Score:0

Unable to suspend with lid action

pr flag

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.
ar flag
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).
Aryan Raj avatar
pr flag
@user68186 `sudo systemctl suspend` works fine
nobody avatar
gh flag
`ps aux | grep power` please.
Aryan Raj avatar
pr flag
@nobody updated the output of `ps aux | grep power` in qestion
nobody avatar
gh flag
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.
Aryan Raj avatar
pr flag
@nobody update in the question
ar flag
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).
Aryan Raj avatar
pr flag
@user68186 how much of a change is it because of power management software?
ar flag
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.
nobody avatar
gh flag
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
Aryan Raj avatar
pr flag
@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
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.