I modified this Ubuntu python script
http://ubuntuforums.org/showthread.php?t=498631 which runs a command when the screensaver is invoked, to instead make it run the OpenCL miner on DEVICE 1 (which is the GPU controlling my video screen) and also modified this script to ensure it kills the OpenCL miner properly when exiting screensaver. Then I added this script to my startup programs (in addition to the python script to run on DEVICE 0), so that I now have DEVICE 0 startup mining on login and then have DEVICE 1 startup mining when screensaver is invoked. That's a total of ~56,000 khash/sec when my screen saver is on using both cards of my GF9800GX2!
#!/usr/bin/python
import os
import time
import subprocess
screensaver_started = 0
running = 0
while 1:
active = 0
out = ""
if screensaver_started == 0:
# Don't do anything if the screensaver isn't running
s = os.popen("pidof gnome-screensaver")
spid = s.read()
s.close()
if len(spid) > 0:
screensaver_started = 1
else:
h = os.popen("gnome-screensaver-command -q", "r")
out = h.read()
active = out.find("inactive")
h.close()
if active < 0 and running == 0:
p = subprocess.Popen(['python', 'poclbm.py', '-d', '1', '--user', 'un', '--pass', 'pw'])
running = 1
elif active > 0 and running == 1:
p.kill()
running = 0
time.sleep(5)
Update: I fixed a small bug...what you see above is corrected.