What is overscan?
Overscan is when the video image sent by the Xbox exceeds the boundaries of the display screen. In Linux this means the the edges of the desktop will not be shown. Since menus for starting programs, window titlebars, etc are often placed at the edges of the desktop overscan can be very inconvientent.
Does Linux on the Xbox always suffer from overscan problems?
For the majority of people Linux will display correctly with no tweaking required. However for users with a v1.6 Xbox Overscan problems are common as the V1.6 video encoder is not well supported under Linux (see xbox-linux's v1.6 warning for more details)
I'm suffering from overscan, what should I do?
The first thing to do is get your overscan corrected in framebuffer. This is what's used to display to display the console when Linux boots up.
Tools for correcting overscan in the framebuffer:
The Xbox framebuffer allows the setting of overscan compensation on append line (this was added in kernel 2.4.22). This only works in standard video modes (not HDTV) on Xboxes prior to v1.6. Open your linuxboot.cfg (this is usually located in E:\linuxboot.cfg) and find the line starting append. Find the option in this line which starts video=... . Change this to video=xbox:640x480:hoc=X,voc=Y where X is replaced by the amount of horizontal overscan correction you require and Y by the amount of vertical overscan correction (both in %, must be in range 0-20). Or if you would prefer a resolution of 800x600 use video=xbox:800x600:hoc=X,voc=Y.
As an alternative you can set you framebuffer settings using the command line tool xbv. Again this only works in standard video modes and won't work on v1.6 Xboxes. Most Xbox Linux distributions will come with this tool but if it is not included with yours you can grab the source from the xbox-linux sourceforge site. You will need to run this from the console (i.e. not within X) otherwise you will experience video corruption. Therefore you will need to either have a usb keyboard or the ability to ssh into you Xbox in order to type the require commands. If you distro boots into the X Window System you will need to quit by pressing Ctrl + Alt + Backspace. xbv requires the frambuffer be in 32 BPP mode so you need to run fbdev -depth 32 before running xbv. Then type xbv --help to see the available options. Most of the time you'l want to use
xbv -video standard -auto x_res y_res hoc voc
where video standard is one of: NTSC, NTSC60, PALBDGHI, PALN, PALNC, PALM, PAL60
x_res y_res indicate the desired resolution and hoc voc are the required horizontal and vertical overscan correction in %. Once you've obtaining settings which you are happy with add the command you used into one of you system startup scripts (you'll need to find out how your distro handles these).
X Window System
How do I correct overscan in X?
Firstly if your distribution uses the K-Drive Framebuffer X Server (e.g. X-DSL) it should take it's settings from the framebuffer so no seperate configuration is necessary. If you use the XFree or X.Org X Servers then you will need to do the following:
-Quit X if its is running (you can do this by pressing Ctrl + Alt + Backspace).
-run fbset -x. This should convert your framebuffer video settings into ones that can be read by your X Server.
-Edit /etc/X11/XF86Config-4 (if you are using XFree) or /etc/X11/xorg.conf (if you are using X.Org) and add the modeline obtained from fbset. e.g. (example taken from a thread on the gentoox forums) if you obtained this:
Xbox # fbset -x
# D: 27.027 MHz, H: 31.500 kHz, V: 60.000 Hz
HTimings 640 694 758 858
VTimings 440 473 480 525
Flags "-HSync" "-VSync" # Warning: XFree86 doesn't support accel
You would add/edit this into you X Server configuration file under the monitor section:
Modeline "xbox" 27.027 640 694 758 858 440 473 480 525 -HSync -VSync
HDTV, v1.6 Xboxes
How do I correct overscan when using Linux with a HDTV (i.e. using 480p/720p)?
With HDTV modes you will need to use a utility called fbset. This is not a Xbox specific utility but a general utility for changing the settings of the framebuffer device. You will need to quit out of X in order to run this (try Ctrl + Alt + Backspace). Then run fbset -s to see your current framebuffer infomation. It should look something like this:
# D: 25.176 MHz, H: 31.469 kHz, V: 59.942 Hz
geometry 640 480 640 480 32
timings 39721 40 24 32 11 96 2
the format is as follows
geometry xres yres vxres vyres depth
timings pixclock left right upper lower hslen vslen
Read fbset's man page and the man page of fb.modes for an explaination of these values. Use fbset -g <xres> <yres> <vxres> <vyres> <depth> -t <pixclock> <left> <right> <upper> <lower> <hslen> <vslen> to set new values. For example you might use something like
fbset -g 640 440 640 440 32 -t 39721 40 24 52 31 96 2
You will need to tweak these values untill everything fits on your TV screen. One suggested way is to reduce the resolution of the visible part of the screen and increase the margins at the edge of the screen utill everything fits (see my thoughts here or read the HDTV howto on xbox-linux). Once you've got the screen looking good run fbset -x to convert your framebuffer video settings into ones that can be read by your X Server and add them to your X Server's configuration, as explained above.
How do I correct overscan with my v1.6 Xbox?
Since the V1.6 video encoder is not well supported under Linux this may be difficult. It may be possible to reduce your effective resolution using fbset (i.e. keep reduce the resolution and increase the borders around the screen to compensate). However it maybe the case that the V1.6 video encoder is not well enough supported for this. If you are feeling adventurous play around and let me know your findings so I can update this guide.
Distro specific stuff
How do I correct overscan in Gentoox
A script to assist with overscan is provided with Gentoox. Simply login as root and run xbvset.
Edited by friedgold, 09 July 2005 - 03:11 AM.