You are not logged in.

#1 2012-09-08 01:30:13

engelus
Member
From: Salta - Argentina
Registered: 2011-06-11
Posts: 46

wicd doesnt reconect after suspend with systemd [Solved]

When I was using initscripts when laptop goes suspend and then wake wicd used to reconect to the wifi or wired conection that is usefull when moving from one location to another with a diferent network (example from home to university)

I am using systemd since 2 o 3 weeks, all the things are working like a charm execpt this one. I tried with sleep hooks as stated in the wiki article but it isnt working

I created this file called wicd.sh in /usl/lib/systemd/system-sleep/wicd.sh

case "$1" in
  pre )
    echo nothing
    ;;
  post )
    /usr/share/wicd/daemon/autoconnect.py
    ;;
esac

But nothing happends, the script /usr/share/wicd/daemon/autoconnect.py is the encharge to reconect wicd, also tried with this script adapting to my needs:

if [[ $1 == 'pre' ]] && [[ $2 == 'suspend' ]] ; then
        /usr/share/wicd/daemon/suspend.py
elif [[ $1 == 'pre' ]] && [[ $2 == 'hibernate' ]] ; then
        /usr/share/wicd/daemon/suspend.py
elif [[ $1 == 'post' ]] && [[ $2 == 'suspend' ]] ; then
        /usr/share/wicd/daemon/autoconnect.py
elif [[ $1 == 'post' ]] && [[ $2 == 'hibernate' ]] ; then
        /usr/share/wicd/daemon/autoconnect.py
fi

But it isnt working too, if I run manually whatever of the two scripts works but when i run systemctl suspend doesnt work. I cracked my head trying to solve this but cant figured out the solution. Any ideas?

PS: also tried with kill wicd and starting wicd, wicd-client and other varietys with no results. Sorry for my bad english.

Last edited by engelus (2012-09-09 01:57:27)

Offline

#2 2012-09-08 02:05:58

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,132

Re: wicd doesnt reconect after suspend with systemd [Solved]

Try looking in the journal or in wicd.log for information about what's happening?

Sorry, I don't know which to direct you to because I'm not sure if wicd will use the journal under systemd or still log to its own file. (I imagine the former but don't know.)


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#3 2012-09-08 02:18:48

engelus
Member
From: Salta - Argentina
Registered: 2011-06-11
Posts: 46

Re: wicd doesnt reconect after suspend with systemd [Solved]

cfr wrote:

Try looking in the journal or in wicd.log for information about what's happening?

Sorry, I don't know which to direct you to because I'm not sure if wicd will use the journal under systemd or still log to its own file. (I imagine the former but don't know.)

wicd is still using is own log at /var/log/wicd and the events arent registered in that log or in journalctl.

If I ran /usr/share/wicd/daemon/autoconnect.py the events are registerd at wicd log but if I ran systemctl susped the events arent registered in wicd log or journal because the script isnt running or at least that was I think.

Last edited by engelus (2012-09-08 02:21:26)

Offline

#4 2012-09-09 00:29:37

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,132

Re: wicd doesnt reconect after suspend with systemd [Solved]

If you have pm-utils installed, take a look at /usr/lib/pm-utils/sleep.d/55wicd which is the file wicd itself installs for that. However, if the hook isn't being run at all, I don't see that being very helpful. Does the journal show anything about the sleep/wake process?


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#5 2012-09-09 00:54:25

engelus
Member
From: Salta - Argentina
Registered: 2011-06-11
Posts: 46

Re: wicd doesnt reconect after suspend with systemd [Solved]

Its something strange with my journal last entrance is from Aug 29 :S since then I have poweroff and on very times my machine, is so strange :S

PS: I use journal with syslog-ng as posted in the wiki

EDIT: I Solved adding to the srpit exec /usr/bin/python2 -O:

#!/bin/sh
if [[ $1 == 'pre' ]] && [[ $2 == 'suspend' ]] ; then
        exec /usr/bin/python2 -O /usr/share/wicd/daemon/suspend.py
elif [[ $1 == 'pre' ]] && [[ $2 == 'hibernate' ]] ; then
        exec /usr/bin/python2 -O /usr/share/wicd/daemon/suspend.py
elif [[ $1 == 'post' ]] && [[ $2 == 'suspend' ]] ; then
        exec /usr/bin/python2 -O /usr/share/wicd/daemon/autoconnect.py
elif [[ $1 == 'post' ]] && [[ $2 == 'hibernate' ]] ; then
        exec /usr/bin/python2 -O /usr/share/wicd/daemon/autoconnect.py
fi

Only have to figure out why the journal is so old :S

Last edited by engelus (2012-09-09 01:56:46)

Offline

#6 2012-10-06 08:30:24

litemotiv
Forum Fellow
Registered: 2008-08-01
Posts: 5,026

Re: wicd doesnt reconect after suspend with systemd [Solved]


ᶘ ᵒᴥᵒᶅ

Offline

Board footer

Powered by FluxBB