You are not logged in.

#1 2024-04-03 18:13:44

ORIOLESFan02
Member
Registered: 2024-04-03
Posts: 47

[Solved] Laptop does NOT sleep on lid close

-=-=-=-=- Please look at the underlined section at the very bottom of this post for the solution to the problem. Thank you.-=-=-=-=-

Just a note before I start. I'm not entirely sure how to provide logs (yes, I did read https://bbs.archlinux.org/viewtopic.php?id=57855, but I still don't understand). If anyone would like to help me with providing logs after my dilemma, please feel free to guide me in the right direction. Thank you.

Hello everyone! I'm currently using KDE Plasma 6 on my laptop, which is the Asus ROG Zephyrus G14, and I've recently gone through many re-installs (and I'd probably have to do at least one more to make sure everything but my /home partition is "clean"), but my main thing is that I cannot get my laptop to go to sleep when I close the lid of the machine. It's driving me crazy, so I'm posting here for help.

So far, what I have done is edited /etc/systemd/logind.conf and have these two unmarked (I believe that is the correct term. What I am trying to say is that it doesn't have the # like the others in the config do):

HandleLidSwitch=suspend
HandleLidSwitchExternalPower=suspend

I have already restarted my laptop to make sure that those go into effect (as attempting to restart the logind service or whatever it's called, makes me have to force shutdown my laptop anyways), but I'm not sure what to do next.

I was wondering if anyone could possibly help me figure out why I can't get my laptop to go to sleep. I know there have been posts like this before, and even though I've read them, they didn't make sense or I believe they were incompatible with my current DE/setup.

Thank you!

Edit:
Timeline so far:

April 3rd, 2024, 2:13:44 PM (14:13:44) EDT - Initial Post. Zephyrus G14 Laptop, KDE Plasma 6. Edited logind.conf.

3:56:04 PM (15:56:04) EDT - Mentioned that laptop is able to sleep when clicking the GUI based sleep button in KDE.

6:05:28 PM (18:05:28) EDT - Uploaded redacted log file [https://0x0.st/Xz58.txt] (includes asusd and supergfxd [asusctl and supergfxctl, community provided to help ASUS laptops under Linux])

7:12:30 PM (19:12:30) EDT - Asked to try multi-user.target (https://wiki.archlinux.org/title/System … _boot_into).

7:57:00 PM (19:57:00) EDT - Wrongly did the multi-user.target thing (was not supposed to have KDE running at the time.) [Look at April 4th, 2024, 9:10:17 AM (09:10:17) EDT for more clarification.]


April 4th, 2024, 4:30:52 AM (04:30:52) EDT - Asked if logind.conf was not altered, and asked to blacklist asus_wmi during bootup (via boot loader)

8:09:29 AM (08:09:29) EDT - More conformation on how to blacklist asus_wmi

8:20:12 AM (08:20:12) EDT - Said that asus_wmi will stop most of your function keys from working (to make people aware).

8:34:13 AM (08:34:13) EDT - Asked to capture and utilize an event using acpid. (https://wiki.archlunux.org/title/acpid)

9:10:17 AM (09:10:17) EDT - Asked if KDE wasn't running on another TTY session when using multi-user.target (It was)

2:30:13 PM (14:30:13) EDT - Tried multi-user.target without a KDE session running on another TTY with acpid disabled/uninstalled. Problem still persists.

4:09:30 PM (16:09:30) EDT - Asked to enable acpid again to see how it handles when closing the lid of the laptop

4:22:05 PM (16:22:05) EDT - Claimed that laptop went to sleep after that (On AC power [Plugged In]) Problem still persists on Battery/DC Power.) [multi-user mode]

4:51:33 PM (16:51:33) EDT - Asked if I changed the acpid config (I did not.)

5:33:36 PM (17:33:36) EDT - Reply to look at the configuration of acpid (https://0x0.st/Xi--.txt) [Was the default config]

5:36:16 PM (17:36:16) EDT - Asked if acpid was uninstalled [I said no.]

5:44:54 PM (17:44:54) EDT - Uninstalled acpid and claimed that laptop was going to sleep on AC Power (Charging) [multi-user mode]

5:46:06 PM (17:46:06) & 5:52:23 PM (17:52:23) EDT - Asked if it goes to sleep when I unplug laptop from power. Problem still persists (meaning I said no, it doesn't sleep on DC/Battery power.) [multi-user mode]

6:33:50 PM (18:33:50), 6:41:42 PM (18:41:42), & 6:47:45 PM (18:47:45) EDT - Asked if asusd and supergfxd may impact it, also asked if laptop goes to sleep on KDE. I replied saying I'm not sure if asusd and/or supergfxd had an impact. Also replied saying that laptop doesn't go to sleep on KDE, even when connected to power. Problem still persists [KDE/graphical mode] (AC Power/Charging)


April 5th, 2024 3:23:56 AM (03:23:56) EDT - Asked to disable supergfxd and asusd to see impact. Was also asked to check KDE settings (replied with all were set to sleep when lid is closed for all power modes). Trying to eliminate targets in multi-user mode, and reintroduce them into KDE.

1:26:35 PM (13:26:35) EDT - Cannot disable asusd.service, but can stop it after bootup. (supergfxd disables just fine)

1:39:10 PM (13:39:10) EDT - Replied that laptop seemed to sleep on battery power [multi-user mode] (battery power). Stopped asusd and disabled supergfxd

5:33:05 PM (17:33:05) EDT - Asked to try behavior on KDE.

6:12:23 PM (18:12:23) EDT - Problem still persists [KDE/graphical mode] (battery power)


April 7th, 2024 3:22:54 AM (03:22:54) EDT - Asked to grep logind.conf and logind.conf.d/*.conf for  "IgnoreInhibited" Asked if powerdevil was configured to suspend on lid events. Asked if it was plasma specific. Asked to try different Window Managers (X11 based)

8:13:46 PM (20:13:46) EDT - Showed the grep, said that powerdevil has been configured to suspend on lid events, and wasn't sure if it is plasma specific. Never head of the window managers that were said until this comment. Made an edit to say that the Window Managers provided were X11 based when Plasma was Wayland based starting with Version 6.

8:43:00 PM (20:43:00) EDT - Claimed that laptop now goes to sleep when connected to power underneath KDE [KDE/graphical] (AC Power/Charging). Asusd enabled, supergfxd still disabled.


April 18th, 2024 11:14:23 AM (11:14:23) EDT - SOLVED. I went into multi-user mode, went to ~/.config, and used the mv command to move the powerdevil config away from that folder, and then went back to the graphical user mode, and then I set my powerdevil settings to the way I wanted them, and now it sleeps every time.

Here is a link to the that comment I provided that I believe solved my problem: https://bbs.archlinux.org/viewtopic.php … 3#p2165653

Last edited by ORIOLESFan02 (2024-04-18 15:31:54)

Offline

#2 2024-04-03 19:56:04

ORIOLESFan02
Member
Registered: 2024-04-03
Posts: 47

Re: [Solved] Laptop does NOT sleep on lid close

So far, one thing I have noticed is that sleeping via kde (pressing the meta/super/windows key and then clicking sleep in that menu) and then closing the lid to my laptop works, and then waking my laptop up by lifting the lid open works as well. Seems to just be a problem with just closing the lid to suspend/sleep.

Offline

#3 2024-04-03 20:29:17

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 23,289

Re: [Solved] Laptop does NOT sleep on lid close

Plasma has it's own handler for that, did you configure what should happen with the lid switch event in

kcmshell6 kcm_powerdevilprofilesconfig

?

Other than that please post a journal from a failed sleep attempt

sudo journalctl -b | curl -F 'file=@-' 0x0.st

and post the resulting URL

Offline

#4 2024-04-03 22:05:28

ORIOLESFan02
Member
Registered: 2024-04-03
Posts: 47

Re: [Solved] Laptop does NOT sleep on lid close

V1del wrote:

Plasma has it's own handler for that, did you configure what should happen with the lid switch event in

kcmshell6 kcm_powerdevilprofilesconfig

?

I'm aware. For some reason, it's not following that and I don't know why.


V1del wrote:

Other than that please post a journal from a failed sleep attempt

sudo journalctl -b | curl -F 'file=@-' 0x0.st

and post the resulting URL

https://0x0.st/Xz58.txt

Here you go. Sorry for the late reply, I wanted to redact some information. Hope this helps!

Offline

#5 2024-04-03 22:48:56

ORIOLESFan02
Member
Registered: 2024-04-03
Posts: 47

Re: [Solved] Laptop does NOT sleep on lid close

oh hey look, i can't read. You asked if I configured what happens with the lid switch event. Yes, yes I did.

Offline

#6 2024-04-03 23:12:30

seth
Member
Registered: 2012-09-03
Posts: 58,974

Re: [Solved] Laptop does NOT sleep on lid close

Apr 03 13:42:27 laptop org_kde_powerdevil[1076]: org.kde.powerdevil: Handle button events action could not check for screen configuration
Apr 03 15:42:45 laptop systemd-logind[498]: Lid closed.
Apr 03 15:42:45 laptop kernel: asus_wmi: Unknown key code 0xe9
Apr 03 15:43:48 laptop systemd-logind[498]: Lid opened.

The lid is there and triggers, but KDE doesn't do anything - either for the (spurious secondary) 0xe9 key or the previous warning.
Does this work outside KDE, eg. if you're only booting the multi-user.target and log into a cosole (2nd link below)?

Offline

#7 2024-04-03 23:57:00

ORIOLESFan02
Member
Registered: 2024-04-03
Posts: 47

Re: [Solved] Laptop does NOT sleep on lid close

seth wrote:
Apr 03 13:42:27 laptop org_kde_powerdevil[1076]: org.kde.powerdevil: Handle button events action could not check for screen configuration
Apr 03 15:42:45 laptop systemd-logind[498]: Lid closed.
Apr 03 15:42:45 laptop kernel: asus_wmi: Unknown key code 0xe9
Apr 03 15:43:48 laptop systemd-logind[498]: Lid opened.

The lid is there and triggers, but KDE doesn't do anything - either for the (spurious secondary) 0xe9 key or the previous warning.
Does this work outside KDE, eg. if you're only booting the multi-user.target and log into a cosole (2nd link below)?

I tried the console, it's doing the same thing. I even let it sit as I was eating dinner. Never went to sleep.

Offline

#8 2024-04-04 08:30:52

seth
Member
Registered: 2012-09-03
Posts: 58,974

Re: [Solved] Laptop does NOT sleep on lid close

I even let it sit as I was eating dinner. Never went to sleep.

Errr… you're still closing the LID, are you?
This is w/o plasma started, so the default logind behavior would kick in and you've not altered /etc/systemd/logind.conf ?

What happens if you blacklist asus_wmi, https://wiki.archlinux.org/title/Kernel … and_line_2

Offline

#9 2024-04-04 12:06:17

ORIOLESFan02
Member
Registered: 2024-04-03
Posts: 47

Re: [Solved] Laptop does NOT sleep on lid close

seth wrote:

I even let it sit as I was eating dinner. Never went to sleep.

Errr… you're still closing the LID, are you?

Yeah, I'm closing the lid. I'm not sure how I would do it in the command line.

seth wrote:

This is w/o plasma started, so the default logind behavior would kick in and you've not altered /etc/systemd/logind.conf ?

Well, if you read my first post, I said this:

ORIOLESFan02 wrote:

So far, what I have done is edited /etc/systemd/logind.conf and have these two unmarked (I believe that is the correct term. What I am trying to say is that it doesn't have the # like the others in the config do):

HandleLidSwitch=suspend
HandleLidSwitchExternalPower=suspend

I have already restarted my laptop to make sure that those go into effect (as attempting to restart the logind service or whatever it's called, makes me have to force shutdown my laptop anyways), but I'm not sure what to do next.

So yeah, I did edit it.

seth wrote:

What happens if you blacklist asus_wmi, https://wiki.archlinux.org/title/Kernel … and_line_2

I don't understand how to do this. Yes, I read that part of the URL, but I still don't understand.

Offline

#10 2024-04-04 12:09:29

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 23,289

Re: [Solved] Laptop does NOT sleep on lid close

ORIOLESFan02 wrote:

I don't understand how to do this. Yes, I read that part of the URL, but I still don't understand.

Go to the referenced https://wiki.archlinux.org/title/Kernel_parameters to find out how to adjust kernel parameters for your chosen method of booting and add

module_blacklist=acer_wmi

Offline

#11 2024-04-04 12:20:12

ORIOLESFan02
Member
Registered: 2024-04-03
Posts: 47

Re: [Solved] Laptop does NOT sleep on lid close

V1del wrote:
ORIOLESFan02 wrote:

I don't understand how to do this. Yes, I read that part of the URL, but I still don't understand.

Go to the referenced https://wiki.archlinux.org/title/Kernel_parameters to find out how to adjust kernel parameters for your chosen method of booting and add

module_blacklist=acer_wmi

So, I did that, and I still am experiencing the same problem. Now the function keys on my keyboard to control things like the brightness don't work, although I'd assume this is only temporary, I would like anyone else in the future who try this to know that this may happen to their machine.

Edit: I would also like to point out that you said acer_wmi instead of asus_wmi, but it's a simple mistake. Just adding this to clear some confusion for other people who may have a similar problem.

Last edited by ORIOLESFan02 (2024-04-04 12:25:07)

Offline

#12 2024-04-04 12:34:13

seth
Member
Registered: 2012-09-03
Posts: 58,974

Re: [Solved] Laptop does NOT sleep on lid close

So yeah, I did edit it.

Yes, but to the default behavior. Losing the WMI features is expectable when blocking the wmi module, if you remove the blacklist entry, thing's are gonna be back to normal.
But it's apparently not the unknown key.

Can you capture and utilize the event w/ https://wiki.archlinux.org/title/acpid ?

Offline

#13 2024-04-04 12:54:45

ORIOLESFan02
Member
Registered: 2024-04-03
Posts: 47

Re: [Solved] Laptop does NOT sleep on lid close

seth wrote:

So yeah, I did edit it.

Yes, but to the default behavior. Losing the WMI features is expectable when blocking the wmi module, if you remove the blacklist entry, thing's are gonna be back to normal.
But it's apparently not the unknown key.

Can you capture and utilize the event w/ https://wiki.archlinux.org/title/acpid ?

Do you want me to capture with asus_wmi blocked or no?

Offline

#14 2024-04-04 13:01:58

seth
Member
Registered: 2012-09-03
Posts: 58,974

Re: [Solved] Laptop does NOT sleep on lid close

No, remove the blacklist - this was just to see whether the unknown key event from the module was somehow getting in the way.

Offline

#15 2024-04-04 13:07:02

ORIOLESFan02
Member
Registered: 2024-04-03
Posts: 47

Re: [Solved] Laptop does NOT sleep on lid close

So I'm not entirely sure what you want me to capture. The statement to me is so vague, I'm not sure what to do. I understand this may be frustrating to you (and others), but I would appreciate some more clarification if you wouldn't mind. Thank you.

Offline

#16 2024-04-04 13:10:17

seth
Member
Registered: 2012-09-03
Posts: 58,974

Re: [Solved] Laptop does NOT sleep on lid close

Did you click the wiki link?
acpid is the pre-systemd/(more powerful) alternative to handle things like eg. the lid, there're a couple of examples and the plan is to have apcid do something with the lid and if that works, ultimately suspend the desktop.

When you tried the multi-user.target, you ONLY booted to the multi-user.target? There wasn't a KDE session running on a different TTY?

Offline

#17 2024-04-04 13:19:49

ORIOLESFan02
Member
Registered: 2024-04-03
Posts: 47

Re: [Solved] Laptop does NOT sleep on lid close

seth wrote:

Did you click the wiki link?
acpid is the pre-systemd/(more powerful) alternative to handle things like eg. the lid, there're a couple of examples and the plan is to have apcid do something with the lid and if that works, ultimately suspend the desktop.

I did click the wiki link, but I didn't understand it.
I've also tried acpid before with the lid closing, using a post either from here or stackoverflow, and while it worked for a little bit, it ultimately forced me to force shut down my computer because it would freeze for some reason.

seth wrote:

When you tried the multi-user.target, you ONLY booted to the multi-user.target? There wasn't a KDE session running on a different TTY?

There was a KDE session running on a different TTY. Would you like me to attempt it without the KDE session?

Offline

#18 2024-04-04 13:24:42

seth
Member
Registered: 2012-09-03
Posts: 58,974

Re: [Solved] Laptop does NOT sleep on lid close

Yes, the 2nd link below explains how to boot into a system w/o GUI at all (multi-user.target) and also make sure that acpid isn't (still) enabled/running, because then it'll just suck the event  away and of course nothing else will respond.

Offline

#19 2024-04-04 18:30:13

ORIOLESFan02
Member
Registered: 2024-04-03
Posts: 47

Re: [Solved] Laptop does NOT sleep on lid close

seth wrote:

Yes, the 2nd link below explains how to boot into a system w/o GUI at all (multi-user.target) and also make sure that acpid isn't (still) enabled/running, because then it'll just suck the event  away and of course nothing else will respond.

Just tried it (sorry for the late response, I had things to do), and I'm still experiencing the same problems. Yes, I made sure acpid was disabled and stopped, but that didn't make a difference.

Offline

#20 2024-04-04 20:09:30

seth
Member
Registered: 2012-09-03
Posts: 58,974

Re: [Solved] Laptop does NOT sleep on lid close

Ok, the next step would be to try to have acpid handle the event - the lid closure gets noticed and from the multi-user.target nothing should inhibit it…
Stupid question: you can suspend the system manually "sudo systemctl suspend"?

Offline

#21 2024-04-04 20:22:05

ORIOLESFan02
Member
Registered: 2024-04-03
Posts: 47

Re: [Solved] Laptop does NOT sleep on lid close

seth wrote:

Ok, the next step would be to try to have acpid handle the event - the lid closure gets noticed and from the multi-user.target nothing should inhibit it…
Stupid question: you can suspend the system manually "sudo systemctl suspend"?


Ok, so the laptop goes to sleep (although I do have it plugged in at the moment, but with the acpid enabled and started, even the function key to sleep the laptop worked. I forgot to mention that before.) when the lid is closed now. And yes, I can do sudo systemctl suspend. That works fine.

Offline

#22 2024-04-04 20:51:33

seth
Member
Registered: 2012-09-03
Posts: 58,974

Re: [Solved] Laptop does NOT sleep on lid close

What does your acpid config look like?
If you completely remove acpid (make sure to preserve your scripts/config!), do things still work as expected?

Offline

#23 2024-04-04 21:02:22

ORIOLESFan02
Member
Registered: 2024-04-03
Posts: 47

Re: [Solved] Laptop does NOT sleep on lid close

seth wrote:

What does your acpid config look like?
If you completely remove acpid (make sure to preserve your scripts/config!), do things still work as expected?

I never changed the config.
Disabling acpid and restarting my laptop, closing the lid doesn't make it go to sleep.

Offline

#24 2024-04-04 21:12:54

seth
Member
Registered: 2012-09-03
Posts: 58,974

Re: [Solved] Laptop does NOT sleep on lid close

The default implementation just logs the events, there's no way a plain acpid from the arch repos is suspending the system for you.

Offline

#25 2024-04-04 21:27:17

ORIOLESFan02
Member
Registered: 2024-04-03
Posts: 47

Re: [Solved] Laptop does NOT sleep on lid close

seth wrote:

The default implementation just logs the events, there's no way a plain acpid from the arch repos is suspending the system for you.


I'm telling you that I didn't change anything. You don't have to believe me, but that's what happened.

Offline

Board footer

Powered by FluxBB