Thanks very much for this tip, caprea.
[UNSOLVABLE] Suspend by closing lid
-
- Posts: 144
- Joined: Mon Dec 10, 2018 1:50 pm
Re: Suspend by closing lid
In my last reply I said it worked, which is true, but only after the 1st time I uncommented the settingcaprea wrote: ↑Mon Mar 04, 2019 9:43 amNo, you can edit the file /etc/default/acpi-supportCode: Select all
since suspension by closing the lid cannot be set as such in any of antiX's configurations. Right?
and change it to your needs.
Look at it, it's well documented.
Code: Select all
LID_SLEEP=true
What could cause that?
Re: Suspend by closing lid
OK,there's another way to try. I once had to do this on a stubborn laptop.Sounds complicated but is easy to do with terminal and rox-filer, if you go step by step.
Create a folder in etc/acpi called actions with
In this folder create a file called lid.sh
In this file (etc/acpi/actions/lid.sh) paste the following script
Make the script executable with
Then change by editing as root the file etc/acpi/events/lidbtn to this
Reboot and try.
Create a folder in etc/acpi called actions with
Code: Select all
sudo mkdir -p /etc/acpi/actions
In this file (etc/acpi/actions/lid.sh) paste the following script
Code: Select all
#!/bin/bash
echo "$1" | grep -q open /proc/acpi/button/lid/LID0/state && exit 0
sleep 2
/usr/sbin/pm-suspend
Code: Select all
sudo chmod +x /etc/acpi/actions/lid.sh
Code: Select all
# /etc/acpi/events/lidbtn
# Called when the user closes or opens the lid
#old
#event=button[ /]lid
#action=/etc/acpi/lid.sh
#new
event=button/lid
action=/etc/acpi/actions/lid.sh %e
-
- Posts: 144
- Joined: Mon Dec 10, 2018 1:50 pm
Re: Suspend by closing lid
@Caprea: many thanks for these step-by-step instructions, which is just what I need as a newbie.
Nevertheless, I got stuck:
I tried to open the folder by doing this:
hoping that I could then create a file with Geany.
But when Geany opens I see a number of tabs open, among which the only acpi tab is acpi-support.
So, clearly this is not the right way, hence my question about creating a file.
And the 2nd hurdle:
If not, how do I open the file?
Nevertheless, I got stuck:
Donecaprea wrote: ↑Tue Mar 05, 2019 6:24 pm Create a folder in etc/acpi called actions with
Code: Select all
sudo mkdir -p /etc/acpi/actions
How do I do that?
I tried to open the folder by doing this:
Code: Select all
sudo geany /etc/acpi/actions
But when Geany opens I see a number of tabs open, among which the only acpi tab is acpi-support.
So, clearly this is not the right way, hence my question about creating a file.
And the 2nd hurdle:
Will the file still be open from the previous step?
If not, how do I open the file?
Re: Suspend by closing lid
Like always there are different ways to do that.To avoid to get lost in explanations which possibilities spacefm or rox-filer offer, we stay at the terminal because it is probably the easiest at the moment.
Create the folder actions
You already did that
Create the file lid.sh
Open the empty file with leafpad
In this empty file copy and paste this script
Close and save
Make the script executable with
Now open with leafpad the file etc/acpi/events/lidbtn
and change the content to this
Close and save
Reboot and try, good luck.
Side note: The number of tabs you see when you open geany , are tabs that you have already opened before, if you don't need them anymore you should close them to avoid confusion.
Create the folder actions
Code: Select all
sudo mkdir -p /etc/acpi/actions
Create the file lid.sh
Code: Select all
sudo touch /etc/acpi/actions/lid.sh
Open the empty file with leafpad
Code: Select all
sudo leafpad /etc/acpi/actions/lid.sh
Code: Select all
#!/bin/bash
echo "$1" | grep -q open /proc/acpi/button/lid/LID0/state && exit 0
sleep 2
/usr/sbin/pm-suspend
Make the script executable with
Code: Select all
sudo chmod +x /etc/acpi/actions/lid.sh
Code: Select all
sudo leafpad /etc/acpi/events/lidbtn
Code: Select all
# /etc/acpi/events/lidbtn
# Called when the user closes or opens the lid
#old
#event=button[ /]lid
#action=/etc/acpi/lid.sh
#new
event=button/lid
action=/etc/acpi/actions/lid.sh %e
Reboot and try, good luck.
Side note: The number of tabs you see when you open geany , are tabs that you have already opened before, if you don't need them anymore you should close them to avoid confusion.
-
- Posts: 144
- Joined: Mon Dec 10, 2018 1:50 pm
Re: Suspend by closing lid
@Caprea: Thanks for your patience and help.
Unfortunately this did not do the trick either. Maybe my computer is such that this simply cannot be implemented.
For example, I managed to get the sound volume fixed (with help on this forum, of course), but when I made the "connection" with the 3 volumes buttons on my keyboard (vol+, vol-, mute), it blocked typing on certain website, and interfered with other things. So I undid the connection and accepted to have to adjust the volume with the volume tray icon.
It seems to me we'll have to leave it at this.
I assume I don't need to undo anything.
Unfortunately this did not do the trick either. Maybe my computer is such that this simply cannot be implemented.
For example, I managed to get the sound volume fixed (with help on this forum, of course), but when I made the "connection" with the 3 volumes buttons on my keyboard (vol+, vol-, mute), it blocked typing on certain website, and interfered with other things. So I undid the connection and accepted to have to adjust the volume with the volume tray icon.
It seems to me we'll have to leave it at this.
I assume I don't need to undo anything.
Re: [UNSOLVABLE] Suspend by closing lid
Too bad it didn't work out.
Do you have the problem with the volumes buttons on your keyboard also on other linux eg. MX ?
If you like to revert the changes
open with leafpad the file etc/acpi/events/lidbtn
and revert it to the old content
This is normally enough, you can also delete the created folder /etc/acpi/actions
Do you have the problem with the volumes buttons on your keyboard also on other linux eg. MX ?
If you like to revert the changes
open with leafpad the file etc/acpi/events/lidbtn
Code: Select all
sudo leafpad /etc/acpi/events/lidbtn
Code: Select all
# /etc/acpi/events/lidbtn
# Called when the user closes or opens the lid
#old
event=button[ /]lid
action=/etc/acpi/lid.sh
Code: Select all
sudo remove /etc/acpi/actions
-
- Posts: 144
- Joined: Mon Dec 10, 2018 1:50 pm
Re: [UNSOLVABLE] Suspend by closing lid
Yes, but such is life.
I don't have MX installed; the only other Linux I have installed is Mint, and it is on a Lenovo laptop too and the keyboard volume buttons work fine, I did not even have to make an adjustment in the software.
As for the antiX changes, I assume it is alright to leave them as is because if it would worked I would not have reverted either. Correct?