You are not logged in.

#1 2012-03-02 16:19:48

Starfall
Member
From: /home/
Registered: 2011-05-24
Posts: 209
Website

Restarting tint2 upon resuming from suspend

Hi smile

There's a known bug with tint2/xfce-power-manager's battery monitor in which waking from suspend causes a large blank space to appear after the battery icon in the notification area of tint2.

I would just like to know if there is a means of calling a script upon resuming from suspend that would kill and restart tint2?

I found this which describes restarting the mouse from suspend, could I just edit this so it kills tint2 and then runs it again?

If so... which parts of that script do I need, or could it literally just contain the following?

#! /bin/sh

pkill tint2 && tint2

Many thanks for any help on this!


Visit my blog and my DeviatArt page

Offline

#2 2012-03-02 19:20:29

prasinoulhs
Member
From: Greece
Registered: 2011-10-30
Posts: 53

Re: Restarting tint2 upon resuming from suspend

I'm not an expert in shell scripts but you could try it out and see if it works. Based on the link i would do it like this.

#!/bin/sh
#
case "$1" in
suspend)
killall tint2
;;
resume)
#killall tint2 
tint2
;;
*) exit $NA
;;
esac

I hope that this works for you.

Offline

#3 2012-03-03 00:12:12

Starfall
Member
From: /home/
Registered: 2011-05-24
Posts: 209
Website

Re: Restarting tint2 upon resuming from suspend

prasinoulhs wrote:

I'm not an expert in shell scripts but you could try it out and see if it works. Based on the link i would do it like this.

#!/bin/sh
#
case "$1" in
suspend)
killall tint2
;;
resume)
#killall tint2 
tint2
;;
*) exit $NA
;;
esac

I hope that this works for you.


Thanks for the response prasinoulhs smile Unfortunately that didn't work, it managed to kill tint2 but not restart it sad

I've tried changing it about a bit so it commands to do nothing on suspend, but then killall tint2 && tint2 on resume, but that hasn't worked.

I also tried with a separate kill and start script, both appropriately so the start script would run last, but still no luck.

Anyone have any ideas?


Visit my blog and my DeviatArt page

Offline

#4 2012-03-03 00:29:55

Starfall
Member
From: /home/
Registered: 2011-05-24
Posts: 209
Website

Re: Restarting tint2 upon resuming from suspend

Hmm I found this thread. The solution works, but now whenever I resume from suspend, wicd is unable to connect to my wireless. when bringing up the GUI and telling it to connect (which it should do automatically) it hangs on 'Disconnecting active connections' so I have to quit wicd-gtk, restart the wicd daemon then reload the gui hmm

EDIT: Tried both the solutions mentioned in this thread also, however no such luck sad

Last edited by Starfall (2012-03-03 00:45:09)


Visit my blog and my DeviatArt page

Offline

#5 2012-03-03 21:37:31

Starfall
Member
From: /home/
Registered: 2011-05-24
Posts: 209
Website

Re: Restarting tint2 upon resuming from suspend

Anybody have any ideas at all? It'd be greatly appreciated smile


Visit my blog and my DeviatArt page

Offline

#6 2012-03-09 18:17:25

Starfall
Member
From: /home/
Registered: 2011-05-24
Posts: 209
Website

Re: Restarting tint2 upon resuming from suspend

I still haven't been able to figure this out. It's rather cumbersome having to manually kill and restart tint2 every time.

Does anyone with experience with this kinda thing have any idea at all? Any words are greatly appreciated!


Visit my blog and my DeviatArt page

Offline

#7 2012-03-12 10:29:44

bergersau
Member
Registered: 2012-01-19
Posts: 52

Re: Restarting tint2 upon resuming from suspend

I have a work around for the tint2/xfce-power-manager bug.

I run xfce-power-manager with the "never show icon" option.  Instead of using the xfce-power-manager icon, I use 'Vattery' (available in the AUR) as the visible power monitor.
This allows me to use xfce-power-manager-settings to control power management on my netbook.

It's not elegant - but it works for me.

Offline

#8 2012-05-15 12:58:13

bennylb0
Member
From: Melbourne, Australia
Registered: 2010-05-21
Posts: 66

Re: Restarting tint2 upon resuming from suspend

Hi Starfall,

I probably broken all kinds of rules doing this but I had the same problem and couldn't find anything so I put the following in /etc/acpi/handler.sh

button/lid)
    case "$3" in
    close)
        su killall tint2
        /usr/sbin/pm-suspend &
        ;;
    open)
        exec tint2 &
        ;;

And it seems to do the job.

Offline

#9 2012-05-20 22:02:29

donniezazen
Member
From: Salt Lake City
Registered: 2011-06-24
Posts: 671
Website

Re: Restarting tint2 upon resuming from suspend

bergersau wrote:

I have a work around for the tint2/xfce-power-manager bug.

I run xfce-power-manager with the "never show icon" option.  Instead of using the xfce-power-manager icon, I use 'Vattery' (available in the AUR) as the visible power monitor.
This allows me to use xfce-power-manager-settings to control power management on my netbook.

It's not elegant - but it works for me.

vattery gives me following error.

Error opening directory '/proc/acpi/battery': No such file or directoryusing data type: None

Offline

Board footer

Powered by FluxBB