configure hibernate - how? [SOLVED]

You have a problem with Salix? Post here and we'll do what we can to help.
Post Reply
User avatar
jsfarinet
Posts: 305
Joined: 23. Nov 2014, 07:32

configure hibernate - how? [SOLVED]

Post by jsfarinet »

I've a problem with hibernate (suspend to disk): When i re-awake the laptop from hibernate, wlan is blocked (hardwarewise?). I've to do a 'sudo rfkill unblock wlan'. Now, i'd like to do this automatically. Is there a way configure hibernate this way?

Thanks in advance!
Last edited by jsfarinet on 8. Oct 2015, 10:23, edited 1 time in total.
djemos
Salix Warrior
Posts: 1464
Joined: 29. Dec 2009, 13:45
Location: Greece

Re: configure hibernate - how?

Post by djemos »

create a file in /etc/pm/sleep.d/ with name wifi.sh
e.g.

Code: Select all

 sudo geany /etc/pm/sleep.d/wifi.sh

and paste the following
Note: For x86_64 change the line . /usr/lib/pm-utils/functions to . /usr/lib64/pm-utils/functions

Code: Select all

#!/bin/bash
. /usr/lib/pm-utils/functions

case "$1" in
    hibernate|suspend)
    rfkill block wifi
    ;;
    thaw|resume)
    rfkill unblock wifi
    ;;
    *)
    ;;
esac

exit

Code: Select all

sudo chmod 0755 /etc/pm/sleep.d/wifi.sh
Please report back here if it is working.
User avatar
jsfarinet
Posts: 305
Joined: 23. Nov 2014, 07:32

Re: configure hibernate - how?

Post by jsfarinet »

Thanks a lot. I'll try tomorrow and i'll report :D
User avatar
jsfarinet
Posts: 305
Joined: 23. Nov 2014, 07:32

Re: configure hibernate - how?

Post by jsfarinet »

IT WORKS!!! GREAT!!

And thanks a lot!
Post Reply