How can I turn off my laptops screen from software side? ex.: under Scientific-linux, OpenBSD? Or the best I can do from OS side is just to show a black picture? Are there any solutions?
How to turn off screen under Linux/BSD
monitorspower-management
Related Solutions
Do you have SELinux enabled? My machine uses the ATI binary blob and it always gets denied to so the monitor is simply black.
There are some suggestions in this Redhat KB doc.
1. Using GNOME Power Managment Applet
Usually I open up the GNOME Power Management
applet and disable any dimming etc. when on AC power. Have you done these things as well?
Right click on the GNOME Power Management
icon in your taskbar:
Select Preferences from the menu:
Disable dimming and make everything else Never:
2. gconftool-2
, setterm
& xset
If the above doesn't work out you can always throw this script at it.
#!/bin/bash
# Disable screensaver start
gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t bool /apps/gnome_settings_daemon/screensaver/start_screensaver false
# Disable screensaver locking
gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t bool /apps/gnome-screensaver/lock_enabled false
# Disable screensaver altogether
gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t bool /apps/gnome-screensaver/idle_activation_enabled false
# Increase screensaver idle time (max 2h, we set to 10h)
gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t bool /apps/gnome-screensaver/idle_delay 600
# Disable DPMS screen blank on AC and battery
gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t string /apps/gnome-power-manager/ac_dpms_sleep_method off
gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t string /apps/gnome-power-manager/battery_dpms_sleep_method off
# Disable Computer sleep when on AC and battery
gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t integer /apps/gnome-power-manager/ac_sleep_computer 0
gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t integer /apps/gnome-power-manager/battery_sleep_computer 0
# Disable Display sleep when on AC and battery
gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t integer /apps/gnome-power-manager/ac_sleep_display 0
gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t integer /apps/gnome-power-manager/battery_sleep_display 0
# Disable Dim-on-Idle
gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t bool /apps/gnome-power-manager/dim_on_idle false
# Setterm
setterm -powersave off -blank 0
# xset stuff
xset -dpms
xset dpms 0 0 0
xset s noblank
xset s off
Scripts courtousey this ubuntuforum thread.
Best Answer
works for most X setups.