Acer Aspire 5670 v. Gentoo

The quick and dirty notes

Hardware Status Notes
Intel Core Duo 1.66Ghz Works Able to turn off one of the cores and restart it (via sysfs)
Primary Display (1280×800) Works  
ATI X1400 Works I’ve had distortions, that then went away with 3D apps
Suspend-to-RAM / “sleep” Works! I didn’t really expect it too; I can’t seem to log out and have gdm keep working/garbled-screen (killing gdm doesn’t seem to help)
Suspend-to-Disk / “hibernate” Works See extensive notes further down the page
2GB RAM Works Came stock; CL is unknown
120GB SATA HD Works  
Slot-loading DVD+/-R/W Works Haven’t burned a dvd yet — I don’t expect difficulties
Broadcom Gigabit Ethernet Works tg3 module needs to be built
Modem Unknown … don’t really care about this one, atm.
Intel 3945 a/b/g wireless Works, but annoying The ipw3945 driver and associated ipw3945d daemon are new, and sometimes modules have to be reloaded again and again for things to start working (after a suspend)
Bluetooth Unknown Not expecting problems; will test this soon.
Infrared Transmitter Unknown I’ll test this at some point.
USB ports Works  
Firewire port Unknown the eth1394 is loaded, as the kernel seemingly detected a supported chipset, I just have not tested it yet
Integrated Webcam Doesn’t work (yet) The spca5xx and linux-uvc projects seem promising
Intel “High Definition” Audio (HDA) Works Front panel audio jacks work as expected.
Multimedia Card Reader Unknown Probably doesn’t work, as there are know drivers (I believe).  
PCMCIA Unknown Will test soon
ExpressCard/34 Unknown Probably doesn’t work — this is a “new PCMCIA”-like standard; I also have no hardware for it
TV-Out Does not work I did not even try it — release notes for ATI drivers said it does not work yet for this chipset
DVI / VGA ports Unknown I have not tried them yet

Prerequisites and About

I have been using Gentoo as my main GNU / Linux distribution since some time around 2001. Unlike some people, who weigh the benefits of Gentoo against binary distros, I had last been using a Linux-From-Scratch based system. So I understood what I was getting into, and fell in love with Gentoo and, it’s main software management tool, portage for what they enabled me to do.

My last, and possibly, most favorite laptop-running-Linux every was my Dell 700m. Everything is supported well, and Gentoo runs on that machine spectacularly.

Having said all that, I must add, Gentoo is not for everyone. In fact, it, and maybe most GNU / Linux based distros maybe not be for this laptop. I usually require all hardware that I would actually use be fully functional. I may not care about a media card reader right now, for e.g., but the display drivers had better work well.

I’m eager to see how well Linux can run on this laptop, and if the binary-only but required software for some of the hardware bits can be put into submission.

Gentoo 2006.0 LiveCD (x86)

I used the Gentoo 2006.0 LiveCD for x86 (get it here). I did not use the GUI or command line new automated installers, but stuck to the method I was familar with from the Gentoo Handboox.

I suggest using a hard-wired ethernet connection during the install. I did not try to get the wireless connection to work during the install, but since the chipset is quite new, there’s a good chance the drivers are not supported in the LiveCD kernel (then again, I didn’t check).

The new x86 LiveCD gives you a full GNOME based GUI, which is helpful, since one can load up Firefox and read the Gentoo Handbook, have this page open, and load up a terminal (sudo su - will get you root access so you can continue the install — assuming you have sudo installed and setup already, which I suggest).

This document will not describe how to install Gentoo, but rather will be a resource of notes and configuration files. Scan through and see if any configuration files are available for you to reference.

Disk and partitioning

Use fdisk to configure the enter disk for a Gentoo install. Mine is setup like this:

Disk /dev/sda: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 1 13 104391 83 Linux
/dev/sda2 14 14593 117113850 5 Extended
/dev/sda5 14 14071 112920853+ 83 Linux
/dev/sda6 14072 14593 4192933+ 82 Linux swap / Solaris

stage3 and portage snapshot

Using the new, graphical LiveCD, I found it much easier to use Firefox to browse for the stage3 file and portage snapshot, and use wget from the terminal window to fetch the files to where they needed to be.

update portage

Running a testing version of portage may not be everyone’s cup of tea. However, there are features in the testing version that I have come to rely on, like such as FEATURES with splitdebug (which removes debugging info from binaries, but saves it for later debugging and development use). Just remember to actually turn on debugging info in your CFLAGS with -g and/or -ggdb.

new (unstable/testing) glibc and gcc

I prefer running a mostly stable system utilities, but I like having my system built with the latest glibc and gcc. This isn’t for the faint of heart, as one needs to know how to work with /etc/portage/package.keywords and associated files.

I tend to not rebuild-world (emerge world -e)unless gcc or glibc major version has been updated, or the ChangeLog’s suggest that the toolchain be rebuilt. Since I want glibc-2.4 series and gcc-4.1 series, the method I use is this:

emerge ~gcc-4.1.0
gcc-config [latest-gcc]
source /etc/profile
emerge ~glibc-2.4
emerge ~gcc-4.1.0 binutils
emerge ~glibc-2.4 ~gcc-4.1.0 binutils

After installation is complete, and you’ve rebooted into your environment, you can rebuild world with the new toolchain with:

emerge world -e

You may encounter some packages that refuse to compile. Using /etc/portage/package.keywords to allow newer revisions (e.g. -r1 to -r2 of the current stable whole-version of a package generally solves these issues, since patches exist in many cases with respect to glibc-2.4 and gcc-4.1.0.

kernel

You may find my kernel .config file helpful

X11

  • I run modular xorg-x11-7.0-r1 — some documents for setting up modular xorg can be found here
  • my current xorg.conf
  • read about ati x1400 gotchas below

DVD playback gotcha

I never played any DVD movies while I ran Windows on this laptop. Consequently, the firmware region code of the drive wasn’t set, so I was getting incredibly scary errors when I tried to play movies via totem or mplayer. To rememdy this, I installed regionset, a simple utility that enabled me to set the region code of the drive so that I could access DVD movie content.

Audio / Sound

Again, I like to run the testing versions; these would be the out-of-kernel drivers. So we need to add entries to /etc/portage/package.keywords

media-sound/alsa-driver
media-sound/alsa-headers
media-libs/alsa-lib
media-sound/alsa-utils

You may need to check if alsa-lib and alsa-headers have updates with emerge world -uDN if they are already installed, which is likely.

If you want alsa-driver to only build some of the drivers (e.g. the ones you want/need), then you can add to make.conf a line like the following:

ALSA_CARDS=”seq-dummy dummy virmidi mtpav serial-u16550 mpu401 serialmidi loopback hda-intel intel8×0 intel8×0m usb-audio usb-usx2y”

After all that, do the following:

emerge alsa-driver alsa-utils

We’re using the snd-hda-intel module, so edit /etc/modules.d/alsa as appropriate for your install, and then re-run modules-update. Then start, and add to boot or default the alsasound init.d script. Remember to set the mixer (try alsamixer), and you’ll be set.

ati x1400 gotches

  • ATI released the 8.24.8 drivers
  • As of 20060424, Gentoo’s ati-drivers-8.24.8 works for me, but I had to set this in /etc/portage/package.keywwords:
    • x11-drivers/ati-drivers -* ~x86 need to get CONFIG_OBSOLETE_INTERMODULE set to y or m in kernel .config
      • You should be able to simply set this to y or m in the .config
      • Or, via make menuconfig
        • Device Drivers->Memory Technology Devices (MTD)->Memory Technology Device (MTD) support
        • Device Drivers->Memory Technology Devices (MTD)->Self Contained MTD device drivers->M-System Disk-On-Chip Millenium Plus
  • hibernate.conf needs some special attention concerning these drivers

ipw3945 wireless gotchas

I like to run the the testing versions of the wireless network drivers, so add lines like the following to /etc/portage/package.keywords (if you don’t specify an ~x86, for e.g. then a line with no setting assumes ~x86, if the ARCH is x86).

emerge ipw3945

hibernate.conf needs some love to work well with ipw3945; see below.

Suspend to RAM gotchas

Disturbingly enough: almost none. The default ram.conf (part of hibernate-script package) works. The default file was set to use vbetool to restore the video bios state, so I simply did emerge vbetool, tried to sleep the laptop, and it worked.

There is one somewhat major or incredibly minor annoyance (depending on your general use of the laptop). After I sleep and wakeup the laptop, which I have done many times in a row to test it, and then log out of GNOME, gdm does not restart / the screen is garbled. Suspend-to-Disk does not cause this issue to occur. I’m guessing here, but I feel that this is related to ATI (not yet?) supporting multiple X sessions running. Hopefully, this will resolve itself after ATI releases next month’s drivers (they seem to have a monthly release cycle), as this was the first time the X1xxx series was supported.

Suspend to Disk gotchas

  • patch kernel with latest Suspend2 patches
    • www.suspend2.net
    • I am running gentoo-sources-2.6.16-r3 (which is 2.6.16.9 with Gentoo patches), with the suspend2 patch
  • re: ati-drivers for x1400
    • Assuming everything else works, if you try to hibernate now, you may see a line like this in hibernate.log: “Pageset1 has grown by 1936 pages. Only 100 growth is allowed for!
      • So, in my case, I want a value greater than 1936
    • So you can add a line to hibernate.conf like the following: ProcSetting extra_pages_allowance 7500
  • re: wireless ipw3945
    • cp /usr/share/hibernate/scriptlets.d/module* /etc/hibernate/scriplets.d/
    • move to a backup location outside of, or remove, /usr/share/hibernate/scriplets.d/module* (or `hibernate` will complain about duplicates)
    • edit /etc/hibernate/scriptlets.d/modules and replace every “rmmod” with “modprobe -r“, as we depend on the code in /etc/modules.d/ipw394d (which gets moved into /etc/modules.conf when you do a modules-update in Gentoo) to stop the daemon, and remove the module; rmmod by itself will simply try to remove the module, which will fail, since the daemon is still running
    • The interface seems kind of wacky sometimes after resume. I noticed sometimes removing all the ieee80211* modules, and reloading ipw3945, which draws them back in, helps. So you can edit /etc/modules.d/ipw3945d line that starts with remove … to look like:
      • remove ipw3945 /sbin/ipw3945d –kill; /sbin/modprobe -r –ignore-remove ipw3945 ieee80211_crypt_tkip ieee80211_crypt
      • This doesn’t make the driver work on resume all the time, but once the interface fails to connect, you can simply do modprobe -r ipw3945, and all the modules will be removed, and then modprobe ipw3945 to reload, and try again. Hopefully as the driver improves, as it is quite new, things like this will stop happening.
    • add a line like “ipw3945” to /etc/hibernate/blacklisted-modules
    • make sure the hibernate.conf file is set to bring down the network interfaces, and to remove the modules set in blacklisted-modules