Getting video to work _right_ on a mini-note (hp 2133)

Asked by kschmitt

This is more information than a question, for folks who bought a 2133 and are frustrated with the resolution the VESA driver is giving them. This is how to get the mini-note working with the openchrome driver (which comes with ubuntu). Yes I know all the docs say that it's broken in 8.10, but they're wrong. It's more that the default settings in X are wrong for the card.

Two things to remember about these instructions:
If you want to switch to and from X to console, you need to have the VESA framebuffer setup.
Sometimes, when switching from console to X, or starting X (or coming out of suspend-to-disc), you get weird wobbly line video. When that happens, you need to reboot, or re-suspend to disc (which is a reboot, as far as the hardware is concerned).

So, here's two sets of instructions. One for the cut & paste crowd, and one for those who want to dig deeper.

Cut&Paste:
There is nothing wrong with not wanting to learn the guts of your car just to get the windows to roll down. Similarly, there isn't anything wrong with just doing a copy&paste. This is done in four steps

Step 1) backup your xorg.conf
sh$ cp /etc/X11/xorg.conf ~/xorg.conf-old

Step 2) as root, edit the xorg.conf, and replace the contents with the config file at the end of this post.
sh$ sudo gedit /etc/X11/xorg.conf

Step 3) log out. This should cause X to restart. If it didn't work, reboot. Log back in to your fresh X

One more step..

Step 4) Open the screen resolution applet from the system menu. System>Preferences>Screen Resolution
Select the correct resolution for your mini-note (for most it will be 1280x768).

Dig Deeper!
So what is going on here?
X (ubuntu uses the x.org version) can do a _ton_ of auto-configuration for you. It's been able to do it for ages. You just type X -configure as root. BUT, X can't be running for you to do this....

So
Log out, and switch to a graphical console
On the console, log in as you, sudo to root
Use the massively powerful killall command to kill the display manager: gdm
sh$ killall gdm
Unsurprisingly this will kill all running binaries with the name "gdm", that root is allowed to (root is allowed to kill everything).
Run X's autoconf by typing X -configure
sh$ X -configure
You'll end up with lots of text on screen, and a file called xorg.conf.new
Usually, this would be all you needed, but on the mini-note, we need to tweak it.
If you were to use this file now, it would display, then probably lock up your system.
Open up the file with vi(or vim, or emacs, or jove, whatever you like), and find the part that starts with Section "Device". More or less, this is how X drivers are really setup.
Every line that starts with a # is a comment, so you see a ton of options are commented out.
In our case, we need two of the unused options, I2CScan and ShadowFB. Start by uncommenting those two lines. Note that there is a second comment at the end of that line that says, #[<bool>]. You guessed it, we need to say "true" to those now.
        Option "I2CScan" "true" # [<bool>]
        Option "ShadowFB" "true" # [<bool>]
Save your file, and move it into place. I encourage you to play more with it, but start by making sure this part works for you.
Now that the /root/xorg.conf.new is edited, make a backup of /etc/X11/xorg.conf.
Seriously, make the backup.
Move /root/xorg.conf.new over to /etc/X11/xorg.conf, cross your fingers, and reboot.

Enjoy digging into things from now on!

## Xorg.conf ##
Section "ServerLayout"
 Identifier "X.org Configured"
 Screen 0 "Screen0" 0 0
 InputDevice "Mouse0" "CorePointer"
 InputDevice "Keyboard0" "CoreKeyboard"
EndSection

Section "Files"
 ModulePath "/usr/lib/xorg/modules"
 FontPath "/usr/share/fonts/X11/misc"
 FontPath "/usr/share/fonts/X11/cyrillic"
 FontPath "/usr/share/fonts/X11/100dpi/:unscaled"
 FontPath "/usr/share/fonts/X11/75dpi/:unscaled"
 FontPath "/usr/share/fonts/X11/Type1"
 FontPath "/usr/share/fonts/X11/100dpi"
 FontPath "/usr/share/fonts/X11/75dpi"
 FontPath "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"
EndSection

Section "Module"
 Load "dbe"
 Load "glx"
 Load "extmod"
 Load "xtrap"
 Load "dri"
 Load "record"
EndSection

Section "InputDevice"
 Identifier "Keyboard0"
 Driver "kbd"
EndSection

Section "InputDevice"
 Identifier "Mouse0"
 Driver "mouse"
 Option "Protocol" "auto"
 Option "Device" "/dev/input/mice"
 Option "ZAxisMapping" "4 5 6 7"
EndSection

Section "Monitor"
 Identifier "Monitor0"
 VendorName "Monitor Vendor"
 ModelName "Monitor Model"
EndSection

Section "Device"
        Option "I2CScan" "true" # [<bool>]
        Option "ShadowFB" "true" # [<bool>]
 Identifier "Card0"
 Driver "openchrome"
 VendorName "VIA Technologies, Inc."
 BoardName "CN896/VN896/P4M900 [Chrome 9 HC]"
 BusID "PCI:1:0:0"
EndSection

Section "Screen"
 Identifier "Screen0"
 Device "Card0"
 Monitor "Monitor0"
 SubSection "Display"
  Viewport 0 0
  Depth 15
 EndSubSection
 SubSection "Display"
  Viewport 0 0
  Depth 16
 EndSubSection
 SubSection "Display"
  Viewport 0 0
  Depth 24
 EndSubSection
EndSection

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu xserver-xorg-driver-via Edit question
Assignee:
No assignee Edit question
Solved by:
nhasian
Solved:
Last query:
Last reply:
Revision history for this message
Best nhasian (nhasian) said :
#1

thanks for tip! you may also want to repost your howto at http://ubuntuforums.org/

please close the thread too. thanks

Revision history for this message
kschmitt (kyleaschmitt) said :
#2

Thanks nhasian, that solved my question.