DPMS and Ubuntu - Printable Version
+- Kodi Community Forum (http://forum.kodi.tv)
+-- Forum: Support (/forumdisplay.php?fid=33)
+--- Forum: General Support (/forumdisplay.php?fid=111)
+---- Forum: Linux and Live support (/forumdisplay.php?fid=52)
+---- Thread: DPMS and Ubuntu (/showthread.php?tid=176410)
DPMS and Ubuntu - presslab - 2013-10-24 03:28
I'm getting started with XBMC and it's great, I'm really enjoying it. There are a few things I'm trying to iron out to get the "girlfriend" approval rating.
My question relates to DPMS and Ubuntu. I'd like a way to turn off the monitor with a button on the remote. I found the "ToggleDPMS" action which should do the trick, but it's not quite working right on Ubuntu and I think I have an idea why.
The first problem is that while ToggleDPMS turns off the screen, it will sometimes come right back on. I think what's happening here is that the "keyup" event is bringing the monitor out of DPMS. I don't believe that it's XBMC that is waking the monitor, I think it's Ubuntu/X11. I've read that a small sleep before turning off DPMS is required for this reason.
The second problem is that moving the mouse or tapping a key brings the monitor back on. Unfortunately XBMC doesn't realize this as it thinks the monitor is in "manual" DPMS mode and it shouldn't be waking up. The effect is that the screen only updates at 5 FPS until executing ToggleDPMS again, bringing things back to normal.
So my question is how can I disable the DPMS wake in Ubuntu/X11? I tried "xset -dpms" but that doesn't disable the wake, just the automatic screen off while in Ubuntu. I know that XBMC is SDL, and therefore SDL also disables the automatic screen off which seems to work fine. But none of these things disable the screen wake on keypress/movement.
Anyone have an idea of where I should look? Thanks!
RE: DPMS and Ubuntu - presslab - 2013-10-24 20:54
It seems this DPMS wake happens in two places. In X11 xf86Xinput.c, as well as gnome-settings-daemon gsd-power-manager.c. It's possible to disable the power plugin on gnome-settings-daemon, but it's not possible to disable the X11 wake up without patching X11. So it seems to me there is no way to get ToggleDPMS working correctly on Linux without a major hack.
RE: DPMS and Ubuntu - chemstar - 2013-10-25 09:51
i've described the same problem two weeks ago at
https://github.com/OpenELEC/OpenELEC.tv/issues/2675. take a look
RE: DPMS and Ubuntu - wsnipex - 2013-10-25 15:14
that translates to: try running xbmc-standalone/xbmc session instead of from a desktop
RE: DPMS and Ubuntu - presslab - 2013-10-26 05:46
Thanks for the replies. I guess I'd rather keep the window manager though as I want to run game emulators and web browsers. Although wouldn't the code in xf86Xinput.c still be running without a window manager? Maybe the input plugins are disabled when running standalone.
I have been working on a solution, a script that runs on XBMC startup. Although it's kludgey, it is pretty much working. It also allows for a few things like a way to disable the DPMS when in an emulator.
If anyone wants to look at the code and suggest improvements that would be appreciated.
RE: DPMS and Ubuntu - presslab - 2013-11-01 07:33
Well to fix some other issues with SDL, I decided to try Lirc to see if I could bypass all the other input stuff. Yes, it works; the DPMS does not wake when Lirc captures the input. Lirc must be blocking the rest of the input system from getting the events. The mapping is all screwed up though, for example none of the A-Z letters work, but I can fix this. I might keep the script though as I can't see any way to disable DPMS temporarily, for when I run the game emulator.
So I would recommend using Lirc with XBMC under Linux, even with a standard HID input device. Using Lirc also fixed my volume key not repeating, which is another weird SDL problem.