When giving a presentation you have to get the projector working quickly and correctly otherwise it might get embarrassing. Many laptops have a special button to control the external screen but that does not always work with Linux or with some configurations, as sometimes there are too many things for the computer to figure out. Best thing to do is learn a couple of commands to control the external VGA output and do the thinking ourselves.
First some easy stuff: let’s disable the screensaver and the automatic inactivity power saving mode, as we want our screen to be ready and visible throughout the presentation.
xset s off
These two commands tell the X server to disable DPMS on the monitor and the screensaver as well. Everything can be set back to normal like this:
xset s on
Now we have to take care of the external output. The command here is xrandr, which stands for “X Resize And Rotate“. Reading its man page it’s really worth the trouble as this command is going to be more and more important with future releases of Xorg, but let me get you introduced first.
Screen 0: minimum 320 x 200, current 1440 x 900, maximum 1440 x 1440
VGA disconnected (normal left inverted right)
LVDS connected 1440×900+0+0 (normal left inverted right) 303mm x 190mm
1440×900 60.0*+
1280×800 60.0
1280×768 60.0
1024×768 60.0
800×600 60.3
640×480 59.9
TMDS-1 disconnected (normal left inverted right)
TV disconnected (normal left inverted right)
As you see invoking xrandr with no parameters just lists all the outputs, resolutions and rotations available and thus is a good way of discovering what resolution the external projector/monitor might like best.
To go further there is a choice to make: using the same resolution on the laptop screen and the projector or using two different resolutions. The first approach make sure that the audience see the very same screen you see and it is a little less prone to errors. It can be achieved like this:
xrandr –output VGA –mode 1024×768 –rate 60
QUICK NOTE 1: the name of the outputs may vary on your computer, check using xrandr without parameters.
QUICK NOTE 2: most projectors support up to 1024×768, some old model stop at 800×600. A 60Hz vertical refresh is probably the best choice too.
QUICK NOTE 3: not every video driver supports the latest xrandr features.
1024×768 is generally supported on any laptop though it usually look horrid, especially on widescreen LCDs. Also it might be useful to keep a little part of the notebook screen for something for your eyes only, or to use some program that works poorly at 1024×768.
Some smaller computers, like the Asus Eee, instead won’t even do 1024×768, so there are some reasons behind wanting to use two different resolutions.
In this case the smaller resolution will see just a precise area of the entire desktop. Luckily this works quite well with many programs, for example with Gnome I found that:
- panels can be placed on the small screen or on the big one just by dragging them around.
- if you place a window in the small screen and maximize it it will usually grow to cover that screen only, not the larger one. Openoffice and evince presentation mode works this way too.
So how is it done?
This will leave the laptop panel resolution intact and map the VGA output to an area of 1024×768 pixels, starting 0 pixels from the left and 25 from the top. You may adapt that to your needs. I use that because I have the gnome panel on top of the screen with an height of 24 pixels.
I suggest to try some different setups with some time on your hands and build a couple of little scripts or aliases. This is how it looks for me:
Some links:



on March 15th, 2008 at 11:10 am
Se ti sentisse Alan…
on March 15th, 2008 at 11:15 am
Queste robe per fortuna le leggono altre persone…
on March 15th, 2008 at 11:25 am
Cmq io ho avuto un sacco di problemi col monitor secondario su ubuntu. Adesso è un po’ che non pratico col secondario, forse era solo una questione di aggiornementi, c’è stato un periodo che su google era un problema asfissiante quello che gnome “perdeva” le info sul monitor primario modificando quello secondario. Ovviamente sto parlando dell’interfaccia grafica di gestione delle periferiche video. Hai presente? =) Quello che poi devono usare le persone “normali” se Linux fosse largamente distribuito
Ciau!
on March 15th, 2008 at 6:31 pm
Ecco, io sono un tipico caso di “embarassed guy”, visto che ho avuto problemi con l’uscita video sia al LinuxDay che al corso all’Uni…
Per la prossima lezione non voglio assolutamente farmi cogliere impreparato, mi studio a memoria l’how-to che hai linkato e cerco di trovare una quadra, perchè non è davvero possibile che ogni volta debba cristonare come una scimmia impazzita.
I tuoi esperimenti si possono adattare anche ai driver VESA? E che tu sappia, quei dannati proiettori a che frequenza viaggiano? Perchè nel mio caso sembrava che X.Org fallisse durante le fasi di “probing” (vuoi per la risoluzione, puoi per la frequenza fuori dal range consentito).
Ah, comunque l’Asus EeePC va a 800×480, ma se colleghi un monitor o altro all’uscita VGA arriva a 1024×768 e forse anche oltre.
Bel post, comunque! Very interesting!
on March 16th, 2008 at 11:03 am
@Gillo siamo in un momento di transizione sia per Xorg che per i tool di configurazione grafici. Dalle prossime release arriveranno nuovi programmi che sfrutteranno meglio xrandr, come quello che ho linkato in fondo.
@d1s4s3r i proiettori viaggiano a 60Hz solitamente. Su vesa non sono del tutto sicuro ma credo che supporti xrandr. Il problema potrebbe essere che non essendo caricati i driver giusti magari non vengono trovati gli output esterni. Te avendo una nvidia (?) potresti usare nvidia-config, ma se hai stai usando i driver legacy forse non ci sono le funzionalità per il secondo monitor che ci sono negli ultimi driver nvidia.