[SOLVED] unwanted systemstart when opening lid
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
[SOLVED] unwanted systemstart when opening lid
Hey!
I was surprised that after installing Mint 20.1 it does not seem to offer hibernation as an option.
However, with some help I managed to get hibernation working.
My Problem: When I put my notebook to hibernation it always automatically starts the system again when opening the lid. Even if the lid is just moved the tiniest bit, the system starts.
I don't want that. I don't find it useful and it can easily happen accidentally when transporting the notebook - and then it discharges the battery for no reason.
In the energy settings I found an easy way to tell the system, not to do anything when the lid is closed. But there seems to be no way to tell the system, not to do anything when it is opened.
Does anyone know a way?
I was surprised that after installing Mint 20.1 it does not seem to offer hibernation as an option.
However, with some help I managed to get hibernation working.
My Problem: When I put my notebook to hibernation it always automatically starts the system again when opening the lid. Even if the lid is just moved the tiniest bit, the system starts.
I don't want that. I don't find it useful and it can easily happen accidentally when transporting the notebook - and then it discharges the battery for no reason.
In the energy settings I found an easy way to tell the system, not to do anything when the lid is closed. But there seems to be no way to tell the system, not to do anything when it is opened.
Does anyone know a way?
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Re: unwanted systemstart when opening lid
You can find the wakeup device with acpitool
This will show wakeup capable devices:
This will toggle wakeup capable device x (note capital W) :
example:
After each reboot you need to repeat
sudo apt install acpitool
This will show wakeup capable devices:
Code: Select all
acpitool -w
Code: Select all
sudo acpitool -W x
Code: Select all
acpitool -w
Device S-state Status Sysfs node
---------------------------------------
1. SBAZ S4 *disabled pci:0000:00:14.2
------
17. LID S3 *enabled platform:PNP0C0D:00
sudo acpitool -W 17
Changed status for wakeup device #17 (LID)
sudo acpitool -W x
command or to implement boot script or service.-=t42=-
Re: unwanted systemstart when opening lid
Wow, that works so far! Very cool! Thanks a lot!
If I understand you right, there is a way to make this permanent!?
How does it work to implement a boot script or service?
If I understand you right, there is a way to make this permanent!?
How does it work to implement a boot script or service?
Re: unwanted systemstart when opening lid
Hot to create a service
Create a text file usb-wakeup.service here:
example:
Change expressions inside double-quotes (here it is UHC7) to what is needed and save the file.
Then execute terminal commands
reboot
Create a text file usb-wakeup.service here:
/etc/systemd/system/usb-wakeup.service
example:
Code: Select all
[Unit]
Description=Disable wakeup events
[Service]
ExecStart=/bin/bash -c "echo UHC7 >> /proc/acpi/wakeup"
Type=oneshot
[Install]
WantedBy=multi-user.target
Then execute terminal commands
Code: Select all
sudo systemctl enable usb-wakeup.service
sudo systemctl start usb-wakeup.service
-=t42=-
Re: unwanted systemstart when opening lid
Change expressions inside double-quotes (here it is UHC7) to what is needed and save the file.
I feel a bit stupid asking this question, but how do I know what is needed?
I have no idea what is supposed to be written there in my case. Where can I find out?
Re: unwanted systemstart when opening lid
Here:
If you have the working command
sudo acpitool -W [number]
use the device name for that number from acpitool -w
command and insert it in this expression "echo [devcie name here] >> /proc/acpi/wakeup
"-=t42=-
Re: unwanted systemstart when opening lid
Aah!! So I knew more than I thought!
The command acpitool -w shows me the following information:
So the device name would judt be LID in my case - right?
The command acpitool -w shows me the following information:
Code: Select all
Device S-state Status Sysfs node
---------------------------------------
1. LID S4 *disabled platform:PNP0C0D:00
2. SLPB S3 *enabled platform:PNP0C0E:00
3. IGBE S4 *enabled pci:0000:00:19.0
4. EXP2 S4 *enabled pci:0000:00:1c.1
5. XHCI S3 *enabled pci:0000:00:14.0
6. EHC1 S3 *enabled pci:0000:00:1d.0
Re: unwanted systemstart when opening lid
I did all that. The effect is indeed that the system does not start when I open the lid.
For some reason now hibernation does not work properly. It is still offered as an option, but it seems to have the same effect as shutting down.
For some reason now hibernation does not work properly. It is still offered as an option, but it seems to have the same effect as shutting down.
Re: unwanted systemstart when opening lid
This might not be connected at all.
I am also having issues with the mint grub. At the moment only the mx grub is working.
I am also having issues with the mint grub. At the moment only the mx grub is working.
Re: unwanted systemstart when opening lid
Are you using the Power button to wake up from hibernation?
Before analyzing other things, make sure the size of a swap file is sufficient. Check it through System Monitor -> Resources or by the
swapon --show
command.
It seems you are back to square oneHowever, with some help I managed to get hibernation working.
-=t42=-
Re: unwanted systemstart when opening lid
Hibernation not working any more was indeed unconnected to creating a service for the lid issue.
I repaired the mint grub and now hibernation works again and all the things connected to opening the lid are exactly the way I wanted them:
I can go to hibernation by choosing it in the menu or by closing the lid. When I open the lid nothing happens. When I press the button the computer wakes up.
So thanks a lot for all the advice!!
(So relieving when things finally just work!)
I repaired the mint grub and now hibernation works again and all the things connected to opening the lid are exactly the way I wanted them:
I can go to hibernation by choosing it in the menu or by closing the lid. When I open the lid nothing happens. When I press the button the computer wakes up.
So thanks a lot for all the advice!!
(So relieving when things finally just work!)