Skip to content
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

Respond to SecureAttentionKey events from logind (once the MR for logind is merged #1922

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

n3rdopolis
Copy link
Contributor

This depends on systemd/systemd#29542 not merged yet, subject to change

The first commit fixes an issue where the greeter hangs if SwitchToGreeter double fires.
Something that if the systemd MR is merged will be easier for users to accidentally trigger, at least with logind, as it is possible to hit Ctrl+Alt+Shift+Esc or whatever the final sequence is, when the greeter is active

dbus-send --system --type=method_call --print-reply --dest=org.freedesktop.DisplayManager $XDG_SEAT_PATH org.freedesktop.DisplayManager.Seat.SwitchToGreeter
sleep 5
dbus-send --system --type=method_call --print-reply --dest=org.freedesktop.DisplayManager $XDG_SEAT_PATH org.freedesktop.DisplayManager.Seat.SwitchToGreeter

src/daemon/SeatManager.cpp Outdated Show resolved Hide resolved
src/daemon/Seat.cpp Outdated Show resolved Hide resolved
@Vogtinator
Copy link
Contributor

The first commit fixes an issue where the greeter hangs if SwitchToGreeter double fires.

Why does it hang? Technically it should work to have multiple greeters on the same seat simultaneously, even though it does not make sense.

@n3rdopolis
Copy link
Contributor Author

The first commit fixes an issue where the greeter hangs if SwitchToGreeter double fires.

Why does it hang? Technically it should work to have multiple greeters on the same seat simultaneously, even though it does not make sense.

If it helps, it's when I am using xorg-user as the greeter. I have not tested on my multiseat vm yet so it's only seat0 that I saw this

I am not sure why it hangs, it only hangs if you try to activate the greeter again when the greeter is active.
If the greeter is running, but not the active session it's OK

It seems to be something to do with the xserver itself or something? Because it's seems to be the display server that acts up, it doesn't respond to Ctrl+Alt+Fx either...

@Vogtinator
Copy link
Contributor

The first commit fixes an issue where the greeter hangs if SwitchToGreeter double fires.

Why does it hang? Technically it should work to have multiple greeters on the same seat simultaneously, even though it does not make sense.

If it helps, it's when I am using xorg-user as the greeter. I have not tested on my multiseat vm yet so it's only seat0 that I saw this

I am not sure why it hangs, it only hangs if you try to activate the greeter again when the greeter is active. If the greeter is running, but not the active session it's OK

It seems to be something to do with the xserver itself or something? Because it's seems to be the display server that acts up, it doesn't respond to Ctrl+Alt+Fx either...

Maybe a deadlock during VT switch?

@n3rdopolis
Copy link
Contributor Author

The first commit fixes an issue where the greeter hangs if SwitchToGreeter double fires.

Why does it hang? Technically it should work to have multiple greeters on the same seat simultaneously, even though it does not make sense.

If it helps, it's when I am using xorg-user as the greeter. I have not tested on my multiseat vm yet so it's only seat0 that I saw this
I am not sure why it hangs, it only hangs if you try to activate the greeter again when the greeter is active. If the greeter is running, but not the active session it's OK
It seems to be something to do with the xserver itself or something? Because it's seems to be the display server that acts up, it doesn't respond to Ctrl+Alt+Fx either...

Maybe a deadlock during VT switch?

Could be, or it could be it trying to restart the greeter/server incompletely or something

If I try to vt switch away from the greeter vt and back to it, it still seems to deadlock (This is with QEMU's virtual serial console that I am able to run the chvt commands)

It could also be an older xserver.... or just this VM

Are you able to replicate with x11-user and these sets of commands

dbus-send --system --type=method_call --print-reply --dest=org.freedesktop.DisplayManager $XDG_SEAT_PATH org.freedesktop.DisplayManager.Seat.SwitchToGreeter
sleep 5
dbus-send --system --type=method_call --print-reply --dest=org.freedesktop.DisplayManager $XDG_SEAT_PATH org.freedesktop.DisplayManager.Seat.SwitchToGreeter

by chance?

@n3rdopolis
Copy link
Contributor Author

Testing on a clean Kubuntu 24.04 ISO, with that set of commands to double-fire SwitchToGreeter, and well it seems that instead of hanging, it is starting the greeter twice, first on tty1, then on tty3,

It defaults to running Xorg as root, and not x11-user, it seems like that this is the issue, it is trying another instance, it just was starting multiple greeters before, and maybe x11-user is different, and is stepping on the first instance, maybe that explains the hang

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants