You are not logged in.

#1 2015-09-14 22:34:43

etoixpi
Member
Registered: 2015-04-16
Posts: 8

How to permanently change /sys/power/disk to 'shutdown'? Udev rule?

Hi guys,

I'm looking for a way to permanently change /sys/power/disk to 'shutdown' and to ensure that 'systemctl hibernate' uses 'shutdown' mode. I'm having trouble trouble with platform mode and ACPI on my laptop during hibernate. The kernel documentation recommends trying 'shutdown' mode vs 'platform' mode. Documentation can be found here: https://www.kernel.org/doc/Documentatio … ugging.txt

I can temporarily change /sys/power/disk to shutdown by issuing 'echo shutdown > /sys/power/disk'. However after a reboot 'cat /sys/power/disk' returns '[platform] shutdown reboot suspend'.

I think maybe this can be accomplished with a udev rule, but I don't know how to write it. If there is another/better way please let me know.

Thanks!

Offline

#2 2015-09-15 00:03:04

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: How to permanently change /sys/power/disk to 'shutdown'? Udev rule?

Maybe use tmpfiles, see 'man tmpfiles.d'.


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#3 2015-09-15 00:18:49

frostschutz
Member
Registered: 2013-11-15
Posts: 1,647

Re: How to permanently change /sys/power/disk to 'shutdown'? Udev rule?

Wouldn't it be power.disk=shutdown in /etc/sysctl.conf? Haven't actually tried it.

Edit: Oh, I think that was for /proc/sys, not /sys, hmm...

Last edited by frostschutz (2015-09-15 00:19:40)

Offline

#4 2016-01-18 05:26:54

firekage
Member
From: Eastern Europe, Poland
Registered: 2013-06-30
Posts: 624

Re: How to permanently change /sys/power/disk to 'shutdown'? Udev rule?

Sorry for refreshing, but i have the same problem with my desktop. Could somebody tell how to do it?

Offline

#5 2016-01-18 14:16:28

aouelete
Member
Registered: 2015-05-27
Posts: 30

Re: How to permanently change /sys/power/disk to 'shutdown'? Udev rule?

You can do this using systemd. Simply put the following in /etc/systemd/sleep.conf:

[Sleep]
HibernateMode=shutdown

Offline

Board footer

Powered by FluxBB