Installing Debian and configuring wifi and sleep on an Asus U56E BBL6

The Asus U56E budget laptop offers some great features, especially the significant battery life. However, if you want to install Debian on this machine, it can be a significant challenged. The biggest and most frustrating challenge is getting the operating system fully installed. Due to the newness of the Atheros Ethernet card:


Ethernet controller: Atheros Communications Inc. AR8151 v2.0 Gigabit Ethernet (rev c0)

Squeeze disk images do not have the necessary drivers for a wired connection and the wifi card


Network controller: Intel Corporation Centrino Wireless-N + WiMAX 6150 (rev 67)

is not automatically detected.

The solution, it seems, is to install wheezy (testing) in which the cd images do see the ethernet card. You can get weekly builds of these images here. These images will allow you to get a full operating system, but wifi will not work. In order to get wifi working you'll have to take a couple of steps. First, follow these instructions for getting the correct firmware on your machine. Once you've completed installing the firmware, your machine should be able to see wireless networks, unfortunately, the current configuration will not allow for connecting to these networks. However, you will likely see error messages like these in your kernel logs /var/log/kernel.log.


kernel: [ 860.047950] iwlagn 0000:02:00.0: L1 Disabled; Enabling L0S
kernel: [ 860.048101] iwlagn 0000:02:00.0: Radio type=0x1-0x2-0x0
kernel: [ 860.198118] iwlagn 0000:02:00.0: L1 Disabled; Enabling L0S
kernel: [ 860.198269] iwlagn 0000:02:00.0: Radio type=0x1-0x2-0x0
kernel: [ 860.270021] ADDRCONF(NETDEV_UP): wlan0: link is not ready
kernel: [ 879.486819] wlan0: direct probe to 00:19:5b:4b:7e:f5 (try 1/3)
kernel: [ 879.686076] wlan0: direct probe to 00:19:5b:4b:7e:f5 (try 2/3)
kernel: [ 879.885749] wlan0: direct probe to 00:19:5b:4b:7e:f5 (try 3/3)
kernel: [ 880.085453] wlan0: direct probe to 00:19:5b:4b:7e:f5 timed out
kernel: [ 882.094462] iwlagn 0000:02:00.0: fail to flush all tx fifo queues
kernel: [ 887.782023] wlan0: direct probe to 00:19:5b:4b:7e:f5 (try 1/3)
kernel: [ 887.981714] wlan0: direct probe to 00:19:5b:4b:7e:f5 (try 2/3)
kernel: [ 888.181396] wlan0: direct probe to 00:19:5b:4b:7e:f5 (try 3/3)
kernel: [ 888.381097] wlan0: direct probe to 00:19:5b:4b:7e:f5 timed out
kernel: [ 890.390099] iwlagn 0000:02:00.0: fail to flush all tx fifo queues
kernel: [ 896.068602] wlan0: direct probe to 00:19:5b:4b:7e:f5 (try 1/3)
kernel: [ 896.265385] wlan0: direct probe to 00:19:5b:4b:7e:f5 (try 2/3)
kernel: [ 896.465060] wlan0: direct probe to 00:19:5b:4b:7e:f5 (try 3/3)
kernel: [ 896.664759] wlan0: direct probe to 00:19:5b:4b:7e:f5 timed out
kernel: [ 898.669766] iwlagn 0000:02:00.0: fail to flush all tx fifo queues
kernel: [ 907.429350] wlan0: direct probe to 00:19:5b:4b:7e:f5 (try 1/3)
kernel: [ 907.628431] wlan0: direct probe to 00:19:5b:4b:7e:f5 (try 2/3)
kernel: [ 907.828139] wlan0: direct probe to 00:19:5b:4b:7e:f5 (try 3/3)
kernel: [ 908.027836] wlan0: direct probe to 00:19:5b:4b:7e:f5 timed out

In order to connect to wireless networks, you'll need to modify the driver options to disable bluetooth. By default the iwlagn and iwlwifi drivers come with bt_coex_active turned on, which for an as yet unknown reason (to me) renders the wifi card unable to connect to networks. If you are running iwlwifi, you can test this method by running:


# modprobe -v iwlwifi bt_coex_active=0

This command should allow you to now connect to wifi connections. It's also possible you'll need to run:


# modprobe -v iwlagn bt_coex_active=0

depending on your setup.

That's pretty much all, except to make this a default for your configuration. To do this you'll need to modify the iwlwifi.conf. You may need to create this file at /etc/modprobe.d/. That is, as root, do:


# emacs /etc/modprobe.d/iwlwifi.conf

Add the following two lines:

  • iwlwifi bt_coex_active=0
  • iwlagn bt_coex_active=0

Save the file and then run:


# update-initramfs -k all -u

This last step simply makes sure that the initramfs will not carry over to your next session and your new configuration options will load on reboot. Restart your computer, and you should now have a working wifi card!

Getting Suspend to Work

This script taken from http://forums.linuxmint.com/viewtopic.php?f=49&t=79634

While I don't fully understand why, the following script makes sleep function properly.

Create the file /etc/pm/sleep.d/20_custom-ehci_hcd with the following script.

#!/bin/sh
#inspired by http://art.ubuntuforums.org/showpost.php?p=9744970&postcount=19
#...and http://thecodecentral.com/2011/01/18/fix-ubuntu-10-10-suspendhibernate-not-working-bug
# tidied by tqzzaa :)
VERSION=1.1
DEV_LIST=/tmp/usb-dev-list
DRIVERS_DIR=/sys/bus/pci/drivers
DRIVERS="ehci xhci" # ehci_hcd, xhci_hcd
HEX="[[:xdigit:]]"
MAX_BIND_ATTEMPTS=2
BIND_WAIT=0.1
unbindDev() {
echo -n > $DEV_LIST 2>/dev/null
for driver in $DRIVERS; do
DDIR=$DRIVERS_DIR/${driver}_hcd
for dev in `ls $DDIR 2>/dev/null | egrep "^$HEX+:$HEX+:$HEX"`; do
echo -n "$dev" > $DDIR/unbind
echo "$driver $dev" >> $DEV_LIST
done
done
}
bindDev() {
if [ -s $DEV_LIST ]; then
while read driver dev; do
DDIR=$DRIVERS_DIR/${driver}_hcd
while [ $((MAX_BIND_ATTEMPTS)) -gt 0 ]; do
echo -n "$dev" > $DDIR/bind
if [ ! -L "$DDIR/$dev" ]; then
sleep $BIND_WAIT
else
break
fi
MAX_BIND_ATTEMPTS=$((MAX_BIND_ATTEMPTS-1))
done
done fi
rm $DEV_LIST 2>/dev/null
}
case "$1" in
hibernate|suspend) unbindDev;;
resume|thaw) bindDev;;
esac