I picked up a Toshiba Satellite M40X RH4 laptop that was on sale yesterday. It has a 1.5GHz Celeron M with 256MB ram, an Intel 915 video card with 128 sharred memory, a 40GB harddrive, and an Atheros wlan chip. All for $899. So I’m pleased about that.
The installation took a lot of research to make sure I could optimize things properly and get everything working. The Gentoo live cd does not have the madwifi drivers so I had to rely on ethernet until the install was done. It used the e100 module.
The CPU is exactly a Celeron M 370, which is of the Dothan family (90nm). It’s essentially a stripped down Pentium M. So as far as I could tell, for the kernel, specifying Pentium M was the way to go. As for GCC -march it was a little more tricky. The Getnoo CD ships with GCC 3.3.5 which has no special pentium-m cpu family, however GCC 3.4.4 does. My research said that it was safe to go with pentium3 for -march for the stage1 install (GCC describes pentium-m as a stripped down pentium 3, and the celeron-m is a stripped down pentium-m). However I really wanted GCC 3.4.4 so I could use -march=pentium-m. To get this I created the file /etc/portage/package.keywords and added the following to it:
sys-devel/gcc ~x86
sys-libs/libstdc++-v3 ~x86
sys-libs/glibc ~x86
sys-devel/gcc-config ~x86
This created an override in porage so it would use the unstalbe version of those packages. To check it was working I # emerge gcc libstdc++-v3. I was ready for the stage1 install.
A note to even the experienced Gentoo user. The install process has changed over the years so you should still follow the handbook. There are subtle changes you’d miss if going from memory that are rather important now. Also, the networking for Gentoo has been completely rework. It’s pretty neat and worth reading up on: http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=4&chap=0.
Once the stage1 install was done I had GCC 3.4.4, so I changed my -march in make.conf to pentium-m. Then instead of the # emerge –newuse system for stage2 based on stage1 I used the starting from stage2 command # emerge –emptytree system which reinstalls everything and the system all with the new GCC and pentium-m -march. However looking over the list of programs to be installed I noticed gcc 3.4.4 and 3.3.6 were being installed. After a bit of looking I determined that it was doing this to upgrade the 3.3.5 the system came with. I was concerned that since the 3.3.6 install was after the 3.4.4 install it would become the default GCC and miscompile everything not having support for march=pentium-m. The only way I found to remedy this was to remove gcc 3.3.5 with # emerge -C =gcc-3.3.5-r1. Then I proceeded with my stage2 install.
Stage2 install was a bit bumpy. It crashed at openssl because it needed perl, which hadn’t been installed. Brilliant. However after looking at the output of –emptytree versus -newuse I determined that everything from the stage1 should have already been recompiled with pentium-m by the time openssl showed up so I didn’t have to emerge perl and then run emerge –emptytree again to ensure everything got done. I just did emerger –newuse system and it picked up and got that openssl depended on perl.
Next up was the kernel. I went with the gentoo sources since they were more current (2.6.12 as opposed to vanilla 2.6.11), plus they apparently had some better laptop support patches. As stated earlier I went with the Pentium-M cpu family. Then the hardware support. The harddrive was a scsi device so I added scsi support and the piix driver. I added Intel 915 support for DRI, yenta sockets for pcmcia, 8139too for ethernet, and intel 8×0 for Alsa sound. Then compile and install and crossed fingers.
The rest of the install was fairly straight forward. Then I rebooted.
And everything worked. Amazingly enough. I installed the madwifi-driver and madwifi-tools and wireless-tools and a # iwconfig ath0 essid mindstab # dhcpcd ath0 later I had wireless internet! I then set up my wireless chip according to the new Gentoo net configuration. I have to say iplugd rocks my socks. Plug in cable, internet on! Unplug cable, internet off! It’s pretty cute. Combined with the new Getnoo net setup, the combined networking setup of my laptop is pretty sexy. I was really pleased about that.
Next up was the XOrg install. I needed the latest and greatest to get my i915 videocard working so I created /etc/portage/package.unmask and added x11-base/xorg-x11 to it. Then I did an ~x86 install of XOrg getting version 6.8.99.15.
I ran xorg –configure. It gave me some errors but gave me a xorg.conf.new. I had to hand configure the mouse, but then it ran.
The good: the new xorg didn’t need to be told about the 1280×800 resolution, it figured it out on its own.
The bad: Returning to the frame buffer console, it was garbled and unusable. Also, DRI was not working as X was not detecting the ram properly. After some searching I found that this problem is noted and there is a temporary patch. After some more research I was able to get the supplied patch and patch applying ebuild to actually work. You can get the portage overlay at http://www.mindstab.net/~haplo/xorg-patch-overlay.tar.gz. Then emerge xorg-x11-6.8.99.15-r1 with the USE=”dri-patch”. Ideally this will be resolved shortly (fingers crossed for 6.8.99.16 ).
As for the frame buffer, I could probably turn it off and be ok. However I’ll probably only be using it at boot where it looks pretty so I left it on. And hopefully that will also get fixed.
Once the new X was installed I tried it again and got DRI working! Even though it can access up to 128MB ram, the video card is by no means strong. It gets about 1200 FPS on GLX Gears. I’ll see about games later.
Then I started the massive Gnome install and left it over night. I sped it up by running emerge gnome –fetchonly in parallel. When you have hundreds of megs to download, it can help speed things up. Once Gnome was installed I installed the otehr necessary prerequisites like Gaim, Abiword, Firefox, Mpd, more fonts, extra themes and art.
Once it was done I fired up gdm and logged on and a nice Gnome desktop met me. More software installation met me, and I recompiled my kernel moving as many things to modules as I could. I did this because I wanted the initial pre frame buffer splash boot time to be slim.
I was having some responsiveness issues with Gnome and heavy load but I suspect it has to do with a number of IO related things. For some of them I need to wait for the Sata drivers (piix) to mature. On the other hand I had a suspicion the anticipatory IO scheduler was not working right so I switched to CFQ. I haven’t really hada heavy load to test it yet, but a few $ emerge -s seemed to be ok. You can change IO schedulers live through the /sys filesystem. To check $ cat /sys/block/sda/queue/scheduler. To set $ echo cfq > /sys/block/sda/queue/scheduler.
After more work I’ve realized there is definitely a drive driver issues. I tired a lot of things and at best hdparm can seem to only get 20MB/s off the harddrive buffered and 500kb off the dvddrive, which makes it unusable. This remains unresolved for me.
I put Quake2, Quake3, and Unreal Tournament on the laptop. I discovered there is currently a bug in Xorg 6.8.99.15 where only the first X session has DRI so I had to run my games there. Quake3 went first and it wasn’t quite able to launch a game. Then I tried Quake2 and it was somewhat jerky. Finally I tried unreal Tournament. Ater I turned the texture detail to medium it was decently playable even at 1024×768. I’m sure the i915 driver will mature over the next few months up to when Xorg 6.9/7.0 are out at the end of September. I’m also sure Gnome will be a little more responsive with 2.12 because this system only has 256mb ram and the Gnome devs have been spending the summer reducing memory usage.
And that more or less gets me to where I am now. It’s pretty cool but I need some stuff to mature and stabilize more :).
[update 1]
I got the dvd drive to work with the sata controller, as outlined here.
[update 2]
Alsa software mixing with Dmix (allows more than one audio channel) www.mindstab.net/wordpress/archives/42