Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

[Software] Disable Sleep-Hibernate

Linux Kernel, Network, and Services configuration.
Post Reply
Message
Author
KenDangerfield
Posts: 11
Joined: 2022-11-26 22:35
Been thanked: 1 time

[Software] Disable Sleep-Hibernate

#1 Post by KenDangerfield »

I know this has been asked and answered several times previously but I have tried the two suggested fixes and neither worked for me.
Dell Inspiron 7370 running Crunchbang++ (Debian 11.1 updated and upgraded).

This is the first suggested solution I tried. After rebooting it had no effect.
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]

Have I made an error, overlooked something?  Is there another solution?

KenDangerfield
Posts: 11
Joined: 2022-11-26 22:35
Been thanked: 1 time

Re: [Software] Disable Sleep-Hibernate

#2 Post by KenDangerfield »

Just to add to the conundrum, the session manager included with my WM, Openbox, allows me to suspend without any problem and then restore with XScreensaver.

KenDangerfield
Posts: 11
Joined: 2022-11-26 22:35
Been thanked: 1 time

Re: [Software] Disable Sleep-Hibernate

#3 Post by KenDangerfield »

The Debian Wiki on Suspend recommends this, which I did with 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."

User avatar
cds60601
df -h | participant
df -h | participant
Posts: 698
Joined: 2017-11-25 05:58
Location: Florida
Has thanked: 129 times
Been thanked: 59 times

Re: [Software] Disable Sleep-Hibernate

#4 Post by cds60601 »

I know this may not address the hiberate you mention and this might not be entirly what you are looking for. I figured I would put this out there more for information than anything else.

Note what xset q shows and and consider something long the lines of the following

/usr/bin/xset dpms 5400 5400 5400 # Set all 3 dpms settings to 90 minutes
/usr/bin/xset -dpms # Disable dpms


And finally, In my /etc/X11/xorg.conf.d/10-monitor.conf
Section "Extensions"
Option "DPMS" "Disable"
EndSection
Supercalifragilisticexpialidocious

KenDangerfield
Posts: 11
Joined: 2022-11-26 22:35
Been thanked: 1 time

Re: [Software] Disable Sleep-Hibernate

#5 Post by KenDangerfield »

Thanks. I don't have enough technical knowledge to understand fully what you're proposing. Nevertheless:

Code: Select all

ken@cbpp:~$ xset q
Keyboard Control:
  auto repeat:  on    key click percent:  0    LED mask:  00000000
  XKB indicators:
    00: Caps Lock:   off    01: Num Lock:    off    02: Scroll Lock: off
    03: Compose:     off    04: Kana:        off    05: Sleep:       off
    06: Suspend:     off    07: Mute:        off    08: Misc:        off
    09: Mail:        off    10: Charging:    off    11: Shift Lock:  off
    12: Group 2:     off    13: Mouse Keys:  off
  auto repeat delay:  250    repeat rate:  25
  auto repeating keys:  00ffffffdffffbbf
                        fadfffefffedffff
                        9fffffffffffffff
                        fff7ffffffffffff
  bell percent:  0    bell pitch:  400    bell duration:  100
Pointer Control:
  acceleration:  2/1    threshold:  4
Screen Saver:
  prefer blanking:  yes    allow exposures:  yes
  timeout:  0    cycle:  0
Colors:
  default colormap:  0x20    BlackPixel:  0x0    WhitePixel:  0xffffff
Font Path:
  /usr/share/fonts/X11/misc,/usr/share/fonts/X11/100dpi/:unscaled,/usr/share/fonts/X11/75dpi/:unscaled,/usr/share/fonts/X11/Type1,/usr/share/fonts/X11/100dpi,/usr/share/fonts/X11/75dpi,built-ins
DPMS (Energy Star):
  Standby: 7200    Suspend: 7200    Off: 14400
  DPMS is Disabled
ken@cbpp:~$ [/ccode]

I don't have the file /etc/X11/xorg.conf.d/10-libinput

KenDangerfield
Posts: 11
Joined: 2022-11-26 22:35
Been thanked: 1 time

Re: [Software] Disable Sleep-Hibernate

#6 Post by KenDangerfield »

Edit: I don't have /etc/X11/xorg.conf.d/10-monitor.conf on my system.

KenDangerfield
Posts: 11
Joined: 2022-11-26 22:35
Been thanked: 1 time

Re: [Software] Disable Sleep-Hibernate

#7 Post by KenDangerfield »

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?

User avatar
cds60601
df -h | participant
df -h | participant
Posts: 698
Joined: 2017-11-25 05:58
Location: Florida
Has thanked: 129 times
Been thanked: 59 times

Re: [Software] Disable Sleep-Hibernate

#8 Post by cds60601 »

KenDangerfield wrote: 2022-12-02 19:01 Edit: I don't have /etc/X11/xorg.conf.d/10-monitor.conf on my system.
All this does (for me) is it turns off DPMS. AFAIK, DPMS IS what is the sleep, hibernate and timeouts for the monitor at least.
At this point, there may be some other software that is setting this for you.
I used to have issues like this but once disabling some DPMS settings and having my screensaver set properly - those issues are long gone.
My daily driver is an ASUS laptop so having these sorts of issues out of the way has been a blessing.

I'll try to did up more on my side to see if I missed some settings (yeah, it's been a spell since then).
Supercalifragilisticexpialidocious

KenDangerfield
Posts: 11
Joined: 2022-11-26 22:35
Been thanked: 1 time

Re: [Software] Disable Sleep-Hibernate

#9 Post by KenDangerfield »

I tried your suggestions but with no luck. After about 5 minutes of keyboard inactivity my system still goes into a "hard" suspend/hibernate with no means (that i can find) to restore. However, as before if I manually put the system into suspend, any keystroke brings up XScreenSaver which prompts me for my password and then restores.

More and more I'm thinking I may have a BIOS problem. I'm considering doing a BIOS update. All my data is auto backed up to PCloud and I would just have to copy my settings, rc files, etc. to a USB and then go for it :)

User avatar
el_koraco
Posts: 242
Joined: 2011-10-20 11:49
Has thanked: 3 times
Been thanked: 8 times

Re: [Software] Disable Sleep-Hibernate

#10 Post by el_koraco »

Doesn't #!++ use xfce power manager or something?

KenDangerfield
Posts: 11
Joined: 2022-11-26 22:35
Been thanked: 1 time

Re: [Software] Disable Sleep-Hibernate

#11 Post by KenDangerfield »

Yes, it does use xfce4 Power Manager. Here are the 4 windows in PM.
PM1.png
PM2.png
PM3.png
PM4.png

User avatar
cds60601
df -h | participant
df -h | participant
Posts: 698
Joined: 2017-11-25 05:58
Location: Florida
Has thanked: 129 times
Been thanked: 59 times

Re: [Software] Disable Sleep-Hibernate

#12 Post by cds60601 »

KenDangerfield wrote: 2022-12-03 23:35 I tried your suggestions but with no luck. After about 5 minutes of keyboard inactivity my system still goes into a "hard" suspend/hibernate with no means (that i can find) to restore. However, as before if I manually put the system into suspend, any keystroke brings up XScreenSaver which prompts me for my password and then restores.

More and more I'm thinking I may have a BIOS problem. I'm considering doing a BIOS update. All my data is auto backed up to PCloud and I would just have to copy my settings, rc files, etc. to a USB and then go for it :)
You mentioned Xscreensaver - by chance do you have power settings enabled under the Advanced tab?
Supercalifragilisticexpialidocious

KenDangerfield
Posts: 11
Joined: 2022-11-26 22:35
Been thanked: 1 time

Re: [Software] Disable Sleep-Hibernate

#13 Post by KenDangerfield »

No, that portion of the Advanced window is greyed out.

ScreenSaver.png

Dai_trying
Posts: 1100
Joined: 2016-01-07 12:25
Has thanked: 5 times
Been thanked: 16 times

Re: [Software] Disable Sleep-Hibernate

#14 Post by Dai_trying »

Did you check both the "On battery" and Plugged in" sections of the power manager settings? your screenshots only show the "On battery" settings.

KenDangerfield
Posts: 11
Joined: 2022-11-26 22:35
Been thanked: 1 time

Re: [Software] Disable Sleep-Hibernate

#15 Post by KenDangerfield »

Yes, "on Battery" has the same settings - i.e. "Never". In any case, this particular laptop never runs on battery - always plugged into AC.

KenDangerfield
Posts: 11
Joined: 2022-11-26 22:35
Been thanked: 1 time

Re: [Software] Disable Sleep-Hibernate

#16 Post by KenDangerfield »

The latest manifestation of this problem makes me think something is definitely in conflict or unstable on my system but I can't put my finger on what it is. When @Dai queried whether I had checked both "On battery" and "Plugged in" settings on Power Manager, I toggled them on and off just to be sure. Now I have this situation:

1. If I manually suspend via that option in the Exit window, any keystroke brings up the XScreenSaver window where I enter my password and the system restores.
2. If I do nothing, after about 5 minutes of inactivity the system suspends itself but I can restore directly with any keystroke, without encountering the XScreenSaver window and being challenged for a password.

In any case, I have still not found a way to disable suspend and hibernate completely.

Post Reply