Fixing the Firefox 3 Rendering Bug
Mozilla recently released version 3.5 of the Firefox web browser. It does a fine job, but there have been some problems, for Linux users, in its rendering of web page graphics. Below you will find two solutions to the problem, which involve configuring the Xserver to interface well with Firefox.
One problem is that pages with resized images, PNG files, or zoomed text will display black rectangles instead of the actual images. Another manifestation of the Firefox rendering bug is garbling of whole pages, where some of the user\'s desktop is repeatedly overlaid on the web page.
There is an easy solution that works for typical Linux systems, where the filesystem is
installed uncompressed on a hard drive. The file /etc/X11/xorg.conf must be edited, and the section
"Device" must have an additional option, "XAANoOffscreenPixmaps" added and set to "true" as shown in
the example below, from a Slackware system:
Section "Device" Identifier "Card0" Driver "radeon" VendorName "ATI Technologies Inc" BoardName "Radeon X1200 Series" BusID "PCI:1:5:0" Option "XAANoOffscreenPixmaps" "true" EndSection
The fix shown above is simple, and results in pages rendering properly in Firefox. After editing and saving the xorg.conf file, restart the Xserver [CTRL - ALT - BACKSPACE] for the changes to take effect.
Badly garbled page in Firefox 3 for Linux
Cleanly rendered page after the fix
About SLAX and similar Live Linux distributions...
Users of USB and live CD / DVD distros, such as SLAX or Bluewhite64 may be tempted to build a custom configuration module with a new xorg.conf file, but the actual fix is more complex. A recent test of SLAX 6.2.0, with Firefox 3.5, was conducted on a common laptop computer. It was necessary to edit the xorg.conf file on a running system, then restart the xserver for the changes to take effect. This was because of the "xconf" script... It runs at boot time, and is located at /usr/bin/xconf. Xconf actually writes an xorg.conf specifically for the user\'s hardware. Therefore, if the user builds a custom config module with the XAANoOffscreenPixmaps option, it is overwritten at boot time by the xconf script!
Live Disc / USB solution 1:
If the system will be used on one computer, or perhaps multiple computers with similar hardware, it is
okay to simply stop the xconf script from overwriting a custom xorg.conf file at boot. In SLAX that is
done by setting SKIP_XCONF=yes in the file /etc/X11/gui.conf as shown below:
# SKIP xconf AT ALL. # If skip=yes, xconf will quit without any modifications to xorg.conf # This is needed if you use xorg.conf from your own module, it would # be overwritten by xconf; So include this gui.conf file in your module # as well, so xconf will not overwrite your xorg.conf. # Huh it seems complicated, but it\'s really simple :)) # example: SKIP_XCONF=yes # SKIP_XCONF=yes
- Edit /etc/X11/gui.conf with SKIP_XCONF=yes.
- Edit /etc/X11/xorg.conf with Option "XAANoOffscreenPixmaps" "true" in the "Device" section.
- Create a config module including the newly edited files.
- Reboot with the new module in place and verify proper webside rendering in Firefox.
Live Disc / USB solution 2:
If, using SLAX, you find it undesirable to inhibit the automatic configuring of X at boot time, but still intend to invoke the XAANoOffscreenPixmaps option as described above, then edit the xconf script. Then X will be automatically configured, and the Firefox rendering bug will still be fixed. The work-around is actually quite simple:
- Edit the script /usr/bin/xconf to find the "Device" section of xorg.conf and write in the XAANoOffscreenPixmaps option as shown above.
- Create a config module with the new xconf script.
- Reboot with the new module and verify proper webside rendering in Firefox
Here is a section of the new xconf script, with the new code starting with
" # Firefox 3 rendering fix" and ending with "done". We are essentially waiting until after
the mouse configuration is set, then looking for the device section, where it notes the radeon
graphics cardradeon graphics card. When the script finds the name of the graphics card in the
"Device" section of xorg.conf, it gets a new instruction to add the line
Option "XAANoOffscreenPixmaps" "true". Find the mouse configuration and make it
look like this:
do # configure mouse if echo | egrep -i "/dev/mouse" 1>/dev/null ; then echo "Option \"ZAxisMapping\" \"4 5\"" >> echo "Option \"Buttons\" \"3\"" >> fi echo "" >> # Firefox 3 rendering fix if echo | egrep -i "radeon" 1>/dev/null ; then echo "Option \"XAANoOffscreenPixmaps\" \"true\"" >> fi doneNote: If your graphics card is other than radeon in xorg.conf (as Card0), use that name instead.
After editing xconf, check the permissions and set it to "executable" before building a new config module. Reboot and verify that there are no black rectangles or garbled graphics when Firefox renders web pages.
These fixes for the Firefox 3 rendering bug should eventually not be necessary, once the developers write code that is more compatible with recent graphics cards. Linux graphics drivers are also evolving, and that should result in smoother operation of Firefox 3 and above.
Tags: firefox 3 rendering, firefox image rendering, firefox page rendering