gnome-power-manager and gnome-screensaver seem to be very confused by the closed lid. Looks like gnome-power-manager does not function once the lid is closed. gnome-screensaver at least starts the screensaver on the external monitor most of the time. I implemented a poor-mans version of screensaver management. I am running the following script every minute in crontab. manual-screensaver.sh :
In the screensaver configuration set the screensaver to start slightly later.Code:#!/bin/bash # this is a workaround for screensaver problems with external monotor # on lenovo. gnome-screensaver and gnome-power-manager seem to get # confused since the laptop screen is disabled and the lid is closed. export DISPLAY=:0.0 SCREENSAVER=300000 #milliseconds DISPLAYSTANDBY=600000 SS_STATE=`gnome-screensaver-command -q` ss_is() { [[ "${SS_STATE}" =~ "The screensaver is $1" ]] } ss_is 'being inhibited' && exit IDLE=`xprintidle` # in milliseconds [ $IDLE -lt $SCREENSAVER ] && exit if [ $IDLE -lt $DISPLAYSTANDBY ] ; then ss_is active || gnome-screensaver-command -a elif ss_is active ; then gnome-screensaver-command -d xset dpms force standby fi



Adv Reply

Bookmarks