You are not logged in.

#1 2015-09-24 12:34:21

fuhrer
Member
Registered: 2013-07-03
Posts: 36

systemctl power management problem with kde

hi !

i am having problems with hibernating and suspend

the issue is when i use the hibernation/suspend button in kde application launcher with "suspend" system lags and no suspend happens, and with "hibernate button" the system freezes after resuming hibernation

BUT, when i use terminal to hibernate/suspend everything is ok (there's only the problem of the fans  go to max speed)

$ systemctl hibernate
$ systemctl suspend

so, does kde app launcher uses other commands than "systenctl" or is it a bug, and what can i do to change this and solve the issue ??

Last edited by fuhrer (2015-09-24 12:44:23)

Offline

#2 2015-09-24 17:30:16

fuhrer
Member
Registered: 2013-07-03
Posts: 36

Re: systemctl power management problem with kde

i think i figured out how to use systemctl by default to handle suspend and hibernation by modifying the file

/etc/systemctl/login.conf

and uncommenting

HandleSuspendKey=suspend

thought i still have a problem with hibernation, the screen blinks twice, and after resuming it, no internet access available after that
i tried restaring "NetworkManager" a couple of times but no success

any help with these two issues ??

Offline

#3 2015-09-24 23:31:28

fuhrer
Member
Registered: 2013-07-03
Posts: 36

Re: systemctl power management problem with kde

Well it seems that i got everything working big_smile
here is everything i've done

First:

Uncomment these lines in the file "/etc/systemd/login.conf"

HandlePowerKey=poweroff
HandleSuspendKey=suspend
HandleHibernateKey=hibernate
HandleLidSwitch=suspend
HandleLidSwitchDocked=ignore

doing this stopped the freezing issue after hibernation

Second:
create the following systemd services and the following script:

/etc/systemd/system/resume.service

[Unit]
Description=User resume actions
After=suspend.target

[Service]
Type=oneshot
ExecStart=/bin/bash /usr/bin/fan_fix.sh
ExecStart=/usr/bin/systemctl restart NetworkManager.service

[Install]
WantedBy=suspend.target

this to fix fan speed and NetworkManager issue

/etc/systemd/system/fan_fix_startup.service

[Unit]
Description=fix fan speed at startup

[Service]
Type=oneshot
ExecStart=/bin/bash /usr/bin/fan_fix.sh

[Install]
WantedBy=multi-user.target

fix fan speed at start-up

fan_fix.sh

#!/bin/bash

for i in $(seq 0 1 15); do echo 0 > /sys/class/thermal/cooling_device$i/cur_state; done
for i in {5,6,7,8,9,12,13,14,15}; do echo 1 > /sys/class/thermal/cooling_device$i/cur_state; done

copy the script to /usr/bin
and give it the following privileges

# chmod a+x /usr/bin/fan_fix.sh

Third:
add notail to mount parameters in file

/etc/fstab

this found it here https://wiki.archlinux.org/index.php/Ma … e#Reiserfs

Fourth:
change the swap swapiness

# echo -e 15 > /proc/sys/vm/swappiness
# echo 'vm.swappiness = 15' >> /etc/sysctl.conf

this here

Sixth:
add "resume" to grub boot parameters, and mkinitcpio hooks, make sure "resume" is the third after base and udev

HOOKS= "base udev resume .....etc"

this here

Last edited by fuhrer (2015-09-24 23:47:42)

Offline

Board footer

Powered by FluxBB