Home > Info > Haier W18: Sound and WLAN under Windows, Debian Etch, and Ubuntu Hardy Heron

Haier W18: Sound and WLAN under Windows, Debian Etch, and Ubuntu Hardy Heron

I reported already that I had bought a Haier W18 notebook, a Chinese make, with which I am very happy. I have installed both Windows XP and Debian Linux Etch. Both installations presented the same two challenges: WLAN and Sound. All other hardware (this includes the wired LAN) has been identified correctly and did not require special treatment to work properly.

In the Web logs I found already people, who searched for something like “Haier W18 drivers” and got directed to my “Chinese Notebook” page. Well…I ended that document with promising to write something about the driver setup. Here we go…hope it helps a few people.

The Hardware

Haier, located in Qingdao, China, seems to like to cooperate with Realtek, located in Hsinchu, Taiwan. Positive political attitude aside: It seems to work. ;) However, Realtek and/or Haier could probably enhance their driver support in the official distributions of Windows and Linux. But at least one has to admit: Everything is there once you find it.

The sound support in the Haier W18 is based on an ATI SB450 HDA Audio chipset, but for reasons unknown to me the standard-driver for “intel-hda” don’t work.

The WLAN adapter is an internal USB-adapter based on the RTL8187 chipset, connected to USB bus 001.

Windows XP

As said, Windows XP does not recognize sound nor WLAN adapter. But all necessary drivers are included on the CDs shipped with the laptop. Don’t have the CDs now with me as I write this, but I remember that one CD was only for one of the above components, i.e. either audio or WLAN. The other CD contains a selection of various drivers, also for video, mouse, and the like.

Well…just put in the CD, start “setup.exe” from the root folder if not starting automatically, and follow the instructions to install Realtek WLAN adapter and Sound drivers.

Two more recommendations from the included drivers on the collections CD:

  • Also install the ATI Video drivers as they only provide full-speed support for the built-in “Radeon Xpress 200M” card. (It is sufficient to just install the drivers; no need to also install the nasty Catalyst Control application, which installs too deep into Windows and pops up and even eats CPU at various places. Really…you want to install drivers only…no Catalyst Control!)
  • Moreover, installation of the mouse drivers is recommended to benefit from many many features of modern touchpad drivers, like scroll-support or drag&drop and the like.

If you have no access to the CD shipping with the W18 or you are using Windows Vista, then check out http://www.realtek.com.tw/downloads. Select “Wireless LAN ICs > WLAN NIC > IEEE 802.11a/b/g > MAC/BBP > Software”, then “RTL8187B” for the WLAN drivers and “Computer Peripheral ICs > Audio Codecs > High Definition Audio Codecs > Software” for the audio drivers. I have not downloaded these, but I would expect them to work like any other Windows drivers.


Debian Linux Etch (4.0)

Note: Debian Sarge (3.1) does not work as it cannot recognize the SATA hard disks built into the W18. Etch installs beautifully, however, but be aware that you need a wired network/internet connection for first time setup, especially if you plan to do a network installation (I did so, very recommended!) or at least plan to update packages immediately after a CD installation.

Just recently,

Etch has been officially released, so there should be no reason to even think about Sarge any longer.

Compile Support Required

Drivers for WLAN and sound need to be compiled locally from source code provided by Realtek. It is not everybody’s favorite to compile drivers, but not exactly difficult either, once the correct packages are installed. It is unfortunately not sufficient to just install the architecture headers (at least not for the sound stuff), but I here is list of necessary packages. Before you continue make sure the following packages are installed (do so via “Desktop | Administration | Synaptic”, which is extremely simple, but make sure you have a wired internet connection, in case you have a network installtion rather than a CD/DVD):

Section “Libraries – Development” (libdev):

  • libc6-dev
  • libncurses5-dev
  • libncursesw5-dev
  • libstdc++6-4.1-dev

Section “Development” (devel)

  • binutils
  • g++-4.1
  • gcc-4.1
  • gcc-4.1-base
  • linux-headers-2.6.18-4
  • linux-headers-2.6.18-4-686
  • linux-kbuild-2.6.18
  • linux-kernel-headers
  • make

For all of the above right-click on the line entry within Synaptic and select “Mark for installation”. Once everything is marked click the big “Apply” button. If Synaptic suggest to install some more package to resolve dependencies, then agree! Synaptic will take care of downloading the packages if necessary and installing them.

I also needed to add a symbolic link from gcc pointing to gcc-4.1 to make the sound driver compile working. You need to be ‘root’ to do so:

cd /usr/bin
ln -s gcc-4.1 gcc

Should the look like this:

birger@woodstock:~/Download/rtl8187B_linux_24.6.1021.0212.2007$ ls -l /usr/bin/gcc
lrwxrwxrwx 1 root root 7 2007-03-10 21:54 /usr/bin/gcc -> gcc-4.1

Getting WLAN (RTL8187) running

Realtek offers Linux source code for “RTL8187B” drivers on its web page. Find the latest version here and download the .tar.gz archive:

http://www.realtek.com.tw/downloads/

Select “Wireless LAN ICs > WLAN NIC > IEEE 802.11a/b/g > MAC/BBP > Software” from the Downloads menu; select model “RTL8187B” and click “go”. Scroll down to the Linux section and click on one of the 3 locations offered for “Linux driver support 2.4&2.6 kernel”. Download that .tar.gz file to some nice location.

Unpack the archive with command

tar xfz rtl8187B_linux_24.6.1021.0212.2007.tar.gz

Go down into the “rtl8187B_linux_24.6.1021.0212.2007″ directory, check out the “ReadMe.txt” file. Building the drivers, however, is as simple as executing

./makedrv

Once the compilation has finished you will find a number of .ko files:

birger@woodstock:~/Download/rtl8187B_linux_24.6.1021.0212.2007$ ls -l */*.ko
-rw-r--r-- 1 birger users  9666 2007-05-12 15:16 ieee80211/ieee80211_crypt_ccmp-rtl.ko
-rw-r--r-- 1 birger users  8141 2007-05-12 15:16 ieee80211/ieee80211_crypt-rtl.ko
-rw-r--r-- 1 birger users 12929 2007-05-12 15:16 ieee80211/ieee80211_crypt_tkip-rtl.ko
-rw-r--r-- 1 birger users  7025 2007-05-12 15:16 ieee80211/ieee80211_crypt_wep-rtl.ko
-rw-r--r-- 1 birger users 75678 2007-05-12 15:16 ieee80211/ieee80211-rtl.ko
-rw-r--r-- 1 birger users 69503 2007-05-12 15:16 rtl8187/r8187.ko

All of them end on “-rtl” to distinguish them from the officially shipped drivers of the same name.

Using the provided tools in the package (wlan0up etc.) is possible, but inconvenient. What you really want is that the drivers start up automatically. For this to work just replace the original drivers in /lib/modules/2.6.18-4-686/kernel/net/ieee80211 with the “-rtl” versions above and add the r8187 in some subdirectory. You need to be ‘root’ to do so. What I did is as follows: I copied each of the ieee80211* drivers above into /lib/modules/2.6.18-4-686/kernel/net/ieee80211 and renamed them from “*-rtl.ko” to “*.ko_8187B”. I renamed the original driver modules to *.ko_original and finally added symbolic links, which link the original name to the *.ko_8187B version. For the r8187 driver I added a new subdirectory below /lib/modules/2.6.18-4-686/kernel/net/ieee80211 and moved the driver into this directory. Also here I used symbolic links, which would not be necessary…just to keep it consistent. After all these operations the 2 relevant module directories look like this:

birger@woodstock:/lib/modules/2.6.18-4-686/kernel/net$ ls -l ieee80211/*
lrwxrwxrwx 1 root root    29 2007-05-12 15:23 ieee80211/ieee80211_crypt_ccmp.ko -> ieee80211_crypt_ccmp.ko_8187B
-rw-r--r-- 1 root root  9666 2007-05-12 15:20 ieee80211/ieee80211_crypt_ccmp.ko_8187B
-rw-r--r-- 1 root root  8809 2007-03-27 06:42 ieee80211/ieee80211_crypt_ccmp.ko_original
lrwxrwxrwx 1 root root    24 2007-05-12 15:23 ieee80211/ieee80211_crypt.ko -> ieee80211_crypt.ko_8187B
-rw-r--r-- 1 root root  8141 2007-05-12 15:20 ieee80211/ieee80211_crypt.ko_8187B
-rw-r--r-- 1 root root  8337 2007-03-27 06:42 ieee80211/ieee80211_crypt.ko_original
lrwxrwxrwx 1 root root    29 2007-05-12 15:24 ieee80211/ieee80211_crypt_tkip.ko -> ieee80211_crypt_tkip.ko_8187B
-rw-r--r-- 1 root root 12929 2007-05-12 15:20 ieee80211/ieee80211_crypt_tkip.ko_8187B
-rw-r--r-- 1 root root 12594 2007-03-27 06:42 ieee80211/ieee80211_crypt_tkip.ko_original
lrwxrwxrwx 1 root root    28 2007-05-12 15:24 ieee80211/ieee80211_crypt_wep.ko -> ieee80211_crypt_wep.ko_8187B
-rw-r--r-- 1 root root  7025 2007-05-12 15:20 ieee80211/ieee80211_crypt_wep.ko_8187B
-rw-r--r-- 1 root root  6801 2007-03-27 06:42 ieee80211/ieee80211_crypt_wep.ko_original
lrwxrwxrwx 1 root root    18 2007-05-12 15:24 ieee80211/ieee80211.ko -> ieee80211.ko_8187B
-rw-r--r-- 1 root root 75678 2007-05-12 15:20 ieee80211/ieee80211.ko_8187B
-rw-r--r-- 1 root root 34422 2007-03-27 06:42 ieee80211/ieee80211.ko_original
ieee80211/softmac:
total 32
-rw-r--r-- 1 root root 31898 2007-04-18 23:34 ieee80211softmac.ko
birger@woodstock:/lib/modules/2.6.18-4-686/kernel/net$ ls -l r8187/*
lrwxrwxrwx 1 root root    14 2007-05-12 15:25 r8187/r8187.ko -> r8187.ko_8187B
-rw-r--r-- 1 root root 69503 2007-05-12 15:25 r8187/r8187.ko_8187B

OK…now comes the moment of truth: Run (still as ‘root’)

depmod

and then reboot. Sure, there’s always a way out in Linux without reboot, but we don’t want to go into the details of unloading/loading drivers. The reboot should make sure that only your new modules are loaded. If you are quick, you might see some messages like the below log extract already running on the screen during the reboot.

If not, try loading the WLAN driver manually:

modprobe r8187

That should not lead to any error message. Check out the end of your message log file:

tail -n 100 /var/log/messages

You should find something similar to:

May 13 18:27:30 localhost kernel: r8187: no version for "ieee80211_reset_queue" found: kernel tainted.
May 13 18:27:30 localhost kernel:
May 13 18:27:30 localhost kernel: Linux kernel driver for RTL8187/RTL8187B based WLAN cards
May 13 18:27:30 localhost kernel: Copyright (c) 2004-2005, Andrea Merello
May 13 18:27:30 localhost kernel: rtl8187: Initializing module
May 13 18:27:30 localhost kernel: rtl8187: Wireless extensions version 20
May 13 18:27:30 localhost kernel: rtl8187: Initializing proc filesystem
May 13 18:27:30 localhost kernel: rtl8187: Reported EEPROM chip is a 93c46 (1Kbit)
May 13 18:27:30 localhost kernel: rtl8187: Card MAC address is 00:15:af:14:96:79
May 13 18:27:30 localhost kernel: rtl8187: Card reports RF frontend Realtek 8225
May 13 18:27:30 localhost kernel: rtl8187: WW:This driver has EXPERIMENTAL support for this chipset.
May 13 18:27:30 localhost kernel: rtl8187: WW:use it with care and at your own risk and
May 13 18:27:30 localhost kernel: rtl8187: WW:**PLEASE** REPORT SUCCESS/INSUCCESS TO Realtek
May 13 18:27:30 localhost kernel: rtl8187: This seems a legacy 1st version radio
May 13 18:27:30 localhost kernel: rtl8187: PAPE from CONFIG2: 0
May 13 18:27:30 localhost kernel: rtl8187: Driver probe completed
May 13 18:27:30 localhost kernel:
May 13 18:27:30 localhost kernel: usbcore: registered new driver rtl8187

Note: With “tail -f /var/log/messages”, ideally in a separate terminal window, you can follow messages live as they are added to the file. If the above appears, then you are pretty close to a working driver! You can play a bit on the command line, try for example “iwlist wlan0 scan”, which returns all visible WLAN hot spots around.

Now start Debian/GNOME’s WLAN configuration tools to set up your connection parameters of your WLAN connection. Try “Debian | System Tools | Wifi Radar” for a list of hotspots (install package “wifi-radar” from the Networking section via Synaptic in case you don’t have that menu item). And fully configure all settings via “Desktop | Administration | Networking”. Help for these settings is available from the Debian help or other Web resources.

One last warning: When the Debian kernel updates (and that could happen if you regularly update your package via the background job as recommended by Debian) then you might need to recompile the driver! Just do ./makedrv again, copy the drivers, run depmod and reboot.

Getting sound (ATI SB450 HDA) running

For sound support I have the following Debian packages installed via Synaptic:

Section “Multimedia” (Sound)

  • alsa-base
  • alsamixergui
  • alsa-oss
  • alsaplayer-alsa
  • alsaplayer-common
  • alsaplayer-esd
  • alsaplayer-gtk
  • alsaplayer-oss
  • alsa-utils
  • esound
  • esound-common
  • libmodplug0c2
  • linux-sound-base
  • oss-compat

Section GNOME

  • rythmbox
  • totem
  • totem-xine

…and certainly again all package Synaptic wants to add to resolve dependencies. I have also successfully installed RealPlayer 10 from their web site.

Driver installation is similar to the WLAN stuff, but once all necessary packages are installed, a bit simpler. The challenge here is to get the stuff compiled as the sound drivers require a number of libraries and other things working. I hope that I remember everything correctly as stated above in the section “Compiler Support Required”. Then it comes down to:

Download the drivers from the Realtek download site

http://www.realtek.com.tw/downloads/

Select “Computer Peripheral ICs > Audio Codecs > High Definition Audio Codecs > Software” and click on one of the 3 download links in the “Others” line, download the archive, and unpack it (double-click on it in a normal file browser helps, if you cannot deal with the command line commands for unpacking .bz2). You end up with a subdirectory “/home/birger/Download/realtek-linux-audiopack-4.05f”. Change into that and check out the file “Readme.txt”.

Theoretically it is sufficient to just run

./install

and done you are after quite some time of compilation and installation. I do not recommend so as this also overwrites a number of tools, which do not require re-installation. Instead, only follow steps 1, 3, 6, and 7 of the Readme file:

Step 1. unzip source code

tar xfvj alsa-driver-1.0.xx.tar.bz2

Step 3. Complied source code and install the driver

a. cd alsa-driver-1.0.xx
b. ./configure
c. make
d. make install
e. ./snddevices

Step 6. Run ALSA auto configuration

./alsaconf

Step 7. Use the alsamixer the disable mute (All audio line default is mute)

*Must to compile and to install the ALSA library and utility. (Use automatic install is already installed)

excute alsamixer

All the tools and the library is not necessary as it comes with the standard packages in a more up-to-date version. Only compile and install the drivers.

Ad step 6: Alsaconf will unload all loaded modules and present you with a list of available drivers. If your step 3 was successful, then you will be presented with the option

hda-intel ATI Technologies Inc SB450 HDA Audio (rev 01)

(in my case actually even 3 times…doesn’t matter which to select). Select that, have Alsaconf configure the stuff and play a test sound!

Now you can use the various sound tools to play sound. Find help in their respective manual pages or on the Web.


Ubuntu Hardy Heron

Kernel 2.6.24-19 (see output of ‘uname -a’), as of 17-AUG-2008.

WLAN (RTL8187) works after automatic update

The good news first: There’s no manual compilation / installation necessary any longer with Ubuntu Hardy Heron. However, WLAN wasn’t detected right away during installation (Ubuntu 8.04.1), so for initial setup you will still need a wired connection. (And so you will if you run Ubuntu directly from the CD, too.) But then after full installation and first login give Ubuntu a bit of time to perform all automatic updates from the internet, give it a reboot, and voila: You will be presented with the WLANs around you after login. All configuration dialogs including encryption work perfectly. I didn’t do anything manually to get it work.

Getting sound (ATI SB450 HDA) volume-controlled

Sound also works out of the box, but I had serious trouble with the volume control: Either a maximum of 100% (and that is very loud!) or alternatively only muted. Turns out that this is due to OSS. Switch all playback/recording to ALSA (in System > Preferences > Sound) and don’t forget to change the device in the Preferences of the Volume Control panel item to ALSA, too.

Comments welcome! Just click on the link “Kommentar hinzufügen…” (which is German for “add comment).

Categories: Info

Originally Created: 05/13/2007 04:45:59 PM
Last Edited: 05/13/2007

Categories: Info Tags: , , , , ,
  1. No comments yet.
  1. No trackbacks yet.