3

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".

Emanuel Berg
  • 6,903
  • 8
  • 44
  • 65
  • Does your laptop's display selecting key (Fn + F2 on my HP Mini 110) do anything? –  Aug 05 '12 at 16:11
  • On my F8, it says (in Fn font and color) "CRT/LCD" which sounds as concerning monitors, but nothing happens when I press the keys. It could be that the Fn key is not configured (I never used it, and I have a keyboard configuration based on an external keyboard) -- unless the Fn stuff is completely in the hardware. In either case, I would like it more - like the xrandr solution for X: transparent, and automatically invoked. – Emanuel Berg Aug 05 '12 at 20:37
  • I'm not sure if that's possible. The console video driver is pretty basic. There's little point in not booting into X nowadays: I recommend booting into xdm/gdm/kdm/…. – Gilles 'SO- stop being evil' Aug 05 '12 at 22:31
  • Yes, I'm not going to stop using X. The first command I give is xinit in 95 out of 100 cases. Still, I'd like to examine if it is possible to disable the monitor. – Emanuel Berg Aug 05 '12 at 23:55

1 Answers1

2

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.

Bananguin
  • 7,984