Comment 16 for bug 65791

Revision history for this message
John Dong (jdong) wrote :

A horrific workaround I'm currently using is a python script in the background that checks DPMS periodically and resets it if it's an unexpected value....

jdong@jdong-laptop:~$ cat /usr/local/bin/dpmswatch
#!/usr/bin/python
import os
import time
while True:
  st=os.popen('xset -q | grep Standby').read()[:-1].strip()
  if st != "Standby: 120 Suspend: 120 Off: 120":
    print "Bad DPMS:",st
    os.system('xset dpms 120 120 120')
  time.sleep(10)

jdong@jdong-laptop:~$ cat .kde/Autostart/displayconfig-restore
#!/bin/bash
python /usr/local/bin/dpmswatch &