[ltp] Fun with 1920x1200 on T42

Marius Gedminas linux-thinkpad@linux-thinkpad.org
Sun, 24 Jun 2007 14:05:32 +0300


--DocE+STaALJfprDB
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Sat, Jun 23, 2007 at 05:32:18PM -0700, Bill Sheppard wrote:
> I just got a nifty new 24" monitor @ 1920x1200.  I'm having challenges
> getting it running on my T42 with ATI 9600 (1400x1050 internal).  I've
> been able to make it work dual-head, where the two screens are entirely
> separate, but I'd prefer to use clone mode where the smaller screen
> scrolls to emulate the larger screen.  Is this possible when the
> external screen is larger?

Yes.  I've got it working on my T42 with ATI 7500 (1024x768 internal)
with an external 1280x1024 LCD.

> When I try it my Xorg.log says 1920x1200 not a valid mode.

Disclaimer: I'm going to talk about the pre-RandR-1.2 'radeon' driver.
(It seems form your attached xorg.conf files that you use the same one).

I had to add CRT2HSync and CRT2VRefresh options, as well as a MetaModes
option to get a clone mode that matches the larger resolution, with the
internal LCD scrolling around.  Also, you probably need to mention
1920x1200 in the Screen section as a valid mode.  And you should only
use one Screen section, not two, in the ServerLayout section.

The /var/log/Xorg.0.log file should say why the server thinks 1920x1200
is not a valid mode, I think.  There should be something about
discarding it because, say, hrefresh is out of range.

> Alternatively, is there a mode where I can at least drag windows or
> migrate apps from one screen to the other (I'm running KDE)?  I don't
> want to have to close apps running on the external window in order to
> reopen them on the internal when I'm preparing to go from home to where
> I'll only have the laptop's LCD screen.

Yes.  It's all done with MetaModes and xrandr.  (In the future, when
RandR 1.2 support trickles down to all the Linux distributions, it'll be
done with just xrandr).

If your MetaModes contains

  1400x1050-1920x1200
  1400x1050+1920x1200
  1400x1050

then you will be able to switch at runtime between dual-head (with the
ability to drag windows around), clone mode at the higher resolution
(with the internal LCD scrolling) and clone mode at the lower resolution.

You do not need to enable Xinerama, and you do not need two Screen sections
in the ServerLayout section -- it's all done with the radeon driver's
MergedFB code, which is enabled by default on any reasonably recent X versi=
ons.

Another disclaimer: this is what works on my Radeon 7500 with 1024x768
and 1280x1024.  I don't know if the 9600 can handle a combined 3320x1200
desktop for the dual-head metamode.

I know that I sacrifice working 3D acceleration (and therefore Compiz)
because my 2304x1024 combined mode is too large for the 3D accelerator
in the 7500, and also it eats too much video memory out of the 32 megs
my 7500 has leaving not enough for textures.

> And, finally, is there a way to have the external be the "primary"
> screen, i.e. so my main desktop shows up there?  I tried changing the
> external to screen0 rather than screen1 but just got a blank screen.

You could play with the MergedXineramaCRT2IsScreen0 option.

> Two Xorg.confs are attached - xorg.conf.clone doesn't give me 1920 on
> the external.  xorg.conf.dualhead works fine, but doesn't let me migrate
> apps.

If you're interested, you can look at my working xorg.conf at
http://mg.pov.lt/xorg.conf.  It's more complicated than necessary,
because I experimented with various server layouts.

xorg.conf.clone:
> Section "Monitor"
>   Identifier   "LCD"
>   # HorizSync    30-81
>   # VertRefresh  56-75
>   Option "DPMS"
>   DisplaySize  287 215
> EndSection
>=20
> Section "Monitor"
>   Identifier   "BenQ 241W"
>   HorizSync    31 - 83
>   VertRefresh  56 - 76
>   Option	"DPMS"
>   Option	"IgnoreEDID"	"true"
>   Option "ModeValidation" "NoMaxPClkCheck"
>   Modeline "1920x1200" 154.0 1920 1968 2000 2080 1200 1203 1209 1235 -Hsy=
nc -Vsync
> #ModeLine "1920x1200" 162.00 1920 1980 2040 2160 1200 1201 1204 1242
> #  UseModes    "16:10"
> # 1920x1200 @ 60.00 Hz (GTF) hsync: 74.52 kHz; pclk: 193.16 MHz
> #  HorizSync    30-92
> #  VertRefresh  48-85
> #  DisplaySize 380 285
>   DisplaySize 518 324
> EndSection
>=20
> Section "Device"
>   Identifier   "radeon0"
>   BusID        "1:0:0"
>   Screen       0
>   Driver       "radeon"
>   Option       "BIOSHotkeys" 		"true"
>   Option       "DynamicClocks" 		"true"
>   Option       "MonitorLayout" 		"LVDS, CRT"
>   Option       "AGPMode" 		"4"
>   Option       "AGPFastWrite" 		"yes"
>   # Option       "ForceCRT2Type" 	"CRT"
>   Option       "SubPixelOrder" 		"RGB"
>   Option       "CRT2HSync" 		"30-81"
>   Option       "CRT2VRefresh" 		"56-75"
>   Option	"OverlayOnCRTC2" 	"true"
>   Option	"EnablePageFlip" 	"1"
>   Option	"ColorTiling" 		"1"
> #  Option       "MetaModes" "1400x1050-1280x1024 1280x1024 1024x768-1024x=
768 800x600-800x600"
> #  Option       "MetaModes" "1680x1050 1400x1050-1680x1050 1280x1024 1024=
x768-1024x768 800x600-800x600"
>   Option       "MetaModes" "1400x1050-1920x1200 1920x1200 1400x1050 1280x=
1024 1024x768-1024x768 800x600-800x600"

You want 1200x1050+1920x1200 for the clone mode

> EndSection
>=20
> Section "Device"
>   Identifier   "radeon1"
>   BusID        "1:0:0"
>   Screen       1
>   Option       "SubPixelOrder" "RGB"
>   Driver       "radeon"
> EndSection

You do not need the second device section.

> Section "Screen"
>   DefaultDepth 24
>   SubSection "Display"
>     Depth      24
> #    Modes      "1680x1050" "1400x1050" "1280x1024" "1024x768" "800x600"
>     Modes      "1920x1200" "1400x1050" "1280x1024" "1024x768" "800x600"
> #    Modes      "1024x768" "800x600"
>   EndSubSection
>   Device       "radeon0"
>   Identifier   "Screen0"
>   Monitor      "LCD"
> EndSection
>=20
> Section "ServerLayout"
>   Identifier   "Server Layout"
>   InputDevice  "Keyboard" "CoreKeyboard"
>   InputDevice  "Mouse[1]" "CorePointer"
>   InputDevice  "Mouse[3]" "SendCoreEvents"
>   Option       "Clone" "off"
> #  Option       "Xinerama" "on"
>   Option       "Xinerama" "off"
>   Screen       "Screen0"
> #  Screen       "Screen1"
> #  Screen       "Screen1" LeftOf "Screen0"
> EndSection

It seems to me that this config file ought to give you the dual-head
mode.  I'd like to see the xorg log file.

xorg.conf.dualhead:
> Section "Monitor"
>   Identifier   "Monitor0"
>   # HorizSync    30-81
>   # VertRefresh  56-75
>   Option "DPMS"
>   DisplaySize  287 215
> EndSection
>=20
> Section "Monitor"
>   Identifier   "Monitor1"
>   HorizSync    31 - 83
>   VertRefresh  56 - 76
>   Option	"DPMS"
>   Option	"IgnoreEDID"	"true"
>   Modeline "1920x1200" 154.0 1920 1968 2000 2080 1200 1203 1209 1235 +Hsy=
nc -Vsync
>   DisplaySize 518 324
> EndSection
>=20
> Section "Device"
>   Identifier   "radeon0"
>   BusID        "1:0:0"
>   Screen       0
>   Driver       "radeon"
>   Option       "DynamicClocks" "true"
>   Option       "MonitorLayout" "LVDS, CRT"
>   Option       "AGPMode" "4"
>   Option       "AGPFastWrite" "yes"
>   # Option       "ForceCRT2Type" "CRT"
>   Option       "SubPixelOrder" "RGB"
>   # Option       "CRT2HSync" "30-81"
>   # Option       "CRT2VRefresh" "56-75"
> EndSection
>=20
> Section "Device"
>   Identifier   "radeon1"
>   BusID        "1:0:0"
>   Screen       1
>   Option       "SubPixelOrder" "RGB"
>   Driver       "radeon"
> EndSection
>=20
> Section "Screen"
>   DefaultDepth 24
>   SubSection "Display"
>     Depth      24
>     Modes      "1400x1050" "1280x1024" "1024x786" "800x600"
>   EndSubSection
>   Device       "radeon0"
>   Identifier   "Screen0"
>   Monitor      "Monitor0"
> EndSection
>=20
> Section "Screen"
>   DefaultDepth 24
>   SubSection "Display"
>     Depth      24
>     Modes      "1920x1200" "1680x1050" "1280x1024" "1280x768" "1024x786" =
"800x600"
>   EndSubSection
>   Device       "radeon1"
>   Identifier   "Screen1"
>   Monitor      "Monitor1"
> EndSection
>=20
> Section "ServerLayout"
>   Identifier   "Server Layout"
>   InputDevice  "Keyboard" "CoreKeyboard"
>   InputDevice  "Mouse[1]" "CorePointer"
>   InputDevice  "Mouse[3]" "SendCoreEvents"
>   Option       "Clone" "off"
> #  Option       "Xinerama" "on"
>   Option       "Xinerama" "off"
>   Screen       "Screen0"
> #  Screen       "Screen1"
>   Screen       "Screen1" LeftOf "Screen0"

With Option "Xinerama" "on" you'd get the ability to drag and drop
windows from one screen to another.  In any case, when you use the
server's mechanism for dual-head (two Screen sections) instead of
radeon's MergedFB support, you lose the ability to turn off
dual-headness at runtime with xrandr.

> EndSection

Marius Gedminas
--=20
Smoking is one of the leading causes of statistics.
                -- Fletcher Knebel

--DocE+STaALJfprDB
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFGfk/8kVdEXeem148RAg8GAJwNZdf6XLK9PodMaXnFZ7EXXVDoXgCfcF6z
VYcW8F19p/KuvZOCXokjqLM=
=Iyun
-----END PGP SIGNATURE-----

--DocE+STaALJfprDB--