New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sddm-helper fails to take control of TTY #1456
Comments
I have the same issue. Here is my
I'm also on Arch Linux and using the sddm-git AUR package. Here is the build script. I tried to gather some relevant information. Hopefully those are useful:
Also, from
Above all, it looks like sddm-helper-start-x11user for user sddm (pid 4825), who owns This looks like a regression from #1449, which makes Xorg for the user reuse the same VT as SDDM. |
I've been looking into the issue, it does regress on some important cases when autologging in, but maybe it's something you could try and see if it helps on your case. This branch should end up getting merged eventually as there's some other important fixes. |
With branch work/polishing, login works again! As a record, I don't use auto login. |
Can confirm, on that branch the issue appears to be fixed; no more of the error logs and successful logins. thanks! |
Yes, as you can see, it has a big FIXME there that needs sorting out first. Thank you for the testing. |
Please make sure you're using #1460, as it's one of the things it addresses. |
Yes, I'm using commit 5e1a573. By the way, I noticed that with
As shown in the strace log, sddm-helper kills sddm-helper-start-x11user with SIGTERM, while Xorg is not killed. If I copied the logic for handling SIGTERM from sddm-helper to sddm-helper-start-x11user, Xorg is properly killed when sddm.service is stopped or repeated logging in/out. diff --git a/src/helper/HelperStartX11User.cpp b/src/helper/HelperStartX11User.cpp
index 768b2a9..2c78da5 100644
--- a/src/helper/HelperStartX11User.cpp
+++ b/src/helper/HelperStartX11User.cpp
@@ -24,6 +24,7 @@
*/
#include <unistd.h>
+#include <signal.h>
#include <QCoreApplication>
#include <QTextStream>
#include <QProcess>
@@ -31,12 +32,22 @@
#include "xorguserhelper.h"
#include "MessageHandler.h"
+// ensure we exit gracefully and close the session if sigtermed (i.e restarting sddm)
+static void sigtermHandler(int signalNumber)
+{
+ Q_UNUSED(signalNumber)
+ if (qApp) {
+ qApp->exit(-1);
+ }
+}
+
void X11UserHelperMessageHandler(QtMsgType type, const QMessageLogContext &context, const QString &msg) {
SDDM::messageHandler(type, context, QStringLiteral("X11UserHelper: "), msg);
}
int main(int argc, char** argv)
{
+ signal(SIGTERM, sigtermHandler);
qInstallMessageHandler(X11UserHelperMessageHandler);
Q_ASSERT(::getuid() != 0);
QCoreApplication app(argc, argv); |
I don't think this is fixed. Just tried out the newest HEAD on develop, f07f7e0 and sddm didn't manage to start sway. Instead of the old behaviour of seemingly crashing and returning me to sddm, sddm just hangs now.
Notably, it seems that it still fails to take control of the TTY, but now also the sddm-helper process launching weston appears to crash. |
Reverting to f07f7e0 works, with the following log
|
Can you try this one? #1478 |
Does not seem to help:
|
I got a similar problem, but not exactly the same.
|
This behaviour is still occuring on Wayland, using the latest develop.
|
Since rebooting my PC today SDDM doesn't seem to successfully start sway or i3. I login, the greeter window disappears for a brief moment, and then it reappears.
I'm using the AUR
sddm-git
package, so I'm on latestdevelop
, i.e. c7e8a9f, and using Wayland. The theme is not of importance, I've tried without the theme, with the same result.SDDM Configuration
Logs
Note the
Failed to take control of /dev/tty7: Operation not permitted
, which seems to be the underlying issue. I somewhat suspect that its related to the privilege dropping code, but that's purely a guess.The text was updated successfully, but these errors were encountered: