Getting Unix running on the Compaq Presario R3140US Notebook (R3000 series)

This page describes how to get FreeBSD, NetBSD, OpenBSD, and Linux, if possible, working on the R3140US laptop made by Compaq. These pages will also be useful:

My goal behind these pages is to help compatibility with Unix and this particular laptop. This page is a work in progress. Please consult the above links to fill in the gaps.

Finding the Laptop

If you just want to find out how to run Unix, skip here.

I was in the market for a new laptop computer in July of 2004, so I went shopping around, looking for the best deals. The Centrino was out, and had good reviews, good battery life, good performance and support, but I was captivated by the new Athlon 64 architecture by AMD. I'm going to have this notebook for a long time, so I might as well upgrade to the new 64-bit architecture now, I thought. Circuit City didn't have any AMD64's in stock, but a friendly worker allowed me to browse their website.

Several Athlon 64 notebooks were out, I narrowed my choices down to eMachines or Compaq. Since I've heard negative things about eMachines, I decided on a Compaq. This may have not been the best choice, but both the eMachines M6805 and Compaq Presario R3140US are very similar, in price and features. So I decided on a Compaq, customized it to my needs--60GB hard drive, Athlon 64 3000+, DVD+RW 4x, 15.4" WXGA screen. It would take several weeks to arrive if ordered. Searching for instant gratification, I checked out Best Buy. They had nearly the exact same notebook, customized as I had at Circuit City, in stock and even on display. The price was right (with rebates, expiring tomorrow), so I bought it. On the whole, I'm completely satisified with this decision, the computer has everything I want. Now on to installing Unix.

Note, it may now be cheaper to purchase directly from HP.

Cleaning up Windows

Compaq had Windows XP Home Edition installed (unfortunately, no OS was not an option, and although I didn't agree to the license agreement, a Best Buy employee did, so I can't attempt to get a refund). Unfortunately they also installed about a gig of unneeded printer drivers and useless startup utilities. I backed these up and deleted them.

Please see Installing Debian GNU/Linux on the Compaq Presario R3000 Laptops for how to resize the Windows NTFS partition, should you chose to keep it. For some reason, even after defragging, qtparted was unable to split the partition. However Partition Magic 8 worked fine.

Running FreeBSD - works

Compaq has always done things a little differently. In the R3000 series laptops (including the X1000, R3140, and R3030 machines), FreeBSD tries to reset the keyboard port, causing the laptop to power off. This happens after loading the kernel, but before (or while) booting it. See the report here: amd64/67745: boot fails on compaq presario r3000z, and here for some insight into the problem. A patch is available here and a followup to the original but report includes another fix.

Fortunately, 5.4 includes the patch, so you don't need to build your own ISO anymore, but you have to set a flag before booting. At the "Welcome to FreeBSD" screen, press 6 to escape to the bootloader prompt, then at the prompt type:

set hint.atkbd.0.flags=8
set hint.acpi.0.disabled=1
boot

The first line sets KB_CONF_NO_PROBE_TEST (a new hint added to make it possible to boot these laptops) and the second disables ACPI. Without disabling ACPI, the system will boot up but freeze at the sysinstall screen. It may be possible to fix ACPI after installation, but if you don't, be sure to put the above lines in /boot/device.hints as soon as you boot.

Broadcom wireless - works

Now that Broadcom released 64-bit drivers, the wireless is usable under the amd64 version of FreeBSD. Although no native FreeBSD driver is available, we can use the Windows drivers under FreeBSD using Project Evil/NDISulator.

To use ndisgen, I had to cvsup to 5-STABLE, as 5.4-RELEASE didn't contain this utility. Apparently, ndiscvt could be used directly but now ndisgen is the proper utility to use--but there are some problems. Jung-uk Kim posted a patch to fix these problems but it failed to apply. Kelly Black applied the changes from Kim's patch manually and it worked fine, but you can also obtain a working ndisgen.sh from CVS, or download it here. Save it as /usr/src/usr.sbin/ndiscvt/ndisgen.sh and run it from there. Follow the instructions on Kelly Black's page for how to install if_ndis.ko, ndis.ko, and BCMWL564_SYS.ko. After you load if_ndis.ko and the new kernel module (note that you need to specify the full path to kldload for BCMWL564_SYS.ko if it isn't in one of the default module directories), ifconfig should show ndis0, and all you have to do now is configure it. I used the net/wistumbler2 package to find my access point.

Lastly, be sure to add kldload if_ndis.ko and kldload BCMWL564_SYS.ko to /etc/rc.local to load the modules on boot.

Touchpad

The touchpad works fine using the PS/2 mouse driver, but is there a way to use the better Synaptics driver? TODO: try this, especially get the scroll area working. Option "ZAxisMapping" "4 5"?

There is a shar here: Synaptics Touchpad xfree driver, the port doesn't seem to be in the ports tree. Synaptics drivers. Arne Schwabe posted a patch in 2004, with howto, here, but sys/isa/psm.c no longer exists; but according to the CVS log, the latest version supports Synaptics. I couldn't build synaptics_drv.o with Schwabe's patches, couldn't find fps2comm.h. Hopefully the patch has already been integrated into FreeBSD.

There are several sysctls:

     # Should the extra buttons act as axes or as middle button
     hw.psm.synaptics.directional_scrolls

     # These control the 'stickiness' at low speeds
     hw.psm.synaptics.low_speed_threshold
     hw.psm.synaptics.min_movement
     hw.psm.synaptics.squelch_level

psm(4) says you should add hw.psm.synaptics_support=1 to /boot/loader.conf, then your dmesg should be detected. Mine already was, but I added it anyway.

psm0:  irq 12 on atkbdc0
psm0: model GlidePoint, device ID 0
Instead of:
psm0:  irq 12 on atkbdc0
psm0: [GIANT-LOCKED]
psm0: model Generic PS/2 mouse, device ID 0

Note, the R3140 actually has an Alps GlidePoint touchpad. moused(8) says -t glidepoint can specify the "ALPS GlidePoint protocol" (the installer, /stand/sysinstall, can also let you select "Alps Glidepoint (serial), to the same effect), but moused says there is a type mismatch:

1% sudo moused -t glidepoint -p /dev/psm0 -3
moused: mouse type mismatch (ps/2 != glidepoint), ps/2 is assumed

It seems you have to put the touchpad into the extended state somehow, otherwise it reverts to the normal PS/2 mode. However, specifying "glidepoint" does make touch-tapping show up in xev (as button 1). Unfortunately, scrolling doesn't seem to work. I'd rather have scrolling than tap-clicking. Very strange. Why does moused switch to PS/2 but still allow tapping?

Audio

Audio works fine with the snd_ich driver, and the audio keys can be remapped using .Xmodmap, but I haven't been able to get the LED on the mute key to light up. In Linux, it can be enabled by muting the "External Amplifier" with alsamixer, but FreeBSD doesn't show any external amplifier, and doesn't have a specific "mute" command (it might just set the volume to 0, who knows?).

According to FreeBSD on HP Pavilion zt3000 notebook, the mute LED is attached to the soundcard, but as far as I know no one has got it working in FreeBSD yet.

Video Display

See the other pages for a working xorg.conf.

You can use xset dpms force off to turn the LCD backlight off (thanks to Olivier Fourdan on the LinuxR3000 mailing list for this tip). I use xscreensaver with Mode: "Blank Screen Only" and in the Advanced tab, Power Management Enabled, Standby after X minutes. This will turn off the screen completely when you are idle, which can save considerable power. Be sure to load xscreensaver -no-splash& in your .xinitrc if you want it to start up every time you login. This works even with ACPI off.

The x11/nvidia-driver and nvidia-settings ports won't install; says only for i386.

ACPI

Even with ACPI disabled at boot, my kernel still panics when receiving an ACPI event (unplugging the AC, closing the lid, etc.). Jung uk-Kim has had some success with ACPI, but I haven't tried using his patches yet.

Running OpenBSD - broken

OpenBSD, 3.5 and the 20040628 snapshot, has a similar bug apparently having to do with ACPI tables. Full OpenBSD dmesg:

booting fd0a:/bsd: 4377200+733120=0x4dfbb8
entry point at 0x100120

Copyright (c) 1982, 1986, 1989, 1991, 1993
        The Regents of the University of California. All rights reserved.
Copyright (c) 1995-2004 OpenBSD. All rights reserved.  http://www.OpenBSD.org/

OpenBSD 3.5 (RAMDISK_CD) #152: Mon Mar 29 12:41:38 MST 2004
    [email protected]:/usr/src/sys/arch/i386/compile/RAMDISK_CD
cpu0: AMD Athlon(tm) 64 Processor 3000+ ("AuthenticAMD" 686-class) 798 MHz
cpu0: FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CF
LUSH,MMX,FXSR,SSE,SSE2
real mem  = 535867392 (523308K)
avail mem = 491593728 (480072K)
using 4278 buffers containing 26894336 bytes (26264K) of memory
mainbus0 (root)
bios0 at mainbus: AT/286+(ee) BIOS, date 04/30/04, BIOS32 rev. 0 @ 0xfd750
pcibios0 at bios0: rev. 2.1 @ 0xfd750/0x8b0
pcibios0: PCI IRQ Routing Table rev. 1.0 @ 0xfdf10/208 (11 entries)
pcibios0: no compatible PCI ICU found: ICU vendor 0x10de product 0x00d0
pcibios0: Warning, unable to fix up PCI interrupt routing
pcibios0: PCI bus #4 is the last bus
bios0: ROM list: 0xc000/0xfc00 0xd0000/0x4000! 0xd4000/0x1000
At this point, the kernel hangs, requiring a hard reset.

Running NetBSD - works

NetBSD installs and runs just fine. The NIC is fully functional. However, I didn't keep NetBSD installed very long as there wasn't much interesting I felt I could do with it. Both the AMD64 and i386 architectures work well.

Running Linux - works

Debian amd64 and Gentoo amd64/i386 boot fine:

There are serious problems (Network dies after slight uptime) with the Realtek RTL-8101 (8139too driver) NIC and hard drive controller if the kernel is compiled with SMP. This is the default, be sure to change it..

In the Gentoo LiveCD you have to ask for SMP support explicitedly by loading the "smp" kernel instead of the generic "gentoo" kernel. So the NIC and hard drive will work fine in the LiveCD, but fail once you have your custom kernel installed and boot from your hard drive -- unless you disable SMP. In /usr/src/linux, type "make menuconfig", go to "Processor type and features" and uncheck "Symmetric multi-processing support" and "Local APIC support on uniprocessors". If you want to see my kernel config here it is: .config. This config should work on the latest kernels, I tried 2.6.7-gentoo-r6 (emerge gentoo-dev-sources):

You might want my /etc/modules.autoload.d/kernel-2.6 file, but if you chose to construct it manually the appropriate steps will to do so will be shown below.

There is extensive information on the web on getting Linux to work on these laptops. See the sites linked at the top of this page for more information. I documented my experience installing Gentoo 2004.1 x86. There is a newer version of Gentoo now, however I was displeased with long compile times (GRP addresses this issue, but at the time of this writing it still has a long way to go), so I decided two try Ubuntu. I left my Gentoo notes here in case you still want to use Gentoo.

Installing Ubuntu Linux

Breezy Badger

The newest beta version at the time of this writing (Dapper Drake) could not install a boot loader (either GRUB or LILO) correctly--this problem may have been fixed, but I decided to install Breezy Badger instead. The installation is fairly straight-forward and most of it should be obvious.

Warthy Warthog (older version)

Ubuntu is a new distribution based on Debian. The installer is great, it sets up a lot of hardware automatically, making many steps you would have to complete in Gentoo unnecessary. I decided to try 4.10, "Warthy Warthog", instead of the in-development "Hoary". You can either download ISO images or order pressed CDs. Be sure to acquire the amd64 disc.

Boot from the CD. Installation is straightforward. Partitioning is probably the hardest part--make sure to not choose the default option to use the whole disk unless you want to overwrite Windows. I made a 250MB ReiserFS root, and left about 30GB for an LVM physical volume, which within it I created a 1GB /var, 512MB swap, 6GB /usr, and a large /home. Of course, LVM is optional.

After finishing part 1 of the install, the installer will eject the CD and reboot. Let it do this. Wait for GRUB to boot from the default option, and complete the second part of the install. Ubuntu will ask you to reboot again. This time, you must hit escape and select "recovery mode" from the GRUB menu, otherwise gdm will start and your graphics will be unreadable. You'll be dropped into a root shell. Comment out (with a #) the /usr/bin/gdm line in /etc/X11/default-display-manager. Reboot, login with your user, then type sudo -s -H and enter your user password to become root. Update and upgrade:

# apt-get update
# apt-get upgrade

Speeding up the boot process

In Warty Warthog, I had to open /boot/grub/menu.lst, and uncomment out the Windows 95/98/NT/2000 example.

However, Breezy Badger detected Windows and added an entry automatically. I changed the following options in /boot/grub/menu.lst:

default saved
timeout 1

I removed all occurances of "splash" in the kernel options in menu.lst. Disabling the splash screen may help hibernation. I also removed "quiet" to see more about the booting process.

To avoid the time-consuming "Calculating module dependencies" at every boot, comment out depmod --quick in /etc/rcS.d/S20module-init-tools.

Customizing gdm: run "gdmsetup" as root. I set gdm to automatically login, and removed "Make a sound when login is ready" in "Accessibility".

Installing nVidia Drivers and Synaptics Touchpad

From the Unofficial Ubuntu 4.10 Starter Guide, type:

# apt-get install nvidia-glx
# apt-get install nvidia-settings
# nvidia-glx-config enable

In Hoary, The XF86Config generated by Ubuntu correctly detected the 32MB video card, but fails to display a picture. I didn't have any luck with the XF86Configs suggested by Kisner or Hughes (non-working config), but Knoppix was able to generate a working XF86Config.

However, Breezy Badger detected and configured the nv video mode with no problems. I modified Ted Kisner's XF86Config-4 to allow using an external monitor without TwinView. TwinView clones the display to LCD and an external monitor, but since the LCD is wide-screen the external monitor display pans. I also couldn't disable the LCD with Fn-F4 in TwinView. To fix this I added a new ServerLayout, "external", that did not enable nVidia TwinView. Fn-F4 successfully disabled the LCD in this setup. My xorg.conf. I also added "--layout external" to gdmsetup's standard server command (in the XServer tab), since I mostly use my laptop with it.

Setup Kisner's findmouse script (I didn't have to do this in Breezy):

# cd /usr/local/sbin
# wget http://cmb.phys.cwru.edu/kisner/linux/compaq-r3000/findmouse
# chmod a+x findmouse
# cd /etc/init.d
# wget http://cmb.phys.cwru.edu/kisner/linux/compaq-r3000/alps-setup
# chmod a+x alps-setup
# update-rc.d alps-setup start 89 2 3 4 5 . stop 02 0 1 6 .

XXX: Install Synaptics 0.13.6 driver, Warty comes with 0.13.3! Also patch kernel.

Other Hardware

powernowd (CPU frequency scaling daemon) is automatically installed, you can get the current frequency by entering cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq. For the 3000+, it varies from 800MHz to 1.8GHz. Test it by running a CPU-intensive task (such as: perl -e'1 while 1'), and watch it speed up.

acpid is also already installed by default. The battery status is reported; its shown in GNOME.

The Broadcom wireless--no luck. No 64-bit drivers.

Sound works out of the box, but you have to setup the X keys to control mute and volume up/down. Update: automatically setup in Breezy.

Installing Gentoo Linux

You can choose either the 64-bit amd64 or 32-bit x86 (i386) version of Gentoo. The amd64 architecture will allow you to run 64-bit code while the x86 version will not. amd64 is still in development; although the development team is making progress I chose to stay with 32-bit i386 for now. As a plus, you can use the Broadcom 54g wireless card with ndiswrapper on i386, but not amd64. This install assumes you'll be using 32-bit Linux (x86), if not, remember to change x86 to amd64 in all applicable places.

Go to http://www.gentoo.org/main/en/mirrors.xml and select a mirror closest to you, navigate to releases/amd64/2004.1/livecd or releases/x86/2004.1/livecd, download and burn either the minimal or universal ISO to a CD-R. The minimal CD will work fine. Once its burned, stick it in the CD drive and boot from it. You should be greeted with a command prompt. Note: if the laptop doesn't boot from the CD, make sure CD booting is not disabled in the BIOS (under security settings).

From now on, I will be roughly following the Gentoo handbook ( x86 or amd64).

Setting up the Network

For some reason, the Realtek RTL-8101 NIC is not auto-detected in 2004.1 (although it is in 2004.0). You have to load the module manually:

livecd root # modprobe 8139too
livecd root # ifconfig
eth0     Link encap:Ethernet  HWaddr 00:02:3F:27:03:14
         inet addr:192.168.0.2 Bcast:192.168.0.255 Mask:255.255.255.0
         inet6 addr: fe80::202:3ff:fe25:1344/64 Scope:Link
         UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
         RX packets:0 errors:0 dropped:0 overruns:0 frame:0
         TX packets:3 errors:0 dropped:0 overruns:0 carrier:0
         collisons:0 txqueuelen:1000
         RX bytes:0 (0.0 b)  TX bytes:238 (238.0 b)
         Interrupt:19 Base address:0x4000

Now type either dhcpcd eth0 (for dynamic addressing) or ifconfig eth0 inet your_ip_addr; route add default gw your_gateway_addr; echo "nameserver your_nameserver_addr" > /etc/resolv.conf (for static addressing). If all goes well, your network interface should now be configured. Test it with ping:

livecd root # ping google.com
PING google.com (216.239.39.99) 56(84) bytes of data.
64 bytes from 216.239.39.99: icmp_seq=1 ttl=244 time=79.0 ms
^C
-- google.com ping statistics --- 
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 79.024/79.024/79.024/0.000 ms
livecd root #

Now you're ready to install Gentoo.

Preparing the Disks

Remember that if you want to keep Windows, install to hda2 not hda1. I used the ext3 file system because I wanted to be able to copy files from my Linux install in Windows using Explore2fs. If performance is an issue, xfs may be a better choice. One drawback of ext2/ext3 is that it is setup to run a fsck every X number of mounts, even if the system was never improperly shutdown. Not even Windows does this.
livecd root # mke2fs -j /dev/hda2
mke2fs 1.34 (25-Jul-2003)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
4055296 inodes, 8096760 blocks
404838 blocks (5.00%) reserved for super user
First data block=0
248 block groups
32768 blocks per group, 32768 fragments per group
16352 inodes per group
Superblock backups stored on blocks:
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
        4096000, 7962624

Writing inode tables: done
Creating journal (8139 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 37 mounts or 
180 days, whichever comes first. Use tune2fs -c or -i to override.

Configuring the Date and Timezone

Set your time zone and date, if necessary In my case:

livecd root # ln -sf /usr/share/zoneinfo/US/Pacific /etc/localtime
livecd root # date
Wed Jun 30 13:41:01 UTC 2004

Installing a Stage

First mount your brand new Linux partition:

livecd root # mount /dev/hda2 /mnt/gentoo
livecd root # cd /mnt/gentoo
livecd root # links http://www.gentoo.org/main/en/mirrors.xml

Select a mirror, go to releases/{x86,amd64}/2004.1/stages. Pick a stage, see the Gentoo Handbook for more information. Under the i386 architecture, you're able to select stages compiled specifically for your platform. In this case (Athlon 64), pick "i686" (not athlon-xp). Press D to download. I used the stage 3 tarball because it requires significantly less compilation -- you don't have to bootstrap gcc.

Follow the instructions in the handbook to proceed in the installation, it should be fairly straightforward.

Kernel Configuration

This is important. To use the full features of your laptop you'll need to disable and enable a few features. Type emerge gentoo-dev-sources, this will install the 2.6.7 kernel with Gentoo patches.

Next, go to Theodore Kisner's page on the R3000 and replace the powernow files as described (you only need to do this if you're using an older kernel -- 2.6.7-gentoo-r8 has the latest powernow files.). Make sure to use the alps.patch file from the Synaptics 0.13.3 driver. Apply it to the 2.6.7 kernel. It should apply cleanly. I also recommend starting with Ted's kernel config. If you don't, make sure to disable SMP. Also, Ted's kernel doesn't enable /dev fs - you'll need to do this, and automount it at boot, to work properly with Gentoo. Configure everything and boot into your new system. Go ahead, I'll wait.

ACPI and PowerNow

emerge acpid,

Since powernowd is considered unstable, add sys-apps/powernowd ~x86 to /etc/portage/package.keywords. You'll now be able to do emerge powernowd. Add the following modules to /etc/modules.autoload.d/kernel-2.6:

thermal
processor
fan
battery
ac
button

freq_table
cpufreq_userspace
powernow-k8

If you want powernowd to start automatically, and adjust your CPU speed depending on load (as described in powernowd(1)), and use ACPI to handle events, type:

rc-update add powernowd default
rc-update add acpid default

PowerNow works great and I recommend it. The Athlon 64 3000+ supports frequencies of 1800000, 160000, 800000. To see your current speed, type cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq.

Installing Xorg

X.org is a fork of the XFree86 window manager. To install it, first add x11-base/xorg-x11 ~x86 to /etc/portage/package.keywords (if it doesn't exist, create it; this has to be done because xorg is currently considered unstable), then type:

emerge xorg-x11

See this thread for more information.

Install the nVidia drivers. As of this writing, 1.0-6106 is the latest. The driver can be downloaded here: for amd64, for ia32, but its in portage as well. Add media-video/nvidia-kernel ~x86 to /etc/portage/package.keywords and run emerge nvidia-kernel. Run this install program with sh, then add nvidia to /etc/modules.autoload.d/kernel-2.6.

Note, be sure to recompile your nVidia driver every time if you build a new kernel.

Add the following modules to /etc/modules.autoload.d/kernel-2.6:

tsdev
evdev
psmouse

Compile and install the Synaptics driver. (AMD64 users need to use Ted's fixed Makefile).

amd64 synaptics-0.13.3 # make
[...]
amd64 synaptics-0.13.3 # cp synaptics_drv.o /usr/X11R6/lib/modules/drivers

There seems to be a bug in nVidia's chipset which prevents detection of the touchpad. Reloading the module fixes the problem. Grab alps-detect and save it as /etc/init.d/alps-detect, then rc-update add alps-detect default. alps-detect is a Gentoo startup script which will unload and reload the psmouse module until the system messages report a PS/2 mouse. This is detected by input: PS/2 Generic Mouse on isa0060/serio4 in dmesg.

Get Ted's XF86Config-4, rename it xorg.conf and put it in /etc/X11. Type startx and see if X and the touchpad work well.

If you want to use the X Display Manager (xdm), add alps-detect to the use line in the depend() function of /etc/init.d/xdm (so the touchpad will load before xdm starts) and type rc-update add xdm default at the command prompt.

Wireless Networking

(For now, i386-only. It doesn't look like ndiswrapper will work on amd64 without some major hacking or until Broadcom releases a 64-bit driver. Not even Windows 64 can load 32-bit drivers. Maybe Wine can be of some use here? Supposedly Wine is able to run without problems on amd64.)

To install ndiswrapper, first add net-wireless/ndiswrapper ~x86 to /etc/portage/package.keywords then emerge ndiswrapper. Download the bcmwl5a.tar.gz driver from Ted's page and extract it into /etc/ndiswrapper:

tar -xpzf bcmwl5a.tar.gz -C /etc/ndiswrapper

Edit /etc/modules.d/ndiswrapper as described, and add ndiswrapper to /etc/modules.autoload.t/kernel-2.6. Press the button on the front of the laptop -- the blue LED should light up. If so, try connecting to your wireless network:

emerge wireless-tools
iwconfig wlan0 mode Managed
iwconfig wlan0 essid your_essid
dhcpcd wlan0
ping google.com

To get a list of APs in your area, use iwlist wlan0 scan. For more information see the ndiswrapper homepage.

Sound

To install alsa: emerge alsa; emerge alsa-utils

I use mpg123 to play audio. To install it: emerge mpg123.

Do rc-update add alsasound default to get ALSA to startup on boot with the default runlevel.

Run alsamixer to unmute (with M) the Master and PCM channels. Crank up the volume and play an audio file with mpg123 to see if sound works. ALSA will save your mixer levels when you shutdown and restore them when you boot.

emerge xmms will install a Winamp-like audio player. If you use xmms, in the Output plugins change it to use ALSA instead of OSS.

PCMCIA

First of all, emerge pciutils. This will give you lspci.

emerge pcmcia-cs

To start PCMCIA services at boot time: rc-update add pcmcia default

Next edit /etc/pcmcia/config.opts. Make sure you have a line like this:

include port 0x3000-0x7fff, memory 0xe8100000-0xe97fffff

The R3190 uses memory 0xe0100000-0xe17ffffff instead, but the R3120 and R3140 use the memory values above.)

cardctl ident should now be able to recognize 16-bit PCMCIA cards and load the proper modules:

amd64 root # cardctl ident
Socket 0:
  product info: "Lucent Technologies", "WaveLAN/IEEE", "Version 01.01", ""
  manfid: 0x0156, 0x0002
  function: 6 (network)
  (Note: I had a silver card, but used
Alchemy v1.01
by Lincomatic to upgrade to gold.)
Socket 1:
  no product info available
  (Note: the R3140 only has one slot).

In /etc/conf.d/pcmcia, change PCIC="i82365" to PCIC="yenta_socket". This is optional but will speed up the boot process (Gentoo will fall back on yenta_socket after i82365 fails).

If you're using an Orinoco card, you may want to patch it to support monitor mode to make it work with kismet (emerge kismet--used for monitoring WLANs). You'll need at least 0.15rc1 to an Orinoco card it on 64-bit.

32-bit CardBus isn't working yet, but with some hacking hopefully it will be fully supported in the feature. Check the LinuxR3000 mailing list for details.

USB

emerge usbd

rc-update add usbd default

USB needs the following modules: usbcore, ohci_hcd, ehci_hcd (USB 2.0). Add these to /etc/modules.autoload.t/kernel-2.6. usbfs needs to be mounted with mount -t usbfs none /proc/bus/usb, but usbd seems to do this automatically.

Microsoft IntelliMouse Optical USB mouse works fine.

In my case, I want to use a USB-to-serial converter (as this laptop has no serial ports) so I can use my GPS. Its a "RadioShack USB to Serial Cable Version 1.0" Cat No. 26-183. Came with a floppy (which this laptop doesn't have either, heh) with drivers that work under Windows. The Linux "usbserial" driver may work with this. Vendor=1453, product=4026.

DVD and Burner

Add "dvd" to the USE flags in /etc/make.conf, them emerge mplayer. In Preferences, change the DVD to /dev/cdrom. DVDs play perfectly in a normal-sized screen; although the burner is only DVD+R, DVD-R's play fine.

Some problems: In full screen and double screen mode (which is more like full screen), there are some white lines which look like static, even when using the latest 1.0-6106 video drivers. TODO: look into this.

Burning CDs works great with emerge k3b. Haven't tried burning a DVD+R yet but it should work. (Note: the burner does not support DVD-R). Add ide-scsi and ide-cd to the modules autoload file, create /etc/modules.d/burner and put this in it:

ide-cd ignore=\"hdc\"
ide-scsi
and hdc=scsi at the end of the kernel command line the GRUB config, then run update-modules. cdrecord -scanbus to see if your burner is detected.

Special Keys

There are numerous programs able to handle special keys. One is lineakd, which you can get with

emerge lineakd, emerge aumix (to set volume) then add this to your /etc/lineakkb.def if its not there already:

[CPR3000Z]      
  brandname = "Compaq"
  modelname = "Presario R3000Z"
  [KEYS]
   Mute                         = 160
   VolumeDown                   = 174
   VolumeUp                     = 176
   Internet                     = 178
   Sleep                        = 223
   Play                         = 162
   Stop                         = 164
   Previous                     = 144
   Next                         = 153
  [END KEYS]
[END CPR3000Z]

Here's my lineakd.conf: lineakd.conf. Save it to ~/.lineakd. Its setup to use xmms. All the keys are fully functional.

Note: I use aumix -w instead of LinEAK's built-in EAK_VOLUP and EAK_VOLDOWN because these commands only control the master volume, while xmms's slider controls the PCM volume.

However, I don't use LinEAK anymore because Fluxbox has keymapping built in. Add xmodmap ~/.Xmodmap to ~/.xinitrc, then add this to ~/.Xmodmap:

keycode 160 = XF86AudioMute
keycode 176 = XF86AudioRaiseVolume
keycode 174 = XF86AudioLowerVolume
keycode 178 = XF86HomePage
keycode 223 = XF86Sleep
keycode 162 = XF86AudioPlay
keycode 164 = XF86AudioStop
keycode 144 = XF86AudioPrev
keycode 153 = XF86AudioNext

Now you can map these keysyms in ~/.fluxbox/keys:

# Compaq Presario R3000Z keys
None XF86AudioMute :ExecCommand perl -e'system("amixer set PCM " . (`amixer sget PCM` =~ m/\[on/) ? "mute" : "unmute")
None XF86AudioRaiseVolume :ExecCommand aumix -w +2
None XF86AudioLowerVolume :ExecCommand aumix -w -2
None XF86HomePage :ExecCommand firefox
None XF86Sleep :ExecCommand echo Sleep 
None XF86AudioPlay :ExecCommand xmms --play-pause
None XF86AudioStop :ExecCommand xmms --stop
None XF86AudioPrev :ExecCommand xmms --rew   
None XF86AudioNext :ExecCommand xmms --fwd

Note 2: Fn-F1 and Fn-F2 produce identical scancodes to F1 and F2 according to xev. Fn-F7 and Fn-F8 are hardwired to change LCD brightness. Neither Fn-F4 nor Fn-F6 produce any scancodes. compaq_presario_

Modified Sun Mar 25 08:48:47 2007 generated Sun Mar 25 08:56:32 2007
http://jeff.tk/compaq_presario_r3140us/