[ltp] external monitor on t40

Paul Kaplan linux-thinkpad@linux-thinkpad.org
Thu, 13 May 2004 05:41:04 -0400


--Boundary-00=_wK0oAf9aIdt+g5C
Content-Type: text/plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

As promised, I am attaching 2 XF86Config-4 files.

The one called XF86Config-4-Wiedner is a modification of one I obtained from 
Klaus Wiedner who posted it to the list last November and also on his T40 
website: (http://www.w-m-p.com/linux-on-t40.html).

I got different behavior under Mandrake 9.2 (kernel 2.4.22, X4.3) and Mandrake 
10.0 (kernel 2.6.3, X4.3), both with kde 3.2 (or 3.1).  My internal LCD is 
1024x768 and my external monitor is 1280x1024).

On MDK 9.2 I would get a single extended desktop with Xinerama enabled.  (With 
Xinerama disabled, I got a second ~/.kde/Desktop file the external monitor 
had it's own configurable desktop.  One can't move apps from one to the other 
by dragging.  When the external monitor isn't attached, that portion of the 
desktop is generated by X but isn't visible because there is no monitor to 
display it on...kind of a nuisance, but not a real problem.  The window 
manager's multiple virtual desktops are stacked one above the other, rather 
than laid out left to right.

When I upgraded to MDK 10, this XF86Config wouldn't work.  I would get the 
same image on both monitors.  The resolution was determined at boot time 
based on whether the external monitor was attached.  Because I stumbled upon 
the next file which works better, I never investigated the problem.

The second file (XF86Config-4-Zamboni) is a modification of one that came from 
Diego Zamboni and appeared in the November thread on dual heading.

On MDK 10.0, I get the same virtual desktop under Xinerama or two desktops 
without.  When I boot without the external monitor, I get a only the smaller 
1024x768 desktop.  The only catch to booting with the external monitor is 
that I can't connect it (through a port replicator) until after the machine 
goes through it's BIOS check (keeping it powerred off and then powering on 
after BIOS doesn't seem to work here).  Otherwise I get the same image on 
both monitors.  The resolution is 1024x768 if I take the default config.  But 
if I restart X after it autoloads, then both monitors display 1280x1024.  
Despite this boot problem, I prefer the no external monitor flexibility 
better than with the former file.  If I attach an LCD projector (or other 
external device) after X starts (in 1024x768 res), then the single image can 
be shown on one or both displays by toggling FN+F7 as for Windows.

I never tested Zamboni's file under MDK 9.2.

In the November dual head thread, Wiedner describes a wonderful approach to 
external monitors that I wasn't able to get working.  Even on a single 
machine it is possible to launch several iterations of X into the different 
virtual terminals.  Wiedner was able to harness this trick to launch a second 
X iteration using VNC to display the second iteration on the external 
monitor.  Both monitors use his XF86Config-4 file, but each uses a different 
iteration of X.  It is a useful config, because it allows one to attach an 
external monitor to an already booted machine and then display on the 
external monitor, different content than appears on the internal one.  Using 
the standard FN+F7, you can only show the same content..

Paul

On Monday 10 May 2004 10:34 am, Erik Velldal wrote:
> hi!
>
> i was hoping someone might help me out getting a workable set-up for
> using an external monitor with my t40 running RHEL 3. for the moment
> this is the roundabout way i'm doing things: i got one XF86Config file
> that works fine with my external HP L1925, and another one tuned to the
> t40's LCD. to switch between the two i have to copy the configuration i
> want to XF86Config and restart X (btw, i use gdm).
>
> does anyone have any advice on how to do this in a more sane manner,
> -i.e not restarting X every time I want to change monitor? btw, the
> Fn-F7 toggling doesn't work now either, -both screens are always on.
>
> thanks,
> cheers :)
>
> -erik

--Boundary-00=_wK0oAf9aIdt+g5C
Content-Type: text/plain;
  charset="iso-8859-1";
  name="XF86Config-4-Wiedner"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename="XF86Config-4-Wiedner"

#### PLK Custom XF86Config-4
#### startx -- -layout indep	for 1024x768 laptop LCD and 1280x1024 external LCD
####				set/unset Xinerama option
#### startx -- -layout single	for 1024x768 laptop LCD only w/ or w/o slave monitor

# COMMENTED LINES REMOVED
# XF86Config-4 (XFree86 server configuration file) generated by dexconf, the
# Debian X Configuration tool, using values from the debconf database.
#
# Edit this file with caution, and see the XF86Config-4 manual page.
# (Type "man XF86Config-4" at the shell prompt.)
#
# If you want your changes to this file preserved by dexconf, only make changes
# before the "### BEGIN DEBCONF SECTION" line above, and/or after the
# "### END DEBCONF SECTION" line below.

Section "Files"
    # Multiple FontPath entries are allowed (they are concatenated together)
    # By default, Mandrake 6.0 and later now use a font server independent of
    # the X server to render fonts.
    FontPath "unix/:-1"
EndSection

Section "ServerFlags"
    #DontZap # disable <Crtl><Alt><BS> (server abort)
    AllowMouseOpenFail # allows the server to start up even if the mouse doesn't work
    #DontZoom # disable <Crtl><Alt><KP_+>/<KP_-> (resolution switching)
EndSection

Section "Module"
    Load "ddc"
    Load "GLcore"
    Load "dbe"		# double buffer extension
    Load "dri"
    Load "extmod"
    Load "glx"
    Load "bitmap"
    Load "speedo"
    Load "type1"
    Load "freetype"
    Load "record"
    
    # This loads the miscellaneous extensions module, and disables
    # initialisation of the XFree86-DGA extension within that module.
    
    Subsection "extmod"
        Option "omit xfree86-dga"
    EndSubsection
EndSection

Section "InputDevice"
    Identifier "Generic Keyboard"
    Driver "keyboard"
    Option "XkbModel" "pc105"
    Option "XkbLayout" "en_US"
    Option "CoreKeyboard"
    Option "XkbRules" "xfree86"
EndSection

Section "InputDevice"
    Identifier "Configured Mouse"
    Driver "mouse"
    Option "Protocol" "PS/2"
    Option "Device" "/dev/psaux"
    Option "Emulate3Buttons"
    Option "ZAxisMapping" "4 5"
    Option "CorePointer"
EndSection

Section "InputDevice"
    Identifier "Generic Mouse"
    Driver "mouse"
    Option "Protocol" "ImPS/2"
    Option "Device" "/dev/input/mice"
    Option "ZAxisMapping" "4 5"
    Option "SendCoreEvents" "true"
EndSection

Section "Device"
    Identifier "Radeon0"
    Driver "radeon"
    Screen 0
    BusID "PCI:1:0:0"
    Option "CloneHSync" "28-65"
    Option "CloneDisplay" "0"
    Option "MonitorLayout" "NONE, TMDS"
    Option "CloneVRefresh" "57-75"
    Option "CloneMode" "1280x1024"
EndSection

Section "Device"
    Identifier "Radeon1"
    Driver "radeon"
    Screen 1
    BusID "PCI:1:0:0"
    Option "MonitorLayout" "NONE, TMDS"
EndSection

Section "Monitor"
    Identifier "LCD"
    Option "DPMS"
EndSection

Section "Monitor"
    Identifier "External Monitor"
    HorizSync 25-65
    VertRefresh 57-75
    Option "DPMS"
EndSection

Section "Screen"
    Identifier "LCD"
    Device "Radeon0"
    Monitor "LCD"
    DefaultColorDepth 24
    DefaultDepth 24
    
    Subsection "Display"
        Depth 8
        Virtual 1024 768
    EndSubsection
    
    Subsection "Display"
        Depth 15
        Virtual 1024 768
    EndSubsection
    
    Subsection "Display"
        Depth 16
        Virtual 1024 768
    EndSubsection
    
    Subsection "Display"
        Depth 24
        Virtual 1024 768
    EndSubsection
EndSection

Section "Screen"
    Identifier "External"
    Device "Radeon1"
    Monitor "External Monitor"
    DefaultColorDepth 24
    DefaultDepth 24
    
    Subsection "Display"
        Depth 8
        Virtual 1280 1024
    EndSubsection
    
    Subsection "Display"
        Depth 15
        Virtual 1280 1024
    EndSubsection
    
    Subsection "Display"
        Depth 16
        Virtual 1280 1024
    EndSubsection
    
    Subsection "Display"
        Depth 24
        Virtual 1280 1024
    EndSubsection
EndSection

Section "ServerLayout"
    Identifier "default"
    Screen 0 "LCD"
    Screen 1 "External" RightOf "LCD"
    
    # Option "Xinerama" "false"
    Option "Xinerama" "true"
    InputDevice "Generic Keyboard"
    InputDevice "Configured Mouse"
    InputDevice "Generic Mouse"
EndSection

Section "ServerLayout"
    Identifier "indep"
    Screen 0 "LCD"
    Screen 1 "External" RightOf "LCD"
    
    # Option "Xinerama" "false"
    Option "Xinerama" "true"
    InputDevice "Generic Keyboard"
    InputDevice "Configured Mouse"
    InputDevice "Generic Mouse"
EndSection

Section "ServerLayout"
    Identifier "single"
    Screen 0 "LCD"
    InputDevice "Generic Keyboard"
    InputDevice "Configured Mouse"
    InputDevice "Generic Mouse"
EndSection

Section "DRI"
    Mode 0666
EndSection

--Boundary-00=_wK0oAf9aIdt+g5C
Content-Type: text/plain;
  charset="iso-8859-1";
  name="XF86Config-4-Zamboni"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename="XF86Config-4-Zamboni"

#Dual headed XF86Config for T40-257551U MDK10 X4.3
#Modified from Diego Zamboni
#Section "ServerLayout"
#        Identifier     "Default Layout" 
#	Screen      0  "Screen0" 0 0
#	InputDevice    "Mouse0" "CorePointer"
#	InputDevice    "Keyboard0" "CoreKeyboard"
#	InputDevice    "DevInputMice" "AlwaysCore"
#EndSection

#Section "ServerLayout"
#        Identifier     "Singlehead" 
#	Screen      0  "Screen0" 0 0
#        Screen         "Screen0"
#        Screen         "Screen1" RightOf "Screen0"
#	InputDevice    "Mouse0" "CorePointer"
#	InputDevice    "Keyboard0" "CoreKeyboard"
#	InputDevice    "DevInputMice" "AlwaysCore"
#EndSection

Section "ServerLayout"
	Identifier     "Multihead"
#	Screen      0  "Screen0" 0 0
        Screen         "Screen0"
        Screen         "Screen1" RightOf "Screen0"
	Option         "Xinerama" "true"
	InputDevice    "Mouse0" "CorePointer"
	InputDevice    "Keyboard0" "CoreKeyboard"
	InputDevice    "DevInputMice" "AlwaysCore"
EndSection

Section "Files"
    # Multiple FontPath entries are allowed (they are concatenated together)
    # By default, Mandrake 6.0 and later now use a font server independent of
    # the X server to render fonts.
    FontPath "unix/:-1"
EndSection

Section "Module"
	Load  "dbe"
	Load  "extmod"
	Load  "fbdevhw"
	Load  "glx"
	Load  "record"
	Load  "freetype"
	Load  "type1"
#	Load  "dri"
EndSection

Section "InputDevice"
	Identifier  "Keyboard0"
	Driver      "keyboard"
	Option	    "XkbRules" "xfree86"
	Option	    "XkbModel" "pc105"
	Option	    "XkbLayout" "us"
EndSection

Section "InputDevice"
	Identifier  "Mouse0"
	Driver      "mouse"
	Option	    "Protocol" "PS/2"
	Option	    "Device" "/dev/psaux"
	Option	    "ZAxisMapping" "4 5"
	Option	    "Emulate3Buttons" "yes"
EndSection

Section "InputDevice"
# If the normal CorePointer mouse is not a USB mouse then
# this input device can be used in AlwaysCore mode to let you
# also use USB mice at the same time.
	Identifier  "DevInputMice"
	Driver      "mouse"
	Option	    "Protocol" "IMPS/2"
	Option	    "Device" "/dev/input/mice"
	Option	    "ZAxisMapping" "4 5"
	Option	    "Emulate3Buttons" "yes"
EndSection

Section "Monitor"
	Identifier   "Monitor0"
	VendorName   "Monitor Vendor"
	ModelName    "Unprobed Monitor"
#	HorizSync    31.5 - 48.5
#	VertRefresh  40.0 - 70.0
	Option	    "dpms"
EndSection

Section "Monitor"
	Identifier   "Monitor1"
	VendorName   "Monitor Vendor"
	ModelName    "Unprobed Monitor"
#	HorizSync    31.5 - 67.0
#	VertRefresh  50.0 - 75.0
	Option	    "dpms"
#        Modeline     "1280x1024" 135.00 1280 1308 1412 1676 1024 1027 1030 1056
EndSection

Section "Device"
	Identifier  "Videocard0"
	Driver      "radeon"
	VendorName  "Videocard vendor"
	BoardName   "ATI Radeon Mobility M7"
#	VideoRam    32768
        Screen      0
        BusID       "PCI:1:0:0"
EndSection

Section "Device"
	Identifier  "Videocard1"
	Driver      "radeon"
	VendorName  "Videocard vendor"
	BoardName   "ATI Radeon Mobility M7"
#	VideoRam    32768
        Screen      1
        BusID       "PCI:1:0:0"
EndSection

Section "Screen"
#       This is the LCD display  
	Identifier "Screen0"
	Device     "Videocard0"
	Monitor    "Monitor0"
	DefaultDepth     24
	SubSection "Display"
		Depth     24
		Modes    "1024x768" "800x600"
	EndSubSection
EndSection

Section "Screen"
#       This is an external monitor running 1280x1024 
	Identifier "Screen1"
	Device     "Videocard1"
	Monitor    "Monitor1"
	DefaultDepth     24
	SubSection "Display"
		Depth     24
		Modes    "1280x1024"  "1024x768"
	EndSubSection
EndSection

#Section "DRI"
#	Group        0
#	Mode         0666
#EndSection

--Boundary-00=_wK0oAf9aIdt+g5C--