# HOWTO: Gentoo on nx6110

## DaNope

Hi 

My gf just bought a HP/Compaq nx6110 notebook. It is very good value and loves Gentoo.

I wanted to share some stuff I stumbled over

Cheers

DaNope

Broadcom wifi BCM4306 

Works good with ndiswrapper.

Correct rebooting

Add reboot=b to kernel command line

Xorg-x11 with DRI and composite

emerge xorg 6.8.99.8 and kernel 2.6.12-rc6

I had some strange behaviour with the synaptics touch pad.

It assosiated a "Tap" with the 3rd mouse button. I was able to track it down to the "TapButtonX" option.

It works for me now - however I have lost the ability to emulate the 3rd mouse button with a two finger tab.

my xorg.conf

```

# **********************************************************************

# Refer to the XF86Config man page for details about the format of

# this file.

# **********************************************************************

Section "Files"

    # Multiple FontPath entries are allowed (they are concatenated together)

    # By default, Mandrake 6.0 and later now use a font server independent of

    # the X server to render fonts.

    #FontPath "unix/:-1"

    FontPath "/usr/share/fonts/TTF"

    FontPath "/usr/share/fonts/Type1"

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

    FontPath "/usr/share/fonts/aquafont"

    FontPath "/usr/share/fonts/corefonts"

    FontPath "/usr/share/fonts/default"

    FontPath "/usr/share/fonts/arphicfonts"

    FontPath "/usr/share/fonts/artwiz"

    FontPath "/usr/share/fonts/cheapskatefonts"

    FontPath "/usr/share/fonts/cyrillic"

    FontPath "/usr/share/fonts/freefont"

    FontPath "/usr/share/fonts/local"

    FontPath "/usr/share/fonts/misc"

    FontPath "/usr/share/fonts/ukr"

    FontPath "/usr/share/fonts/sharefonts"

    FontPath "/usr/share/fonts/urw-fonts"

    FontPath "/usr/share/fonts/urwvn-fonts"

    FontPath "/usr/share/fonts/hunkyfonts"

    FontPath "/usr/share/fonts/lfpfonts-fix"

    FontPath "/usr/share/fonts/lfpfonts-var"

EndSection

Section "ServerFlags"

    #DontZap # disable <Crtl><Alt><BS> (server abort)

    AllowMouseOpenFail # allows the server to start up even if the mouse doesn't work

    #DontZoom # disable <Crtl><Alt><KP_+>/<KP_-> (resolution switching)

EndSection

Section "Module"

    Load "dbe" # Double-Buffering Extension

    Load "dri"

    Load "GLcore"

    Load "v4l" # Video for Linux

    Load "extmod"

    Load "type1"

    Load "freetype"

    Load "glx" # 3D layer

    Load "synaptics"

    Load "agpgart"

EndSection

Section "DRI" 

    Mode 0666 

EndSection

Section "InputDevice"

    Identifier "Keyboard1"

    Driver "kbd"

    Option "XkbModel" "pc105"

    Option "XkbLayout" "en_US"

    Option "XkbOptions" ""

EndSection

Section "InputDevice"

    Identifier "Mouse1"

    Driver "mouse"

    Option "Protocol" "Auto"

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

    Option "ZAxisMapping" "4 5"

    Option "SendCoreEvents" "true"

    #Option "Emulate3Buttons" "true"

EndSection

Section "InputDevice"

  Driver        "synaptics"

  Identifier    "touchpad"

  Option        "Device"        "/dev/input/event1"

  Option        "Protocol"      "auto-dev"

  Option        "LeftEdge"      "1700"

  Option        "RightEdge"     "5300"

  Option        "TopEdge"       "1700"

  Option        "BottomEdge"    "4200"

#  Option        "FingerLow"     "25"

  Option        "FingerLow"     "20"

#  Option        "FingerHigh"    "30"

  Option        "FingerHigh"    "35"

  Option        "MaxTapTime"    "180"

  Option        "MaxTapMove"    "220"

  Option        "VertScrollDelta" "100"

  Option        "MinSpeed"      "0.08"

  Option        "MaxSpeed"      "0.18"

  Option        "AccelFactor" "0.0010"

  Option        "SHMConfig"     "on"

  Option   "TapButton2" "1"

  Option   "TapButton1" "2"

#  Option       "Repeater"      "/dev/ps2mouse"

EndSection

Section "Monitor"

    Identifier "monitor1"

    VendorName "Generic"

    ModelName "Flat Panel"

    HorizSync 31.5-90

    VertRefresh 75

    DisplaySize 314 234

EndSection

Section "Device"

    Identifier "device1"

    Driver "i810"

    Option "VBERestore"

    Option "DPMS"

    VideoRam 32768

    BusID "PCI:0:2:0"

EndSection

Section "Screen"

    Identifier "screen1"

    Device "device1"

    Monitor "monitor1"

    DefaultColorDepth 24

    

    Subsection "Display"

        Depth 24

        Virtual 1024 768

    EndSubsection

EndSection

Section "ServerLayout"

    Identifier "layout1"

    InputDevice "Keyboard1" "CoreKeyboard"

    InputDevice "touchpad" "AlwaysCore"

    InputDevice "Mouse1" "CorePointer"

    Screen "screen1"

EndSection

Section "Extensions" 

    Option "Composite" "Enable" 

EndSection

```

ACPI sleep / suspend to ram / S3:

emerge vbetool hibernate-script

echo "b44" >> /etc/hibernate/blacklisted-modules (hangs otherwise after resume)

my hibernate.conf

```

# Example hibernate.conf file. Adapt to your own tastes.

# Options are not case sensitive.

# 

# Run "hibernate -h" for help on the configuration items.

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

### Choose your Suspend method. You currently have 3 choices:

###

###    suspend2            Software Suspend 2 (requires kernel patches from

###                        http://www.suspend2.net/)

###

###    sysfs_power_state   Uses /sys/power/state to suspend (activates pmdisk

###                        on kernels < 2.6.8, or vanilla swsusp otherwise).

###

###    acpi_sleep          Uses /proc/acpi/sleep to activate swsusp, or other

###                        ACPI sleep state supported by your machine.

###

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

### suspend2 (for Software Suspend 2)

# UseSuspend2 yes

# Reboot no

# EnableEscape yes

# DefaultConsoleLevel 1

# ImageSizeLimit 200

## useful for initrd usage:

# SuspendDevice swap:/dev/hda2

# LoadSuspendModules suspend_swap suspend_lzf suspend_text

# UnloadSuspendModulesAfterResume yes

## Powerdown method - 3 for suspend-to-RAM, 4 for ACPI S4 sleep, 5 for poweroff

#PowerdownMethod 3

## If you experience hangs on resume due to write caching, try this:

# AsyncIOLimit 128

## Any other /proc/software_suspend setting can be set like so:

# ProcSetting expected_lzf_compression 50

## Or traditionally like this:

# Suspend2AllSettings 0 0 2056 65535 5

## Or even from the results of hibernate --save-settings with this:

# Suspend2AllSettingsFile /etc/hibernate/suspend-settings.conf

## For filewriter:

# FilewriterLocation /suspend_file 1000

# VerifyFilewriterResume2 yes

### sysfs_power_state

## To use /sys/power/state to suspend your machine (which may offer

## suspend-to-RAM, suspend-to-disk, standby, etc) comment out all the options

## above for Software Suspend 2, below for acpi_sleep, and uncomment this line.

## You may replace mem with any one of the states from "cat /sys/power/state"

UseSysfsPowerState mem

#PowerdownMethod 3

### acpi_sleep

## To use ACPI to suspend your machine (via /proc/acpi/sleep), comment out

## all the options above for Software Suspend 2 and sysfs, and uncomment this

## line. The number refers to the ACPI sleep state - 3 is suspend-to-RAM and

## 4 is suspend-to-disk.

# UseACPISleep 4

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

### Some global settings

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

Verbosity 0

LogFile /var/log/hibernate.log

LogVerbosity 1

# AlwaysForce yes

# AlwaysKill yes

# HibernateVT 15

# Distribution debian (not required - autodetection should work)

Distribution gentoo

 XDisplay :0

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

### Scriptlets

###   Scriptlets provide support for doing all sorts of things before and after

###   suspending. The defaults settings here should work for most people, but

###   you may wish to edit these to taste. Consult "hibernate -h" for help on

###   the configuration settings.

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

### bootsplash

## If you use bootsplash, also enabling SwitchToTextMode is recommended if

## you use X, otherwise you may end up with a garbled X display.

# Bootsplash on

# BootsplashConfig /etc/bootsplash/default/config/bootsplash-1024x768.cfg

### clock

SaveClock restore-only

### devices

# IncompatibleDevices /dev/dsp /dev/video*

### diskcache

# DisableWriteCacheOn /dev/hda

### fbsplash (enable SwitchToTextMode if you use this)

# FBSplash on

# FBSplashTheme suspend2

### filesystems

# Unmount /nfsshare /windows /mnt/sambaserver

# UnmountFSTypes smbfs nfs

# UnmountGraceTime 1

# Mount /windows

### grub

# ChangeGrubMenu yes

# GrubMenuFile /boot/grub/menu.lst

# AlternateGrubMenuFile /boot/grub/menu-suspended.lst

# BackupGrubMenuFile /boot/grub/menu.lst.hibernate.bak

### hardware_tweaks

# IbmAcpi yes

# RadeonTool yes

### lilo

# EnsureLILOResumes yes

### lock (generally you only want one of the following options)

# LockConsoleAs root

# LockXScreenSaver yes

# LockKDE yes

### misclaunch

# OnSuspend 20 echo "Good night!"

# OnResume 20 echo "Good morning!"

### modules

# UnloadModules snd_via82cxxx usb-ohci

# UnloadAllModules yes

UnloadBlacklistedModules yes

LoadModules auto

# LoadModulesFromFile /etc/modules

### modules-gentoo

GentooModulesAutoload yes

### network

# DownInterfaces eth0

# UpInterfaces auto

### programs

# IncompatiblePrograms xmms

### services

# RestartServices postfix

# StopServices alsasound

# StartServices aumix

### vbetool

EnableVbetool yes

#RestoreVbeStateFrom /var/lib/vbetool/vbestate

VbetoolPost yes

### xhacks

SwitchToTextMode yes

# UseDummyXServer yes

### xstatus

## This can be set to gnome, kde or x:

# XStatus gnome

# XSuspendText Preparing to suspend...

# XResumeText Resuming from suspend...

## When using XStatus x, and you have xosd installed:

# XosdSettings --font -misc-fixed-medium-r-semicondensed--*-120-*-*-c-*-*-* --colour=Green --shadow 1 --pos bottom --align center --offset 50

```

References:

http://www.srcf.ucam.org/~mjg59/hp.html

Updates:

24/06/05: Added Option "VBERestore" to Device section in xorg.conf - solves some resume problems with X

24/06/05: Had some funny colors when using xv for video playback -> get the latest driver from dri.sf.net

07/08/05: There is still an issue with crashes after resume from s3 and xv usage. I opened a bug for that (https://bugs.freedesktop.org/show_bug.cgi?id=3861).

               The bug is closed but still existant. I just don't have the time to reopen and test - anybody interested in doing that?

23/10/05: There is still a problem with the xv and resuming from s3. Please contribute under https://bugs.freedesktop.org/show_bug.cgi?id=4353Last edited by DaNope on Sun Oct 23, 2005 9:52 pm; edited 2 times in total

----------

## DaNope

Hi

There does not seem to be support for hue / saturation adjustement for xv in the i810 driver.

Anyone knows more about this.

Cheers

DaNope

----------

## meulie

Another place with useful info on the NX6110 is this page:

http://olivier.mondoloni.free.fr/indexnx6110.html

 :Cool: 

----------

## ahorn

I got no touchpad mouse-pointer after resuming from hibernate. edit: i missed the alwayscore options in xorg.conf

i guess /sys/power/state mem is acpi s3, is it right? can it be better to do this with acpi in the hibernate.conf? and how much battery is needed for mem-state - i mean, how long is the time for mem-state till the laptop goes really off (because of no power).

under the windows synaptics driver, there's a virtual scrollwheel, how i can do that in linux?

----------

## ahorn

I found out how to do the scrollthing:

```
Option  "UpDownScrolling"       "on"

Option  "TouchpadOff"   "0"
```

Now I only miss the feature which is the left-klick emulate if you tip at the touchpad. you know what I mean?

edit:

```
Option   "TapButton2" "2" 

Option   "TapButton1" "1"
```

I got it.

edit2: to use FN+F3 for suspend

```

emerge lineakd

nano /etc/lineakd.conf

--

# Global settings

KeyboardType            = CP-NX6110

CdromDevice             = /dev/cdrom

MixerDevice             = /dev/mixer

# Specific keys of your keyboard

Sleep           = "/usr/sbin/hibernate"

--

nano /etc/lineakkb.def

--

[CP-NX6110]

  brandname = "HP Compaq"

  modelname = "HP NX6110"

  [KEYS]

    Sleep            = 223

  [END KEYS]

[END CP-NX6110]

--

nano /etc/init.d/lineakd

--

#!/sbin/runscript

start() {

        ebegin "Starting lineakd"

        start-stop-daemon --start --quiet --exec /usr/bin/lineakd &

        eend $?

}

stop() {

        ebegin "Stopping lineakd"

        start-stop-daemon --stop --quiet --exec /usr/bin/lineakd

        eend $?

}

--

/etc/init.d/lineakd start

rc-update add lineakd default battery

```

----------

## elgrande71

The content of http://olivier.mondoloni.free.fr/indexnx6110.html has been updated.

Synaptics section completed.

Thank you for your help.  :Very Happy:   :Wink: 

----------

## meulie

Hmm, I get the following with the synaptics driver:

```

(II) Synaptics touchpad driver version 0.14.3

Mouse1 no synaptics event device found (checked 14 nodes)

Mouse1 The evdev kernel module seems to be missing

(**) Option "Device" "/dev/input/event1"

(EE) xf86OpenSerial: Cannot open device /dev/input/event1

        No such device.

Synaptics driver unable to open device

```

What did I forget/do wrong?

----------

## elgrande71

 *meulie wrote:*   

> Hmm, I get the following with the synaptics driver:
> 
> ```
> 
> (II) Synaptics touchpad driver version 0.14.3
> ...

 

You forgot the evdev kernel compilation option.

 :Wink: 

----------

## elgrande71

To be more precise, look at (after make menuconfig) :

device drivers -> Input device support -> evdev interface .

You have to activate evdev interface kernel compilation option to have synaptics driver correctly installed.

Don't forget to recompile your kernel before the synaptics driver installation.  :Wink: 

----------

## meulie

That did the trick!  Thanks, guys!   :Cool: 

----------

## tuff

If you have problems with the b44 driver, like transmit timeouts, then switching to the broadcom provided driver (gpl) can help.

Just emerge bcm4400

----------

## ^marcs

i have some problems with DRI, i wont describe everything ive made to lunch it...ive figure it out that card memory is to low accorgind to Xorg.log

```
(II) I810(0): detected 7932 kB stolen memory.
```

it takes only 8MB...not much...ive read that is not enought to run direct rendering...im looking way to assign more, but HP bios is soooo limited, there is no such option

any ideas how to incerase it??

regs.

----------

## Sachankara

Have anyone gotten cpu scaling to work, if so what kernel, which cpu scaling driver and which scaling daemon are you using? I've been trying all sorts of combinations of these three, but cannot get it to work. Currently running hardened-sources-2.6.14-r6, p4-clockmod and cpufreqd (which doesn't even do anything since it doesn't even manage to create the required socket). I've been able to manually change govenor to powersave which lowers the cpu speed to 185 MHz, but changing to any other govenor yeilds no working results.

Please let me know if you have gotten it to work...  :Smile: 

Kernel config

----------

## soigres

if someone has succesfully installed lm_sensor... can you explain what are the sensors to enable and what kernel?

thanks in advance!

----------

## Nemrod

I also have nx6110 and almost all works fine (except GLcore but this is not important now) but problems started when I try hibernate it. I used a DaNope's hibernate.conf. Now my notebook is going sleep but when I try to wake it up - system is back for few seconds and imediately power off itself.

-- 

sorry for my bad english  :Sad: 

----------

