Difference between revisions of "Talk:Power management"

From ArchWiki
Jump to: navigation, search
(Remove closed discussion.)
m (add missing signature)
 
(16 intermediate revisions by 8 users not shown)
Line 1: Line 1:
 +
== Suspend/resume service files ==
  
 +
I have the slight suspicion that the service files posted in the section [[Power Management#Suspend/resume service files]] might not work. Has anybody tried them or is actually using them? <br>
 +
-- [[User:Jakobh|jakobh]] [[User talk:Jakobh|✉]]  03:12, 10 May 2013 (UTC)
 +
 +
: (Mod: the section was moved from [[systemd]] into [[Power Management]], so I moved this post too, fixed link along the way. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 10:24, 21 August 2013 (UTC))
 +
 +
== Sleep hooks ==
 +
 +
Where is the exact difference between '''Suspend/resume service files''' approach and '''Hooks in /usr/lib/systemd/system-sleep'''?
 +
 +
Is the latter obsolete?
 +
 +
-- [[User:Orschiro|Orschiro]] 07:33, 17 January 2014
 +
 +
:From {{ic|systemd-sleep(8)}}:
 +
::"Note that scripts or binaries dropped in {{ic|/usr/lib/systemd/system-sleep/}} are intended for local use only and should be considered hacks."
 +
:It's always preferred to use service files, they are much more flexible in handling the dependencies etc.
 +
:-- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 23:52, 31 January 2014 (UTC)
 +
 +
== Delayed hibernation service ==
 +
 +
I have found that the service file given in this section does not work. My laptop hibernates immediately after resuming from suspend. I have also found that the older version of this service found in the forum post does indeed work perfectly. Does anyone know why this is?
 +
[[User:Aouellette|Aouellette]] ([[User talk:Aouellette|talk]]) 16:16, 30 May 2015 (UTC)
 +
 +
== Resume file does not work after resuming from hibernation ==
 +
 +
The systemd unit {{ic|User resume actions}} presented on this page only worked for me after resuming from sleep, not from hibernate.
 +
After adding {{ic|hibernate.target}} to the {{ic|After}} and {{ic|WantedBy}} lines it works both ways.
 +
However this is the first time I've done anything with such service files so I ain't sure if this is the optimal way.
 +
Can anyone confirm?
 +
 +
{{unsigned|18:30, 12 October 2015‎|PhilippD}}
 +
 +
:Actually, the {{ic|suspend@.service}} in [[Power_management#Suspend.2Fresume_service_files]] binds to {{ic|sleep.target}}, but {{ic|resume@.service}} binds to {{ic|suspend.target}}. They are not synonyms, systemd triggers {{ic|suspend.target}} and {{ic|sleep.target}} when the system is suspended to RAM, and {{ic|hibernate.target}} and {{ic|sleep.target}} when it is suspended to disk. This way you can bind your service to either one or both suspend methods using just a single target. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 19:17, 12 October 2015 (UTC)
 +
 +
== Bluetooth rfkill ==
 +
 +
Systemd now provides {{ic|systemd-rkfill.service}}. If you use {{ic|rfkill block}} to disable bluetooth, {{ic|systemd-rfkill.service}} will remember this and restore this state on next boot -- [[User:robtaylor|robtaylor]] ([[User talk:robtaylor|talk]]) Wed 18 May 16:10:05 BST 2016

Latest revision as of 15:11, 18 May 2016

Suspend/resume service files

I have the slight suspicion that the service files posted in the section Power Management#Suspend/resume service files might not work. Has anybody tried them or is actually using them?
-- jakobh 03:12, 10 May 2013 (UTC)

(Mod: the section was moved from systemd into Power Management, so I moved this post too, fixed link along the way. -- Lahwaacz (talk) 10:24, 21 August 2013 (UTC))

Sleep hooks

Where is the exact difference between Suspend/resume service files approach and Hooks in /usr/lib/systemd/system-sleep?

Is the latter obsolete?

-- Orschiro 07:33, 17 January 2014

From systemd-sleep(8):
"Note that scripts or binaries dropped in /usr/lib/systemd/system-sleep/ are intended for local use only and should be considered hacks."
It's always preferred to use service files, they are much more flexible in handling the dependencies etc.
-- Lahwaacz (talk) 23:52, 31 January 2014 (UTC)

Delayed hibernation service

I have found that the service file given in this section does not work. My laptop hibernates immediately after resuming from suspend. I have also found that the older version of this service found in the forum post does indeed work perfectly. Does anyone know why this is? Aouellette (talk) 16:16, 30 May 2015 (UTC)

Resume file does not work after resuming from hibernation

The systemd unit User resume actions presented on this page only worked for me after resuming from sleep, not from hibernate. After adding hibernate.target to the After and WantedBy lines it works both ways. However this is the first time I've done anything with such service files so I ain't sure if this is the optimal way. Can anyone confirm?

—This unsigned comment is by PhilippD (talk) 18:30, 12 October 2015‎. Please sign your posts with ~~~~!

Actually, the suspend@.service in Power_management#Suspend.2Fresume_service_files binds to sleep.target, but resume@.service binds to suspend.target. They are not synonyms, systemd triggers suspend.target and sleep.target when the system is suspended to RAM, and hibernate.target and sleep.target when it is suspended to disk. This way you can bind your service to either one or both suspend methods using just a single target. -- Lahwaacz (talk) 19:17, 12 October 2015 (UTC)

Bluetooth rfkill

Systemd now provides systemd-rkfill.service. If you use rfkill block to disable bluetooth, systemd-rfkill.service will remember this and restore this state on next boot -- robtaylor (talk) Wed 18 May 16:10:05 BST 2016