Installing Debian Lenny on Asus M50SV-AS160C

Written by Petr Zemek. Last update: 2008-09-08 (changelog)
(s3rvac@gmail.com)

General hardware specifications of the laptop

Asus specifications

Component Type Status (x86_64) Note
Processor Intel Core 2 Duo T8300 (2.4 GHz, 3 MB, FSB 800 MHz) Works Frequency scaling, thermal control
Chipset Mobile Intel PM965 Express Works -
RAM 4 GB DDRII 667 (2048+2048 MB) Works free -m: total 3970
Display 15.4" WXGA+ ColorShine (1440x900) Works -
Video nVidia GeForce 9500M GS 512MB VRAM Works Tested: Single screen (1440x900) 2D/3D, TwinView
Audio Intel High Definition Audio Works Tested: Internal speakers, headphones, microphone
HDD 320 GB SATA WDC WD3200BEVT-2 (5400rpm) Works Thermal control
Optical drive MATSHITA BD-CMB UJ-120 (blu-ray combo) Works Tested: CD-R/DVD-R reading, CD-RW/DVD-RW writing
LAN Marvell 88E8055 PCI-E Gigabit Ethernet Controller (10/100/1000 Mbit) Works Tested: 100 Mbit
WLAN Intel Wireless WiFi 4965AGN (802.11a/g/n) Works Tested: Managed mode
Bluetooth v2.0+EDR Works Tested: Communication with my mobile phone
USB 4x USB2.0 Works Tested: Optical mouse and external HDD
Card reader Ricoh R5C822 (SD, MMC,MS, MS Pro, MS Duo, SM, xD-Picture card) Works Tested: SD card
Webcam 1.3M UVC WebCam Works Tested: Only video (mplayer, kopete)
Fingerprint reader AuthenTec AES1610 Works Tested: fprint-demo
FireWire Ricoh IEEE 1394 Controller Works Tested: DV camera
eSATA Works Tested: External HDD
VGA port Works Tested: TwinView with an external LCD panel
HDMI Works partially No audio
Touchpad Works partially Dual-mode and two finger scrolling don't work
Irda Does not work Bugs in lirc (see details)
TV tuner Lite-On TVT-1060 Does not work No drivers (but see details)
Expresscard Untested Can't test it (details)
Modem 56 kb/s Untested Can't test it

Function keys

Fn+F1 Suspend switch Works *
Fn+F2 Wifi (bluetooth) switch Works
Fn+F3 E-mail client Works *
Fn+F4 Web browser Works *
Fn+F5 Brightness down Works
Fn+F6 Brightness up Works
Fn+F7 LCD on/off Works
Fn+F8 LCD/CRT switch display Works *
Fn+F9 Touchpad lock Works *
Fn+F10 Volume mute/unmute Works *
Fn+F11 Volume down Works *
Fn+F12 Volume up Works *
Fn+Num Lk Scroll Lock on/off "Locks" whole keyboard
Fn+Space ? Works *
Fn+C ? Works *
Fn+T ? Works *
Fn+V ? Works *
Fn+UpArrow Stop Works *
Fn+DownArrow Play/Pause Works *
Fn+LeftArrow Previous track Works *
Fn+RightArrow Next track Works *

Special keys

These keys are on the upper-left side above the keyboard. I'll describe them from left to right order.

1. (?) Same as: Fn+Space Works *
2. Touchpad lock Same as: Fn+F9 Works *
3. (?) Same as: Fc+C Works *
4. Music player Works *

* acpi_event catches the pressed key event, but you have to assign actions to these events, otherwise these keys do nothing.

Action and event scripts for some keys

I've modified ACPI scripts from this gentoo page and added some new scripts. Currently, these scripts cover these buttons/actions:

You can download them here (don't forget to change your username in some of these files, i.e. substitute "s3rvac" with your username).

Linux identification (outputs)

lspci, lshw, lsusb

Distribution and kernel versions

Debian Lenny (amd64) installation snapshot from 07-2008
Vanilla kernel 2.6.26

Pre-installation

You can check ASUS ftp server to see if there is a new BIOS version available (in the time of writing this article the current BIOS version was 207). For BIOS version update follow the section "BIOS Update" in this article (just replace the BIOS file name, the procedure should be the same).

Installation

I followed this great article in order to install the base system on an encrypted partition using dm-crypt/LUKS and LVM. I chose this layout:

Post-installation

Kernel compilation

For detailed instructions on kernel compilation on Debian GNU/Linux please read this article. I'll write only commands that I executed and changes that I made in the kernel configuration (some changes were taken from this and this gentoo wiki page).

Preparation

	aptitude install gcc fakeroot bzip2 kernel-package libncurses-dev
	adduser your_username src

Getting the source

	wget ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.26.tar.bz2

Preparation for configuration

	cd /usr/src
	tar jxf /path/to/linux-2.6.26.tar.bz2
	cd linux-2.6.26
	cp /boot/config-$(uname -r) .config
	make menuconfig

Kernel configuration

	# Basic
	Processor type and features --->
		Processor family ---> (X) Core 2/newer Xeon
		Timer Frequency ---> (X) 1000 HZ
		Preemption Model ---> (X) Voluntary Kernel Preemption (Desktop)
	Kernel hacking --->
		[ ] Kernel debugging

	# RTC (solves the problem with "Cannot access the Hardware Clock via any known method." on 2.6.26 kernels)
	Device Drivers  --->
		<*> Real Time Clock --->
			<*> PC-style 'CMOS'

	# Sound
	Device Drivers  --->
		Sound  --->
			<*> Sound card support

	# Graphics
	Device Drivers --->
		Graphics support --->
			Support for frame buffer devices --->
				<M> Userspace VESA VGA graphics support
				< > nVidia Framebuffer Support
				< > nVidia Riva support
			Console display driver support --->
				<*> Framebuffer Console support

	# SATA
	Device Drivers --->
		<*> Serial ATA (prod) and Parallel ATA (experimental) drivers --->
			<*> AHCI SATA support

	# LAN
	Device Drivers --->
		[*] Network device support --->
			[*]   Ethernet (1000 Mbit) --->
				<M> SysKonnect Yukon2 support

	# WLAN
	Networking --->
		[*] Networking support
			Wireless --->
				{*} Improved wireless configuration API
				[*] nl80211 new netlink interface support
				<*> Generic IEEE 802.11 Networking Stack (mac80211)
	Device Drivers --->
		[*] Network device support --->
			[*] Wireless LAN --->
				[*] Wireless LAN (IEEE 802.11)
				{*} Intel Wireless Wifi Core
				[*] IWLWIFI RF kill support
				<M> Intel Wireless WiFi 4965AGN
				[*]   Enable 802.11n HT features in iwl4965 driver
				[ ]   Enable LEDS features in iwl3945 driver         # If you like blinking LEDs, enable this (I don't)
				[*]   Enable Spectrum Measurement in iwl4965 driver
				[*]   Enable Sensitivity Calibration in iwl4965 driver
				< > Intel PRO/Wireless 3945ABG/BG Network Connection

	# FireWire
	# (kino/dvgrab doesn't work with the New FireWire stack)
	Device Drivers --->
		IEEE 1394 (FireWire) support --->
			< > New FireWire stack, EXPERIMENTAL
			<M> Stable FireWire stack
			<M>   OHCI-1394 controllers
			<M>   PCILynx controller
			<M>   Storage devices (SBP-2 protocol)
			[ ]     Enable replacement for physical DMA in SBP2
			<M>   IP over 1394
			<M>   raw1394 userspace interface
			<M>   video1394 userspace interface
			<M>   dv1394 userspace interface (deprecated)
			[ ]   Excessive debugging output

	# Special keys, brightness, ...
	Power management options --->
		ACPI (Advanced Configuration and Power Interface) Support  --->
			< >   ASUS/Medion Laptop Extras
	Device Drivers --->
		Misc devices --->
			<M>   Asus Laptop Extras (EXPERIMENTAL)

Compilation

	fakeroot make-kpkg clean
	fakeroot make-kpkg --append-to-version "-amd64-custom" --revision "20080724" --us --uc --initrd kernel_image kernel_headers

Installation

	cd ..
	dpkg -i linux*.deb

Screen

If you want higher resolution (1440x900) in console during boot, then boot with vga=0x365.

Solved problem: Screen goes really dark on boot

The solution of this problem is based on this solution - we disable the internal light sensor. If you don't want to disable it, you can try this howto.

Create a file /etc/init.d/light-sensor with the following content:

	#!/bin/sh
	echo 0 > /sys/devices/platform/asus-laptop/ls_switch

Then run the following commands (as root):

	chmod a+x /etc/init.d/light-sensor
	update-rc.d light-sensor defaults 90

LEDs

New email LED

If you want enable the email LED, follow the 5th point of this article (I haven't tried it since I don't need it).

Touchpad enabled LED

Download my function and special keys scripts and you can toggle the LED by Fn+F9.

Solved problem: "Cannot access the Hardware Clock via any known method."

Original problem description: During boot, the following error appears (twice):

	Cannot set the Hardware Clock via any known method.
	Use the --debug option to see the details of our search for an access method.
	Unable to set System Clock to: ...

I got the following output from hwclock:

	# hwclock --debug
	hwclock from util-linux-ng 2.13.1.1
	hwclock: Open of /dev/rtc failed, errno=2: No such file or directory.
	No usable clock interface found.
	Cannot access the Hardware Clock via any known method.

Solution: The cause of this problem is (IMO) the removal of the CONFIG_RTC=y option in the 2.6.26 kernel configuration. To solve it, build the kernel with these options enabled:

	Device Drivers  --->
		<*> Real Time Clock --->
			<*> PC-style 'CMOS'

Unsolved problem: "Volume group XYZ not found."

During boot, before I enter the password for my encrypted partition, two messagess "Volume group XYZ not found." appear. However, boot process completes successfully and I haven't found anything useful on this "error", so I don't care for now.

Unsolved problem: "ACPI: EC: GPE storm detected, disabling EC GPE"

This message sometimes appears before (while) I enter the password for my encrypted partition. It appears irregularly, but it doesn't seem to make any problems, so I don't care for now. Here is some discussion on this topic that I found.

EDIT: This message hasn't appeared since 2.6.26.1.

Unsolved problem: "Can't deactivate volume group XYZ with 2 groups"

This message appears during shutdown. I found a bug report on this topic, and some other posts, like this one. I'll check these for any hints how to solve this "error", however it doesn't seem to cause any problems to me.

Video (VGA + Display)

Download the latest nVidia drivers (in my case 173.14.09) and install them. Previous versions (<= 173.14.05) do not support 2.6.26 kernel and the kernel module fails to compile without custom patches!

	wget http://us.download.nvidia.com/XFree86/Linux-x86/173.14.09/NVIDIA-Linux-x86-173.14.09-pkg1.run
	chmod a+x NVIDIA-Linux-x86-173.14.09-pkg1.run && ./NVIDIA-Linux-x86-173.14.09-pkg1.run

X configuration file

Here you can download my xorg.conf (nvidia driver, single screen: 1440x900)

External monitor

Use the nvidia-settings utility - it found my second monitor and I was able to configure everything - however, I only tested TwinView with an external Acer LCD panel (1280x1024). Note: This laptop has only a VGA port, so if you want to connect an LCD monitor through DVI, you have to use a DVI->VGA adapter.

Audio

Install the latest alsa-drivers (version >= 1.0.16, because there seems to be a headphone problem with previous versions). If you are running KDE, you can install kmix for handling volume etc. (after installation you have to right click on the KMix icon, choose "Select Master Channel" and select "Front").

Microphone

To enable microphone, right click on KMix, Show Mixer Window -> Input -> Enable both captures [ref]. You can then try it yourself by running:

	arecord -D plughw:0,0 -f S16_LE - | aplay -D plughw:0,0 -f S16_LE -

Now say something to the microphone and you should hear it with a short delay.

Solved problem: Speakers don't mute while headphones are plugged in

Add the following to /etc/modprobe.d/alsa-base [ref]:

	options snd-hda-intel model=haier-w66

and restart the system.

HDD

HDD works out of the box, however there seems to be a general issue with hard drives concerning head parking. So, to fix this issue, you can (after reading this article) install hdparm and append this to /etc/hdparm.conf:

	command_line {
		hdparm -B 255 /dev/sda
	}

Some additional info can be found here.

LAN

If you're running KDE, install network-manager-kde.

Solved problem: KNetworkManager says: "No network device found"

Add yourself to the netdev group, log off and restart networking services [ref].

WLAN

Install firmware-iwlwifi and wireless-tools. Then make sure that wifi is enabled (hardware on/off switch and Fn+F2) and if so, you can connect to a wifi site by using wireless-tools (iwconfig, iwlist, etc.). If you are running KDE you can install and use knetworkmanager to handle wifi connections (but see the problem with it below).

Unsolved problem: "wmaster0: unknown hardware address type 801"

If I run dhclient wlan0, I get the following "error": wmaster0: unknown hardware address type 801. However, wifi seems to be working so until I figure out how to solve this "error", I don't care. Here are some links on this topic that I found: 1, 2.

Unsolved problem: KNetworkManager doesn't use supplied WEP key

The problem (symptoms and workaround) is exactly the same as in this bugreport. However, I haven't found a working solution yet...

Bluetooth

	aptitude install kdebluetooth

I was then able to communicate with my mobile phone through kbtobexclient.

HDMI

After plugging the HDMI cabel in and restart, use the nvidia-settings utility to configure the connected external output device (LCD panel, TV, ...). Video works perfectly.

Unsolved problem: No audio through HDMI

According to this post, HDMI audio support should be included in the nVidia 177 beta driver. However, I was not able to get audio working even with these beta drivers. I tried enable/disable various switches via alsa-mixer, but nothing changed.

Also, there is no HDMI audio listed in /proc/asound/cards:

	 0 [Intel          ]: HDA-Intel - HDA Intel
	                      HDA Intel at 0xfebf8000 irq 22

Another found links on this topic: 1, 2, 3.

I think I'll wait until some new information/nVidia drivers (or maybe alsa 1.0.17?) are available.

Firewire

In order to get kino/dvgrab (and possibly other programs) working, you have to disable the New FireWire stack and enable the stable one (see kernel configuration). I was not able to get these programs working with the New FireWire stack.

eSATA

Hotplug (connecting and using a device without rebooting) is working.

Irda

Unsolved problem: Buggy lirc

There is a bug in lirc-0.8.3, which results into lirc compilation errors on 2.6.26 kernels. This bug is fixed in the CVS version, however there is another bug which prevents lirc_* modules from loading. So, I'll wait until the latter bug gets fixed and then I'll try again.

Expresscard

I can't test it right now, but if you have some expresscard available, check this article and try it yourself.

TV Tuner

There seems to be no working drivers for this device at the moment [ref1, ref2, ref3].

Unsolved problem: Get this tuner working by a dirty hack

There is a dirty hack to get this tuner working described in this thread. I was able to compile modified drivers for it and install them, but I wasn't able to get them working (xawtv -hwscan didn't find the device, xawtv -device device_location failed and utilities from dvb-apps didn't work). However, if you want to try it, this is what I did:

Install all needed packages and get the drivers source code (if you haven't compiled your own kernel, you will have to additionally install linux-headers-`uname -r`):

	aptitude install mercurial build-essential
	cd /usr/src
	hg clone http://linuxtv.org/hg/v4l-dvb
	cd v4l-dvb

Change the line USB_DEVICE(USB_VID_TERRATEC, USB_PID_TERRATEC_CINERGY_T_XXS) in linux/drivers/media/dvb/dvb-usb/dib0700_devices.c to USB_DEVICE(USB_VID_LITEON, 0xf016).

Compile and install the drivers:

	make
	make install

Download device firmware:

	cd /lib/firmware
	wget http://www.wi-bw.tfh-wildau.de/~pboettch/home/files/dvb-usb-dib0700-1.20.fw

Load the driver:

	modprobe dvb-usb-dib0700

Now you can try the tuner via some application, like xawtv.

Touchpad

Basic touchpad control is working.

Unsolved problem: Dual-mode doesn't work

I didn't test this feature, however according to this article, dual-mode doesn't work.

Unsolved problem: Two finger scrolling doesn't work

I was not able to get this feature working (I tried this and this howto). However, vertical (horizontal) scrolling works for me by "scrolling" the right (bottom) side of the touchpad.

Webcam

The laptop has a model that supports the USB Video Class, so it works with linux-uvc [ref]. If you haven't compiled your own kernel, you will have to additionally install linux-headers-`uname -r`.

	aptitude install build-essential subversion
	cd /usr/src
	svn checkout svn://svn.berlios.de/linux-uvc/linux-uvc/trunk linux-uvc
	cd linux-uvc
	make
	make install

Now when the module is installed, load it (modprobe uvcvideo) and see if you get some action:

	mplayer tv:// -tv driver=v4l2:width=320:height=240:fps=25:outfmt=yuy2:device=/dev/video0

I tested it also in kopete, where it seems to be working correctly. Here is a photo taken by the webcam.

Fingerprint reader

Packages that are needed to get the fingerprint reader working are currently only in the experimental branch, so you have to manually download them (libfprint0 and fprint-demo) and install them via dpkg. After that, you can test the fingerprint reader by running fprint_demo.

If you want to use the fingerprint reader as an authentization method, please refer to this or this article, because I didn't try it myself (I simply don't need it).

Power management

Install laptop-mode-tools. If you are running KDE, install also kpowersave. I haven't noticed any problems so far. When I unplug the AC power cable, "powersave" policy gets enabled. When I plug it back, "performance" policy gets enabled instead. Battery state monitor seems to be working, too.

Frequency scaling

Install cpufrequtils and powernowd. Then load acpi-cpufreq module by modprobe acpi-cpufreq and you should be able to view/get/set CPU frequencies via cpufrequtils. If everything works, append acpi-cpufreq to /etc/modules (note that you can compile it directly into kernel as: X86_ACPI_CPUFREQ [y]).
cpufreq-info output (with installed kpowersave and only one core info, the second one is similar):

	cpufrequtils 002: cpufreq-info (C) Dominik Brodowski 2004-2006
	Report errors and bugs to linux@brodo.de, please.
	analyzing CPU 0:
		driver: acpi-cpufreq
		CPUs which need to switch frequency at the same time: 0 1
		hardware limits: 800 MHz - 2.40 GHz
		available frequency steps: 2.40 GHz, 2.40 GHz, 2.00 GHz, 1.60 GHz, 1.20 GHz, 800 MHz
		available cpufreq governors: conservative, userspace, powersave, ondemand, performance
		current policy: frequency should be within 800 MHz and 2.40 GHz.
						The governor "ondemand" may decide which speed to use within this range.
		current CPU frequency is 800 MHz.

Thermal control

Processor

Follow this howto to get lm-sensors working. The only module that I had to load was coretemp.
My output:

	coretemp-isa-0000
	Adapter: ISA adapter
	Core 0:      +31.0 C  (high = +100.0 C, crit = +100.0 C)

	coretemp-isa-0001
	Adapter: ISA adapter
	Core 1:      +32.0 C  (high = +100.0 C, crit = +100.0 C)

Hard disk

Install hddtemp and run sudo hddtemp /dev/sda - my output:

	/dev/sda: WDC WD3200BEVT-22ZCT0: 39 C

Conclusion

Everything that I need is working. I haven't found any serious issues on this laptop and considering that this type of a laptop is only a few months old, the hardware support is great. I'm pretty sure that if you choose another distribution, you get similar results (however, I recommended you to run the newest kernel and related drivers as possible). So, if you are looking for a GNU/Linux compatible laptop with high performance, I'd definitely recommend this one to you!

Here is a list of things that doesn't work for me at the moment:

Feel free to send me your remarks, questions, ideas or hints that you may have at s3rvac@gmail.com.

Changelog

TODO