Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Papercut: Plasma 5 + systemd : user inhibit suspend??
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
BobWya
Apprentice
Apprentice


Joined: 12 Aug 2012
Posts: 227
Location: Cambridge,UK

PostPosted: Tue May 31, 2016 10:23 pm    Post subject: Papercut: Plasma 5 + systemd : user inhibit suspend?? Reply with quote

Hi folks,

I have the following in my little emerge world script:
Code:
...
systemd-inhibit --what=idle:sleep:handle-suspend-key:handle-lid-switch --why="Gentoo emerge @world running" emerge $1 --update --deep --newuse --with-bdeps=y --keep-going --backtrack=100 @world
...


So basically overriding the default Plasma Powerdevil auto-suspend daemon:
Code:
systemd-inhibit --list
 
     Who: PowerDevil (UID 1000/robert, PID 4426/kded5)
    What: handle-power-key:handle-suspend-key:handle-hibernate-key:handle-lid-switch
     Why: KDE handles power events
    Mode: block

     Who: NetworkManager (UID 0/root, PID 1322/NetworkManager)
    What: sleep
     Why: NetworkManager needs to turn off networks
    Mode: delay

2 inhibitors listed.


That appears to work.

I've tried doing the same for a h264enc alias, which runs as my normal user:
Code:
# systemd inhibit power saving mode
alias h264enc='systemd-inhibit --what=idle:sleep:handle-suspend-key:handle-lid-switch --why="h264enc" h264enc'


I see it showing up in my inhibit list:
Code:
systemd-inhibit --list
     Who: h264enc -2p -p vdihq (UID 1000/robert, PID 7006/systemd-inhibit)
    What: sleep:idle:handle-suspend-key:handle-lid-switch
     Why: h264enc
    Mode: block

     Who: PowerDevil (UID 1000/robert, PID 4426/kded5)
    What: handle-power-key:handle-suspend-key:handle-hibernate-key:handle-lid-switch
     Why: KDE handles power events
    Mode: block

     Who: NetworkManager (UID 0/root, PID 1322/NetworkManager)
    What: sleep
     Why: NetworkManager needs to turn off networks
    Mode: delay

3 inhibitors listed.


Code:
ps aux | grep [k]ded5
robert    4426  0.0  0.2 1721024 96036 ?       Sl   May30   0:12 kded5 [kdeinit5]


But I'm finding my laptop still suspends part way through the encoding process... 8O Any thoughts?? :?
Seems a bit weird...

Thanks
Bob
_________________
system: G751JT (ASUS-NotebookSKU); processor: Intel(R) Core(TM) i7-4710HQ CPU @ 2.50GHz; memory: 32GiB System Memory; display: GM204M [GeForce GTX 970M]; disk: 2048GB Samsung SSD 850;BD-CMB UJ172 S;1024GB Samsung SSD 850
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum