This document describes running Linux on ASUS M6R laptop. The page was written by Jan "Yenya" Kasprzak.
As a whole I can recommend this laptop. There are some parts which do not work with Linux or work with binary-only driver (WiFi interface, maybe OpenGL acceleration). But it has long battery life and the best thing is that it can be bought without an operating system, so you don't pay the "Microsoft tax".
My M6R has the following configuration:
Here is the contents of /proc/cpuinfo, the output of lspci command, and kernel messages after boot.
I had the Fedora Core 2, 3, and 4 Linux distributions installed on my system, with few additional RPMs from freshrpms.net. Here is my package list (from FC2). I use GNOME as my personal desktop. It has pretty standard configuration except that my window manager is Sawfish with the blue-steel theme and my WWW browser is Galeon.
At the time of writing this page I use Linux 2.6.13-rc4 kernel. Here is my kernel configuration (you can copy this to /usr/src/linux-2.6_version_/.config and run make oldconfig command. NOTE: I had stability problems with the kernel which came with FC2 distribution, and acpi4asus did not work for me. The vanilla kernel is OK, though.
The 2.6 kernel has pretty good ACPI support, and it works with M6R. There is additional support for ASUS laptops - the acpi4asus module. It is needed to allow extra keys (Fn+key combinations, CD-player keys, etc) and external CRT switching to work. Acpi4asus kernel module is included in the stock 184.108.40.206 kernel, I have not fully tested all the features, but I can read the CPU temperature from /proc/acpi/thermal_zone/THRM/temperature, read the battery status from /proc/acpi/battery/BAT0/state (GNOME has a nice battstat-applet-2 applet which works for me).
The software suspend-to-disk works OK for me. I have configured that the system suspends itself when I press the "power on/off" button. You need to have the ACPI support in kernel (see above for my kernel config), run acpid (included in Fedora Core 1), create the /etc/acpi/events/power file with the following contents:
Then add the "resume=/dev/hda<your_swap_partition>" parameter to the "kernel" line in your /boot/grub/grub.conf file. See also the Documentation/power/swsusp.txt file in the kernel sources.
I have found that the software suspend breaks the XVideo overlay, but it can be fixed either by restarting the X server (making the whole point of SW suspend void), or even by starting second X server and killing it after the initialization. So I have added this into the above script.
With 2.6.9 and newer kernels I suggest to use the ondemand CPU scaling governor, which does the similar work as the cpuspeed utility, but in kernel space. I have found that the default setup is too fast to increase frequency, but too slow to go down (so for example when you are playing video, 600 MHz is almost always sufficient, but with the ondemand governor the speed is almost all the time at 1500MHz). I use the following /etc/rc.d/rc.local script to set up my own parameters for the ondemand CPU scaling governor. With 2.6.13-rc4 there is a new "conservative" speed governor, which is more suitable for systems running on battery.
You can also have a look at the laptop mode tools (installation is pretty straightforward) and the cpuspeed program from the kernel-utils package (included in Fedora Core 2).
ACPI can be used to switch on/off the two LEDs ("mail" and "wireless") on the front edge of the laptop. Just echo 0 or 1 to /proc/acpi/asus/[mw]led.
I had problems with ACPI on kernels newer than 2.6.9 (see the output of the dmesg command on 2.6.10 kernel with ACPI debugging enabled). The issue is now tracked at Linux Kernel Bugzilla as bug #4150. Apparently the ec_polling patch fixes the problem (I have ACPI working on 2.6.13-rc4 kernel).
The 2.6.13-rc4 kernel needs the ec_polling boot option (and ec_polling patch mentioned above) to fix the ACPI problem, and the acpi_specific_hotkey boot option to enable acpi4asus extensions.
The laptop is equipped with RICOH RL5c476 Cardbus bridge. The bridge has one external slot (PCMCIA/Cardbus compatible) and the other port works as a memory card reader. However, there is no public documentation for the card reader part of the bridge, so it does not work with Linux. When you plug in a SD card, it is identified this way:
# cardctl ident
product info: "RICOH", "Bay1Controller"
manfid: 0x0000, 0x0000
function: 254 ((null))
The spec sheet can be ordered from Ricoh, so writing a driver should be possible. I will not buy it myself, but donations are welcome.
I have tested the PCMCIA/Cardbus interface with the Lucent Orinoco Wi-Fi card (orinoco_cs driver), and it works.
I have found that PCMCIA slot does not work for me with 2.6.9 and newer kernels. 220.127.116.11 is OK, though.
There are five buttons above the keyboard (e-mail, WWW, wireless and two others), four buttons on the left edge (rewind, stop, play/pause, and fast forward), and Fn+Fnumber combinations. All these special keys are handled as ACPI buttons, so you can add any action you want just by adding the proper description to the acpid configuration. For example, I use my "wireless" button to switch the wireless interface on and off by adding this to /etc/acpi/events/wlan:
(The wlan_updown script is a bit complicated, because I use either the internal WiFi adapter or a PCMCIA Orinoco WiFi card; use this as an example only).
The following Fn combinations work without any special setup just by using the acpi4asus kernel module:
Most notably, the Fn+F8 (LCD/CRT switch) does not work for now, but you can use echo 3 > /proc/acpi/asus/disp to get LCD+CRT working. I did not explore this further.
The graphics card is ATI IGP 9100 with shared framebuffer, and 15.1" wide-angle (1280x800) display. The default framebuffer size was 128 MB, consuming 1/4 of all available RAM! I have reduced it to 32 MB (BIOS setup/Advanced/Chipset/Northbridge settings). Note: with 16 MB some OpenGL applications (such as TuxRacer) do not work. Here is my /etc/X11/xorg.conf (beware: note the special section for the touchpad - see bellow). The only tricky part is to set the display size (as the LCD panel does not support DDC) and to define the modeline for 1280x800 mode.
The graphics works OK in the RGB mode and has working XVideo support - YUV overlay for displaying and scaling data in the YUV colorspace (such as movies). Here is the xvinfo output. I have noticed that xvinfo stops working after software suspend. I dont know why-maybe the graphics chip wants to be resetted. I use MPlayer multimedia player. Add the following line to ~/.mplayer/config for correct aspect ration in the full-screen mode:
There is still a problem with mplayer - observed also by Richard Faasen: About once every 30 minutes of playback the movie playes very rapidly for about 3 seconds, like fast motion. This happens with me on 2 distributions (fedora & debian). I tried different versions of MPlayer. It does the same for me.
I have tried to use HW-accelerated 3D graphics (OpenGL). According to glxinfo it should work (you have to make /dev/dri/card0 file accessible for your UID; here is the output of glxinfo). I've got about 100-150 FPS in glxgears running maximized to the full screen. Tuxracer also works (provided that you have at least 32 MB of shared memory for graphics framebuffer).
Binary-only proprietary drivers from ATI support TV-out and dual-head setup, but no 3D acceleration (I have not tested these drivers; thanks to Alexandre Mitev for providing the link).
The external VGA output partly works - use the echo 3 > /proc/acpi/asus/disp command to get the CRT+LCD output (and echo 1 ... to get LCD-only). I was not able to set up a CRT-only output.
The laptop has a S-Video (TV-out) port, but it did not work for me (just plugging the S-Video cable during boot did not get any output on the TV-set). I have tried the atitvout package, and it did not help either. I have not tried playing with /proc/acpi/asus/disp values yet, and neither did I try the Gatos package. The specifications for TV-out from ATI are not public (may be because of their Macrovision license agreement). So the TV-out status now is "may or may not work".
For anime fans: I use this wallpaper on my desktop.
The touchpad works OK in plain PS/2 mode as two-button PS/2 mouse (you can use the Emulate3Buttons in the X configuration) to get the middle button, altough I've got a lot of "synchronisation lost" messages when using the kernel from Fedora Core 2.
Now I use my own vanilla 2.6.9 kernel and I have compiled the Synaptics touchpad driver for X.org. See my /etc/X11/xorg.conf file for details on how the touchpad is set up. I use the "scroll down" button as a middle mouse button. For vertical scrolling the rightmost area of the touchpad can be used, and I use the bottom part of touchpad for horizontal, which is IMHO better than the scroll buttons.
The laptop has four external USB ports, and the system can see three USB controllers - one EHCI (USB 2.0) and two OHCI (USB 1). Depending on what device (USB 1 or USB 2.0) you plug in, the ports are handled by USB controllers 2 and 3 (OHCI) or 1 (EHCI), respectively.
The CD drive (Toshiba SD-R2512 CDRW/DVD) is detected as /dev/hdc on Linux. I have tested reading CDs, burning CD-RW and blanking CD-RW. I did not use the The supports the burnfree mode, and supports DAO (disk-at-once) as well as TAO (track-at-once) mode (I have tested TAO only).
I have not tried to read any DVDs yet, and I have not tried the RPC-1 (region-free) firmware. The rpc1.org pages may provide a good starting point.
Richard Faasen wrote: I fixed a problem I had with my DVD drive. I thought you might be interested to put it on your page. My M6R was shipped with a Toshiba ODD-DVD SD-R6372 drive. I could not burn DVD+R disks, I had to update my firmware from version 1730 to 1732. The link to this update is: http://www.toshiba-europe.com/storage/Index.asp?page=PFW&nav=RSC_SDR
My M6R contains an ATI IXP audio controller. The ALSA driver works well. After SW suspend all the lines are muted, but it can be worked around by adjusting the volume by +1 and then -1 in swsuspend script. The laptop has line-out 3.5mm jack (for headphones, works OK), microphone-in 3.5mm jack (works OK), built-in microphone (OK), and built-in stereo speakers (OK). The audio quality is much better than I had on other laptops (even with volume set to max), and even when using the small built-in speakers. However, a laptop with the label "Digital entertainment gateway" on the lid should contain a digital S-PDIF output, which M6R doesn't.
There is an IEEE 1394 port on the OHCI1394 controller (I have the CONFIG_IEEE1394_OHCI1394=m option in my kernel config). The controller is detected OK, but I did not try to use any FireWire device yet.
Works OK - tested with an ink jet printer. I don't know why the laptop makers bother to add a parallel port while they omit the serial port, which is usable for a wider range of devices.
The infrared port is detected by Linux as /dev/ttyS1 (if you use my kernel configuration, you have to modprobe 8250 by hand. I tried to use it - I am able to use Gnokii to communicat with Nokia 6310i cell phone (follow the instructions in the gnokii-IrDA-Linux file in Gnokii sources. Piotr Kęplicz wrote:
Well, it looks like IrDA device is recognized as a standard serial port: [root@beton root]# dmesg | grep tty ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A I installed irda-utils, and set up /etc/sysconfig/irda to /dev/ttyS1: [root@beton root]# cat /etc/sysconfig/irda IRDA=yes DEVICE=/dev/ttyS1 DISCOVERY=yes Now, when I start irda with "service irda start", the following kernel modules are loaded: irtty-sir 5312 2 sir-dev 13228 1 irtty-sir irda 119932 1 sir-dev crc-ccitt 1664 1 irda [root@beton root]# ifconfig irda0 irda0 Link encap:IrLAP HWaddr 5c:04:00:00 UP RUNNING NOARP MTU:2048 Metric:1 RX packets:1454 errors:2 dropped:2 overruns:0 frame:0 TX packets:1411 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:8 RX bytes:25468 (24.8 Kb) TX bytes:22640 (22.1 Kb) The two computers definitely see each other (Linux on an M6R, Windows on a Compaq Evo). You can check it by viewing /proc/net/irda/discovery or using irdadump. Now I'm looking for a simple solution to send files between the two of them...
The built-in LAN adapter is a pretty standard RTL 8139c (not c+) chip. While not optimal from the performaince standpoint, it works OK and is sufficient for the laptop usage. It can be driven with the 8139too driver in the Linux kernel (set CONFIG_8139TOO=y in your kernel config).
This laptop does not have any link or LAN activity LEDs, which is bad when you work as network administrator and use your laptop for debugging LANs. However, the 8139c chip has a working MII interface, so the link status can be read using the mii-tool command.
I use ifplugd daemon for monitoring the link status. I have set it up so that when I plug the ethernet cable in, it tries to get the IP address via DHCP, and if it succeeds, it switches the laptop "mail LED" on and disables the WiFi interface. Thus I can visually see what interface is active now (I use the "WLAN LED" and "wireless" button for WiFi interface control).
The laptop contains a Broadcom BCM94306 WiFi interface. There is AFAIK no Linux driver for this chip. It can be used with ndiswrapper and the these two files from the Windows driver (can be downloaded from www.asus.com as well).
The open source bcm43xx driver is in development. As of 2005-12-07 it detects the BCM4306 WiFi adapter in M6R, and I was able to ping my gateway through it. It is not very stable under load, but the situation is quickly improving. The driver itself is open source, but it needs the (non-open source) firmware that can be extracted from the Windows driver.
I use either this interface or an Orinoco PCMCIA card in my laptop. I have set up a "wireless" button (near the power switch) to activate/deactivate the wireless interface and to switch on or off the "WLAN LED".
It seems there are two models of M6R - Richard Faasen have one with Intel ipw2200 wireless adapter (open-source driver here). Apart from that, his laptop seems to be the same as mine, even the label is the same.
Modem is a ATI IXP. I have found some description of making it work under Linux here - I am currently experimenting with this.
The laptop contains an i2c-isa controller and the w83627thf sensors chip, which can be used for monitoring voltage, temperature and fan rotation speed using the lm_sensors package (included in Fedora Core 2). The sensors chip is detected, and it gives some values. However, the fan and temperature monitors are probably not wired in, so you get 0 RPM. Voltage values seems to be correct, though.
Jan "Yenya" Kasprzak