6 Straighten Out Your X Settings

Straighten Out Your X Settings

figs/moderate.gif figs/hack6.gif

Finely tune X to get the most out of your video hardware, and work around hardware detection mistakes.

Knoppix detects video card and monitor settings pretty well. If it can't detect any better settings, it tries to at least set up a generic environment for X. Even with its excellent hardware detection, sometimes Knoppix is unable to detect everything it needs to set up X the way you would like. If X won't start up correctly or at all, you might be able to get things working with the variety of cheat codes Knoppix provides for X:

Cheat code


knoppix screen=1280x1024

Use specified screen resolution for X

knoppix depth=16

Use specified color depth for X

knoppix xvrefresh=60

 (or vsync=60


Use 60 Hz vertical refresh rate for X

knoppix xhrefresh=80

 (or hsync=80


Use 80 kHz horizontal refresh rate for X

knoppix xserver=XFree86


Use specified X-Server

knoppix xmodule=ati



| radeon




Use specified XFree4-Module

knoppix wheelmouse

Enable IMPS/2 protocol for wheel mice

knoppix nowheelmouse

Force plain PS/2 protocol for PS/2 mouse

knoppix vga=normal

No-frame-buffer mode, but X


Use fixed frame-buffer graphics (1)


Use fixed frame-buffer graphics (2)


Use fixed frame-buffer graphics (3)

1 Tweak the Monitor Settings

Knoppix attempts to automatically detect the highest resolution at the highest color depth your computer supports, and starts X at that resolution and depth. For some computers, these maximum settings might be hard on the eyes: screen flicker may occur when refresh rates are too low or tiny icons may occur when a resolution is too high. In these circumstances, you can usually fix the problem by using a few cheat codes to change your X server settings.

The screen cheat code lets you specify exactly at which resolution to run X. For instance, if your 15-inch monitor can support 1024 768, but 800 600 is more comfortable on your eyes, at the boot: prompt enter:


Similarly, the depth cheat code lets you configure how many bits per pixel for X to use to display color (for instance, the cheat code depth=16 starts X with support for 65,536 colors). Set depth to 24, 16, 15, or 8 (256 colors). Use this cheat code when you want to use high resolutions with high refresh rates, but your video card can display them only at lower color depths.

If Knoppix can't automatically detect the appropriate horizontal and vertical refresh rates for your monitor, it might cause X to start up at a much lower resolution and refresh rate than your monitor is capable of. Alternatively, X might try to display the highest resolution possible, leaving you with screen flicker from the low refresh rate. In either case, you can force Knoppix to try X at a vertical and horizontal refresh rate of your choice with the xvrefresh and xhrefresh cheat codes. The documentation that came with your monitor should list in the technical specifications what range of vertical and horizontal refresh rates it supports. If you don't have your monitor documentation, you can usually find technical specifications by searching for your monitor's model number on the Internet. Also, some monitors actually list the horizontal and vertical refresh rates on a label on the back. Once you have a list of valid refresh rates your monitor supports, you can experiment with different values in the range until you find the optimal resolution, color depth, and vertical and horizontal refresh rates for your computer.

2 Video Card Cheats

Knoppix may not always detect the exact video card that is installed in your system. If you have two different video cards installed, it might detect one while you want to use the other, or you may have a cutting-edge video card that isn't yet supported fully in X. Whatever the problem is, you can tell Knoppix which video card module to try by using the xserver and xmodule cheat codes.

The xserver cheat code specifies video card settings to use for the XFree86 Version 3 server, while xmodule specifies video card settings for the XFree86 Version 4 server. To determine which module your video card uses, visit the driver status page on the XFree86 Project site. For instance, to check the driver status for an ATI card on X 4.3, go to http://www.xfree86.org/4.3.0/Status.html and click on ATI to see a list of modules for each chipset.

To take advantage of the newer Xfree86 4 server, use xmodule instead of xserver. To tell Knoppix to use a specific video card module instead of what it auto-detects, pass the name of the module as an argument to the xmodule cheat code. For example, to have Knoppix use the radeon module you would type:


Three of the XFree86 modules, svga, vesa, and fbdev, are particularly useful when the X module for your chipset doesn't work, because X doesn't support the chipset yet or X's support is buggy. These modules access the lower-level generic video support many cards provide. This lower-level support means you do not get hardware acceleration for your video card, but you should be able to get basic functionality. The svga and vesa modules should work with any SVGA- or VESA-compliant video card. The fbdev module works a bit differently, as it accesses the low-level framebuffer support in the Linux kernel; its operation level depends on the level of support the Linux kernel has for the framebuffer mode of your particular video card hardware.

If you have tried all of the above modules, and X still does not load, there is still hope! One of the older XFree86 Version 3 servers might still support your card. The Version 3 X servers included with Knoppix are: XF86_3DLabs, XF86_8514, XF86_AGX, XF86_I128, XF86_Mach32, XF86_Mach64, XF86_Mach8, XF86_P9000, XF86_S3, XF86_S3V, XF86_SVGA, XF86_VGA16, and XF86_W32. To use one of these servers, pass its name to the xserver cheat code. For instance, to try the S3 server, type:


3 Help, My Mouse Is Crazy!

You can also configure mouse settings with cheat codes. If the mouse is moving wildly around the screen or moving down to the bottom-left corner, no matter where you try to point it, Knoppix might be trying the wrong protocol for the mouse. The nowheelmouse cheat code forces X to use the generic PS/2 protocol for the mouse. Alternatively, if it's your wheel mouse that isn't being detected, the wheelmouse cheat code forces the IMPS/2 protocol, which provides support for the scrollwheel, to be used.

4 Console Cheats

Just as you can tell Knoppix to run X directly through the framebuffer with the xmodule=fbdev cheat code, you can tell the Linux console to run through the framebuffer by passing fb along with the resolution you want to use. The fb cheat code is a bit different from most of the cheat codes in that it actually is specifying a special set of predefined kernel parameters to run the console at a specific resolution. To boot Knoppix into a 1280 1024 framebuffer console, type:


Do not type the following command at the command line:

knoppix fb1280x1024 

These parameters change the vga= setting for the kernel and set xmodule=fbdev, so if there is a different resolution you want to use, you can look up the correct vga= line to use in /usr/src/linux/Documentation/fb/vesafb.txt.

Knoppix defaults to using a high-resolution console framebuffer when it boots. If it picks a resolution that's too high, or there is some other problem with framebuffer support on your machine, you see a blank screen and are not able to read any console output.

If you want to disable the framebuffer console completely, and use a regular 25 80 VGA console instead, add the following to the boot: prompt:


     Python   SQL   Java   php   Perl 
     game development   web development   internet   *nix   graphics   hardware 
     telecommunications   C++ 
     Flash   Active Directory   Windows