Installing Linux on the emachines M6805 laptop

So, my friend had this Athlon-64 laptop that he couldn't get working right, and I had some time on my hands, so I told him I'd have a go at it. After much google-searching, list-browsing, kernel-recompiling, and bruised CTRL-ALT-DEL fingers, I've finally gotten this puppy into a reasonably usable state. I the hopes of sparing others the agony of what I've gone through, this is some brief documentation of what I managed to put together.

DISCLAIMER A: This is what works for me - I make no guarantees that it will work for you, nor that it won't turn your lovely laptop into a steaming pile of melted plastic. Be warned.

DISCLAIMER B: There are two kinds of geeks in this world: One is the kind that approaches a problem by learning as much as possible about the technologies involved, so that eventually they understand the situation enough to put things right in a rational and elegant manner. Then there's the type that simply brute forces its way through a predicament, using nothing but a slightly-less-than-random barrage of trial-and-error experiments (along with the faint hope that no permanent damage might be done), until the thing just works. I am undoubtedly of the latter breed. I certainly make no claims that I've done things the "right" way, only that things seem to be functioning the way I wanted them to. If you have suggestions on how I might improve things, please let me know.

Okay, on to the fixing!

About the Laptop

It's an emachines M6805, with a Mobile Athlon 64 3000+ (@ 1800 mhz), with 512 mb of RAM, an ATI Mobility Radeon 9600 M10 video card, onboard Broadcom BCM4306 802.11b/g wireless card, and a 60 GB hdd. It's apparently very similiar to several other laptops, including Medion Ram 2010, VooDoo Envy M:860, eMachines M680x, Arima W730-K8 DTR, Targa Visionary 811, AccessMicro AI-730, ACI Alevia, and the Gateway 7405GX, so if you have one of those, this might help you too. (List from http://www.rmecc.com/~v2/em/.)

BIOS

Don't even try to do anything until you flashed the sucker with the latest bios. I'm using version 0F08.P00, released 8/11/04. You can download it from here: http://www.rmecc.com/~v2/em/. Apparently prior versions of the bios are extremely linux-unfriendly. Unfortunately, I had to install windows in order to perform the flash (okay, maybe I wanted to see how well I could play Half-Life 2 will sitting on my front porch.)

Installing Linux

One of my goals was to run linux is true 64-bit mode. Thus, I installed Debian AMD64, by following the FAQ here: https://alioth.debian.org/docman/view.php/30192/21/debian-amd64-howto.html. The install, using a netinst CD would have been straightforward, except for the fact that the CD image I used was slightly misconfigured. So, if they haven't updated the "sid-amd64-netinst.iso" from the one from 1/24/05, here's a tip: the modules are compiled for a different version of the kernel than the installer is running. So, when it complains that it can't find the modules, go to the console, then run: cd /cdrom/pool/udeb; udpkg -i `find -name "*modules*"`; cd /lib/modules/; then move the older modules dir out of the way, rename the new modules dir to what the old one was called (sorry, can't remember the names), then run depmod -a; After that, the rest of the installer should run smoothly. Just don't forget to give yourself a swap partition bigger than the amount of ran you have, if you want to use suspend-to-disk.

Fixing ACPI

After installing Debian, the laptop booted okay, but anytime you touched any of the 'special keys' (including the ones to adjust the screen brightness), or close the lid, the thing would freeze. So, to make it work right, you have to fix the ACPI DSDT table. (For more info on ACPI, go here: http://acpi.sourceforge.net). I fixed the DSDT table until it compiled cleanly. Here's what I got: Basically, if you just want to run my default kernel config, download the third file, and put it in /root/acpi/.

The kernel

I'm running linux-2.6.10. You can get the sources from here: http://www.us.kernel.org/pub/linux/kernel/v2.6/linux-2.6.10.tar.bz2. First off, I applied the latest ACPI patch: http://ftp.kernel.org/pub/linux/kernel/people/lenb/acpi/patches/release/2.6.10/acpi-20050125-2.6.10.diff.bz2 Then, I configured my kernel (several times). Here's my kernel config that I'm using now - it seems to work: .config You probably want to at least change the location of the custom-DSDT table (see above) and the default swap partition. Oh, yeah, make sure you load the right modules at bootup. Here's my /etc/modules file.

Software

Make sure you install powernowd (apt-get install powernowd). This will enable the cool powernow stuff (causes your CPU to run a lower speed when you're not using it). Save power, stay cool. Also, to use the trackpad functions (like the scrollpad), install xfree86-driver-synaptics and ksynaptics (if you use KDE).

Suspend to Disk

This took a lot of fiddling. Basically, you have to make sure you boot with the kernel options "acpi_os_name="Microsoft Windows XP" resume=/dev/hda2 nmi_watchdog=0" (changing the resume partition to your setup, of course). You can add these to the "kopt" line in /boot/grub/menu.1st, and then run update-grub. Also, you have to disable the powernow daemon before you suspend. To set it up so you can just use the suspend button on your keyboard (you know, the cute moon on the F3 key), install acpid, copy this file to /etc/acpid/events/, and this file to /etc/acpid/.
The nmi_watchdog business is apparently some kernel-based built-in debugger. When the machine is reading back in the suspend file, apparently there is too long a delay, and the watchdog thinks the kernel has crashed. So, we just tell the watchdog to stay in its cage.

Special keys

To use the volume, "internet", and music control keys, I re-mapped them to unused function keys (F13-F21). You can do this by copying this file to /etc/X11/Xsession.d/ and making it executable. Restart X, and then you can use your favorite window manager to set up actions for these keys. (I use KDE, so go under Control Center->Region and Accessibility->Keyboard Shortcuts).

On-board wireless card

There are no linux drivers for the on-board Broadcom BCM4306 wireless card. However, you can still make it work under linux using NDISWrapper (which enables you to use the windows drivers in linux). First, download the windows drivers for this card from here. Then, download the ndiswrapper source from here. Then, follow the instructions at http://ndiswrapper.sourceforge.net/phpwiki/index.php/Installation. I haven't actually gotten on a wireless network yet (haven't been near a public one yet), but I do see some when i do "iwlist wifi0 scan", so i assume it's working. Oh, you might need to hit the "turn wireless one" hotkey (Fn-F2) for it to work. You'll see a little blue ((e)) light under the trackpad.

Other stuff

Well, that's about it. Everything else seemed fairly straightforward to me. Flash card reader is standard usb. Didn't try the firewire or the modem. Oh, if you want 3-D accelerated X, using the proprietary ATI drivers (NOTE: I couldn't get this and software suspend to play nice together), you can use the script I found at here: http://kanotix.com/files/install-radeon-debian.sh. Also, I tried getting S3 suspend working (suspend to RAM), but this seems a long shot. Something quirky about how video cards reinitialize or something.

Other Files

Good Luck!

If you have questions or comments, you can email me at greg (nospam AT nospam) primate (nospam DOT nospam) net.
Feel free to check out the rest of my pitiful website, http://greg.primate.net

This page was last modified .