[ltp] T41p/T42p/R50p VGA and DVI Out

Carlos linux-thinkpad@linux-thinkpad.org
Thu, 05 Jan 2006 14:44:18 -0500


On Thu, 2006-01-05 at 01:22 -0800, Dave Hansen wrote:
> On Mon, 2005-12-19 at 10:16 -0500, th.trauco@neverbox.com wrote:
> > 1) Can a t42p be configured to do on-the-fly (i.e. without restarting
> > the X server) switching/cloning of the screen using fn-f7 for the VGA
> > port? 
> 
> Yes.  I just got this working today, and I used the "CloneDisplay"
> option to the free radeon driver.    My colleagues and I are learning
> that there are several ways to do this, but this method is functional
> for me.  It also allows me to switch resolutions at runtime with
> gnome-display-properties and xrandr.
> 
> The key was putting this in my xorg.conf file's Device section:
> 
> Section "Device"
>         Identifier  "Primary ATI FireGL Mobility T2"
>         Driver      "radeon"
>         BusID       "PCI:1:0:0"
>         Option      "AGPMode" "4"
>         Option      "AGPFastWrite" "on"
>         Option      "MonitorLayout" "LVDS, CRT"
>         Option      "CloneDisplay" "1"
>         Option      "CRT2HSync" "30-130"
>         Option      "CRT2VRefresh" "50-160"
>         Option      "MetaModes" "1400x1050-1600x1200 1400x1050-1280x1024 1280x1024-1280x1024"
> EndSection
> 
> You might want to add some MetaModes and CRT2 parameters which more
> closely match your projector or external monitor.
> 
> 
> > 2) If the answer to (1) is yes, could you please explain how, and maybe
> > post your xorg.conf and your acpi event script for FN-F7?
> 
> I used a custom script with acpid and xrandr to actually do the
> resolution switching with Fn-F7.  If this doesn't work, make sure to
> post the output of 
> 
> 	cat /proc/acpi/ibm/hotkey
> 
> All the script basically does is switch between the three different
> modes that I gave in the MetaModes section.  
> 
> # /etc/acpi/events/ibmvideobtn
> # This is called when the user presses the video button. It is currently
> # a placeholder.
> 
> event=ibm/hotkey HKEY 00000080 00001007
> action=/etc/acpi/ibm-thinkpad-fn-f7.sh
> 
> 
> #!/bin/bash
> # /etc/acpi/ibm-thinkpad-fn-f7.sh
>  . /etc/default/acpi-support
>  . /usr/share/acpi-support/power-funcs
>  . /usr/share/acpi-support/device-funcs
> 

Mhh.. what do these do? Where did you get them from?

> DeviceConfig;
> function xrandr_reslines
> {
>         xrandr | grep '^[ \*][0-9][0-9]*'
> }
> RES_NR="$(xrandr_reslines | grep -n ^\* | awk -F: '{print $1}')"
> NR_RESES="$(xrandr_reslines | wc -l)"
> 
> TARGET_RESLINE="$(xrandr_reslines | head -$((RES_NR%NR_RESES + 1)) | tail -1)"
> # resline format is like this:
> #  1   1400 x 1050   ( 542mm x 406mm )   0
> #echo resline: "$TARGET_RESLINE"
> TARGET_RES="$(echo "$TARGET_RESLINE" | awk '{print $2$3$4}')"
> xrandr --size $TARGET_RES
> 
> 

What about this? Is this part of a script? (sorry about the ignorance)

Thanks for your help. I can't try this right now (radeon driver is
locking up my system - debian/sid) but I will as soon as the problems
are fixed.

Carlos