Gentoo on a Phillips Freevents X52
My old laptop was very nice and powerful but had one problem when using it for work. It weighted close to 4kg in its bag with the power adapter. I never did any 3d graphics work on it anyway so I decided I needed a new lighter laptop.
After looking around for ages I finally found one that was perfect… at PC World… I know! I normally don’t touch PC World machines but this machine was perfect. There’s a page here on the X53 which as far as I can tell is exactly the same. The specs of the machine are…
- Intel Core Duo T2050 Processor 1.66GHz
- 667 MHz FSB
- 1024 MB RAM
- 80 GB Hard Drive
- DVD ReWriter MultiDrive
- 12.1″ Widescreen Display (1280×800)
- Microsoft Windows XP Home
- 224MB Intel GMA950 Integrated Graphics
- 1.85kg
- 802.11 a/b/g Wireless
- About 4 hours battery life
…and all for the price of £799.99. I haven’t been able to find a small laptop this light and powerful for anywhere near that price. One of the first things I did was try and get gentoo running on it. Here’s some notes on how to do it.
Note: This is still a work in progress.
Initial Install
I installed the system following the Gentoo Handbook using the gentoo 2006.0 install CD. I used an i686 stage 3 release. Gentoo seems to have an issue with the network card in this laptop (see below) so to boot up the system from the install CD I had to press Ctrl-C when the PCI Coldplugging text appeared. This stops it from loading the network driver and it continues booting. I then had to use a USB network device to complete the install.
My CHOST and CFLAGS are…
CHOST="i686-pc-linux-gnu"
CFLAGS="-march=prescott -O2 -pipe -fomit-frame-pointer"
CXXFLAGS="${CFLAGS}"
Kernel
I currently have almost everything working under gentoo. I’m currently running gentoo-source-2.6.21-r2 and am only having trouble with the MMC reader.
To build the kernel I just used genkernel with the –menuconfig option so I could change kernel options. I also disabled creation of bootsplash images but that’s just a personal preference. There were a number of options I changed in the kernel to get things working. They were…
# Set Processor Information Processor type and features Processor family = Pentium M Preemption Model = Preemptible Kernel #set SATA controller (I believe it's Intel ESB, #ICH, PIIX3, PIIX4 PATA/SATA Support that is needed #but I enabled all of them to make sure Device Drivers Serial ATA and Parallel ATA drivers ATA device Support = M All SubOptions set to M #Linux currently has issues with the network card and #the MMC Reader, here we disable the MMC Reader. Device Drivers MMC/SD Card Support Secure Digital Host Controller Interface support = N
Network
Gentoo seems to have an issue with the network card in the laptop. lspci gives…
01:00.0 Network controller: Intel Corporation Unknown device 4222 (rev 02) 03:04.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 10)
So for the ethernet controller it should require either 8139cp or 8139too. However when the 8139too module is loaded the whole laptop freezes up. After a lot of playing I finally figured out how to get it working. You need to enable the following sections in the kernel configuration
#To fix it enable PIO and RX-reset options, not sure which it is #but it works with both enabled Device Drivers Network Device support Ethernet 10 or 100Mbit Realtek RTl-8129/8130/8139 PCI Fast Ethernet = M Use PIO instead of MMIO = Y Support for uncommon RTL-8139 rev. K = Y Support for older RTL-8129/8130 boards Use older RX-reset method
Wireless
I have managed to get wireless working on this laptop. Previously I managed to get NetworkManager working fully with the wireless but recently it has stopped working. However I can still get it to connect to un-encrypted WAPs from the command line so it is probably just NetworkManager.
Gentoo comes with drivers for the wireless card. All you need to do is…
emerge -a net-wireless/ipw3945
and that will handle all dependencies. You may need to disable or enable some sections in the kernel but they are easy to find. Obviously when you upgrade you kernel you will need to reinstall this package.
Power Management
To get power management to work correctly I followed the instructions in the Gentoo Power Management Guide. The modules I had to add to /etc/modules.autoload.d/kernel-2.6 were…
- speedstep-centrino
- ac
- battery
- button
- container
- fan
- processor
- thermal
- video
- cpufreq_conservative
- cpufreq_ondemand
- cpufreq_powersave
- cpufreq_stats
- cpufreq_userspace