API to turn off the display
jim at thebadger.org
Thu Jan 29 15:27:10 PST 2004
On Thu, 2004-01-29 at 19:40, Jesse Guardiani wrote:
> James Green wrote:
> > Interestingly, however, is that:
> > # sysctl hw.acpi.video.lcd0.active=0 && acpiconf -s 1
> > will turn off the LCD and suspend gracefully, whereas
> > # xset -display :0 dpms force off && sysctl hw.acpi.video.lcd0.active=0
> > && acpiconf -s 1
> > just locks everything up... (discovered by adding the commands to
> > /etc/rc.suspend and getting a lock up)
> What about from SSH? I've found that things sometimes need a bit of a delay
> to work properly from /etc/rc.suspend.
I have found that too. I did most of my testing over ssh, until I setup
a serial login console (boot -h, and appropriate line in /etc/ttys) , so
I could see any messages that I might be missing... and I could not
reproduce the hang. Suspended without any problem at all. Tried booting
with the -h and I could reproduce the hang every time.
Recompiled the kernel with:
and now it all works!
I added to rc.suspend:
xset -display :0 dpms force off
and to rc.resume:
xset -display :0 dpms force on
The order of DPMS and ACPI is important. This works on both the console
and in X. Next up is to add in ataidle...
More information about the freebsd-current