LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 11-30-2022, 10:05 PM   #1
llewellen
Member
 
Registered: Oct 2016
Location: Vancouver Island, Canada
Distribution: Crunchbang++ Openbox
Posts: 401

Rep: Reputation: Disabled
Disable Suspend-Hibernate - How?


Dell Inspiron 7370 running Crunchbang++ (Deb 11.1 upgraded) with Openbox

After about 5 minutes of no keyboard activity my system goes into suspend or hibernate (can't tell which) and I cannot find any means to restore it. I have to hard shut down and boot again.

However, if I select Exit from the OB menu I get what I believe is the lightdm shut down window, from which I can select the "Suspend" option. I am then able to restore by touching any key which brings up a login prompt from XScreenSaver and all is well.

Debian Wiki advises this means to disable suspend and hiberate which I have implemented - to no effect:

"A modern alternative approach for disabling suspend and hibernation is to create /etc/systemd/sleep.conf.d/nosuspend.conf as

[Sleep]
AllowSuspend=no
AllowHibernation=no
AllowSuspendThenHibernate=no
AllowHybridSleep=no

The above technique works on Debian 10 Buster and newer. See systemd-sleep.conf(5) for details."

Other sources found on the internet suggested these two possible solutions which I have tried - to no effect:

Code:
ken@cbpp:~$ sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target
[sudo] password for ken: 
ken@cbpp:~$ sudo systemctl status sleep.target suspend.target hibernate.target hybrid-sleep.target
● sleep.target
     Loaded: masked (Reason: Unit sleep.target is masked.)
     Active: inactive (dead)
● suspend.target
     Loaded: masked (Reason: Unit suspend.target is masked.)
     Active: inactive (dead)
● hibernate.target
     Loaded: masked (Reason: Unit hibernate.target is masked.)
     Active: inactive (dead)
● hybrid-sleep.target
     Loaded: masked (Reason: Unit hybrid-sleep.target is masked.)
     Active: inactive (dead)
ken@cbpp:~$
Someone suggested editing /etc/systemd/sleep.conf This is what mine now looks like. No effect after rebooting
[[Sleep]
AllowSuspend=no
AllowHibernation=no
AllowSuspendThenHibernate=no
AllowHybridSleep=no
#SuspendMode=
#SuspendState=mem standby freeze
#HibernateMode=platform shutdown
#HibernateState=disk
#HybridSleepMode=suspend platform shutdown
#HybridSleepState=disk
#HibernateDelaySec=180min/pre]

My system power manager is set to "never" suspend:


No solution with any of these. Suggestions?
Attached Thumbnails
Click image for larger version

Name:	PowerManager.png
Views:	5
Size:	43.4 KB
ID:	39967  

Last edited by llewellen; 11-30-2022 at 10:23 PM.
 
Old 11-30-2022, 10:09 PM   #2
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 18,582
Blog Entries: 28

Rep: Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880
Maybe I missed something, but have you looked in the system settings?
 
Old 11-30-2022, 10:18 PM   #3
llewellen
Member
 
Registered: Oct 2016
Location: Vancouver Island, Canada
Distribution: Crunchbang++ Openbox
Posts: 401

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by frankbell View Post
Maybe I missed something, but have you looked in the system settings?
Sorry, yes I should have stated that. I will edit my OP to include that. Thanks.
 
Old 12-01-2022, 05:30 PM   #4
rclark
Member
 
Registered: Jul 2008
Location: Montana USA
Distribution: KUbuntu, Fedora (KDE), PI OS
Posts: 260

Rep: Reputation: 75
On that 'system settings' you did do the 'plugged in' tab, not just the battery tab... Just checking.
 
Old 12-01-2022, 08:23 PM   #5
llewellen
Member
 
Registered: Oct 2016
Location: Vancouver Island, Canada
Distribution: Crunchbang++ Openbox
Posts: 401

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by rclark View Post
On that 'system settings' you did do the 'plugged in' tab, not just the battery tab... Just checking.
Yes, it's not that clear in the screenshot I posted but that is "plugged in", not battery.
 
Old 12-02-2022, 06:13 PM   #6
llewellen
Member
 
Registered: Oct 2016
Location: Vancouver Island, Canada
Distribution: Crunchbang++ Openbox
Posts: 401

Original Poster
Rep: Reputation: Disabled
Update: This gets curiouser and curiouser.

The system is still going into suspend after about 5 minutes of keyboard inactivity, regardless of all the things mentioned above that I have tried to prevent that. However, it now restores instantly with any keystroke. Previously I could not find any way to make it restore and had to do a hard shutdown and then boot.

What changed? Possibly this: this laptop had a broken key and I took it into the local repair shop yesterday to have a new keyboard installed. They told me that that they had to remove the motherboard to do that (???) and when they put the unit back together, it wouldn't boot. It would boot from a USB stick but not otherwise. After some messing around in BIOS, which they didn't describe very clearly, they were able to get it booting again and it has been doing so and rebooting just fine with no difficulties.

I noticed this change: before the keyboard repair, on the Boot Sequence window in BIOS, there was a checkbox marked "Debian" which was toggled on. I assumed that referred to Debian because CBPP is a stripped down variant of Debian. Since the repair shop messed around in BIOS that checkbox is marked "GRUB" and is also toggled on. Relevant or not? I don't know.

Something else that is not a recent change but may be relevant and also point to a BIOS issue in the Dell laptop. I have this exact version of CBPP installed from the same USB stick on an old Asus X200CA laptop. There has never been any issue with suspend/restore on the Asus. It suspends as it always did before CBPP was installed and restores immediately with any keystroke.

Any clues?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Moksha DE - How to disable menu items "System-Suspend" and "System-Hibernate"? r0bur Bodhi 12 04-24-2019 07:18 PM
How to add in a pm-utils hook to disable pcmcia wifi card for suspend/hibernate? Arcosanti Slackware 1 02-24-2013 10:21 PM
Disable suspend/sleep/hibernate/whatever-you-call-it arizonagroovejet Linux - General 4 02-06-2009 05:33 AM
Disable hibernate / suspend on desktop Dell Inspiron 531s bcarl314 Mandriva 2 09-04-2007 11:48 AM
cli hibernate works but gnome panel hibernate fails BCarey Linux - Desktop 1 06-08-2007 11:21 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 04:54 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration