DisplayConfig810

HP 2133 Xorg.conf & GDM for Compiz or RandR

This page is designed to document the knowledge the community has built up about using the Via drivers for the Hp 2133's Chrome9 graphics card.

This page is not yet an 'install guide' - for installation the best info is

a) In the via driver packages that you can download from

http://linux.via.com.tw/support/downloadFiles.action

(Platform is CN896+VT8251, selected by default)

Then there are useful threads about installing the drivers here:

http://www.hp2133guide.com/forums/viewtopic.php?t=1136

and here

http://forums.mininoteuser.com/viewtopic.php?f=11&t=666&start=0

Via Drivers

There are different drivers available, and they each require different xorg.conf files to use them optimally under 8.10

3D

The most recent Ubuntu drivers are the 2nd Dec 2008 Via drivers, available from via's Linux Portal, they are designed for Ubuntu 8.10. They have support for using the 3D chips features to hardware accellerate 3D rendering.

Getting xorg.conf right is not so easy. After a while I've worked out a fairly good solution that I thought was worth sharing. There are some other good solutions, too.

2D

On Nov 7th Via released (04Nov08) drivers that provide 2D accelleration. Compiz doesn't work using these drivers, and neither do things like boxee (at any usable framerate) or other programs using OpenGL.

They do allow things like Avant-Window-Navigator to run, though, using the metacity compositor (see below)

Issues with Both

I have not found any way to play two video streams at once. In the older drivers there is distortion, in the newer drivers the second application crashes due to there not being enough memory available.

The 'DisplaySwitchHotkey' option doesn't do what it says on the tin and ion fact, causes other problems like video not playing or the cursor not showing up (!?)

Caveats/Pitfalls of the Newer Driver

These drivers have only _alpha_ RandR supprt, and in some ways support external displays worse (with the current configuration) than the older 2D drivers did with the right xorg.conf. If you rely heavily on using an external display AND you don't want to have to login and out in order to change between displays then for now you're better of with the 2D drivers.

That said, the 3D drivers enable hotness like Compiz, Elisa, Boxee and other things (note that Gnome-Do and Avant-Window-Navigator both only require a compositing manager, which metacity can provide using the 2D drivers - so you don't need to use these new drivers if you only want these)

The new RandR support makes dynamic use of external monitors much easier BUT is really sketchy. I can't get the internal LCD and the external one to display things together so if I am using the external one, standby, unplug and then try and restore the session on the internal display I can't. If you don't mind just restarting the Xserver in such situations then you should be fine. Also, if you tweak this config you might be able to get both displays working together - with the 2D drivers I had an external monitor at 1680x1050 and the internal one scrolling around that, I could then use gnome-display-properties below to resize to 1280x768 when I unplugged the external display. I'm yet to reach this functionality with teh 3D drivers. See '2D' below for info on how to do this.

There are a number of other caveats that I don't find important with the 2133 listed in the readme distributed with the driver. Please read through these before continuing.

Required Kernel Version (and exceptions)

The Via drivers are designed to work with the 2.6.27-7-generic kernel, but some users report being able to use them with later kernels by ether forcing the modules to load (http://forums.mininoteuser.com/post5276.html#p5276) or by renaming some modules:

(see http://www.hp2133guide.com/forums/viewtopic.php?p=7590#7590 for instructions )

Warning: THESE are just EXAMPLES, see the thread above, your system may vary.

/lib/modules/2.6.27-9-generic/kernel/ubuntu/via_chrome9/via_chrome9.ko to /lib/modules/2.6.27-9-generic/kernel/ubuntu/via_chrome9/via_chrome9.ko.viainstalled_fails

and /lib/modules/2.6.27-9-generic/kernel/ubuntu/via_chrome9/via_chrome9.ko.viaback to /lib/modules/2.6.27-9-generic/kernel/ubuntu/via_chrome9/via_chrome9.ko

xorg.conf for 3D

Here's the xorg.conf I'm currently using to allow Compiz to work (note that you need to add via to the whitelisted kernel modules, see 'Enabling Compiz' below)

xorg.conf_who

and here it is if you want to read it

# xorg.conf (X.Org X Window System server configuration file)
#
# This file was based on one generated by dexconf.
# Lots of testing was done by Jonathan Austin (Who) 
# Thanks to mikez's docs and examples for teaching me!
# Bits of the Suse Xorg.conf were used too.
#
# This is very much a work in progress. I accept no responsibility
# for any damage to you, your hardware, or your mental state that
# this configuration file may cause. Provided As Is, like Ubuntu is

Section "ServerFlags"
        #Change the default server layout from "main" to "randry" if you want to use RandR. Compiz isn't well supported in randry
        Option          "DefaultServerLayout"   "main"

        Option          "AllowMouseOpenFail"    "on"
        Option          "Pixmap"                "32"
    EndSection


###____________________________________________________________________________/ Devices /______
Section "Device"
        Identifier      "Main Video Device"

        Driver "via"
        VendorName  "VIA Tech"
        BoardName   "via"
        
        Option "ActiveDevice" "LCD"                     #required to make the resolution correct without RandR
        Option "PanelID" "12"                           #SUSE uses this, seems not to be reqd
        Option "ReDrawColorkey" "TRUE" # testing
        #Option "DeviceSwitchHotkey"  #Kills HwCursor! How weird Possibly necessary if ActiveDevice set to LCD,CRT
        #Option "HQVManualSwitch" # No idea what this does   

EndSection

Section "Device"
        Identifier      "RandR Video Device"

        Driver "via"
        VendorName  "VIA Tech"
        BoardName   "via"

        Option "ActiveDevice" "LCD"                     #not sure of effect with randr (someone want to test this?) Setting it to LCD,CRT doesn't seem to help in getting external display work with randr. If you set LCD,CRT you need to set DeviceSwitchHotkey
        Option "PanelID" "12"                           #SUSE uses this, seems not to be reqd

        Option "UseRandR12"  # I WANT to use this (it works, almost)
        #Option "HWCursor" # Doesn't restore cursor, but it does work withOUT RandR
        Option "SWCursor" # Does restore cursor, BUT leaves distortion with Compiz      
        #Option "DeBlockingEnable" # No visible impact, doesn't fix HWCursor 
        #Option "HQVManualSwitch" # leaves SW cursor intact, no visible improvement, doesn't fix HWcursor
        #Option "DeviceSwitchHotkey"  #Necessary if ActiveDevice set to LCD,CRT
EndSection

###____________________________________________________________________________/ Monitors /______

Section "Monitor"
        Identifier "Main LCD"
        DisplaySize 250 150 # WARNING: Screws RandR
        HorizSync    28-50
        ModelName    "1280X768@60HZ"
        Option       "DPMS"
        VendorName   "HP 2133 Internal Display"
        VertRefresh  50-61
        UseModes     "2133-Modes"
EndSection

Section "Monitor"
        Identifier "RandR LCD"
        #DisplaySize 250 150 # WARNING: Screws RandR
        HorizSync    28-50
        ModelName    "1280X768@60HZ"
        Option       "DPMS"
        VendorName   "HP 2133 Internal Display"
        VertRefresh  50-61
        UseModes     "2133-Modes"
EndSection
###_____________________________________________________________________________/ Screens /______

Section "Screen"
        Identifier      "Main Screen"

        Monitor  "Main LCD"
        SubSection "Display"
                Modes  "1280x768" 
                Virtual 1280 768
                Depth  24
        EndSubSection
        Device          "Main Video Device"
        Option          "ForceLCD"              "true"
        Option          "ActiveDevice"          "LCD"
        Option          "VideoOnDevice"         "LCD"   
        Option          "SetMpegFBNumber"       "true"
        #Option         "ShadowFB"              "true" # distorts Compiz lots. Helps video with Metacity compositor
        Option          "NoDDCValue"            "on"
EndSection

Section "Screen"
        Identifier      "RandR Screen"

        Monitor  "RandR LCD"
        SubSection "Display"
                Modes  "1280x768" 
                Virtual 1280 768
                Depth  24
        EndSubSection

        Device          "RandR Video Device"
        Option          "ForceLCD"              "true" #Doesn't seem to be necessary?
        Option          "VideoOnDevice"         "LCD"   
        Option          "SetMpegFBNumber"       "true"
        Option          "NoDDCValue"            "on" #Test what this does!!
EndSection

Section "Module"
        Load  "glx"
        Load  "dri"
        Load  "extmod"
EndSection

Section "DRI"
        Group 0
        Mode 0666
EndSection

###_____________________________________________________________________/ ServerLayouts /______
Section "ServerLayout"
        Option "RandR" "False"
        Identifier "main"
        Screen "Main Screen"
EndSection

Section "ServerLayout"
        Identifier "randry"
        Screen "RandR Screen"
EndSection

###_______________________________________________________________________/ Modes /______
Section "Modes"
        Identifier "All-Modes"
        ModeLine "720x480" 26.7 720 736 808 896 480 481 484 497
        ModeLine "720x576" 32.7 720 744 816 912 576 577 580 597
        ModeLine "800x480" 29.58 800 816 896 992 480 481 484 497
        ModeLine "848x480" 31.5 848 864 952 1056 480 481 484 497
        ModeLine "856x480" 31.7 856 872 960 1064 480 481 484 497
        ModeLine "960x600" 45.98 960 1000 1096 1232  600 601 604 622 -HSync +Vsync
        ModeLine "1000x600" 48.07 1000 1040 1144 1288 600 601 604 622 -HSync +Vsync
        ModeLine "1024x512" 41.3 1024 1056 1160 1296 512 513 516 531
        ModeLine "1088x612" 52.95 1088 1128 1240 1392 612 613 616 634 -HSync +Vsync
        ModeLine "1152x720" 67.32 1152 1208 1328 1504 720 721 724 746 -HSync +Vsync
        ModeLine "1200x720" 70.18 1200 1256 1384 1568 720 721 724 746 -HSync +Vsync
        ModeLine "1280x600" 61.50 1280 1336 1464 1648 600 601 604 622 -HSync +Vsync
        ModeLine "1280x720" 74.6 1280 1341 1474 1688 720 721 724 746
        ModeLine "1280x768" 80.1 1280 1344 1480 1680 768 769 772 795
        ModeLine "1360x768" 85.50 1360 1392 1712 1744 768 783 791 807 +HSync +Vsync
        ModeLine "1366x768" 85.86 1366 1440 1584 1800 768 769 772 795 -HSync +Vsync
        ModeLine "1440x900" 106.47 1440 1520 1672 1904 900 901 904 932 -HSync +Vsync
        ModeLine "1440x1050" 126.2 1440 1536 1688 1936 1050 1051 1054 1087
        ModeLine "1600x900" 119.00 1600 1696 1864 2128 900 901 904 932 -HSync +Vsync
        ModeLine "1600x1024" 136.36 1600 1704 1872 2144 1024 1025 1028 1060 -HSync +Vsync
        ModeLine "1792x1344" 202.97 1792 1920 2112 2432 1344 1345 1348 1391 -HSync +Vsync
        ModeLine "1856x1392" 218.57 1856 1992 2192 2528 1392 1393 1396 1441 -HSync +Vsync
        ModeLine "1920x1080" 172.9 1920 2043 2249 2578 1080 1081 1084 1118
        ModeLine "2048x1536" 266.95 2048 2200 2424 2800 1536 1537 1540 1589 -HSync +Vsync
        ModeLine "720x480" 34.9 720 752 824 928 480 481 484 502
        ModeLine "720x576" 42.6 720 760 832 944 576 577 580 602
        ModeLine "848x480" 41.0 848 880 968 1088 480 481 484 502
        ModeLine "856x480" 41.3 856 888 976 1096 480 481 484 502
        ModeLine "1024x512" 53.3 1024 1072 1176 1328 512 513 516 535
        ModeLine "1280x768" 103.0 1280 1360 1496 1712 768 769 772 802
        ModeLine "1440x1050" 160.0 1440 1536 1696 1952 1050 1051 1054 1096
        ModeLine "1280x768" 118.5 1280 1368 1504 1728 768 769 772 807
        ModeLine "1440x1050" 184.5 1440 1544 1704 1968 1050 1051 1054 1103
        ModeLine "848x480" 47.4 848 888 976 1104 480 481 484 505
EndSection

Section "Modes"
        Identifier "2133-Modes"
        Modeline        "1280x768" 78.80 1280 1344 1480 1680 768 769 772 795
        Modeline        "1280x768" 77.37 1280 1344 1480 1680 768 769 772 794
        Modeline        "1024x768" 63.04 1024 1080 1184 1344 768 769 772 795
        Modeline        "1024x768" 61.89 1024 1080 1184 1344 768 769 772 794
        Modeline        "1280x600" 59.79 1280 1328 1456 1632 600 601 604 621
        Modeline        "1280x600" 58.78 1280 1328 1456 1632 600 601 604 621
        Modeline        "1024x600" 48.07 1024 1064 1168 1312 600 601 604 621
        Modeline        "1024x600" 47.26 1024 1064 1168 1312 600 601 604 621
        Modeline        "800x600" 37.52 800 832 912 1024 600 601 604 621
        Modeline        "800x600" 36.88 800 832 912 1024 600 601 604 621
        Modeline        "768x576" 34.32 768 792 872 976 576 577 580 596
        Modeline        "768x576" 33.74 768 792 872 976 576 577 580 596
        Modeline        "640x480" 23.46 640 656 720 800 480 481 484 497
        Modeline        "640x480" 23.06 640 656 720 800 480 481 484 497
        Modeline        "800x600" 38.22 800 832 912 1024 600 601 604 622
EndSection

To use it download it to your home directory and then run

sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.backup_before_3D_conf sudo cp ~/xorg.conf_who /etc/X11/xorg.conf

There are comments withtin the file explaining which options I've tried and what fails. If you're not just using this with Compiz then look at this file and you will see some things you can change. Most notably, you can make the ServerLayout with RandR enabled the default layout (right at the top) and have the flexibility of XRandR to change the size and rotation of your display (also for enableing external monitors). I have not tested this file extensively with an external monitor (writing it on the go...) so please comment here on any changes required to make it work better. Last I knew, configuring the external display correctly with gnome-display-properties stopped the internal LCD from looking right Sad :(

Xorg.conf for 2D

For 2D I've modified Mikez's xorg.conf file (http://www.morethan.org/mini-note/) so that it works smoothly under 8.10

The file is here: xorg.conf.mini.mikez_and_who To use it download it to your home directory and then run

sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.backup_before_2D_conf
sudo cp ~/xorg.conf.mini.mikez_and_who /etc/X11/xorg.conf

Or something equivalent

This file has multiple ServerLayouts and you should select the one you want to be default by uncommenting the appropriate line near the top of the file. I strongly suggest 'CRT-Clone' because it provides resizing of the display AND external monitor AND Panning when the internal LCD can't display the whole resolution of the external one.

ServerLayouts and gdm.conf (easy switching between RandR and 'Main' config)

I've found managing the different ServerLayouts and xorg configurations easiest by editing gdm.conf and gdm.conf-custom to allow me to start additional xservers with different ServerLayouts. The server that starts when X starts will use DefaultServerLayour or the first SeerverLayout that is listed in xorg.conf. This way you never need to edit xorg.conf.

So, when using 2D drivers I use CRT-Clone as default and then use the tool 'gdmflexiserver' to start another server with a different ServerLayout as I need

With the 3D drivers I use 'main' as the default and use 'gdmflexiserver' in order to start a 'randry' server if I need the RandR features.

Preparing gdm conf

We want to be able to get back where we started so we backup our current GDM config

sudo cp /etc/gdm/gdm.conf /etc/gdm/gdm.conf_backup_before_viafixes
sudo cp /etc/gdm/gdm.conf-custom /etc/gdm/gdm.conf-custom_backup_before_viafixes

Changes for the 3D drivers

The following changes are required. This assumes that you're using the 'main' layout as default and want to switch to randry in your second server. The hidden advantage of this is that when there is already one compiz session open, Compiz won't open again (I think this is a limitation of the 3D drivers...) and so you will get metacity running on new server - metacity doesn't have the same problems with the SwCursor that Compiz has and so the server is useable.

In /etc/gdm/gdm.conf

In the [servers] section of gdm.conf (at the end, just before the [customcommand] section add (These allow the selection of these serverlayouts from the GDM configuration UI, I am not sure if they are strictly necessary)

[server-randry]
name=Server for RandR with SW Cursor
command=/usr/X11R6/bin/X -br -audit 0 -layout randry
flexible=true

and in /etc/gdm/gdm.conf-custom, in the equivalent place (there's no [customcommand] section here, probably - so this might just be the end of the file)

[server-RandR-Server]
name=Server for use with an External Display
command=/usr/X11R6/bin/X -br -audit 0 -layout randry
chooser=false
handled=true
flexible=true
priority=0

Changes for the 2D Drivers

In /etc/gdm/gdm.conf

In the [servers] section of gdm.conf (at the end, just before the [customcommand] section add the following (or some variation of these, the pattern is quite simple/clear) (These allow the selection of these serverlayouts from the GDM configuration UI, I am not sure if they are strictly necessary)

[server-External]
name=External VGA Only
command=/usr/X11R6/bin/X -br -audit 0 -layout CRT-only
flexible=true

[server-LCD-only]
name=Internal LCD Only
command=/usr/X11R6/bin/X -br -audit 0 -layout LCD-only
flexible=true

[server-External-Clone]
name=Internal VGA Clone
command=/usr/X11R6/bin/X -br -audit 0 -layout CRT-clone
flexible=true

[server-LCD-Clone]
name=Internal VGA Clone
command=/usr/X11R6/bin/X -br -audit 0 -layout LCD-clone
flexible=true

and in /etc/gdm/gdm.conf-custom, in the equivalent place (there's no [customcommand] section here, probably - so this might just be the end of the file)

[server-External-Clone]
name=External Display Cloned
command=/usr/X11R6/bin/X -br -audit 0 -layout CRT-clone
chooser=false
handled=true
flexible=true
priority=0

[server-LCD-Only]
name=Internal Display Only
command=/usr/X11R6/bin/X -br -audit 0 -layout LCD-only
chooser=false
handled=true
flexible=true
priority=0

[server-Internal-Cloned]
name=Internal Display Cloned
command=/usr/X11R6/bin/X -br -audit 0 -layout LCD-clone
chooser=false
handled=true
flexible=true
priority=0

[server-External]
name=External Display ONLY
command=/usr/X11R6/bin/X -br -audit 0 -layout CRT-only
chooser=false
handled=true
flexible=true
priority=0

LaptopTestingTeam/Old/HP2133/DisplayConfig810 (last edited 2010-02-24 14:45:20 by host58-172-dynamic)