Friday, February 11, 2011

Howto clone Ubuntu 10.04 display on a projector

The Ubuntu 10.04 on HP ProBook 4420s was able to connect to the projector by pressing the fn+f4 keys. This cycled through 4 modes but nothing that allowed me to view a clone of the display on laptop and projector.

Here are steps to resolve this (results in 800x600 for most projectors).

Step 1: Login to laptop and then plug-in projector.

Step 2: Identify the mode available for 800x600 and add to the existing display modes

xrandr -q
cvt 800 600

example of output:
nicholas@nicholas-laptop-kde:~/scripts$ xrandr -q
Screen 0: minimum 320 x 200, current 1366 x 768, maximum 8192 x 8192
VGA1 disconnected (normal left inverted right x axis y axis)
LVDS1 connected 1366x768+0+0 (normal left inverted right x axis y axis) 310mm x 174mm
1366x768 59.6*+
640x480 59.9

$ cvt 800 600
# 800x600 59.86 Hz (CVT 0.48M3) hsync: 37.35 kHz; pclk: 38.25 MHz

Modeline "800x600_60.00" 38.25 800 832 912 1024 600 603 607 624 -hsync +vsync

Step 3: Create following script called clone800x600.sh that add the 800x600 capability to the display and enables on both projector and laptop. Notice the bold fonts above is copied to the first xrandr command below.


#!/bin/bash
xrandr --newmode "800x600_60.00" 38.25 800 832 912 1024 600 603 607 624 -hsync +vsync
xrandr --addmode LVDS1 800x600_60.00
xrandr --output VGA1 --off
xrandr --output LVDS1 --off
xrandr --fb 800x600
xrandr --output VGA1 --mode 800x600 --rate 60
xrandr --output LVDS1 --mode 800x600_60.00 --same-as VGA1 --auto --scale 1x1 --panning 0x0

Step 4: Make executable and run the script

chmod u+x clone800x600.sh
./clone800x600.sh

To switch back to original settings, press fn+f4.

Next, try to get it working at higher resolution that the projector can support.

5 comments:

kesten broughton said...

looked promising
I'm running ubuntu 11.10 with an ATI radeon HD 5470 card.

upon running the script i get a few errors such as
warning: output VGA1 not found; ignoring

kesten broughton said...

This worked for me on ubuntu 11.10 with an ATI Radeon HD 5470 card.

I also had to change the lines that said
LDSA1 and VGA1 to LDSA and VGA as my output showed LSDA not LDSA1 and the latter wasn't recognized.

Thanks! I searched for hours and tried many other suggestions before this worked.

Note: I had to reboot for the effects to take place, however, when i ctrl+alt+f1 to tty1, this signal did go to the projector, even before rebooting.

darKoram

Tboxmy said...

Kesten,
It shouldn't require reboot to work. But if it works for you, then great!

fegyi001 said...

I have problems as well.
I work on a PC, not a notebook, using 2 monitors with extended (not cloned) desktop.
I would like to use a projector instead of the second monitor.

I would not want to replace my first monitor to the projector, only to extend its desktop as it were a second monitor.

I put the VGA cable from my second monitor to the projector. It said "no signal". I tried this method with xrandr, but the result was that my still working monitor returned blank and the projector still didn't work. With Crtl+Alt+F1 I managed to return to my monitor but to the tty screen, and I was unable to return my normal desktop (Crtl+F7 didn't help, the screen became blank again).

I must admit I'm quite new to Ubuntu, I use 11.10.

I would be grateful for any ideas/advices.

fegyi001 said...

I have problems as well.
I work on a PC, not a notebook, using 2 monitors with extended (not cloned) desktop.
I would like to use a projector instead of the second monitor.

I would not want to replace my first monitor to the projector, only to extend its desktop as it were a second monitor.

I put the VGA cable from my second monitor to the projector. It said "no signal". I tried this method with xrandr, but the result was that my still working monitor returned blank and the projector still didn't work. With Crtl+Alt+F1 I managed to return to my monitor but to the tty screen, and I was unable to return my normal desktop (Crtl+F7 didn't help, the screen became blank again).

I must admit I'm quite new to Ubuntu, I use 11.10.

I would be grateful for any ideas/advices.

Blog Archive