Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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

share|improve this question
    
Does your laptop's display selecting key (Fn + F2 on my HP Mini 110) do anything? –  AlexWebr Aug 5 '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 5 '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 Aug 5 '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 5 '12 at 23:55
add comment

1 Answer

up vote 3 down vote accepted

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.

share|improve this answer
    
100% correct: sudo vbetool dpms off shuts my laptop monitor off, but doesn't affect the projector. –  Emanuel Berg Aug 6 '12 at 14:47
    
I've never heard of vbetool - great answer! –  AlexWebr Aug 6 '12 at 15:08
    
@user1129682: Do you know how to make this option default? Or maybe how to always run it before you get to the tty login prompt? I put it in .profile - it works, but requires the super user password each time. –  Emanuel Berg Aug 13 '12 at 0:44
    
@user1129682: Never mind, found it: /etc/rc.local –  Emanuel Berg Aug 13 '12 at 12:41
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.