0

I recently upgraded to ubuntu 22.10, before the upgrade everything was working fine but after upgrading, my laptop doesn't suspend as it should on lid close action

HandleLidSwitch=suspend
HandleLidSwitchExternalPower=suspend
HandleLidSwitchDocked=ignore
SuspendKeyIgnoreInhibited=yes
LidSwitchIgnoreInhibited=yes

I uncommented above from /etc/systemd/logind.conf but still no effect, I also installed tweaks and used it to suspend on lid close but no luck[uninstalled afterwards].

Result of systemd-inhibit

WHO                          UID  USER  PID  COMM            WHAT                                                     WHY                                                       MODE 
ModemManager                 0    root  876  ModemManager    sleep                                                    ModemManager needs to reset devices                       delay
NetworkManager               0    root  872  NetworkManager  sleep                                                    NetworkManager needs to turn off networks                 delay
UPower                       0    root  1254 upowerd         sleep                                                    Pause device polling                                      delay
Unattended Upgrades Shutdown 0    root  977  unattended-upgr shutdown                                                 Stop ongoing upgrades or perform upgrades before shutdown delay
GNOME Shell                  1000 aryan 2949 gnome-shell     sleep                                                    GNOME needs to lock the screen                            delay
aryan                        1000 aryan 3158 gsd-media-keys  handle-power-key:handle-suspend-key:handle-hibernate-key GNOME handling keypresses                                 block
aryan                        1000 aryan 3158 gsd-media-keys  sleep                                                    GNOME handling keypresses                                 delay
aryan                        1000 aryan 3166 gsd-power       sleep                                                    GNOME needs to lock the screen                            delay

I have tried various other methods already but none of them working for me

  • Suspend itself works fine with sudo systemctl suspend

/Edit/

Output of ps aux | grep power

root         747  0.0  0.0 239440  7472 ?        Ssl  17:22   0:00 /usr/libexec/power-profiles-daemon
root        1018  0.0  0.0 236408  6948 ?        Ssl  17:22   0:00 /usr/libexec/upowerd
aryan       3870  0.0  0.2 525428 27484 ?        Ssl  17:23   0:00 /usr/libexec/gsd-power
aryan       6490  0.0  0.0   9056  2236 pts/1    S+   17:26   0:00 grep --color=auto power

/Edit 2/

Result of journalctl --unit=systemd-logind --follow with lid close

Oct 30 17:49:17 aryan-VivoBook-ASUSLaptop-X571GT-F571GT systemd-logind[836]: New seat seat0.
Oct 30 17:49:17 aryan-VivoBook-ASUSLaptop-X571GT-F571GT systemd-logind[836]: Watching system buttons on /dev/input/event2 (Power Button)
Oct 30 17:49:17 aryan-VivoBook-ASUSLaptop-X571GT-F571GT systemd-logind[836]: Watching system buttons on /dev/input/event0 (Power Button)
Oct 30 17:49:17 aryan-VivoBook-ASUSLaptop-X571GT-F571GT systemd-logind[836]: Watching system buttons on /dev/input/event1 (Lid Switch)
Oct 30 17:49:17 aryan-VivoBook-ASUSLaptop-X571GT-F571GT systemd-logind[836]: Watching system buttons on /dev/input/event3 (AT Translated Set 2 keyboard)
Oct 30 17:49:17 aryan-VivoBook-ASUSLaptop-X571GT-F571GT systemd[1]: Started User Login Management.
Oct 30 17:49:18 aryan-VivoBook-ASUSLaptop-X571GT-F571GT systemd-logind[836]: New session c1 of user gdm.
Oct 30 17:49:28 aryan-VivoBook-ASUSLaptop-X571GT-F571GT systemd-logind[836]: New session 3 of user aryan.
Oct 30 17:49:38 aryan-VivoBook-ASUSLaptop-X571GT-F571GT systemd-logind[836]: Session c1 logged out. Waiting for processes to exit.
Oct 30 17:49:38 aryan-VivoBook-ASUSLaptop-X571GT-F571GT systemd-logind[836]: Removed session c1.
Aryan Raj
  • 1
  • 2
  • Open a terminal and enter `sudo systemctl suspend`. If you get any error messages copy and [paste the output of this command in your question](https://askubuntu.com/posts/1437537/edit). If it works, [add that information in your question](https://askubuntu.com/posts/1437537/edit). – user68186 Oct 26 '22 at 19:12
  • @user68186 `sudo systemctl suspend` works fine – Aryan Raj Oct 27 '22 at 03:08
  • 1
    `ps aux | grep power` please. – nobody Oct 27 '22 at 10:03
  • @nobody updated the output of `ps aux | grep power` in qestion – Aryan Raj Oct 28 '22 at 11:59
  • Oh something new for me gsd-media-keys part. close the lid and then check `journalctl --unit=systemd-logind --follow` maybe this will enlight us. – nobody Oct 28 '22 at 13:27
  • @nobody update in the question – Aryan Raj Oct 30 '22 at 12:33
  • This may be a bug. Bugs are off topic here. Please report it using [How do I report a bug?](https://askubuntu.com/questions/5121/how-do-i-report-a-bug). Also see [Ubuntu help on this subject](https://help.ubuntu.com/stable/ubuntu-help/report-ubuntu-bug.html.en). – user68186 Oct 31 '22 at 18:32
  • @user68186 how much of a change is it because of power management software? – Aryan Raj Nov 01 '22 at 19:25
  • I have no idea if it is the power management or something else in the kernel. My guess is, it is a bug in the kernel. I may be wrong. – user68186 Nov 01 '22 at 19:30
  • Is package gnome-power-manager installed? I think the problem is the plugin `gsd-media-keys` from gnome-daemon. Maybe this works in ubuntu too to deactivate this plugin https://forum.zorin.com/t/how-to-disable-media-keys/15104 – nobody Nov 20 '22 at 08:32
  • @nobody I guess issue lies with gsd-media-keys plugin, dconf-editor shows value [''] in various fields. Though it is completely unexplored territory for me. should i remove the plugin entirely? or purge gnome-power-manager and reinstall – Aryan Raj Nov 21 '22 at 10:07

0 Answers0