[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Monitor switched off after resume from hibernation



On Sun 08 Jan 2017 at 07:59:39 (+0100), solitone wrote:
> On Saturday, January 7, 2017 1:35:07 PM CET David Wright wrote:
> > you could go on to combine it with the
> > hibernation process to make sure that the monitor was on just before
> > hibernation started. (There might be some sort of serialisation
> > required to make sure the two actions occur in the right order. You
> > don't want a race.)
> 
> What sort of serialisation are you referring to? I tried with the following 
> script, but won't work:
> 
> $cat /usr/lib/systemd/system-sleep/screen_hack_hibernate
> 
> if [ "$2" = "hibernate" ]; then
>     case "$1" in
>         pre)
>             xset -display :0 dpms force on
>             ;;
>     esac
> fi
> 
> I thought it would be run just before hibernate (it's the same technique I use 
> to unload the driver of my wifi adapter before hibernate, to prevent some other 
> network issues I had) , but it doesn't.

I can only answer you in the vaguest terms. I thought you might add a
service that has to run before hibernate, and it would contain a
Before= (or hibernate an After= ) line to make sure that turning on
the monitor preceeded the hibernation.

If you manage this, perhaps with others' help, you'll be ahead of me
on the systemd learning curve.

BTW I haven't bothered to respond to Stefan Monnier's contribution.
I can imagine scenarios that might cause power consumption when a
machine is off (like network cards running to watch for magic WoL
packets, and things like that), but a machine in hibernation should
cope with a power cut. In any case, I support your expectation that
using sleep/hibernate should not involve compromising monitors'
power-saving behaviour.

Cheers,
David.


Reply to: