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

loginctl suspend doesn't work properly on rootless Xorg. #36183

Closed
aintyourcat opened this issue Mar 17, 2022 · 2 comments
Closed

loginctl suspend doesn't work properly on rootless Xorg. #36183

aintyourcat opened this issue Mar 17, 2022 · 2 comments
Labels

Comments

@aintyourcat
Copy link

System

  • xuname:
    Void 5.15.26_1 x86_64 AuthenticAMD notuptodate rFFF
  • package:
    xorg-server-21.1.3_3

Expected behavior

Laptop goes to sleep immediately when loginctl suspend issued & wake up properly when triggered (e.g a key on the keyboard pressed).

Actual behavior

Laptop still awake for about 30 seconds with a blank screen before goes to sleep, moreover it kills Xorg when woken up.

Services status: global_services.txt, user_services.txt
Xorg's log: Xorg.0.log
xinitrc: xinitrc.txt

Notes:

  1. The laptop is not even goes to sleep when I'm using this xinitrc: https://github.com/aintyourcat/dotfiles/blob/8e17830e68d1a45e367bf0af14d18835b03321c1/x/.config/X11/xinitrc#L19 (The only difference with the previous one is on the specified line).
  2. loginctl suspend works fine on xorg-server installed from the repo, which requires the "needs_root_rights" key set to "yes" in /etc/X11/Xwrapper.config, however when I accidentaly run the same command with the same Xwrapper.config on the manually compiled xorg-server (which makes it's running as root) the issue is persist.
  3. Similar issue i found: https://libredd.it/r/voidlinux/comments/nndnja/xorg_with_elogind_support_breaks_suspend_to_ram/.
  4. My current workaround is to not run loginctl suspend but zzz and config elogind to ignore ACPI events like explained in: https://docs.voidlinux.org/config/power-management.html#elogind

Steps to reproduce the behavior

  1. Install xorg-server with the elogind build option enabled via xbps-src.
  2. Verify it: xbps-query -p build-options xorg-server.
  3. Make sure that:
    • The "needs_root_rights" key equals to "no" in /etc/X11/Xwrapper.config.
    • The dbus & elogind services is running.
  4. Start Xorg, in my case via startx.
  5. Make sure the user which Xorg is running as isn't root: ps -o user $(pgrep Xorg).
  6. Run loginctl suspend.
@ghost
Copy link

ghost commented Apr 24, 2022

it also crashing sway on laptop while lid's events
and seatd working perfectly fine

@github-actions
Copy link

Issues become stale 90 days after last activity and are closed 14 days after that. If this issue is still relevant bump it or assign it.

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

No branches or pull requests

1 participant