Prevent interference with DPMS?
#1
Hello.

TLDR version: I can't get DPMS settings to reliably revert once quitting XBMC inside a Gnome/metacity session. Is it possible to disable XBMC's interference with DPMS entirely? If it isn't, should it be?

---

I realise this is quite the opposite of what most people are trying to achieve, but there you go.

I'm running an O2 Joggler with Ubuntu 9.10 Gnome/metacity, using XBMC 2:10.00~svn33778-karmic1. I have the following script bound to a panel launcher;

Code:
#!/bin/sh

ans=$(zenity --width=500 --height=230 --title="Screen Power Management" --list --text "Backlight control" --radiolist --column "Select" --column "Action" FALSE "Off" FALSE "2 Minutes" FALSE "30 Minutes" FALSE "3 hours";)
if [ "$ans" = "Off" ] ; then
xset -display :0 dpms force off
fi
if [ "$ans" = "2 Minutes" ] ; then
xset -display :0 dpms 120 0 0
fi
if [ "$ans" = "30 Minutes" ] ; then
xset -display :0 dpms 1800 0 0
fi
if [ "$ans" = "3 hours" ]; then
xset -display :0 dpms 10800 0 0
fi

[ETA - well, I've discovered the first problem anyway! dpms values are space separated, not comma separated... We'll see whether that helps...]

And I'm using the following script to run XBMC;

Code:
#!/bin/sh

if ps ax | grep -v grep | grep xbmc
then
  wmctrl -c xbmc
  sleep 5
  killall xbmc
  killall xbmc.bin
fi

rm /home/joggler/xbmc_crashlog*

xbmc
xset -display :0 dpms 1800 0 0

Sometimes, I'll leave the thing alone for a bit after having run XBMC, and come back to find the screen still on. I'm not 100% sure this is anything to do with XBMC as it would *sometimes* happen before I installed it, but it seems more common now. This does not seem to depend on any XBMC GUI power management options - or on how I quit it (which is often, savagely enough, using 'xkill' bound to another launcher).

Questions:

1) Can anyone see a way to get my scripts to work better? [Have now, figuring out that I was separating the dpms settings wrongly, updated them to set 'suspend', and 'off' 60 and 120 seconds respectively after the 'standby' time. All three seem to do the same thing on the joggler (switch off the backlight), but hopefully three attempts each time will get it to turn off reliably. Will update...] This would be the optimal solution, in many ways, because then I could have different screen blanking timeouts depending on what I was doing with the device.

2) Alternatively, is there a way, preferably without recompiling, to disable XBMC's interference with power management entirely?

3) If there isn't, are there good reasons not to propose it as an option?

Thanks.
Reply

Logout Mark Read Team Forum Stats Members Help
Prevent interference with DPMS?0