Asus Z33A

Introduction
This article should help you get Linux working on an ASUS Z33A laptop. Note that the Z33A/Z33AE (the E version is identical except for ram, having a base 512MB instead of 256MB) is the name Asus uses for the North American market, in the rest of the world Asus uses the official name M5A (the M5A is a refresh of the earlier M5N using the newer 915GM chipset). The name change for North America is likely related to Asus phasing out the S5N/S5A (an even lighter version of the M5N/M5A with external optical drive) in the North American market in favor of promoting the W5 series. The BIOS of the Z33A is unchanged from the original, identifying itself as the M5A, and components such as batteries listed as being for the "M5A" will work with both the Z33A and Z33AE.

This guide is aimed at Gentoo Linux, but if you are visiting from another Linux distribution, you may still find some useful information here. Note that some of the hardware on the Z33A is still fairly new (as of March 2006). Because of this, the "stable" versions of some packages do not have appropriate drivers, and it is necessary to use "testing" versions.

This is not a step-by-step guide to installing Gentoo from scratch on the Z33A. The aim of this document is to document special steps or "tricks" that are not mentioned in the standard documentation (the official Gentoo documentation or other Gentoo-Wiki articles). This article should be used as a companion to those other sources.

Hardware Overview
The following table summarizes which components I have or have not been able to get working. See the related sections below for details.

lspci output

Linux Kernel
I am currently using a 2.6.15 kernel with swsusp2 patches. The standard gentoo kernel also works. It is probably not necessary to use a 2.6.15 kernel; however, you do need a fairly recent 2.6 kernel. Drivers for some hardware components are not available in many older versions.

LAN
I had no problems with the Realtek 8139 network card (except when ). It works with the "8139too" driver. You can compile it in-kernel or as a module. The driver has some sub-options. I left those at their default settings.

WLAN
See this guide. (There are also a few things to watch out for when .)

Sound
In order to use this soundcard, you need ALSA drivers v1.0.10 or greater. Drivers for some Intel High Definition Audio (HDA) soundcards are included in older versions of ALSA, but they do not work on this laptop. (The module loads without errors, but no sound is produced.) The in-kernel drivers are currently too old (as of March 2006), so you must use the package from portage. See the Gentoo Linux ALSA Guide for details on how to install ALSA. In thise case, you want to add this line to :

and then. Remember to re-emerge the driver whenever you upgrade your kernel.

Setting up is done as for any other ALSA soundcard. However, you also need to pass an option to the snd-hda-intel module. The default file from the ebuild already contains most of the settings you need. Add the following lines:

Afterwards run.

The first two lines are the normal way to set up a soundcard under ALSA. The third line passes the "position-fix=1" option to the module when it is loaded. If you omit this, you will probably get "clicks" or skipping in the sound output. If 'position_fix=1' does not work, the other values you can try are 0, 2, and 3. Read for details on what they mean.

You should also so that you can run  to change the volume level. Most ALSA soundcards have a 'Master' channel; this one has a 'Front' channel instead. You will want to unmute and turn up the volume on 'Front' and 'PCM' to get digital sound output. The 'Surround', 'Center', and 'LFE' (low freqency effects) channels are for surround-sound, which is supported by this chipset, but useless on a laptop that only has stereo speakers and a stereo headphone output.

This soundcard does not have a built-in MIDI synthisizer, so you will have to use a software one like ++. See the Gentoo Linux ALSA Guide, Section 4 (under "Virtual Synthesizers") for instructions on setting that up. This soundcard also does not support hardware mixing, so you will either need to use a sound daemon that does that for you (such as esd or arts) or the ALSA dmix plugin. Remember to add 'alsasound' and 'timidity' to your default runlevel. See the section for enabling the multimedia keys Fn+F10 - Fn+F12.

Graphics Card
See this HowTo.

X Composite
X Composite is used to enable transparency effects. Follow the instructions at Xorg X11 and Transparency. Note that not all programs support X Composite. Some will exhibit display corruption or may even crash on start-up. This is an issue with the programs themselves, not with the i915 chipset. See Xorg X11 and Transparency and especially Xorg X11 and Transparency (which is a workaround that applies to many X11 programs, not just Firefox). I recommend you set up X11 without transparency first, make sure everything works properly, and then add transparency.

DVD/CD-RW
This is a fairly generic IDE DVD-ROM/CD-RW combo drive. Nothing unusual is required here.

PC Card
See this guide.

USB 2.0
This laptop has three USB 2.0 ports. The EHCI driver in the kernel provides USB 2.0 support. If you want to use any USB 1 devices, then you also need the UHCI driver. Enable the following kernel options:

You can compile these in-kernel or as modules. Look through the other options under "USB support" to see if any perhipherals you have require additional drivers.

Firewire
Firewire works with the kernel IEEE1394 modules. You will need to install whatever modules or drivers are necessary for the firewire devices you want to use. I have tested this with a PointGrey FireFly camera and a generic external harddrive enclosure.

Basic Setup
Set the following kernel options:

Now. Use to ensure both cpufrequtils and acpid run at startup. You can set the default frequency governor by editing. "ondemand" and "conservative" are the only two that do anything automatically. "ondemand" quickly sets the CPU speed to maximum when the system load increases and reduces it to minimum when it is idle. "conservative" raises and lowers the speed more slowly, and it may stop at an intermediate speed if your system load is light. "performance" and "powersave" fix the speed at the maximum or minimum, respectively.

Hotkeys
The above kernel settings enable "ASUS/Medion Laptop Extras" in the kernel. If you prefer, this is also available as. The current version supports many of the ACPI events, including the power and sleep buttons and the lid close event. See ACPI/Configuration for instructions on how to write scripts to handle the remaining hotkeys. Remember to run after changing any scripts. The hotkeys which are not currently supported have the following values:

Example hotkey scripts
ACPI/Configuration shows you how to configure scripts to be run when various ACPI events are encountered. I modified to hibernate instead of powering off. I also created the following scripts to handle the volume controls, which I have listed below as examples to get you started. These scripts require, for which you need to. Remember to make the script files ending in .sh executable.

The result of all this pressing volume up/down will unmute the sound and increase/decrease the volume by 5%, and pressing the mute button will mute or unmute the sound.

KDE Bug Workaround
There seems to be a problem with KDE and ACPI events on this laptop. If you are running KDE, you will get several warning messages a second in your system log unless you do something about it. The messages will contains "Asus ACPI: Error reading LCD status". Since acpid does not seem to provide a way to turn off warning messages, we need to do something else to get rid of them.

Workaround 1: Disable KMilo
The easiest way to get rid of the warning messages is to disable the KMilo service in KDE. From the Control Centre, choose. Stop KMilo and clear the checkbox beside it to prevent it from running on startup. Each user will hae to do this.

Workaround 2: Filter the syslog messages
Disabling KMilo is an easy way to fix the problem, but every user must go through the steps. Instead, we can prevent the warnings from being written to the system log file. If you are using, add the following lines to :

Also make sure your messages destination includes "flags(fallback);". If you do not know what any of this means, see before trying anything.

Software Suspend
Suspend-to-disk (hibernate) and suspend-to-RAM (sleep) both work using. See TuxOnIce for the basics. A few configuration changes are necessary to get it working with this laptop.


 * If you are loading the ASUS Laptop Extras as a kernel module, make sure you add asus_acpi to the UnloadModules line of.
 * In order to restore the display during suspend-to-RAM, set "EnableVbetool yes", "VbetoolPost no", and "SwitchToTextMode yes". (The VBE post method does not work and is not necessary on this laptop.)
 * If you get a blank screen when you return from standby, try switching to a text-mode console and then back to X-Windows (Ctrl+Alt+F1, then Alt+F7).
 * Depending on your kernel configuration, you may need to add other modules to UnloadModules. If you find hardware stops working when returning from hibernation, then either compile the driver into the kernel or add the related modules to this line. You can also run your own scripts when resuming with the OnResume</tt> directive. See.

We can set up the hotkeys so that the power button hibernates and the sleep key or lid close events suspend. Edit, and replace the lines from "power)</tt>" to the following ";;</tt>" with these:

Modem
This is a software modem. You can read more about those in general at: http://linmodems.org/

Under Windows XP, the modem driver files are provided by Conexant Systems Inc. Modem diagnostics give the following output:

Modem diagnostics

This modem is not supported yet (March 2006), but it is likely it will be supported sometime soon. The tool does not detect the modem. Conexant does not produce Linux drivers, but another company, Linuxant does. (Linuxant has acquired a license from Conexant in order to do so. Their drivers are generally available in two versions: free ones which are limited to 14.4kbps, and commercial ones which run at full speed.) This modem runs through the Intel High Definition Audio (HDA) card. An announcement on the Linuxant webpage reads "Feb-07-2006 Linuxant releases enhanced HSF driver with Intel High Definition Audio (HDA) bus support!" However, the Linuxant HSF driver installer does not recognize the modem. I assume this means that the specific chipset used in the ASUS Z33A is too new, and that Linuxant has not yet gotten around to supporting it. Since I have no need of the modem at the moment, I have not investigated further.

Linuxant drivers
If you wish to try the Linuxant drivers for yourself, start by downloading the modem identification tool: http://www.linuxant.com/drivers/modemident.php

Download and untar the "ListModem Tool for Linux" to get. This script does not work as it is; it requires changes to two lines. You must add a backslash (\) to the end of lines 174 and 183 (those numbers may change if the file is updated):

listmodem.sh:174 correction

listmodem.sh:183 correction

With those corrections, I get the following output:

listmodem.sh output

Card Reader
Linux drivers may never be available for this device. Ricoh only provides Windows XP drivers, and they have not released specs that would allow a third party to write drivers for another OS. The MultiMediaCard project is an effort to provide Linux drivers for MMC and SD card readers. If they manage to produce a driver, you will be able to read about it on their Ricoh page.

Dual-Booting Windows
My laptop shipped with Windows XP, and I chose to dual-boot that with Linux. I came across one problem which I have been unable to fix. If you shut down Windows and boot Linux, everything works. If you hibernate Windows and boot Linux, the ethernet card does not work. The driver modules load properly, and ifplugd can even detect whether or not the cable is plugged in, but any attempts to send or receive data just sit there until they time out. The result is that if you hibernate Windows and boot Linux, then Linux will hang for a while during the bootup process while it tries to initialize the network until it eventually gives up. (Note that if you are using DHCP to acquire a network address, the default timeout is several minutes!) One workaround is to remove net.eth0 from your startup scripts and use the wireless card instead. The only other option is always to remember to shut down Windows before booting into Linux. I suspect that Windows is somehow putting the ethernet device into a power-save mode that Linux is unable to wake it from. If anyone finds more information about this, please leave me a note and/or update this page.