elogind / elogind

The systemd project's "logind", extracted to a standalone package
GNU General Public License v2.0
303 stars 47 forks source link

Unlock session signal not sent #176

Closed travankor closed 1 year ago

travankor commented 3 years ago

Logind's D-bus unlock signal doesn't seem to work. Interestingly, the lock signal works as expected.

To reproduce with swayidle, swayidle -dw unlock 'zenity --info' and then loginctl lock-session. Unlocking the session does not trigger the hook.

Yamakuzure commented 3 years ago

Just tried it with Plasma.

Are you sure that swaylock would listen to the unlock signal?

However, I have no Sway installed right now, but it doesn't seem to be too big, so I'll give it a try.

travankor commented 3 years ago

Ok, so the loginctl unlock-session command seems to work (triggers the "unlock" hook), but this hook isn't triggered after succesfully unlocking a session (solving a lock screen). However, loginctl unlock-session doesn't actually unlock the session (it just runs the hook while the screen remains locked).

In contrast, there is an "after-resume" hook that triggers succesfully after resuming from suspend.

travankor commented 3 years ago

Are you sure that swaylock would listen to the unlock signal?

Does the screen locker have to have this built in because I don't think it does listen. swayidle is the only daemon listening and responding to sd_bus.

travankor commented 3 years ago

Assuming the problem is that there is no built in logind support in any wlroots screenlocker, then this could be solved by adding loginctl unlock-sessionto screenlocker.sh.

Yamakuzure commented 3 years ago

I have installed Sway, which, in contrast to Plasma, allows me to use my external Monitor via Wayland, but have only an empty screen with a mouse curser and nothing to do. Looking at https://wiki.gentoo.org/wiki/Sway I realize that setting up Sway is far from being trivial. But I like the idea of a Wayland WM that is actually able to power my external Monitor, so I will invest the time to configure it. ...but not today...

travankor commented 3 years ago

Tangentially, wayfire should be similar to sway, except with less configuration. They both use the same compositor library and share the same wayland protocol extensions.

travankor commented 3 years ago

[...] then this could be solved by adding loginctl unlock-session to screenlocker.sh.

No, this didn't fix it.

Yamakuzure commented 3 years ago

Currently I can't seem to get either to work. However, I'll start a new trial tomorrow morning, then with greetd using tuigreet.

Yamakuzure commented 3 years ago

Now I know why I haven't seen anything when starting wayfire or sway via SDDM. Using greetd I had a brief glimpse of an error message saying that the proprietary NVIDIA driver is not supported.

GNOME and KDE utilize EGLStreams, so they can run using Wayland on NVIDIA, but others are fixed on GBM. (*)

Why that stupid thing then breaks off instead of just using the Integrated Intel HD is beyond me. But I guess I have to stop all nvidia system services and to blackist all nvidia modules.

That is a bit much for doing it "just like that" only to try to reproduce a problem that may not be on our side anyway. But the next two weeks, from next Saturday on, I am on vacation. I'll have my laptop with me and no pressure from office, so I can try this out.

(*) Nouveau is no option for me until NVIDIA have finished their GBM replacement in Nouveau and Mesa. See: https://xdc2019.x.org/event/5/contributions/335/attachments/426/677/Generic_Allocator_in_Nouveau.pdf However, there doesn't seem to have been much action since the 2019 convention, but maybe behind the scenes.

travankor commented 3 years ago

You could either disable the nvidia gpu in the uefi, or you could set WLR_DRM_DEVICES=/dev/dri/ to the right card.

Also seems like it's under the FAQ: https://github.com/swaywm/sway/wiki#i-have-a-multi-gpu-setup-like-intelnvidia-or-intelamd-and-sway-does-not-start

Yamakuzure commented 3 years ago

You could either disable the nvidia gpu in the uefi, or you could set WLR_DRM_DEVICES=/dev/dri/ to the right card. Also seems like it's under the FAQ: https://github.com/swaywm/sway/wiki#i-have-a-multi-gpu-setup-like-intelnvidia-or-intelamd-and-sway-does-not-start

WLR_DRM_DEVICES seems to be the right way to go. Unfortunately, without the nvidia card, my external monitor will remain dark. Unfortunately I have to defer this until at least v246-rc3...

Yamakuzure commented 1 year ago

Is this still an issue with elogind 246.10 or 252?

Yamakuzure commented 1 year ago

Closing this due to inactivity. If this is still an issue, please feel free to re-open.

hamzashahid-blit commented 1 year ago

Yes, I am facing the same issue.