You are not logged in.

#1 2017-08-06 07:42

Rademes
Member
From: Latvia
Registered: 2015-12-13
Posts: 636

Disabling suspend and hibernate mode

Good day!
How to disable completely suspend and hibernate mode in Q4OS? Especially hibernate mode, because my aunt has made a mistake and clicked on [Hibernate Computer] instead of [Shutdown Computer], which made her notebook unbootable mad (see attachment). Luckily, after about five attempts of battery removal it finally booted normally... Anyway, hibernate mode does not working at all!
As for me, I have never used suspend and hibernate modes. So I want to completely get rid of those modes!


Attachments:
jpg OS_not_Found.jpg, Size: 168.12 KiB, Downloads: 614

Before asking for help please read this topic: https://www.q4os.org/forum/viewtopic.php?id=3502   If you have problems with WiFi network, try to install the Network Manager using Q4OS Software Centre.

Offline

#2 2017-08-06 13:59

bin
Member
From: U.K.
Registered: 2016-01-28
Posts: 1,295

Re: Disabling suspend and hibernate mode

A quick and dirty solution is to create a desktop icon which runs /sbin/poweroff - that'll do the trick.

In Control Centre>TDE Components>Session Manager you can set the default action but it doesn't stop someone clicking the wrong button.

If you uncheck Confirm Logout and Offer Shutdown Options it sadly does not abide by the default 'Turn Off Computer' even if it is selected. However it doesn't present any other choices - just logs you out.

Offline

#3 2017-08-08 08:37

Rademes
Member
From: Latvia
Registered: 2015-12-13
Posts: 636

Re: Disabling suspend and hibernate mode

bin wrote:

A quick and dirty solution is to create a desktop icon which runs /sbin/poweroff - that'll do the trick.

No, no, no. I want to completely remove the ability to hibernate system by any possible methods! I know, that it can be done by modifying system configuration file, I just don`t know which one. I have found the possible solution here: http://www.linuxquestions.org/questions … et-877889/, but unfortunatelly, there is no such file in my system...

denis@g2030home:~$ cat /usr/share/polkit-1/actions/org.freedesktop.upower.policy
cat: /usr/share/polkit-1/actions/org.freedesktop.upower.policy: Нет такого файла или каталога
denis@g2030home:~$

In another source, I have read, that it can be disabled by typing

# systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target

Another possible solution:
https://serverfault.com/questions/32149 … er-netbook
So which should I use for Q4OS? Or there is another specific solution?

Last edited by Rademes (2017-08-08 08:38)


Before asking for help please read this topic: https://www.q4os.org/forum/viewtopic.php?id=3502   If you have problems with WiFi network, try to install the Network Manager using Q4OS Software Centre.

Offline

#4 2019-08-09 19:41

cjoliprsf
Member
Registered: 2017-04-23
Posts: 71

Re: Disabling suspend and hibernate mode

To Rademes, two years later... Did you find a solution to this?
I would also like to completely remove the ability to hibernate for a number of reasons...
First and most important is that I now have 3 OSs on this computer (Windows 7, Linux Mint and Q4OS) that share a common Data partition. If I let one OS go to hibernation with the Data partition mounted, and boot with another OS, this would cause data corruption.
Second is that I now have installed a SSD drive, and I understand it is not a good idea to write large amount of stuff to such disk when not necessary.
And third, the computer now boots in less than 60 seconds, and resumes from hibernation in exactly the same time, so there is no gain to using hibernation.

Offline

#5 2019-08-09 20:52

cjoliprsf
Member
Registered: 2017-04-23
Posts: 71

Re: Disabling suspend and hibernate mode

OK, I did it with the following command, and it seems to work
systemctl mask hibernate.target hybrid-sleep.target
(note I removed the sleep.target and the suspend.target from the command mentioned by Rademes, as I didn't want to prevent the simple sleep mode)

Offline

#6 2019-08-09 21:09

cjoliprsf
Member
Registered: 2017-04-23
Posts: 71

Re: Disabling suspend and hibernate mode

PS, this really comes from Debian
https://wiki.debian.org/Suspend

The solutions on the internet that are relevant to Ubuntu often refer to this file:
/etc/polkit-1/localauthority/50-local.d/com.ubuntu.enable-hibernate.pkla
that should be modified or removed or moved to some other folder but there is no such file in Q4OS, so it won't work.

Offline

#7 2019-08-10 17:00

Rademes
Member
From: Latvia
Registered: 2015-12-13
Posts: 636

Re: Disabling suspend and hibernate mode

cjoliprsf wrote:

To Rademes, two years later... Did you find a solution to this?.

Sorry, I have not found the solution. sad
I thought q4osteam would help me to find it.


Before asking for help please read this topic: https://www.q4os.org/forum/viewtopic.php?id=3502   If you have problems with WiFi network, try to install the Network Manager using Q4OS Software Centre.

Offline

Board footer

Powered by FluxBB