Sunday, December 30, 2012

Fix wireless soft-switch when running Debian on HP dv6

The HP dv6 laptop has touch switch to turn the wireless on & off.
When running Debian Wheezy on this laptop the wireless will turn off (blue -> orange), but doesn't turn back on.  The status can also be viewed by using rfkill application (install from apt/Synaptic), using the command:
rfkill list
To get the light to change from orange to blue when the wireless is re-enabled we need a couple of scripts.
Firstly create the udev rule that will call a script when rfkill is triggered:
e.g.: sudo nano /etc/udev/rules.d/75-rfkill.rules
SUBSYSTEM=="rfkill",ATTR{type}=="wlan",ACTION=="change",ATTR{state}=="1", RUN+="/usr/local/bin/fixwifi"
Next create the script that will turn on the wireless interface, and restart wlan0 to fix routes:
e.g.: sudo nano /usr/local/bin/fixwifi
#!/bin/sh
# Turn the light blue
ifconfig wlan0 up
# Restart networking to get correct default gateway
ifdown wlan0; ifup wlan0
Make the script executable:
sudo chmod +x /usr/local/bin/fixwifi

Test it! Remember you must have rfkill installed and you can use "rfkill list" to view switch status.
Tested on Kernel 3.2.04-amd64.

 


Sunday, December 2, 2012

Debian Touchpad Tap-to-Click

To enable tap-to-click for Synaptic touchpads (including BCM5974 in MacBook Pro) for Debian Wheezy:

su
mkdir /etc/X11/xorg.conf.d
cp /usr/share/X11/xorg.conf.d/50-synaptics.conf  /etc/X11/xorg.conf.d/
nano /etc/X11/xorg.conf.d/50-synaptics.conf

Section "InputClass"
 ...
 Driver "Synaptics"
 ...
 option "TapButton1" "1"
 ...

Restart X.