make resume not turn the display on
Hi, yet another annoying thing about automatic suspend/resume is that the display turns on at resume time. If you use GPRS and automatic suspend then incoming GPRS packets will resume the system. Now combine this with unsolicited IP traffic from Windows worms and you have the backlight going on and off all the time, very annoying :-) My current solution: Save backlight brightness and state on suspend and restore it on suspend. Suspend hook: backlight="$(backlight)" # Keep the backlight off and turn it on in resume hook only after we have # restored the DPMS state. backlight 0 # This is ugly as it depends on access to DISPLAY of normal user monitor="$(xset q | grep "^ Monitor is")" Resume hook: if [ "$monitor" = " Monitor is Off" ]; then xset dpms force off fi if [ "$backlight" != "" ]; then backlight "$backlight" else backlight 255 fi Is this again something that could be solved in the kernel? -Timo ___ Smartphones-userland mailing list Smartphones-userland@linuxtogo.org http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland
Re: make resume not turn the display on
My current solution: Save backlight brightness and state on suspend and restore it on suspend. Suspend hook: where do you hook in? ___ Smartphones-userland mailing list Smartphones-userland@linuxtogo.org http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland
Re: make resume not turn the display on
"arne anka" writes: >> My current solution: Save backlight brightness and state on suspend >> and restore it on suspend. Suspend hook: > > where do you hook in? Currently I just have a monolithic suspend script. This xset reference is one of the things that prevent me from moving this to /etc/apm/(suspend|resume).d -Timo ___ Smartphones-userland mailing list Smartphones-userland@linuxtogo.org http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland
Re: make resume not turn the display on
ok, let me rephrase that: how do you run scripts upon suspend/resume. do you run apmd? ___ Smartphones-userland mailing list Smartphones-userland@linuxtogo.org http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland
Re: make resume not turn the display on
"arne anka" writes: > ok, let me rephrase that: how do you run scripts upon suspend/resume. > do you run apmd? I suspend by running ~/bin/susp that runs these lines and "echo mem > /sys/power/state" (can't be sure about the path name now) to suspend. ___ Smartphones-userland mailing list Smartphones-userland@linuxtogo.org http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland
Re: make resume not turn the display on
On Fri, Oct 23, 2009 at 02:55:31PM +0300, Timo Juhani Lindfors wrote: > "arne anka" writes: > > ok, let me rephrase that: how do you run scripts upon suspend/resume. > > do you run apmd? > > I suspend by running ~/bin/susp that runs these lines and "echo mem > > /sys/power/state" (can't be sure about the path name now) to suspend. The package pm-utils provides what seems to be needed here: a way to run scripts on suspend and on resume. I've been considering making openmoko-related hooks for it since quite a bit (for example, to tell the GSM to sleep, or save/restore ephemeris, if one does not want to run ousaged). How about just adopting that? Ciao, Enrico -- GPG key: 4096R/E7AD5568 2009-05-08 Enrico Zini signature.asc Description: Digital signature ___ Smartphones-userland mailing list Smartphones-userland@linuxtogo.org http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland
Re: make resume not turn the display on
Enrico Zini writes: > The package pm-utils provides what seems to be needed here: a way to run > scripts on suspend and on resume. Yes. However, 1) I need to get rid of that "xset q" first. Having root talk to my $DISPLAY can not be a real solution. 2) I might sometimes want to "cancel" resume if a hook detects that it was spurious. Can pm-utils hooks do this? -Timo ___ Smartphones-userland mailing list Smartphones-userland@linuxtogo.org http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland
Re: make resume not turn the display on
I've been considering making openmoko-related hooks for it since quite a bit (for example, to tell the GSM to sleep, or save/restore ephemeris, if one does not want to run ousaged). i've once filed an enhancement request against fso, requesting such an infrastructure to be added, and irc, mickey lauer responded. no idea, though, how far he got. ___ Smartphones-userland mailing list Smartphones-userland@linuxtogo.org http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland
Re: make resume not turn the display on
On Fri, Oct 23, 2009 at 06:53:00PM +0300, Timo Juhani Lindfors wrote: > 2) I might sometimes want to "cancel" resume if a hook detects that it >was spurious. Can pm-utils hooks do this? I've now subscribed to the pm-utils mailing list and asked this question. Ciao, Enrico -- GPG key: 4096R/E7AD5568 2009-05-08 Enrico Zini signature.asc Description: Digital signature ___ Smartphones-userland mailing list Smartphones-userland@linuxtogo.org http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland