Monday, October 30, 2006

Performance tweaks in Firefox 2.0

Since FasterFox doesn't work with Firefox 2.0, here's a brief recap of common performance tweaks to use on the latest greatest Firefox:
  • network.http.pipelining = true
optionally set network.http.proxy.pipelining = true, if you use a proxy and it supports HTTP/1.1 pipelining. More details are in the HTTP/1.1 Pipelining FAQ.
  • network.http.pipelining.maxrequests = 8
8 is a good start, bumping this higher may cause some webservers to throttle your connections down or deny access.

I'm still tracking down about:config options for 2.0, since a lot of the previous ones from 1.0 or 1.5 have gone away or have been replaced by better default values.

Also see the Lifehacker Top Firefox 2 config tweaks for more good stuff.

Friday, October 27, 2006

Working in Iraq

One of my friends from college just went back to Iraq. He had served one tour previously in the Army, was wounded after being attacked while on guard duty, came back to the States for a while, and now he's back in the Sunni Triangle, embedded with an Iraqi battalion, providing training.

The one thing he's asking for in care packages is Strawberry Pop Tarts (frosted or non-frosted).

Ubuntu DapperDrake -> EdgyEft Upgrade

So I upgraded from Ubuntu DapperDrake (6.06) to EdgyEft (6.10) on my Dell Latitude D810 yesterday.

It wasn't too bad - I followed the instructions on the release notes:

gksu "update-manager -c"

That failed after running into the immutable flags I had set on the /etc/rcS.d directory and the /etc/init.d/cryptdisks script (chattr +i /etc/rcS.d, chattr +i /etc/init.d/cryptdisks). Whoops. Turned those off (chattr -i /etc/rcS.d, chattr -i /etc/init.d/cryptdisks), then ran apt-get dist-upgrade a few times. I had to do a manual apt-get install of the remaining python packages that were left over.

Time to reboot.

Cryptdisks wouldn't accept input on console during boot and didn't mount my encrypted volumes. Hmmm.

So I googled and found Bug 62751, edited the /lib/cryptsetup/cryptdisks.functions script, commented out these lines:

#if [ "${stdin#/dev/null}" != "$stdin" ]; then
# exec /dev/console 2>&1
#fi

and pasted in these lines instead:

if [ "${stdin#/dev/null}" != "$stdin" ] && [ "$ON_VT" != "yes" ]; then
exec env ON_VT=yes /usr/bin/openvt -f -c `fgconsole` -w $0 "$@"
fi

Rebooted, now can enter password, but it shows on the screen. Rrrrgh.

Edited /boot/grub/menu.lst to remove "splash" from # defoptions, ran update-grub, rebooted.

Now it works, and doesn't show the password entered on the screen.

Tried putting in a GRUB splash screen (following instructions from Unofficial Ubuntu 6.10 (Edgy Eft) Starter Guide), it comes up but for some reason the selection highlight in the GRUB menu disappears. Makes it kinda hard to figure out what to boot.

So I took that back out after booting into my Dell utility partition and into single-user mode on the -386 kernel.

Upstart runs really really really fast. Wow. I always spend some effort on any OS trying to reduce boot times (disabling unnecessary services, pulling out unneeded components, symlink /bin/sh to dash instead of bash, recompile the kernel and remove all the crap I never use, play with InitNG or runit) but this is impressive.

Oh wait, for some reason I'm getting this error: Xlib: extension "XFree86-DRI" missing on display ":0.0".

Turns out EdgyEft turns on the X Composite extension by default, and this horks up the ATI binary fglrx driver. fglrxinfo was showing the Mesa OpenGL implementation (software) instead of the ATI driver (hardware). Yuck.

Thanks to Felipe Alfaro Solana, I figured out that I needed to edit /etc/X11/xorg.conf and append:

Section "Extensions"
Option "Composite" "false"
EndSection

Then log out, restart GDM (CTRL-ALT-BACKSPACE; or CTRL-ALT-F1 to switch to tty1, log in, run /etc/init.d/gdm restart), log back in, and run fglrxinfo:

display: :0.0  screen: 0
OpenGL vendor string: ATI Technologies Inc.
OpenGL renderer string: MOBILITY RADEON X600 Generic
OpenGL version string: 2.0.6011 (8.28.8)

w00t!

I'm pretty happy with it. Looks nice, especially after grabbing some cool GDM themes and backgrounds from GNOME-Look.org. Had to poke around a bit to see where to twiggle off the mauve background that pops up when GDM starts (matches the Human theme, but not much else) - it's around lines 416-417 in /etc/gdm/gdm.conf, #dab082 by default, which I switched to #000000. Any color you want, so long as it's black.

So far I like Firefox 2.0 as well. It takes a little adjustment to have the close-this-tab [X] button on the right side of each tab, rather than on the far-right of the tab list, but hey, whatever. More like Konqueror I guess. And you can switch back to the old tab close buttons by setting `browser.tabs.closeButtons = 3` in about:config. The automatic session restoration is nice, especially if you're playing around with Xgl/Compiz and Beryl crashes on you unexpectedly.