You are not logged in.
I've been doing a fair amount of fiddling around installing kernels (the patched kernel for usb fixed suspend) and modules lately, and seemed to have hosed the Fn-F2 button for WiFi switching. Unfortunately it doesn't work no matter what kernel I use, even teh original one. I must have replaced something but I don't know what...
My WiFi is actually working, and I can manually switch it on off with
echo "0 or 1" > /proc/acpi/asus/wlan
Can someone please tell me where/what scripts I should be looking for to re-enable Fn-F2 functionality.
It's only a minor thing but I hate it when something worked and now doesn't!
Offline
Thats how i fixed it:
# sudo bash
# tail -f /var/log/acpid
then press Fn-F2 and look for event code. Mine was "hotkey ATKD 00000010" when WLAN was off and "hotkey ATKD 00000011" when wlan was on.
Then create these two files:
#FILE: /etc/acpi/events/eee-wifi-on event=hotkey ATKD 00000010 action=/sbin/eee-wifi-on-off.sh on
#FILE: /etc/acpi/events/eee-wifi-off event=hotkey ATKD 00000011 action=/sbin/eee-wifi-on-off.sh off
Create the script that will handle on/off (FILE: /sbin/eee-wifi-on-off.sh):
#!/bin/bash if [ "$1" == "off" ]; then echo 0 > /proc/acpi/asus/wlan else echo 1 >/proc/acpi/asus/wlan fi
Of course you can do other things here too (like using pynotify, but this is sufficient for me).
Now make script runnable and restart acpid:
# chmod a+x /sbin/eee-wifi-on-off.sh
# /etc/init.d/acpid restart
It should be working.
Last edited by arturaz (2008-01-09 6:07:34 am)
Offline
Many thanks arturaz. In the end I just reinstalled the Eee ubuntu scriptpack and it worked again. Thanks anyway.
Last edited by tristan (2008-01-09 7:09:28 am)
Offline
If you find that wifi doesn't work properly after switching it back on (as I did), use the more extensive on/off script from here:
http://eee-ubuntu-support.googlecode.co … -on-off.sh
Offline
i am still unable to get these scripts working for toggle on off wifi..................
the closest i got was permission denied once
and then i went into permissions and allowed what i could
when retyping the same command, i just got a blank response...........
Offline
Thanks for this solution! It works fine with my german eeePC 4G running eeeXubuntu r3.
I am using a modified version of the extended script shown above. I had to modify the order of unloading modules because they depend on each other and can only be unloaded in a certain order.
The complete solution was put to the wiki.
Offline
Thank you! This works great!
I really start to love this community ![]()
Offline
Thank you for the great solution! Now I finally got (on my keymap, the keys were 90 and 91 instead of 10 and 11, but I used the tail -f /var/log/acpid to get the right keys).
One question for anyone: There is an OSD python script /etc/events/notify-wifi.py (I think I got it from the scriptpack?) that takes the syntax on or off and generates an OSD in the lower right corner indicating the change in Wifi status. When I run it from the command line, it generates the appropriate OSD. If I add it to the ACPI script, it does nothing. Any insight as to why that might be?
Offline
knox wrote:
Thanks for this solution! It works fine with my german eeePC 4G running eeeXubuntu r3.
I am using a modified version of the extended script shown above. I had to modify the order of unloading modules because they depend on each other and can only be unloaded in a certain order.
The complete solution was put to the wiki.
Using this solution (but changing the hotkeys to 90/91 to match the output I got from /var/log/acpid), I've got it turning the wifi (well, the blue light, but I'm going to assume it's not just lying) on and off quite the thing, but once it's turned off it never shows up in the system again - no ath0/wifi0 interface showing in /dev, so the network manager doesn't see that I have wireless, and I can't connect.
Even doing 'sudo modprobe ath_pci' doesn't bring it back.
I'm using the patched kernel and madwifi drivers from http://forum.eeeuser.com/viewtopic.php?id=6585, if that makes any difference.
Anyone got any ideas, or places to look for tips?
Offline
wibbble wrote:
once it's turned off it never shows up in the system again - no ath0/wifi0 interface showing in /dev ...
Even doing 'sudo modprobe ath_pci' doesn't bring it back.
You didn't look at the solution in the wiki - you have to un- and reload the pcieh (pci express hotplug) module as well and it will work.
Offline
knox wrote:
wibbble wrote:
once it's turned off it never shows up in the system again - no ath0/wifi0 interface showing in /dev ...
Even doing 'sudo modprobe ath_pci' doesn't bring it back.You didn't look at the solution in the wiki - you have to un- and reload the pcieh (pci express hotplug) module as well and it will work.
Yes, I did look at the solution in the wiki - and I used the script from the wiki without changes, and that includes the pciehp module part.
Offline
sudo cp /etc/xmodmaprc /home/(user)/.xmodmaprc
sudo reboot
Afterwards, notify-wifi.py work.
Last edited by kazuki (2008-02-01 7:02:47 am)
Offline
EDIT: Kazuki, I checked out the xmodmaprc file... I think I miscommunicated my problem. The function key itself works for me -- it turns the wifi on and off. The notify-wifi.py script also works for me if I manually run it from the command line. What does not work is putting the notify-wifi.py script call in the eee-wifi-on-off.sh script. It seems to just not trigger an OSD if it's called inside the script. That's what I don't understand. Could it have something to do with the scripting language of the eee-wifi script? I'd like to use that python script as a template to make other OSDs.
Actually, in the acpid log, I get this warning:
/var/lib/python-support/python2.5/gtk-2.0/gtk/__init__.py:72: GtkWarning: could not open display warnings.warn(str(e), _gtk.Warning) libnotify-Message: Unable to get session bus: dbus-launch failed to autolaunch D-Bus session: Autolaunch error: X11 initialization failed.
Last edited by mkrishnan (2008-02-01 12:09:18 pm)
Offline
As an update to this, I'm pretty sure that the problem is specifically that notify-wifi.py is being run at the superuser level by the acpi system. When I do ./notify-wifi.py on from the terminal, it works fine. If I do sudo ./notify-wifi.py on, I get the error message I posted above and no OSD.
But I don't know how to proceed from there. Is there an alternate way to call the script that will cause it to have access to the display?
Offline
ok so Ive followed this tutorial on how to make the fn button works (the easy way, method 1)
http://wiki.eeeuser.com/ubuntu:eeexubuntu:customization
and I also installed the osd script pack. But somehow I still cant toggle the wifi on and of with fn-f2
I tried the
# sudo bash
# tail -f /var/log/acpid
and its showing this :
[Sun May 11 19:42:36 2008] notifying client 4610[108:117]
[Sun May 11 19:42:36 2008] notifying client 6831[0:0]
[Sun May 11 19:42:36 2008] notifying client 6913[1000:1000]
[Sun May 11 19:42:36 2008] completed event "hotkey ATKD 00000011 00000026"
[Sun May 11 19:42:41 2008] received event "hotkey ATKD 00000011 00000027"
[Sun May 11 19:42:41 2008] notifying client 4610[108:117]
[Sun May 11 19:42:41 2008] notifying client 6831[0:0]
[Sun May 11 19:42:41 2008] notifying client 6913[1000:1000]
[Sun May 11 19:42:41 2008] completed event "hotkey ATKD 00000011 00000027"
and the on off script that I have from that method 1 is alread using hotkey ATKD 00000010 and 11
can someone tell me what I should do to make the wifi toggle work again. Thanks !!
-linux noob-
Offline
Should these scripts also work for the 901 on Kubuntu? I am having wireless woes as well, but I don't seem to find any mention of the ra0 module built into my kernel or if this works on the eeepc901. Thanks.
Offline