LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   PC Immediately Wakes Up After Suspend After Replacing Button Battery (https://www.linuxquestions.org/questions/linux-software-2/pc-immediately-wakes-up-after-suspend-after-replacing-button-battery-4175708685/)

larrymeditates 02-27-2022 03:55 PM

PC Immediately Wakes Up After Suspend After Replacing Button Battery
 
1 Attachment(s)
I replaced the CMOS battery on my Dell Optiplex motherboard yesterday and now the PC wakes up immediately after I try to put it in suspend. My OS is Ubuntu 20.04.4LTS

I used the following command to find out what is inhibiting suspend mode: systemd-inhibit --list --mode=block

The inhibitor is shown in the attached screenshot below. Can you tell me how to disable this inhibitor?

Thank you!

camorri 02-28-2022 08:28 AM

Did you go into the BIOS after installing the new battery and validate the BIOS setting are correct; including the hardware time of day clock?

Systems do strange things with wrong TOD clock settings.

larrymeditates 02-28-2022 09:00 PM

Time Reset in Bios but Suspend still not working
 
I checked bios and reset the time but suspend still isn't working.

larrymeditates 02-28-2022 11:46 PM

Screenshots of Output After Attempting Sleep Mode
 
3 Attachment(s)
A user at Stackexchange suggested a command showing the output after attempting a failed suspend. I've attached the screenshots below. I had difficulty showing everything. Can you tell me what is blocking my PC from going into suspend? Thanks.

ondoho 03-01-2022 01:51 AM

^ Please can you simply copy-paste the text here? I haver difficulty reading this.
Assuming the problematic behavior occured less than 5min ago, try
Code:

sudo journalctl --since "-5 minutes" > journal.txt
Then paste the content of journal.txt here (in CODE tags, see my signature), or upload it to a pastebin.

Quote:

Originally Posted by larrymeditates (Post 6333725)
I used the following command to find out what is inhibiting suspend mode: systemd-inhibit --list --mode=block

The inhibitor is shown in the attached screenshot below. Can you tell me how to disable this inhibitor?

It does not look like this inhibitor is actually keeping your system from suspending.

larrymeditates 03-01-2022 11:11 PM

Terminal Output
 
The output was too long to paste in this post (60,002 characters) so I pasted a copy in pastebin: https://pastebin.com/gmGXbKzg

I haven't done this before so I'm hoping you can access it. Thanks.

ondoho 03-04-2022 01:17 AM

It looks like your machine simply wakes 5s up after you put it to sleep without any obvious error.

Sounds familiar... a quick web search yields some interesting results:
https://askubuntu.com/questions/1303...-after-suspend
https://forums.linuxmint.com/viewtopic.php?t=313164
https://www.reddit.com/r/linuxquesti...epsuspend_due/

HTH

larrymeditates 03-06-2022 11:51 AM

Found a temporary solution
 
This post helped:
https://askubuntu.com/questions/5982...conds-of-sleep

As a temporary solution I'm using echo EHC1 | sudo tee /proc/acpi/wakeup

but I have to keep the terminal open for suspend to work.

I wasn't able to determine how to make this permanent.

Can you tell me how? Thanks.

ondoho 03-08-2022 01:04 AM

Quote:

Originally Posted by larrymeditates (Post 6335654)
This post helped:
https://askubuntu.com/questions/5982...conds-of-sleep

As a temporary solution I'm using echo EHC1 | sudo tee /proc/acpi/wakeup

but I have to keep the terminal open for suspend to work.

I wasn't able to determine how to make this permanent.

Can you tell me how? Thanks.

Terminal open? That seems unlikely.

Why did you choose a 7 year old solution instead of one of the links I posted?

larrymeditates 03-08-2022 11:08 PM

So it looks like the culprit is EHC1 but I don't want to have to open a terminal and enter the command each time so I can put my PC in suspend. In the posting I mentioned, it said that you can add this to your /etc/rc.local to make the change permanent. Do you know how to do that? Thanks.

ondoho 03-08-2022 11:23 PM

Quote:

Originally Posted by larrymeditates (Post 6336427)
In the posting I mentioned, it said that you can add this to your /etc/rc.local to make the change permanent. Do you know how to do that?

On Ubuntu? Might work to simply add the line there (no sudo), but you'll be better off making a systemd service.
Is it enough to issue that command once after every boot?


All times are GMT -5. The time now is 07:28 PM.