Linux – tty (console): disable monitor

consolelinuxmonitors

In .xinitrc, I use

xrandr --output LVDS1 --off

to disable the monitor of my laptop (I always use a projector at school).

But, before I log in with xinit, or when I temporary go to the console (Linux virtual terminal, for example tty2 with Ctrl+Alt+F2) — simply put, then the monitor is on, and I'd like it to be off.

I suppose it is logical that it only works during X as xrandr is an X tool. So, I need to find the console "xrandr".

Best Answer

I don't think that's possible, as the driver(s) used for the virtual consoles are not that flexible. Once the *fb kernel driver is loaded its settings cannot be changed and once the fbcon module is loaded the *fb wouldn't unload (for me).

However, you just want to enable/disable a monitor and not a full equivalent to xrandr on the console, I think. There is the program vbetool which can interact with hardware a little. Depending on your hardware this tool can enable/disable your lcd panel.

The Linux kernel documentation knows a little about this. In Documentation/power/video.txt lists some alternative tools as well.

Related Question