I have recently bought a laptop (an Acer 6930G by the way) and plug it to my existing LCD screen. I want to share my new screen configuration. I wanted to have an easy way to switch on or off one of the 2 screens, or switch on both to have a dual screen config. The method described here was tested only on my laptop, using the NVidia non-free drivers, configured as twinview in the nvidia-settings programm.
In the file /etc/X11/xorg.conf, you have to put a line like the following one under the *Screen* section:
Option “metamodes” “CRT: nvidia-auto-select +1366+0, DFP: nvidia-auto-select +0+0; CRT: nvidia-auto-select +1365+0, DFP: NULL; DFP: nvidia-auto-select +1366+0, CRT: NULL”
Basically, this creates 3 different modes (each separated by “;”) between which you will be able to switch. The first uses both screens, CRT and DFP and set the absolute positions of each screen. The second tells Linux to use only the CRT screen, so the laptop screen will be off. The last uses only the laptop screen and switch off the CRT one. My laptop screen is 1366 pixel width, so in dual screen config, my CRT screen is positionned at x=1366 in the virtual desktop spanning on both screens. On my desk, my laptop is on the left and my CRT screen on the right.
As you can see, when using only one screen (wether it be the laptop or the CRT), I set it on the right of the virtual desktop because that is where my icons are and I want to see them even when I am single screening.
But for the moment, we only *defined* the 3 modes. In oder to switch between them, you just have to use xrandr.
xrandr -s 0 will set the dual screen config
xrandr -s 1 will switch off the laptop screen and
xrandr -s 2 will display only the laptop screen
Just make sure to reload X once you have modified the xorg.conf file before trying those commands.
- I am able to switch between screens configurations live
- When dual screening, I have a problem with fullscreen flash video which display only on one screen, and some parts of the video are not displayed. With this technique, I can switch off one of the 2 screens easily before watching a video.
- For gaming, it is the same. In dual screen, games consider that my screen resolution is 3046*1050. that’s not true, it only the virtual desktop that is this size ! So I have to shut one screen down before running a game.
Some problems though:
- when using only the CRT screen, I can’t position it at 1366 as in the dual setup. I have to set it to 1365 (as you can see above). I don’t know why !
Please, tell me you experience with Dual screen and Ubuntu
Update 1: the first metamode listed in xorg.conf will be the one used by default at boot. But if you specify to boot in the CRT only mode and that this screen is not plugged, what will happen ? Will you see nothing ? No, the driver is intelligent enough to set the “laptop screen only” mode automatically
Update 2 (2009-03-03): It seems that on startup, if I’m in mode 0, I can’t change to another mode immediately. I have to run first the command to set in mode 0, and then I can change to another screen setup mode. So strange !