Page 1 of 1
Bookworm Lid action - Debian Dog non-systemd
Posted: Mon May 06, 2024 12:07 pm
by dcung
I have used this in BusterDog and Bullseye - and they works.
viewtopic.php?p=29286#p29286
Today, I try to use it in Bookworm (my latest mklive build 2024-04) - tried on 3 laptops.
Both suspend and poweroff did not 'complete' the process.
On suspend - when lid is closed, it started doing 'suspend' process, but 'incomplete'. Later when you open the lid, it continued the 'suspend' process and goes to 'suspend'.
On poweroff - when lid is closed, it started doing 'poweroff' process, but 'incomplete' too. Later when you open the lid, it continued the 'poweroff' process and then goes off.
Not sure if I explained it clearly.
But on Buster or Bullseye they works as I expected.
On suspend - when lid is closed, goes to sleep. Later when you open the lid, it wakes up.
On poweroff - when lid is closed, goes off. Later when you open the lid, no 'residue' poweroff process.
Re: Bookworm Lid action - Debian Dog non-systemd
Posted: Tue May 07, 2024 6:06 am
by ozsouth
@dcung - would this .pet help?
viewtopic.php?p=109561#p109561
Re: Bookworm Lid action - Debian Dog non-systemd
Posted: Tue May 07, 2024 7:41 pm
by dcung
@ozsouth I read the thread. I haven't tried the .pet yet, since the problem is not laptop won't wake up.
Since noticing this, I have tested on 4 (old) laptops.
On each laptop, I installed fresh frugal of both Bullseye and Bookworm DDOG (mklive build 2024-04).
On each laptop, Bullseye lid action (either suspend/sleep or poweroff/shutdown) works as expected.
Bookworm suspend/sleep slightly different to discribe due to different leds indicator of each laptop, but essentially the same.
Bookworm poweroff/shutdown - they go to 'sleep' instead, and when lid is opened they 'wake up' and 'continue' and goes off. You have to press power button to turn on.
All 4 laptops, shows this - i.e. consistent with their Bullseye lid action (?):
Code: Select all
cat /sys/power/state
freeze mem disk
Probably easier to see it in action if you have Bookworm DDOG than describing in words.
I wonder if only happened to my (old) laptops or elsewhere too? Maybe someone that use Bookworm DDOG can check theirs.
Re: Bookworm Lid action - Debian Dog non-systemd
Posted: Wed May 08, 2024 4:08 pm
by fredx181
@dcung Perhaps the following works for you (as I think, not sure, that you want the laptop to poweroff when lid closed, edit; or/and have choice how to configure, see EDIT below):
- Keep /etc/acpi/events/lid.sh as (I think) you edited it (with commenting "echo -n mem > /sys/power/state" and un-commenting "poweroff")
- In /etc/elogind/logind.conf make it:
HandleLidSwitch=poweroff
Took a while before I thought of editing logind.conf (similar as you did earlier with systemd conf), for me this method works ok on my laptop.
If it still doesn't work, you can try deleting the files lid.sh and lidbtn (they may be not needed, as the logind.conf edit is enough perhaps (things may depend on some things e.g. having a login-manager installed or not)
EDIT: to switch between configuration suspend <> poweroff, it can be done from logind.conf, rather than using acpid I guess, so deleting these files in /etc/acpid/events may be best to avoid conflicts.
Did experiment first by installing package acpi-support and configuring it in /etc/default/acpi-support, but didn't work out well for me to make it poweroff when lid closed (again, maybe because sort-of conflict with elogind configuration ).
Re: Bookworm Lid action - Debian Dog non-systemd <SOLVED>
Posted: Wed May 08, 2024 7:29 pm
by dcung
fredx181 wrote: Wed May 08, 2024 4:08 pm
@dcung Perhaps the following works for you (as I think, not sure, that you want the laptop to poweroff when lid closed,
A while ago, I setup a laptop for a relo who like it to poweroff when lid is closed (Buster/Bullseye). And I was replacing it with Bookworm few days ago. That's when I noticed the issue.
fredx181 wrote: Wed May 08, 2024 4:08 pm
- Keep /etc/acpi/events/lid.sh as (I think) you edited it (with commenting "echo -n mem > /sys/power/state" and un-commenting "poweroff")
- In /etc/elogind/logind.conf make it:
HandleLidSwitch=poweroff
..., for me this method works ok on my laptop.
I tested it (poweroff). Yes, works for me too...
Thank you @fredx181