Code: Select all
pi@raspbmc:~$ setterm -powersave hsync
setterm: cannot (un)set powersave mode: Invalid argument
Code: Select all
sudo su
fbset -s >> /etc/fb.modesCode: Select all
fbset -xres 1184 -yres928 -depth 16Sorry, i haven't tested this with x11...Are there any more ideas to power save the monitor and awake it with proper desktop as leaved by script / programatically?
Code: Select all
sudo apt-get install x11-xserver-utils
/opt/vc/bin/tvservice -o
/opt/vc/bin/tvservice -p && fbset "1184x928" && xrefresh
Code: Select all
xrefresh -d :0.0Code: Select all
tvservice -oCode: Select all
tvservice -p && fbset -xres 1280 -yres 1024 -depth 16 && xrefresh -d :0.0
I believe fbset ignores you if nothing has changed since the last call. So I think you want to deliberately change something then change back. E.g.olberger wrote:only turns on the screen, but it stays black.Code: Select all
tvservice -p && fbset -xres 1280 -yres 1024 -depth 16 && xrefresh -d :0.0
Code: Select all
tvservice -p && fbset -depth 8 && fbset -depth 16 && xrefresh -d :0.0Code: Select all
echo $DISPLAYCode: Select all
/opt/vc/bin/tvservice -oCode: Select all
/opt/vc/bin/tvservice -p
fbset -xres 1184 -yres 928 -depth 16
fbset -depth 8
fbset -depth 16
xrefreshCode: Select all
import subprocess
import time
import os
import RPi.GPIO as GPIO
GPIO.setmode(GPIO.BOARD)
GPIO.setup(16, GPIO.IN)
subprocess.Popen('/opt/vc/bin/tvservice -o', shell=True)
while True:
mybutton= GPIO.input(16)
if mybutton== True:
subprocess.Popen('/opt/vc/bin/tvservice -p', shell=True)
subprocess.Popen('fbset -xres 1184 -yres 928 -depth 16', shell=True)
subprocess.Popen('fbset -depth 8', shell=True)
subprocess.Popen('fbset -depth 16', shell=True)
subprocess.Popen('xrefresh', shell=True)
print ("I'm awake!")
time.sleep(30)
print ("Now I go to sleep!")
time.sleep(3)
subprocess.Popen('/opt/vc/bin/tvservice -o', shell=True)
time.sleep(1)Code: Select all
echo $ DISPLAY
:0Code: Select all
pi@pi ~ $ tvservice -o
Powering off HDMI
Code: Select all
pi@pi ~ $ tvservice -p
Powering on HDMI with preferred settings
Code: Select all
pi@pi ~ $ fbset -xres 1280 -yres 1024 -depth 16 -v
Linux Frame Buffer Device Configuration Version 2.1 (23/06/1999)
(C) Copyright 1995-1999 by Geert Uytterhoeven
Opening frame buffer device `/dev/fb0'
Using current video mode from `/dev/fb0'
Setting video mode to `/dev/fb0'
Code: Select all
pi@pi ~ $ xrefresh -d :0
Code: Select all
#!/bin/sh
tvservice -p
fbset -xres 1280 -yres 1024 -depth 16 -v
xrefresh -d :0
As I've written above these are parts of the firmware, which you can get at https://github.com/raspberrypi/firmwaredarkapec wrote: I am still unsure if this situation will work for me as I do not think some of the components you are calling in your python script are available to RASPBMC users.
As my tv uses ~20 Watts of power in standby mode, I've attached an relais to one of the GPIO pins (via transistor to drive the 5volts the relais needs) and can drive it with my x10 usb remote now, cutting the main power of the tv - maybe that's the way to go for you too?darkapec wrote:So I either need to find a way to cut the power to the monitor after X amount of time or figure out how to get raspbmc to cut the signal to hdmi.