Gentoo Wiki


This article is part of the Hardware series.
Laptops TV Tuner Cards Wireless Servers Storage Other Hardware Motherboards Related
The HP nx6125 running Linux
The HP nx6125 running Linux


This is for the AMD Turion64 based nx6125's.


The hardware

Other details

Battery life

As the brochure says, you can get 3 hours battery life from this, but if the system is under load, the wifi is on and the screen brightness is all the way up, you may find this brought down to about 1:20.


I personally found the layout to be very well thought out. At the rear is the network, power and an USB port. This means that everything that you normally plug in ( network cable, power supply, and mouse ) is at the same place. The headphones jack is near the front, and to the side, which i found a lot nicer that at the back. USB ports are located at the side as well as at the back, meaning that you dont have to unplug your mouse when you want to use a USB key. Also the side USB ports aren't resessed, also making USB keys/mp3 player easier to plug in. For the ports on the left, there are icons for each port on the top so that you dont have to guess where to plug the devices into.


I'm assuming you are installing Gentoo from scratch and already have an installation guide ( e.g. here ). I'm also assuming you are going for a 64-bit installation, not a 32-bit one.


This wiki page says that for this CPU you should use these CFLAGS.

CFLAGS="-march=athlon64 -O2 -pipe -msse3"


Use a kernel that is at least a 2.6.17. I can not stress this enough, the older kernels have all sorts of problems. ( Like the fans not starting (causing the thing to overheat), the power status often freezes, CPU scaling doesnt work properly, and on some very only kernels it wont boot or the time will run twice as fast as it should ). In fact, if you have any problems that you think may be kernel related, then get the latest -rc from and install it. Kernel versions starting from 2.6.21-rc1 should be bug free according to bugzilla kernel bug number 5534

Warning: The 2.6.18-rc2 kernel has removed the code nessary for the fans to spin up, as it messes with some other hardware configurations. So use 2.6.18-rc1 or 2.6.17.x. Code necessary for fans to work correctly were finally added at version linux-2.6.21-rc1

Kernel Config

These are just the options that are important. Of course, you will also need keyboard/mouse/etc/etc support, but i'm assuming that either the defaults will be fine or you already know how to do that. This is my kernel config. It has a few weird settings, but overall is pretty normal.

Linux Kernel Configuration: Vanilla 2.6.18-r1
Processor type and features  --->
 Processor family (AMD-Opteron/Athlon64)

# Normall ACPI stuff
Power management options (ACPI, APM)  --->
 ACPI (Advanced Configuration and Power Interface) Support  --->
  [*] ACPI Support
  <*>   AC Adapter
  <*>   Battery
  <*>   Button
  <*>   Video
  < >   Generic Hotkey (EXPERIMENTAL)
  <*>   Fan
  <*>   Processor
  <*>     Thermal Zone

 CPU Frequency scaling  --->
  [*] CPU Frequency scaling
  <*>   'powersave' governor
  <*>   'userspace' governor for userspace frequency scaling
  <*>   'ondemand' cpufreq policy governor
  <*>   'conservative' cpufreq governor
  <*>   AMD Opteron/Athlon64 PowerNow!

 # The GFX card is PCIE ( i suspect the network cards are too )
 Bus options (PCI, PCMCIA, EISA, MCA, ISA)
  <*> PCI Express support
 # HDD DMA support
 Device Drivers  --->
  ATA/ATAPI/MFM/RLL support  --->
   PCI IDE chipset support  --->
    [*]  Generic PCI bus-master DMA support    
     <*>  ATI IXP chipset IDE support     
 # The (wired) network card
 Device Drivers  --->
  Network device support  --->
   <*> Broadcom Tigon3 support

 Sound  --->
  <*> Sound card support
  Advanced Linux Sound Architecture  --->
   <M> Advanced Linux Sound Architecture
   PCI devices  --->   
    <*> ATI IXP AC97 Controller
    < > ATI IXP Modem
 # Unless you need modem support, dont enable it as it
 #  stops the mute LED from working.

USE flags

These are the USE flags that you should pay attention too.

USE=" ... acpi dri dvd hal ieee1394 usb ... "

Xorg 7.0 driver flags.

INPUT_DEVICES="keyboard mouse synaptics"
# Keyboard, mouse and touchpad
VIDEO_CARDS="fglrx radeon vesa vga"
# Binary ATi driver, OSS ATi drivers, and generic.

Driver / config setup

Things that worked out of the box

Things that were not working or tested


Here you can either use the binary driver from ATi or the OSS radeon driver.

Binary driver

This may be harder to set up and crashed more often, however if you want 3d acceleration, this is the only option. ATI drivers has details on this. I had trouble compiling it on a 2.6.18-rc1 kernel ( not suprising though ).

It also detects the true size of the LCD panel which works out to 86x88 dpi for the 1024*768 display.

You can fix this by telling that your display is larger, so that it will get 75dpi.

Section "Monitor"
        DisplaySize  347 260

Also the display brightness buttons don't work with the binary driver ( i suspect there is a way around this, in a xorg.conf option). You can work around this by Ctrl+Alt+F1, adjust brightness with fn+F9/F10, Alt+F7. I.e., swap over to a terminal, change it and swap back.

OSS driver

I found this to be faster than the binary driver for 2d.


See the Broadcom 43xx article.

Hibernation / suspend setup

I have it working ( except when using the ATi binary driver ).

If you are trying to get it working i would recommend running mount -o remount,sync / as root so that your filesystem doesn't damage itself should the resume fail.

Warning: Currently suspend to disk ( aka, hibernate ) will cause the next hibernate/suspend to fail. So you can only use it once.

You will need ....

Emerge the hibernation scripts with emerge -av sys-power/hibernate-script.

You will also need a swap partion ( which you have normally ) for hibernation.

The suspend2 kernel patch may be of help, but i didn't use it.

Kernel settings & modules

Kernel boot parameters are "noapic resume=/dev/path_to_swap" ( you may find you kernel doesn't need the noapic parameter, and if it doesn't remove it as it decreases performance ).

Possible modules that may stop it from working :

Hibernate.conf & other settings

Note: I am currently trying suspend with fglrx, and i'm not expericening too many issues.
File: /etc/hibernate/
echo 3 > /proc/acpi/fan/C255/state
echo 3 > /proc/acpi/fan/C256/state
echo 3 > /proc/acpi/fan/C257/state
echo 3 > /proc/acpi/fan/C258/state


Other stuff to make it easier to use

If you want to run hibernate or hibernate-ram as someone other than root, you will need to :


File: /usr/bin/hibernate
/usr/bin/sudo /usr/sbin/hibernate $@
File: /usr/bin/hibernate-ram
/usr/bin/sudo /usr/sbin/hibernate --config-file /etc/hibernate/ram.conf $@
addgroup hibernate
usermod -a -G hibernate <the user>

chown root:hibernate /usr/bin/hibernate*
chmod 750 /usr/bin/hibernate*

And add ..

Code: /etc/sudoers
%hibernate ALL=(root) NOPASSWD: /usr/sbin/hibernate

For a KDE .desktop shortcut :

File: ~/Desktop/Suspend.desktop
[Desktop Entry]

Quirks / issues

  Note: pressing the Fn+F4 key (for switching to external display) resolves that problem and turns the display on again.

used again. I theorize that the HDD has parked itself, but i really have no idea.

EDIT : I have this laptop, under Fedora 6, and the same problem, I fix it whith hdparm, using : #/sbin/hdparm -q -B 255 /dev/hda at startup for turning off the power management of the hdd. (Sorry for my bad english, and I invite the author of this wiki to rewrite this better :) , my mail : Arnaud)

Processor undervoltage

It seems that linux kernel defaults to do some overvoltage on this machine. It uses 1,45 V (For Turion ML-32) and it should use 1,35 V (AMD spec). This is worth checking and correcting - with perhaps doing futher undervoltage if vaiable. Proposed ways are: - patching driver directly - using deamon, with no patches required

You are doing this at your own risk!

Suspending to RAM

Using the SuSE s2ram tool i have found that "s2ram -f -s" works fine.

Hibernation ( suspend to disk )

I finally got this to work. I'm not sure exactly what it involved but i have it working ( except the fans turn on full as re-boot ). It appears that the kernel restores all kinds of states to devices when it resumes, like the ac adaptor status will remain it the original state until the status is cycled.

I'm still tracing down exactly what stopped it from working before, but from what i can tell it needed the noapic kernel parameter , and some modules removed.
Scratch that, it works fine with the fglrx and ndiswrapper ( And USB, sound, 1394, etc) modules running.
Hmm, i take that back, i'm almost sure now that the 1394 drivers can be a problem ....
Hmm, or maybe fglrx only works for the first hibernate and not the second .....

Rebooting when GRUB has a gfxical interface

It doesnt. When i had grub set up to use a graphical interface it wouldn't reboot. I've heard that "reboot=b" as a kernel option would help this.

Polling acpi -t

Code: Add to /etc/conf.d/local.start or similar

sh -c "while(true) do sleep 5 ; acpi -t > /dev/null ; done "&

One work around for the fan problem is to poll the acpi termal monitors often. The above line forks a shell the checks ( and then redirects to /dev/null ) every 5 seconds.


Acpi auto cpufreq adjuster

Put this in your acpi handler to have it automaticly change the cpufreq scaling_governor when the ac_adapter state changes.

If you want it changed at boot put /etc/acpi/ ac_adapter local.start in your /etc/conf.d/local.start.

File: /etc/acpi/
 if  grep on-line /proc/acpi/ac_adapter/*/state &> /dev/null ; then
  echo 1800000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
  echo performance > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
  echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

Multimedia keys

The laptop has an (i) ( infomation ), presentation, and volume up/down/mute buttons. The volume mute button also has the mute LED inset. See a generic guide like HOWTO Use Multimedia Keys for more details on setting this up.

This is an example hotkeys config definition file.

File: /usr/share/hotkeys/hpnx6125.def
<?xml version="1.0"?>
<!-- /usr/share/hotkeys/hpnx6125.def -->
  <config model="HP Compaq NX6125 Laptop">
    <userdef keycode="176" command="/usr/bin/amixer set Master 4%+ > /dev/null">Volume Up</userdef>
    <userdef keycode="174" command="/usr/bin/amixer set Master 4%- > /dev/null">Volume Down</userdef>
    <userdef keycode="160" command="/usr/bin/amixer set Master toggle > /dev/null">Volume Mute</userdef>
    <userdef keycode="xxx" command="/usr/bin/sudo /bin/sh /etc/">Toggle CryptoFS</userdef>
    <userdef keycode="xxx" command="/usr/bin/xmms -t ">Toggle XMMS Pause status</userdef>
    <name>Matthew Peterson</name>

LM Sensors

Simply enable support for the following modules in your kernel:
i2c_piix4, adm1021 and k8temp (Linux >=2.6.19 required)
After modprobing the modules you can use lm_sensors (>=2.10.1) to display the temperature.

Built-In CardReader

02:04.3 Mass storage controller: Texas Instruments PCIxx21 Integrated FlashMedia Controller

Onse the system being installed, you need next modules for cardreader working properly:


Just modprobe them. You may get notification from dmesg:

mmcblk0: mmc2:0001 MMCm   ... KiB 
 mmcblk0: p1

Also, you´ll get


block devices created.

Anyway, you cannot mount them, until you strike something like that:

setpci -s 02:04.3 4c=22

It´s a little trick, but it works! Reinsert the card.

See also

Retrieved from ""

Last modified: Sat, 30 Aug 2008 06:46:00 +0000 Hits: 18,226