Archive for the ‘Laptops’ Category

Linux 2.6.15 Stock Debian Kernel on Asus M2400N

Saturday, January 28th, 2006

I’ve been using a custom kernel for a long time, mostly because I needed several patches for the Asus M2400N and it was a lot easier to grab a ready made kernel from Tuxmobil.org.

Hence, I’ve been running 2.6.9 for a long time, and had a few problems. For example, I haven’t been able to upgrade udev for quite some time, since it now requires 2.6.12 or later.

Anyway, I decided to try and take the short road, and just install a stock debian kernel and see what happens. In the end it turned out quite succesful, though not 100%. There are a few problems to look into.

(more…)

Battery related freezes

Thursday, December 29th, 2005

My beloved Asus M2400N has started to freeze rather unpredictably.

The only thing I have managed to figure out, is that it is related to running on battery power. It never happens on AC power, but when running on the battery it will almost inevitably freeze well before the battery runs out. It can be anything between 2 minutes and an hour before it happens. The last time the battery was at 97% charged, and it froze within minutes. (more…)

Asus M2400N integrated modem functional (at least partially)

Sunday, December 19th, 2004

After my latest kernel upgrade to 2.6.9 via the usual TuxMobil.org debian packages, I noticed that Alsa now finds naming the integrated modem. The modem is a softmodem integrated with the sound-card.

Relevant output from “lspci -v“:

0000:00:1f.6 Modem: Intel Corp. 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) AC'97 Modem Controller (rev 03) (prog-if 00 [Generic])
        Subsystem: Asustek Computer, Inc.: Unknown device 1716
        Flags: bus master, medium devsel, latency 0, IRQ 7
        I/O ports at e200 [size=256]
        I/O ports at e300 [size=128]
        Capabilities: [50] Power Management version 2

The Alsa module for the modem is snd_intel8x0m.

From “cat /proc/asound/cards“:

0 [I82801DBICH4   ]: ICH - Intel 82801DB-ICH4
                     Intel 82801DB-ICH4 at 0x1f800400, irq 7
1 [Modem          ]: ICH-MODEM - Intel 82801DB-ICH4 Modem
                     Intel 82801DB-ICH4 Modem at 0xe200, irq 7

Searching the net a bit established that a user-space daemon is needed, slmodemd, debian package sl-modem-daemon.

The default debian setup detected the Alsa driver automatically and linked /dev/modem to /dev/ttySL0.

I have this running:

/usr/sbin/slmodemd --alsa -c DENMARK hw:1

I write “at least partially” in the title, because I haven’t managed to get everything to work.

I can dial a number and the phone rings.

I can send a fax using efax. I haven’t tried receiving.

I can’t connect to the ISP I tried. If I dial the provider, there is no carrier and wvdial just retries repeatedly. A manual call to the number gets the modem just fine. For each dial attempt I get this in the system log:

codec_semaphore: semaphore is not ready [0x1][0x701300]
codec_write 1: semaphore is not ready for register 0x54

I have search high and low, but I have not been able to find a solution to this problem.

So, partial functionality at most.

Linux 2.6.7 on an Asus L8400C

Monday, November 15th, 2004

I have installed the same Linux 2.6.7 kernel I use on my Asus M2N on my old Asus L8400C, and the result was much the same. It runs ok, but it only boots when the kernel is given the nolapic option.

The only negative thing is that the computer no longer powers down completely when turned off. It just prints “Power down” and sits there in a tight loop, and you have to turn off the power by keep the on/off button down for several seconds. It is a bit of a turn off :-)

UPDATE (07 december 2004):
I’m not quite sure what happened, but poweroff now works, but the system restarts when I close the lid. There is some wakeup mechanism involved, which is weird, because the system is really powered down.

Installing a new wireless mini-pci card in an Asus M2400N laptop

Wednesday, October 27th, 2004

My Asus M2400N laptop came with an integrated Intel PRO/Wireless 2100 mini-pci card for wi-fi access. It was ok initially, but when I upgraded the rest of my gear to 802.11g and 54Mbps, it was too slow. I used an Atheros Cardbus card for a while, using the madwifi driver, but the laptop has only one PCMCIA slot, and it was a bit of a pain to have it always occupied.

Now I have bought an Intel PRO/Wireless 2200BG mini-pci card, which I managed to insert into the laptop with not too much difficulty.

The short story is that it can be done upgrading the builtin wireless card in the laptop, and it works. The long story, with photos of each step, is in the extended copy below.

(more…)

Linux 2.6.7 on Asus M2400N

Sunday, October 24th, 2004

In another futile attempt at getting SWSUSP2 to work on my laptop, I installed a 2.6.7 kernel from TuxMobil.org.

The results were so so.

First the kernel didn’t boot. It would hang just after a line of

ACPI: IRQ9 SCI: Edge set to Level Trigger.

After some searching I found the solution: add ‘nolapic’ to the kernel arguments. With that option the kernel boots perfectly.

Next problem was that no kernel modules wouldn’t load. No matter what I did, I kept getting the error message:

QM_MODULES: Function not implemented.

This time it was because my versions of depmod(8), insmod(8) et.al. were too old. I installed the debian package ‘module-init-tools’ and this problem went away too.

Some modules have changed names and some drivers have been replaced compared to Linux 2.4.24. I had to load ‘psmouse’ to get the PS/2 mouse to work and the USB host module is ‘uhci_hcd’.

Since the kernel from TuxMobil.org is made for Asus laptops, many drivers are compiled into the kernel (such as sound, drm, agpgart, the nic and acpi), so there are relatively few modules loaded. I just load these:

uhci-hcd
psmouse
parport_pc
ath_pci

Now, to get back to Software Suspend, it still doesn’t work. With my previous kernel I could suspend, but not resume, and now I cannot even suspend. The process blocks at “Freezing processes”, but fortunately I can interrupt it by pressing ESC.

I suspect the DRM module or agpgart to be the culprit.

I also tried to use S3 suspend to ram, both with acpi_sleep=s3_bios and acpi_sleep=s3_mode, but also without success. The suspend doesn’t quite work, because I can continue to type and edit so the kernel input line discipline is working, but the system remains unresponsive, and the only way out is to force a reboot by pressing the power button for some seconds.

All in all, I’m practically back where I started, albeit with a newer kernel, which is not bad, but still no working suspend.

The boot log is here.

UPDATE: the upgrade killed waproamd. The ath_pci driver no longer registers a disassociation, the no more roaming :-(

UPDATE 2005-06-04 13:48:26 CEST
Software Suspend now works, with a more recent kernel.

SWSUSP2 woes

Friday, August 20th, 2004

I have never really used the suspend options on my laptops but since it might be handy I tried to install Software Suspend 2 on my Asus M2N laptop.

SWSUSP2 was already supported in the kernel I recently installed, so it should be very easy, but no.

At boot I give the kernel the resume2=swap:/dev/hda5 which is my swap partition, and afterwards I can suspend using a hibernate script I downloaded here.

The problem is resuming. The resume process starts fine, restoring kernel and process data, but then freezes. There is no progress and no disk activity. In the end there is no other way out than to turn off power and boot with the noresume2 from the lilo prompt.

Its a bit of a bummer.

Looking around a bit didn’t help much. There seem to be some issues with DRI and possibly the agpgart and i830 kernel modules, but currently there is little I can do about that, since I have compiled them statically in the kernel.

Sigh.

Intel PRO/Wireless 2100 mini-pci network card

Sunday, August 15th, 2004

The Asus M2N series of laptops have an integrated wireless network card. It is an Intel PRO/Wireless 2100 mini-pci card, which supports 802.11b at 11Mbps.

Initially I used an ndiswrapper type driver from linuxant.com, which I even paid for. I think it is the first time in many many years I have paid for a piece of software :-) It served me well, though, until I bought a 802.11g PCMCIA card.

There’s also a free ndiswrapper driver, which I haven’t tried.

Anyway, at some point in time Intel finally got around releasing a free native Linux driver for the PRO/Wireless 2100 card.

Besides following the instructions, I only had to make one change. My kernel doesn’t have some code to download firmware to the wifi card, so I had to edit the Makefile and uncomment the line

CONFIG_IPW2100_LEGACY_FW_LOAD=y

After a “make” and a “make install” I could load the driver with

modprobe ipw2100

which gave me this in my kernel log:

ieee80211_crypt: registered algorithm 'NULL'
ieee80211: loading with WEP enabled.
ipw2100: Intel(R) PRO/Wireless 2100 Network Driver, 0.51
ipw2100: Copyright(c) 2003-2004 Intel Corporation
ipw2100: Compiled with LEGACY FW load.
ipw2100: 01:05.0: Detected at mem: 0xFF7FF000-0xFF7FFFFF -> e01bc000, irq: 5
eth1: Using legacy firmware load.
eth1: Bound to 01:05.0

The driver automatically associates with the nearest access point, but in understands the commands of the wireless extensions, so it can be configured with iwconfig.

Linux 2.4.24 on an Asus M2400N laptop

Sunday, August 15th, 2004

My Asus M2400N has been running 2.4.22 since I bought it. It came preinstalled with Debian stable and Linux 2.4.22, patched for Asus ACPI, cpufreq and swsusp, and I left it there because it was too much work upgrading.

Recently I have noticed that display updates were noticably slower than before, and after a bit of research I found that XFree86 wanted a newer version of the i830 drm module than was included in Linux 2.4.22. After a while the pain was too much and I set out to upgrade my kernel.

First observation: a standard Debian kernel doesn’t boot on an Asus M2N unless ACPI is disabled, which isn’t very practical, so there was no other option than building my own kernel.

I first tried a 2.6.2 as described at the time on TuxMobil, but the resulting kernel never got further than the first ACPI line.

Later I tried a 2.6.7 kernel downloaded as debs from tuxmobil, again with little success.

In the end I settled for 2.4.24. Always at TuxMobil I found a config-file and a patch, so I downloaded the kernel sources, copied the config file to .config, patched everything and compiled a kernel image deb. Luckily Xtops.DE had given me a nice script to do the compilation, so I didn’t have to read up on make-kpkg and associated magic.

The kernel booted and everything was nice. Except it still didn’t have the correct version of i830.o. It wasn’t configured. I added CONFIG_AGP_I810=y and CONFIG_DRM_I830=y which solved the problem.

Instead of using the Alsa driver for the sound card, I configured CONFIG_SOUND_ICH=m which works perfectly with the integrated soundcard. The module to load is i810_audio.

Here is the final kernel config file which include a few other less relevant changes, mostly about which filesystems to use.

Most of the drivers are compiled directly into the kernel, including drivers for USB, PCMCIA, SpeedStep, ACPI, the RealTek RTL-8101 nic, agpgart and DRM.

I load a few as modules: NFS, sound, Wifi cards and parport.

Here’s the entire boot log.

Using the Mail led with remote mail

Saturday, January 10th, 2004

I recently switched all my mail reading over to using IMAP over SSL, and needed to get GNOME’s Inbox Monitor applet to handle it. It doesn’t do it natively, so I had to use a script to do the check. It is done easily with fetchmail.

I have found a way to use the extra leds on the Asus M2400N, which I have added to the script.

The script is this:

#!/bin/sh
MBOX=$HOME/.newmail
MLED=/proc/acpi/asus/mled

test -x /usr/bin/fetchmail || exit 0

if fetchmail --ssl -c > $MBOX+; then
    mv -f $MBOX+ $MBOX
    test -w $MLED && echo 1 > $MLED
else
    rm -f $MBOX+ $MBOX
    test -w $MLED && echo 0 > $MLED
fi

In the preferences of GNOME’s Inbox Monitor, the script runs before each update, and the Mail Spool File is set to $HOME/.newmail.

That’s it.