# HP compaq nx9010

## Slalomsk8er

Index

1. The Hardware

2. The Kernel-Config

2.1. Compiled In Options

2.1. Compiled As Modules

3. The Xorg-Config

4. The One-Touch Buttons

4.1. OMKE Or Omnibook

4.2. Setkeycodes

4.3. Hotkeys

Credit goes to:

http://pvanhoof.be/wiki/index.php/Installing_RH9_on_a_Compaq_nx9010_laptopPhilip Van Hoof; Germán Sanchis Trilles; Jason Motes;

Joao Mendes; Micheal Schexnayder; Milton Paiva Neto; Rui Seabra; Peter Scott; Thierry Randrianiriana; Lauris Buksis; Lamarque Souza

http://sourceforge.net/projects/omke/Pavel Mihaylov for omke.pl; Soos, Peter for the nx9xxx.def

http://www.gentoo.org/doc/en/power-management-guide.xml Dennis Nienhüser for his great guide

To sum it up: I own a hp compaq nx9010, run Gentoo (Jackass!) on it and found that it is not that simple to find infos about this Laptop and how to configure it to get the best out of GNU/Linux and the hardware.

So I write this to help others and for me as reference in the future  :Wink: 

This is version 0.003 of this post.

1. The Hardware

The particular model I own is a DG231A, this translates to:

```
# cat /proc/cpuinfo

processor       : 0

vendor_id       : GenuineIntel

cpu family      : 15

model           : 2

model name      : Intel(R) Pentium(R) 4 CPU 2.80GHz

stepping        : 9

cpu MHz         : 2791.205

cache size      : 512 KB

fdiv_bug        : no

hlt_bug         : no

f00f_bug        : no

coma_bug        : no

fpu             : yes

fpu_exception   : yes

cpuid level     : 2

wp              : yes

flags           : fpu vme de pse tsc msr pae mce cx8 sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe cid xtpr

bogomips        : 5590.29
```

```
# cat /proc/meminfo

MemTotal:       448584 kB

...
```

```
# lspci

0000:00:00.0 Host bridge: ATI Technologies Inc RS200/RS200M AGP Bridge [IGP 340M] (rev 02)

0000:00:01.0 PCI bridge: ATI Technologies Inc PCI Bridge [IGP 340M]

0000:00:06.0 Multimedia audio controller: ALi Corporation M5451 PCI AC-Link Controller Audio Device (rev 02)

0000:00:07.0 ISA bridge: ALi Corporation M1533 PCI to ISA Bridge [Aladdin IV]

0000:00:08.0 Modem: ALi Corporation M5457 AC'97 Modem Controller

0000:00:0a.0 CardBus bridge: O2 Micro, Inc. OZ601/6912/711E0 CardBus/SmartCardBus Controller

0000:00:0b.0 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 50)

0000:00:0b.1 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 50)

0000:00:0b.2 USB Controller: VIA Technologies, Inc. USB 2.0 (rev 51)

0000:00:0c.0 FireWire (IEEE 1394): Texas Instruments TSB43AB21 IEEE-1394a-2000 Controller (PHY/Link)

0000:00:10.0 IDE interface: ALi Corporation M5229 IDE (rev c4)

0000:00:11.0 Bridge: ALi Corporation M7101 Power Management Controller [PMU]

0000:00:12.0 Ethernet controller: National Semiconductor Corporation DP83815 (MacPhyter) Ethernet Controller

0000:01:05.0 VGA compatible controller: ATI Technologies Inc Radeon IGP 330M/340M/350M
```

```
# hdparm -i /dev/hda

/dev/hda:

 Model=HITACHI_DK23EA-40, FwRev=00K3A0A2, SerialNo=K29595

 Config={ HardSect NotMFM HdSw>15uSec Fixed DTR>10Mbs }

 RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=4

 BuffType=DualPortCache, BuffSize=2048kB, MaxMultSect=16, MultSect=16

 CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=78140160

 IORDY=yes, tPIO={min:240,w/IORDY:120}, tDMA={min:120,rec:120}

 PIO modes:  pio0 pio1 pio2 pio3 pio4

 DMA modes:  mdma0 mdma1 mdma2

 UDMA modes: udma0 udma1 udma2 udma3 udma4 *udma5

 AdvancedPM=yes: mode=0x80 (128) WriteCache=enabled

 Drive conforms to: ATA/ATAPI-5 T13 1321D revision 3:

 * signifies the current active mode
```

That's it with the "I show you mine and you show me yours". 

2. The Kernel-Config

Let's start with the kernel config for the gentoo-sources-2.6.14-r2 :

2.1. Compiled In Options

```
# cat /boot/config | grep "=y"

CONFIG_X86=y

CONFIG_SEMAPHORE_SLEEPERS=y

CONFIG_MMU=y

CONFIG_UID16=y

CONFIG_GENERIC_ISA_DMA=y

CONFIG_GENERIC_IOMAP=y

CONFIG_ARCH_MAY_HAVE_PC_FDC=y

CONFIG_EXPERIMENTAL=y

CONFIG_CLEAN_COMPILE=y

CONFIG_BROKEN_ON_SMP=y

CONFIG_LOCK_KERNEL=y

CONFIG_LOCALVERSION_AUTO=y

CONFIG_SWAP=y

CONFIG_SYSVIPC=y

CONFIG_POSIX_MQUEUE=y

CONFIG_SYSCTL=y

CONFIG_AUDIT=y

CONFIG_AUDITSYSCALL=y

CONFIG_HOTPLUG=y

CONFIG_KOBJECT_UEVENT=y

CONFIG_IKCONFIG=y

CONFIG_IKCONFIG_PROC=y

CONFIG_KALLSYMS=y

CONFIG_PRINTK=y

CONFIG_BUG=y

CONFIG_BASE_FULL=y

CONFIG_FUTEX=y

CONFIG_EPOLL=y

CONFIG_SHMEM=y

CONFIG_MODULES=y

CONFIG_MODULE_UNLOAD=y

CONFIG_MODULE_FORCE_UNLOAD=y

CONFIG_OBSOLETE_MODPARM=y

CONFIG_KMOD=y

CONFIG_X86_PC=y

CONFIG_MPENTIUM4=y

CONFIG_X86_CMPXCHG=y

CONFIG_X86_XADD=y

CONFIG_RWSEM_XCHGADD_ALGORITHM=y

CONFIG_GENERIC_CALIBRATE_DELAY=y

CONFIG_X86_WP_WORKS_OK=y

CONFIG_X86_INVLPG=y

CONFIG_X86_BSWAP=y

CONFIG_X86_POPAD_OK=y

CONFIG_X86_GOOD_APIC=y

CONFIG_X86_INTEL_USERCOPY=y

CONFIG_X86_USE_PPRO_CHECKSUM=y

CONFIG_PREEMPT=y

CONFIG_PREEMPT_BKL=y

CONFIG_X86_UP_APIC=y

CONFIG_X86_UP_IOAPIC=y

CONFIG_X86_LOCAL_APIC=y

CONFIG_X86_IO_APIC=y

CONFIG_X86_TSC=y

CONFIG_X86_MCE=y

CONFIG_X86_MCE_NONFATAL=y

CONFIG_X86_MCE_P4THERMAL=y

CONFIG_NOHIGHMEM=y

CONFIG_SELECT_MEMORY_MODEL=y

CONFIG_FLATMEM_MANUAL=y

CONFIG_FLATMEM=y

CONFIG_FLAT_NODE_MEM_MAP=y

CONFIG_MTRR=y

CONFIG_SECCOMP=y

CONFIG_HZ_250=y

CONFIG_PM=y

CONFIG_SOFTWARE_SUSPEND=y

CONFIG_ACPI=y

CONFIG_ACPI_SLEEP=y

CONFIG_ACPI_SLEEP_PROC_FS=y

CONFIG_ACPI_AC=y

CONFIG_ACPI_BATTERY=y

CONFIG_ACPI_BUTTON=y

CONFIG_ACPI_VIDEO=y

CONFIG_ACPI_FAN=y

CONFIG_ACPI_PROCESSOR=y

CONFIG_ACPI_THERMAL=y

CONFIG_ACPI_EC=y

CONFIG_ACPI_POWER=y

CONFIG_ACPI_SYSTEM=y

CONFIG_X86_PM_TIMER=y

CONFIG_CPU_FREQ=y

CONFIG_CPU_FREQ_TABLE=y

CONFIG_CPU_FREQ_STAT=y

CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y

CONFIG_CPU_FREQ_GOV_PERFORMANCE=y

CONFIG_CPU_FREQ_GOV_POWERSAVE=y

CONFIG_CPU_FREQ_GOV_USERSPACE=y

CONFIG_CPU_FREQ_GOV_ONDEMAND=y

CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y

CONFIG_X86_P4_CLOCKMOD=y

CONFIG_X86_SPEEDSTEP_LIB=y

CONFIG_PCI=y

CONFIG_PCI_GOANY=y

CONFIG_PCI_BIOS=y

CONFIG_PCI_DIRECT=y

CONFIG_PCI_MMCONFIG=y

CONFIG_PCI_LEGACY_PROC=y

CONFIG_ISA_DMA_API=y

CONFIG_PCCARD=y

CONFIG_PCMCIA=y

CONFIG_PCMCIA_LOAD_CIS=y

CONFIG_PCMCIA_IOCTL=y

CONFIG_CARDBUS=y

CONFIG_YENTA=y

CONFIG_PCCARD_NONSTATIC=y

CONFIG_BINFMT_ELF=y

CONFIG_BINFMT_AOUT=y

CONFIG_BINFMT_MISC=y

CONFIG_NET=y

CONFIG_PACKET=y

CONFIG_UNIX=y

CONFIG_INET=y

CONFIG_IP_MULTICAST=y

CONFIG_IP_FIB_HASH=y

CONFIG_INET_DIAG=y

CONFIG_INET_TCP_DIAG=y

CONFIG_TCP_CONG_BIC=y

CONFIG_NETFILTER=y

CONFIG_IP_NF_CONNTRACK=y

CONFIG_IP_NF_QUEUE=y

CONFIG_IP_NF_IPTABLES=y

CONFIG_IP_NF_MATCH_LIMIT=y

CONFIG_IP_NF_MATCH_IPRANGE=y

CONFIG_IP_NF_MATCH_MAC=y

CONFIG_IP_NF_MATCH_PKTTYPE=y

CONFIG_IP_NF_MATCH_MARK=y

CONFIG_IP_NF_MATCH_MULTIPORT=y

CONFIG_IP_NF_MATCH_TOS=y

CONFIG_IP_NF_MATCH_RECENT=y

CONFIG_IP_NF_MATCH_ECN=y

CONFIG_IP_NF_MATCH_DSCP=y

CONFIG_IP_NF_MATCH_AH_ESP=y

CONFIG_IP_NF_MATCH_LENGTH=y

CONFIG_IP_NF_MATCH_TTL=y

CONFIG_IP_NF_MATCH_TCPMSS=y

CONFIG_IP_NF_MATCH_HELPER=y

CONFIG_IP_NF_MATCH_STATE=y

CONFIG_IP_NF_MATCH_CONNTRACK=y

CONFIG_IP_NF_MATCH_OWNER=y

CONFIG_IP_NF_FILTER=y

CONFIG_IP_NF_TARGET_REJECT=y

CONFIG_IP_NF_TARGET_LOG=y

CONFIG_IP_NF_TARGET_ULOG=y

CONFIG_IP_NF_TARGET_TCPMSS=y

CONFIG_IP_NF_NAT=y

CONFIG_IP_NF_NAT_NEEDED=y

CONFIG_IP_NF_TARGET_MASQUERADE=y

CONFIG_IP_NF_TARGET_REDIRECT=y

CONFIG_IP_NF_TARGET_NETMAP=y

CONFIG_IP_NF_TARGET_SAME=y

CONFIG_IP_NF_MANGLE=y

CONFIG_IP_NF_TARGET_TOS=y

CONFIG_IP_NF_TARGET_ECN=y

CONFIG_IP_NF_TARGET_DSCP=y

CONFIG_IP_NF_TARGET_MARK=y

CONFIG_IP_NF_TARGET_CLASSIFY=y

CONFIG_IP_NF_ARPTABLES=y

CONFIG_IP_NF_ARPFILTER=y

CONFIG_IP_NF_ARP_MANGLE=y

CONFIG_IRDA=y

CONFIG_IRLAN=y

CONFIG_IRCOMM=y

CONFIG_IRDA_ULTRA=y

CONFIG_IRDA_CACHE_LAST_LSAP=y

CONFIG_IRDA_FAST_RR=y

CONFIG_ALI_FIR=y

CONFIG_STANDALONE=y

CONFIG_PREVENT_FIRMWARE_BUILD=y

CONFIG_FW_LOADER=y

CONFIG_PARPORT=y

CONFIG_PARPORT_PC=y

CONFIG_PARPORT_1284=y

CONFIG_PNP=y

CONFIG_PNPACPI=y

CONFIG_BLK_DEV_FD=y

CONFIG_LBD=y

CONFIG_IOSCHED_NOOP=y

CONFIG_IOSCHED_AS=y

CONFIG_IOSCHED_DEADLINE=y

CONFIG_IOSCHED_CFQ=y

CONFIG_IDE=y

CONFIG_BLK_DEV_IDE=y

CONFIG_BLK_DEV_IDEDISK=y

CONFIG_IDEDISK_MULTI_MODE=y

CONFIG_BLK_DEV_IDECD=y

CONFIG_IDE_GENERIC=y

CONFIG_BLK_DEV_CMD640=y

CONFIG_BLK_DEV_IDEPCI=y

CONFIG_IDEPCI_SHARE_IRQ=y

CONFIG_BLK_DEV_GENERIC=y

CONFIG_BLK_DEV_RZ1000=y

CONFIG_BLK_DEV_IDEDMA_PCI=y

CONFIG_IDEDMA_PCI_AUTO=y

CONFIG_BLK_DEV_ALI15X3=y

CONFIG_BLK_DEV_IDEDMA=y

CONFIG_IDEDMA_AUTO=y

CONFIG_SCSI=y

CONFIG_SCSI_PROC_FS=y

CONFIG_BLK_DEV_SD=y

CONFIG_CHR_DEV_SG=y

CONFIG_SCSI_SATA=y

CONFIG_SCSI_ATA_PIIX=y

CONFIG_SCSI_SATA_INTEL_COMBINED=y

CONFIG_SCSI_QLA2XXX=y

CONFIG_IEEE1394=y

CONFIG_IEEE1394_OHCI1394=y

CONFIG_IEEE1394_SBP2=y

CONFIG_IEEE1394_DV1394=y

CONFIG_IEEE1394_RAWIO=y

CONFIG_I2O_EXT_ADAPTEC=y

CONFIG_I2O_CONFIG_OLD_IOCTL=y

CONFIG_NETDEVICES=y

CONFIG_DUMMY=y

CONFIG_NET_ETHERNET=y

CONFIG_MII=y

CONFIG_NET_PCI=y

CONFIG_NATSEMI=y

CONFIG_PPP=y

CONFIG_PPP_ASYNC=y

CONFIG_PPP_SYNC_TTY=y

CONFIG_INPUT=y

CONFIG_INPUT_MOUSEDEV=y

CONFIG_INPUT_MOUSEDEV_PSAUX=y

CONFIG_INPUT_KEYBOARD=y

CONFIG_KEYBOARD_ATKBD=y

CONFIG_INPUT_MOUSE=y

CONFIG_MOUSE_PS2=y

CONFIG_SERIO=y

CONFIG_SERIO_I8042=y

CONFIG_SERIO_LIBPS2=y

CONFIG_VT=y

CONFIG_VT_CONSOLE=y

CONFIG_HW_CONSOLE=y

CONFIG_SERIAL_8250=y

CONFIG_SERIAL_CORE=y

CONFIG_UNIX98_PTYS=y

CONFIG_LEGACY_PTYS=y

CONFIG_PRINTER=y

CONFIG_AGP=y

CONFIG_AGP_ATI=y

CONFIG_DRM=y

CONFIG_DRM_RADEON=y

CONFIG_I2C=y

CONFIG_I2C_CHARDEV=y

CONFIG_I2C_ALGOBIT=y

CONFIG_I2C_ALI1535=y

CONFIG_SENSORS_EEPROM=y

CONFIG_HWMON=y

CONFIG_FB=y

CONFIG_FB_CFB_FILLRECT=y

CONFIG_FB_CFB_COPYAREA=y

CONFIG_FB_CFB_IMAGEBLIT=y

CONFIG_FB_SOFT_CURSOR=y

CONFIG_FB_MODE_HELPERS=y

CONFIG_FB_VESA=y

CONFIG_FB_VESA_TNG=y

CONFIG_VIDEO_SELECT=y

CONFIG_FB_RADEON=y

CONFIG_FB_RADEON_I2C=y

CONFIG_VGA_CONSOLE=y

CONFIG_DUMMY_CONSOLE=y

CONFIG_FRAMEBUFFER_CONSOLE=y

CONFIG_FONT_8x8=y

CONFIG_FONT_8x16=y

CONFIG_BACKLIGHT_LCD_SUPPORT=y

CONFIG_BACKLIGHT_CLASS_DEVICE=y

CONFIG_BACKLIGHT_DEVICE=y

CONFIG_LCD_CLASS_DEVICE=y

CONFIG_LCD_DEVICE=y

CONFIG_FB_SPLASH=y

CONFIG_SOUND=y

CONFIG_SND=y

CONFIG_SND_TIMER=y

CONFIG_SND_PCM=y

CONFIG_SND_RAWMIDI=y

CONFIG_SND_SEQUENCER=y

CONFIG_SND_OSSEMUL=y

CONFIG_SND_MIXER_OSS=y

CONFIG_SND_PCM_OSS=y

CONFIG_SND_SEQUENCER_OSS=y

CONFIG_SND_MPU401_UART=y

CONFIG_SND_AC97_CODEC=y

CONFIG_SND_AC97_BUS=y

CONFIG_SND_ALI5451=y

CONFIG_USB_ARCH_HAS_HCD=y

CONFIG_USB_ARCH_HAS_OHCI=y

CONFIG_USB=y

CONFIG_USB_DEVICEFS=y

CONFIG_USB_EHCI_HCD=y

CONFIG_USB_UHCI_HCD=y

CONFIG_USB_PRINTER=y

CONFIG_USB_STORAGE=y

CONFIG_USB_HID=y

CONFIG_USB_HIDINPUT=y

CONFIG_USB_MON=y

CONFIG_EXT2_FS=y

CONFIG_EXT3_FS=y

CONFIG_EXT3_FS_XATTR=y

CONFIG_JBD=y

CONFIG_FS_MBCACHE=y

CONFIG_REISERFS_FS=y

CONFIG_REISERFS_PROC_INFO=y

CONFIG_INOTIFY=y

CONFIG_DNOTIFY=y

CONFIG_AUTOFS4_FS=y

CONFIG_ISO9660_FS=y

CONFIG_JOLIET=y

CONFIG_ZISOFS=y

CONFIG_ZISOFS_FS=y

CONFIG_UDF_FS=y

CONFIG_UDF_NLS=y

CONFIG_FAT_FS=y

CONFIG_MSDOS_FS=y

CONFIG_VFAT_FS=y

CONFIG_NTFS_FS=y

CONFIG_PROC_FS=y

CONFIG_PROC_KCORE=y

CONFIG_SYSFS=y

CONFIG_TMPFS=y

CONFIG_RAMFS=y

CONFIG_NFS_FS=y

CONFIG_NFS_V3=y

CONFIG_NFSD=y

CONFIG_NFSD_V3=y

CONFIG_NFSD_TCP=y

CONFIG_LOCKD=y

CONFIG_LOCKD_V4=y

CONFIG_EXPORTFS=y

CONFIG_NFS_COMMON=y

CONFIG_SUNRPC=y

CONFIG_SMB_FS=y

CONFIG_SMB_NLS_DEFAULT=y

CONFIG_CIFS=y

CONFIG_MSDOS_PARTITION=y

CONFIG_NLS=y

CONFIG_NLS_CODEPAGE_437=y

CONFIG_NLS_ISO8859_1=y

CONFIG_NLS_UTF8=y

CONFIG_PROFILING=y

CONFIG_OPROFILE=y

CONFIG_DEBUG_BUGVERBOSE=y

CONFIG_EARLY_PRINTK=y

CONFIG_X86_FIND_SMP_CONFIG=y

CONFIG_X86_MPPARSE=y

CONFIG_CRYPTO=y

CONFIG_CRC_CCITT=y

CONFIG_CRC32=y

CONFIG_ZLIB_INFLATE=y

CONFIG_GENERIC_HARDIRQS=y

CONFIG_GENERIC_IRQ_PROBE=y

CONFIG_X86_BIOS_REBOOT=y

CONFIG_PC=y
```

2.1. Compiled As Modules

```
# cat /boot/config | grep "=m"

CONFIG_MICROCODE=m

CONFIG_X86_MSR=m

CONFIG_X86_CPUID=m

CONFIG_DCDBAS=m

CONFIG_IP_NF_RAW=m

CONFIG_IP_NF_TARGET_NOTRACK=m

CONFIG_BLK_DEV_LOOP=m

CONFIG_BLK_DEV_CRYPTOLOOP=m

CONFIG_BLK_DEV_RAM=m

CONFIG_SCSI_DPT_I2O=m

CONFIG_SCSI_SATA_SX4=m

CONFIG_SCSI_SATA_SIS=m

CONFIG_SCSI_IPR=m

CONFIG_I2O=m

CONFIG_I2O_CONFIG=m

CONFIG_I2O_BLOCK=m

CONFIG_I2O_SCSI=m

CONFIG_I2O_PROC=m

CONFIG_S2IO=m

CONFIG_I2C_ALGOPCF=m

CONFIG_I2C_ALGOPCA=m

CONFIG_USB_WACOM=m

CONFIG_USB_XPAD=m

CONFIG_LIBCRC32C=m
```

If you like me to add/move/remove some thing from the build in and/or modules list, please post and I will test your contribution and change the lists accordingly.

3. The Xorg-Config

This config is based on the ubuntu 5.10 xorg.conf. 

```
# cat /etc/X11/xorg.conf

Section "Files"

    RgbPath         "/usr/lib/X11/rgb"

    ModulePath      "/usr/lib/modules"

    FontPath    "/usr/share/fonts/misc"

    FontPath    "/usr/share/fonts/75dpi"

    FontPath    "/usr/share/fonts/100dpi"

    FontPath    "/usr/share/fonts/TTF"

    FontPath    "/usr/share/fonts/Type1"

    FontPath    "/usr/local/share/fonts"

EndSection

Section "Module"

        Load    "bitmap"

        Load    "dbe"

        Load    "ddc"

        Load    "dri"

        Load    "extmod"

        Load    "freetype"

        Load    "glx"

        Load    "int10"

        Load    "record"

        Load    "type1"

        Load    "vbe"

EndSection

Section "InputDevice"

        Identifier      "Generic Keyboard"

        Driver          "keyboard"

        Option          "CoreKeyboard"

        Option          "XkbRules"      "xorg"

        Option          "XkbModel"      "pc105"

        Option          "XkbLayout"     "de_CH" # I have a swiss layout, change this if your not in the same little spot on earth ;)

EndSection

Section "InputDevice"

        Identifier      "Configured Mouse"

        Driver          "mouse"

        Option          "CorePointer"

        Option          "Device"                "/dev/input/mice"

        Option          "Protocol"              "ImPS/2"

        Option          "Emulate3Buttons"       "true"

        Option          "ZAxisMapping"          "4 5"

EndSection

Section "InputDevice"

        Identifier      "Synaptics Touchpad"

        Driver          "synaptics"

        Option          "SendCoreEvents"        "true"

        Option          "Device"                "/dev/psaux"

        Option          "Protocol"              "auto-dev"

        Option          "HorizScrollDelta"      "0"

EndSection

Section "Device"

        Identifier      "ATI Technologies, Inc. Radeon 330M/340M/350M (RS200 IGP)"

        Driver          "ati"

        BusID           "PCI:1:5:0"

EndSection

Section "Monitor"

        Identifier      "Generic Monitor"

        Option          "DPMS"

EndSection

Section "Screen"

        Identifier      "Default Screen"

        Device          "ATI Technologies, Inc. Radeon 330M/340M/350M (RS200 IGP)"

        Monitor         "Generic Monitor"

        DefaultDepth    24

        SubSection "Display"

                Depth           1

                Modes           "1024x768"

        EndSubSection

        SubSection "Display"

                Depth           4

                Modes           "1024x768"

        EndSubSection

        SubSection "Display"

                Depth           8

                Modes           "1024x768"

        EndSubSection

        SubSection "Display"

                Depth           15

                Modes           "1024x768"

        EndSubSection

        SubSection "Display"

                Depth           16

                Modes           "1024x768"

        EndSubSection

        SubSection "Display"

                Depth           24

                Modes           "1024x768"

        EndSubSection

EndSection

Section "ServerLayout"

        Identifier      "Default Layout"

        Screen          "Default Screen"

        InputDevice     "Generic Keyboard"

        InputDevice     "Configured Mouse"

        InputDevice     "Synaptics Touchpad"

EndSection

Section "DRI"

        Mode    0666

EndSection

Section "Extensions" # This enables a unstable extention so use on your own risk ;)

        Option "Composite"      "Enable"

EndSection
```

Again, feel free to help me find the best config.

4. The One-Touch Buttons

4.1. OMKE Or Omnibook

There seams to be an easier way to get the One.Touch buttons to produse scancodes:

```
# emerge omnibook

echo "omnibook" >> /etc/modules.autoload.d/kernel-2.6
```

 *Quote:*   

> A program to enable/disable various features on HP Omnibook laptops
> 
> such as the extra multimedia/onetouch keys. It was written for XE3-GC
> 
> but at least the extra keys enabling is reported to work on other XE3
> ...

 

```
#! /usr/bin/perl

#

# A program to enable/disable various features on HP Omnibook laptops

# such as the extra multimedia/onetouch keys.

# Running on non-Omnibook computers is not tested and not recommended.

#

# v1.0 (C) Pavel Mihaylov <bin@bash.info>

#

# you may redistribute this under terms of the Artistic License

#

use strict;

my $args = join ' ', @ARGV;

if ($args !~ /^(\s*-[a-z]\s*(0x[\da-f]+|\d+))+$/i) {

   print STDERR "

omke - Omnibook advanced configuration tool

usage:   omke <commands>

possible commands are:

-k N      enable/disable the extra multimedia/onetouch keys

-d N      turn on/off the LCD display

-t N      enable/disable the touchpad

-p N      enable/disable the external power (DANGEROUS)

-u VALUE   send command parameter VALUE to Omnibook configuration register

      (be EXTREMELY CAREFUL if you use this)

Non-zero N value means enable/turn on and zero value means disable/turn off.

The VALUE for option -u can be given in hex, for example -u 0xd2 will make

your laptop beep.

";

   exit;

}

my %args = $args =~ /\s*-([a-z])\s*(0x[\da-f]+|\d+)/ig;

open PORTS, "+</dev/port" or die("can't open /dev/port");

if (defined $args{k}) {

   if ($args{k}) {

      kbd_param(0x90) if (kbd_command(0x59));

      print "HP Omnibook multimedia/onetouch keys enabled.\n";

   } else {

      kbd_param(0x91) if (kbd_command(0x59));

      print "HP Omnibook multimedia/onetouch keys disabled.\n";

   }

}

if (defined $args{d}) {

   if ($args{d}) {

      kbd_param(0xE1) if (kbd_command(0x59));

      print "HP Omnibook LCD display turned on.\n";

   } else {

      kbd_param(0xE2) if (kbd_command(0x59));

      print "HP Omnibook LCD display turned off.\n";

   }

}

if (defined $args{t}) {

   if ($args{t}) {

      kbd_param(0xAA) if (kbd_command(0x59));

      print "HP Omnibook touchpad enabled.\n";

   } else {

      kbd_param(0xA9) if (kbd_command(0x59));

      print "HP Omnibook touchpad disabled.\n";

   }

}

if (defined $args{p}) {

   if ($args{p}) {

      kbd_param(0xC2) if (kbd_command(0x59));

      print "HP Omnibook external power enabled.\n";

   } else {

      kbd_param(0xC1) if (kbd_command(0x59));

      print "HP Omnibook external power disabled.\n";

   }

}

if (defined $args{u}) {

   kbd_param(eval($args{u})) if (kbd_command(0x59));

   print "User command parameter $args{u} sent to HP Omnibook configuration register.\n";

}

   

close PORTS;

#######################################################

sub inb {

   my ($port, $data) = (shift, undef);

   sysseek PORTS, $port, 0;

   sysread PORTS, $data, 1;

   return ord($data);

}

sub outb {

   my ($data, $port) = (shift, shift);

   sysseek PORTS, $port, 0;

   syswrite PORTS, chr($data);

}

sub wait_kbd_empty {

   my $i = 5000;

   while((inb(0x64) & 2) and $i) {

      $i--;

      if ($i == 0) {

         print "timeout waiting for the buffer to empty\n";

         return 0;

      }

   }

   return 1;

}

sub kbd_command {

   my $command = shift;

   if (wait_kbd_empty()) {

      outb($command, 0x64);

      return 1;

   }

   return 0;

}

sub kbd_param {

   my $param = shift;

   if (wait_kbd_empty()) {

      outb($param, 0x60);

      return 1;

   }

   return 0;

}

```

Put the above code in a file named omke.pl and 

```
# chmod +x omke.pl

# ./omke -k 1
```

4.2. Setkeycodes

Now that the One-Touch Buttons that did not worked (Search, Lock and Help) generate scancodes we need to register them with the system by seting keycodes.

First use dumpkeys to find unused keycodes or ones that match the button (like help is keycode 115 in my mapping) and then use setkeycodes to bind the scancodes and the keycodes together.

The scancodes are:

 *Quote:*   

> HP/Compaq nx9000
> 
> ----------------
> 
> Mail button:                    e06c
> ...

 

This are the ones we need to set manually:

Search button:                  e073

Lock button:                    e071

Help button:                    e070

Use dumpkeys to check if the keycodes are free or have a matching meaning (cross check with the nx9010.def file below):

```
# dumpkeys | less
```

Set the scancodes to your desired keycodes

```
# setkeycodes e070 115

# setkeycodes e071 241

# setkeycodes e073 243
```

4.3. Hotkeys

Now we need to get the hotkeys deamon (set the xosd use flag for nice onscreen feedback):

```
# emerge hotkeys
```

Save the following bash script under the name amixer_mute.sh at a place of your desire and chmod it executable:

```
# chmod +x amixer_mute.sh
```

```
#!/bin/bash

Master=1

MASTER_mute="mute"

MASTER_set=1

PCM=1

PCM_mute="mute"

PCM_set=1

case "$1" in

    "-master")    Master=0 ;;

    "-pcm")       PCM=0 ;;

    "-h")           echo "Usage: amixer_mute [ -pcm | -master | -h | -v ]

If no option is given amixer_mute default to -pcm" ;;

    "-v")           echo "

 ###########################################

 #                2005.11.28               #

 # amix_mute.sh v0.1(C) by Dominik G. Riva #

 #        amixer_mute@slalomsk8er.ch       #

 # this code is licenced under the GPL v.2 #

 #   http://www.gnu.org/copyleft/gpl.html  #

 ###########################################

" ;;

    "")           PCM=0 ;;

    *)            echo "Usage: amixer_mute [ -pcm | -master | -h | -v ]

If no option is given amixer_mute default to -pcm">&2

                  exit 1 ;;

esac

if [ ${Master} -ne 1 ] ; then

    if `amixer cget iface=MIXER,name="Master Playback Switch" | grep "=off"` ; then

        MASTER_mute="unmute"

    fi

    case "${MASTER_mute}" in

        "mute")    if `amixer cset iface=MIXER,name="Master Playback Switch" 0 > /dev/null` ; then

                       MASTER_set=0 

                   fi ;;

        "unmute")  if `amixer cset iface=MIXER,name="Master Playback Switch" 1 > /dev/null` ; then

                       MASTER_set=0

                   fi ;;

        *)         echo "ERROR: Some problem with Master" >&2

                   exit 1 ;;

    esac

fi

if [ ${PCM} -ne 1 ] ; then

    if `amixer cget iface=MIXER,name="PCM Playback Switch" | grep "=off"` ; then

        PCM_mute="unmute"

    fi

    case "${PCM_mute}" in

        "mute")    if `amixer cset iface=MIXER,name="PCM Playback Switch" 0 > /dev/null` ; then

                       PCM_set=0

                   fi ;;

        "unmute")  if `amixer cset iface=MIXER,name="PCM Playback Switch" 1 > /dev/null` ; then

                       PCM_set=0 

                   fi ;;

        *)         echo "ERROR: Some problem with PCM" >&2

                   exit 1 ;;

    esac

fi

if [ ${MASTER_set} -o ${PCM_set} ] ; then

    exit 0

else

    echo "ERROR: A internal logic error occured or amixer was not found (or the API is no longer the same)"

    exit 1

fi
```

Save the following file as nx9010.def in /usr/share/hotkeys/

```
<?xml version="1.0"?>

<definition>

   <config model="HP/Compaq nx9010 laptops">

   <!--

      Multimedia keys are disabled by default on HP laptops.

      For enabling them see the project at URL

      http://sourceforge.net/projects/omke

   -->

      <Mail      keycode="236"/>

      <Search      keycode="243"/>

      <Information   keycode="178"/>

      <Lock   keycode="241"/>

      <Help      keycode="115"/>

      <VolUp      keycode="176" adj="1"/>

      <VolDown   keycode="174" adj="1"/>

      <userdef keycode="160" command="[/path/to/amixer_mute/]amixer_mute.sh[use "-master" or "-pcm"]">Sound muted</userdef>

   </config>

   <contributor>

      <name>Riva, Dominik</name>

      <email>hotkeys@slalomsk8er.ch</email>

   </contributor>

</definition>
```

Edit /etc/hotkeys.conf to use nx9010.def as default and define actions to your One-Touch Buttons.

Check your graphical login-manager's docu an how to start some thing like hotkeys after login.

----------

## Slalomsk8er

I have some problems with hotkeys and it looks like lm_sensors can not find any sensor chips to work with  :Sad: 

----------

## ychaouche

Hi,

I have a nx9010 under debian. The display screw up when i try to use a 1024x768 resolution. It only works under 800x600 and that sucks. Under mandrake it was allright. I wonder if you have experienced any problems with the display under gentoo ?  I heard that gentoo was really install-very-unfriendly and that the installation process take a very long time with lots of questions to answer and options to precise.

Thank you for any suggestion.

I recently downloaded the proprietary ati drivers for their sites, but that did not solve my probleme (under debian)

thx.

Y.Chaouche

----------

## Slalomsk8er

I did not had any of your problems   :Shocked: 

I use Xorg and on [Ku|U]buntu it worked out of the box.

Well, this is my xorg.conf: 

<edit>well I posted the config above so no reason to repost it  :Wink: </edit>

----------

## ychaouche

Ok i'll check out ubuntu then.

thanx mate.

----------

## ychaouche

i am fully satisfied ! i've just downloaded and installed ubuntu, it runs  perfectly !! that's wonderful even the keys for audio control in the right of the laptop are working !! synaptic touchpad works great, and no more display problems when switching to 1024x768 resolution  :Smile: 

Thanx.

Y.chaouche

----------

