DPMS without X

I am looking for a way to turn the monitor of my laptop off without using X.

My system is a:
Code:
FreeBSD 10.1-RELEASE-p6 #0: Tue Feb 24 18:57:59 UTC 2015
root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  i386
Installed on an HP Compaq Presario V3700 laptop.

With X on, the monitor can be turned off, presumably by DPMS, automatically after a certain period of time when there are no keyboard events or mouse events. I can even do:
sleep 1; xset dpms force off
to turn off the monitor manually, without even becoming a super user.

Without X, I have no luck in doing so, even being root. I have tried setting hw.acpi.video.lcd0.active to 0, but the system wouldn't let me do that, insisting that it should be 1. I have also tried using acpiconf, but it is not possible to just turn the monitor off while keeping the system running. I have also tried sysutils/vbetool, but it doesn't seem to work on my system, even if I did sysctl security.bsd.map_at_zero=1.

Is there an easy way to use DPMS with console (so without X) to control my monitor, preferably without using the superuser privilege? Thank you!

PS: I should also mention that I am still using the syscons(4) driver.
 
Have you tried the blank screensaver? It doesn't actually turn the screen off, just blanks it. For some situations, that might be good enough. YMMV, and all that jazz.
See rc.conf(5) for how to set it up.
 
I have tried setting hw.acpi.video.lcd0.active to 0, but the system wouldn't let me do that, insisting that it should be 1
From acpi_video(4):
Code:
BUGS
Some systems only perform output switching via SMM even though they
export the proper information via ACPI. On such systems, the proper
hotkeys or OEM driver (for example, acpi_toshiba(4)) must be used
instead.
 
Have you tried the blank screensaver? It doesn't actually turn the screen off, just blanks it. For some situations, that might be good enough. YMMV, and all that jazz.
See rc.conf(5) for how to set it up.
Yes, I have. But I think I need more than just blanking. I want to turn the screen off.
 
From acpi_video(4):
Code:
BUGS
Some systems only perform output switching via SMM even though they
export the proper information via ACPI. On such systems, the proper
hotkeys or OEM driver (for example, acpi_toshiba(4)) must be used
instead.
I don't think there is a hotkey I can use on my laptop to turn the screen off. And after loading all the possible OEM modules, I still couldn't change the varible to 0 (so the screen stayed on). I have been using acpi_video(4) to adjust brightness of my screen though; it has always been working; I just couldn't turn it off.
 
I don't think there is a hotkey I can use on my laptop to turn the screen off. And after loading all the possible OEM modules, I still couldn't change the varible to 0 (so the screen stayed on). I have been using acpi_video(4) to adjust brightness of my screen though; it has always been working; I just couldn't turn it off.
While this is an old thread. I suddenly needed this information. Thanks for this thread.

There's x11/sxhkd which can now be used with multimedia keys (Thread howto-enabling-multimedia-keys-gamepads-joysticks-for-desktop-usbhid.84464).

~/config/sxhkd/sxhkdrc
Code:
shift + XF86Audio{Mute}
        {sleep 1;xset dpms force off}
I tied this to Shift Mute, as it's the video equivalent of audio mute.
 
I am looking for a way to turn the monitor of my laptop off without using X.

My system is a:
Code:
FreeBSD 10.1-RELEASE-p6 #0: Tue Feb 24 18:57:59 UTC 2015
root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  i386
Installed on an HP Compaq Presario V3700 laptop.

With X on, the monitor can be turned off, presumably by DPMS, automatically after a certain period of time when there are no keyboard events or mouse events. I can even do:
sleep 1; xset dpms force off
to turn off the monitor manually, without even becoming a super user.

Without X, I have no luck in doing so, even being root. I have tried setting hw.acpi.video.lcd0.active to 0, but the system wouldn't let me do that, insisting that it should be 1. I have also tried using acpiconf, but it is not possible to just turn the monitor off while keeping the system running. I have also tried sysutils/vbetool, but it doesn't seem to work on my system, even if I did sysctl security.bsd.map_at_zero=1.

Is there an easy way to use DPMS with console (so without X) to control my monitor, preferably without using the superuser privilege? Thank you!

PS: I should also mention that I am still using the syscons(4) driver.
9 years later and still not available. Are there like hardware limitations to implement this?
 
9 years later and still not available. Are there like hardware limitations to implement this?
A number of years ago, the answer was "just run Xorg" for DPMS. But since everything has moved to kernel modesetting it is probably a little more feasible now.

(i.e OpenBSD has the ability to do this).

Check out FreeBSD's vidcontrol(1). It looks like there is a -t screensaver mode.

Some more info from 2021.

That said, if you are using the old usermode setting stuff (on older hardware), running Xorg (or extracting the more complex code from the usermode driver) might still be the only way. Blanking the screen isn't quite the same as DPMS.
 
Last edited:
I forgot, that the text console doesn't have use of multimedia keys and use of hotkey shortcuts.

Probably alas commands to a shorter command in your .shrc equivalent. I missed that about how it didn't work in the console.

Vidcontrol didn't work on mine, but that may be the way. I tried using man -k looking for drm modules and other software in the kernel.

I needed to make a correction from above, regarding of in X, it was within the .config/ directory.
 
One thing to test is if the screen turns off if the laptop lid is shut. Some of them do (hardwired into the BIOS/firmware).

Usually closing a laptop lid and running it (i.e as a server) is not recommended. It gets quite warm. However you might be able to find the mechanism / sensor in the hinge and push it down with some i.e blu tack. A bit cheesy but desparate times call for desparate measures ;)
 
9 years later and still not available. […]
We do already support dpms(4). However,​
[…] The dpms(4) driver is only required for putting the screen into standby via the VESA BIOS when suspending the machine, and this only works if VESA support is present […]. […]
So we just do not support some command that merely transmits some DPMS signals or a screensaver timeout configuration (for “Newcons” = vt(4)) as of yet.​
[…] Are there like hardware limitations to implement this?
I don’t think so, yet DPMS is really just a tiny fraction of getting pixels lit on your screen.​
[…] Check out FreeBSD's vidcontrol(1). It looks like there is a -t screensaver mode. […]
Your comment gives the impression you didn’t use FreeBSD, at least not on the console. The vidcontrol(1) command (including its screensaver ‑timeout parameter) has been available since (at least) FreeBSD version 1.1.5.1 (released in 1994). It has always been using an ioctl(2) (CONS_BLANKTIME) on the device. The device is sc(4) or vt(4). The CONS_BLANKTIME ioctl(2) is not implemented yet for vt(4), PR 233356.​
[…] check out saver and blanktime in rc.conf […]
These are no “magic” parameters. They simply invoke vidcontrol or load a kernel module.​
[…] Usually closing a laptop lid and running it (i.e as a server) is not recommended. It gets quite warm. […]
You can at least easily put it upside‑down. The base (the section that gets warm) facing up, the display at the bottom (on the table or other surface) so it doesn’t inhibit convection too much.​
 
Your comment gives the impression you didn’t use FreeBSD, at least not on the console. The vidcontrol(1) command (including its screensaver ‑timeout parameter) has been available since (at least) FreeBSD version 1.1.5.1 (released in 1994). It has always been using an ioctl(2) (CONS_BLANKTIME) on the device.​
Really? I assume you just misunderstood my post. (plus when you use a KVM switch, screen blanking is a non-issue)
Whilst screen blanking isn't quite the same thing as DPMS, vidcontrol is indeed something for the OP to look into, which is why I suggested it in the previous post and the one from 2021.

That said, I am not entirely convinced that since the move to the more recent vt(4) console, that the older ioctls for sc(4) are still functional. There could easily be some bitrot the the OP is running into. Have you tried syscons recently? I used it with my old T23 (s3 savage) as an SSH tunnel during the COVID era. Things were starting to break a little with the older console system.

These are no “magic” parameters. They simply invoke vidcontrol or load a kernel module.​
I think it is safe for you to assume everyone knows that (i.e shell interpreters tend to not call ioctls directly). However, signposting to relevant manpages for more details is the correct thing to do when people ask for technical help (likewise I directed towards vidcontrol(1) earlier in the thread).
 
Back
Top