Gentoo Linux on HP/Compaq nx7400 Core 2 Duo Laptop
[this article has been updated several times with new info after it was initially written. last update: 2007-05-08]
New job, new laptop :o)
I picked up my new nx7400 at the post office this morning. In case you'd like to look it up, the exact reference is RH403ET: it's the version with a Core 2 Duo T5600 (2x 1.83GHz) CPU, 1024MB RAM, a 100 GB HD and a WSXGA+ (16801050) 15.4" screen.
When you open the box, the first step you have to go through is to setup the pre-installed XP Pro copy. I did not really want it, but it seems very difficult, if at all possible, to order a laptop without a Windows license. Once XP has been setup, you are "strongly encouraged" to create a set of backup disks. In this case, you'll need either 12 blank CDs or 2 blank DVDs. The setup process also leaves a 9GB-big "recovery partition" on your disk.
It seems that Bios version 08 fixes some bugs with SpeedStep and linux [see link #1], and anyway it's probably a good idea to use the latest stable version, so I went to hp.com, downloaded the latest Bios + flash utility from there and updated.
After having completed this, here is what I've done:
- restarted the computer with sysrescuecd
- used gparted to shrink the XP ntfs partition to 25 GB and move it to the end of the disk
- still with gparted created a new 80 MB primary partition at the beginning of the disk (future /boot)
- created a new extended partition with the remaining space between /boot and XP
- created two logical partitions for swap and / within the extended partition
After that I rebooted on a gentoo 2006.1 amd64 install CD (minimal), and went through a regular gentoo install:
- mount / and /boot in /mnt/gentoo
- download and untar stage3 + portage snapshot
- at this point I left the default CFLAGS="-O2 -pipe" in make.conf, I just added MAKEOPTS="-j3" and filled GENTOO_MIRRORS (march=native or march=core2 seem promising but are not available before gcc 4.2 resp. 4.3)
CPU FREQ
emerge -av cpufrequtils
echo 'echo 1833000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq' >> /etc/conf.d/local.start
echo 'echo 1833000 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq' >> /etc/conf.d/local.start
echo 1833000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
echo 1833000 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq
vi /etc/conf.d/cpufrequtils
/etc/init.d/cpufrequtils start
rc-update add cpufrequtils boot
PSMOUSE BUG
- compile psmouse as module
- echo '/sbin/rmmod psmouse' >> /etc/conf.d/local.stop
WLAN
After having installed everything, I restarted my new system, and wanted to add support for the Intel PRO/Wireless 3945ABG card:
echo 'net-wireless/ipw3945' >> /etc/portage/package.unmask
echo 'net-wireless/ipw3945 ~amd64' >> /etc/portage/package.keywords
echo 'net-wireless/ipw3945d ~amd64' >> /etc/portage/package.keywords
echo 'net-wireless/ipw3945-ucode ~amd64' >> /etc/portage/package.keywords
Everything went fine until emerge complained that ipw3945-1.1.3 needed a kernel >= 2.6.19...
So I downloaded the latest stable kernel (2.6.19.2 as of today) from the nearest mirror, reconfigured it based on my 2.6.18 .config (some new options appeared, and some things like SATA have moved between 2.6.18 and 2.6.19, overall the H/W support for my laptop seems to be better)
- reboot on 2.6.19.2
- emerge ipw3945
- echo 'ipw3945' >> /etc/modules.autoload.d/kernel-2.6
- modules-update
- reboot
=> iwconfig eth1 now displays what you'd expect it to
XORG
echo 'VIDEO_CARDS="i810"' >> /etc/make.conf
echo 'INPUT_DEVICES="evdev keyboard mouse synaptics"' >> /etc/make.conf
emerge xorg-x11
there is a problem with the vga bios which does not "advertise" the 1680x1050 mode. here is the workaround:
- echo 'sys-apps/915resolution ~amd64' >> /etc/portage/package.keywords
- emerge -av sys-apps/915resolution
- pick up a mode you don't need from the output of 915resolution -l
- here is what I put in /etc/conf.d/915resolution: replace=( "41 1680 1050 24" )
- /etc/init.d/915resolution start
- rc-update add 915resolution default
ALSA
it looks like there is a problem with the hda-intel driver included in kernel 2.6.19, so I recompiled the kernel without alsa support and emerged alsa-driver:
- echo 'ALSA_CARDS="hda-intel"' >> /etc/make.conf
- echo 'media-sound/alsa-headers ~amd64' >> /etc/portage/package.keywords
- echo 'media-sound/alsa-driver ~amd64' >> /etc/portage/package.keywords
- emerge -av alsa-driver
- emerge alsa-utils
- vi /etc/modules.d/alsa
alias snd-card-0 snd-hda-intel
alias sound-slot-0 snd-card-0
- modules-update
- rc-update add alsasound boot
- /etc/init.d/alsasound restart
PCMCIA
emerge -av sys-apps/pcmciautils
echo 'pcmcia' >> /etc/modules.autoload.d/kernel-2.6
echo 'yenta-socket' >> /etc/modules.autoload.d/kernel-2.6
modules-update
TEMPERATURE SENSORS
echo 'gnome-extra/sensors-applet hddtemp' >> /etc/portage/package.use
emerge -av gnome-extra/sensors-applet
Links:
[1] http://people.solsys.ro/silviu/2006/11/17/hp-nx7400-linux-problems-solved/
[2] http://psykil.livejournal.com/300856.html
[3] http://psykil.livejournal.com/2006/12/03/
[4] http://gcc.gnu.org/onlinedocs/gcc/i386-and-x86_002d64-Options.html
[5] http://tuxmobil.org/gentoo_mobile.html
[6] http://gentoo-wiki.com/Safe_Cflags
[7] http://devel.reinikainen.net/docs/how-to/nx7400/
[8] http://forums.gentoo.org/viewtopic-t-517019.html
[9] http://emisca.altervista.org/nx7400/
[10] http://ubuntuforums.org/showthread.php?t=345569
New job, new laptop :o)
I picked up my new nx7400 at the post office this morning. In case you'd like to look it up, the exact reference is RH403ET: it's the version with a Core 2 Duo T5600 (2x 1.83GHz) CPU, 1024MB RAM, a 100 GB HD and a WSXGA+ (16801050) 15.4" screen.
When you open the box, the first step you have to go through is to setup the pre-installed XP Pro copy. I did not really want it, but it seems very difficult, if at all possible, to order a laptop without a Windows license. Once XP has been setup, you are "strongly encouraged" to create a set of backup disks. In this case, you'll need either 12 blank CDs or 2 blank DVDs. The setup process also leaves a 9GB-big "recovery partition" on your disk.
It seems that Bios version 08 fixes some bugs with SpeedStep and linux [see link #1], and anyway it's probably a good idea to use the latest stable version, so I went to hp.com, downloaded the latest Bios + flash utility from there and updated.
After having completed this, here is what I've done:
- restarted the computer with sysrescuecd
- used gparted to shrink the XP ntfs partition to 25 GB and move it to the end of the disk
- still with gparted created a new 80 MB primary partition at the beginning of the disk (future /boot)
- created a new extended partition with the remaining space between /boot and XP
- created two logical partitions for swap and / within the extended partition
After that I rebooted on a gentoo 2006.1 amd64 install CD (minimal), and went through a regular gentoo install:
- mount / and /boot in /mnt/gentoo
- download and untar stage3 + portage snapshot
- at this point I left the default CFLAGS="-O2 -pipe" in make.conf, I just added MAKEOPTS="-j3" and filled GENTOO_MIRRORS (march=native or march=core2 seem promising but are not available before gcc 4.2 resp. 4.3)
CPU FREQ
emerge -av cpufrequtils
echo 'echo 1833000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq' >> /etc/conf.d/local.start
echo 'echo 1833000 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq' >> /etc/conf.d/local.start
echo 1833000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
echo 1833000 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq
vi /etc/conf.d/cpufrequtils
/etc/init.d/cpufrequtils start
rc-update add cpufrequtils boot
PSMOUSE BUG
- compile psmouse as module
- echo '/sbin/rmmod psmouse' >> /etc/conf.d/local.stop
WLAN
After having installed everything, I restarted my new system, and wanted to add support for the Intel PRO/Wireless 3945ABG card:
echo 'net-wireless/ipw3945' >> /etc/portage/package.unmask
echo 'net-wireless/ipw3945 ~amd64' >> /etc/portage/package.keywords
echo 'net-wireless/ipw3945d ~amd64' >> /etc/portage/package.keywords
echo 'net-wireless/ipw3945-ucode ~amd64' >> /etc/portage/package.keywords
Everything went fine until emerge complained that ipw3945-1.1.3 needed a kernel >= 2.6.19...
So I downloaded the latest stable kernel (2.6.19.2 as of today) from the nearest mirror, reconfigured it based on my 2.6.18 .config (some new options appeared, and some things like SATA have moved between 2.6.18 and 2.6.19, overall the H/W support for my laptop seems to be better)
- reboot on 2.6.19.2
- emerge ipw3945
- echo 'ipw3945' >> /etc/modules.autoload.d/kernel-2.6
- modules-update
- reboot
=> iwconfig eth1 now displays what you'd expect it to
XORG
echo 'VIDEO_CARDS="i810"' >> /etc/make.conf
echo 'INPUT_DEVICES="evdev keyboard mouse synaptics"' >> /etc/make.conf
emerge xorg-x11
there is a problem with the vga bios which does not "advertise" the 1680x1050 mode. here is the workaround:
- echo 'sys-apps/915resolution ~amd64' >> /etc/portage/package.keywords
- emerge -av sys-apps/915resolution
- pick up a mode you don't need from the output of 915resolution -l
- here is what I put in /etc/conf.d/915resolution: replace=( "41 1680 1050 24" )
- /etc/init.d/915resolution start
- rc-update add 915resolution default
ALSA
it looks like there is a problem with the hda-intel driver included in kernel 2.6.19, so I recompiled the kernel without alsa support and emerged alsa-driver:
- echo 'ALSA_CARDS="hda-intel"' >> /etc/make.conf
- echo 'media-sound/alsa-headers ~amd64' >> /etc/portage/package.keywords
- echo 'media-sound/alsa-driver ~amd64' >> /etc/portage/package.keywords
- emerge -av alsa-driver
- emerge alsa-utils
- vi /etc/modules.d/alsa
alias snd-card-0 snd-hda-intel
alias sound-slot-0 snd-card-0
- modules-update
- rc-update add alsasound boot
- /etc/init.d/alsasound restart
PCMCIA
emerge -av sys-apps/pcmciautils
echo 'pcmcia' >> /etc/modules.autoload.d/kernel-2.6
echo 'yenta-socket' >> /etc/modules.autoload.d/kernel-2.6
modules-update
TEMPERATURE SENSORS
echo 'gnome-extra/sensors-applet hddtemp' >> /etc/portage/package.use
emerge -av gnome-extra/sensors-applet
Links:
[1] http://people.solsys.ro/silviu/2006/11/17/hp-nx7400-linux-problems-solved/
[2] http://psykil.livejournal.com/300856.html
[3] http://psykil.livejournal.com/2006/12/03/
[4] http://gcc.gnu.org/onlinedocs/gcc/i386-and-x86_002d64-Options.html
[5] http://tuxmobil.org/gentoo_mobile.html
[6] http://gentoo-wiki.com/Safe_Cflags
[7] http://devel.reinikainen.net/docs/how-to/nx7400/
[8] http://forums.gentoo.org/viewtopic-t-517019.html
[9] http://emisca.altervista.org/nx7400/
[10] http://ubuntuforums.org/showthread.php?t=345569
Trackbacks
blog.crox.net on : Gentoo Linux on HP/Compaq nx7400 Core 2 Duo Laptop - Update (suspend to ram working now)
Show preview
An update to my initial article on installing Gentoo on my nx7400 laptop:
I've switched to kernel 2.6.21-gentoo (latest gentoo-sources available currently with ~amd64), and to the latest versions of ipw3945, alsa and xorg, and suspend to ram works fine
The author does not allow comments to this entry
Comments
Display comments as Linear | Threaded
Jinesh on :
Else, could you please e-mail me your config.
regards
JC
crox on :