Blog Forum Wiki Links Contact Us NetbookUser
RunCore Pro IV SSD Transforms your ASUS EEE PC by increasing 
performance 5-40X. Your satistfaction guaranteed RunCore Pro 70mm SATA Mini PCI-e SSD
RunCore Pro IV 70mm SATA II Mini PCI-e SSD
RunCore Pro IV 2.5 Inch SATA II SSD

You are not logged in.

#1 2008-01-07 4:31:30 pm

tristan
Member
From: Brisbane, Australia
Registered: 2007-12-05
Posts: 99

Xubuntu: Fn-F2 not working

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

Code:

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

 

#2 2008-01-09 6:03:38 am

arturaz
New member
From: Lithuania
Registered: 2008-01-09
Posts: 6
Website

Re: Xubuntu: Fn-F2 not working

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:

Code:

#FILE: /etc/acpi/events/eee-wifi-on
event=hotkey ATKD 00000010
action=/sbin/eee-wifi-on-off.sh on

Code:

#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):

Code:

#!/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

 

#3 2008-01-09 7:08:46 am

tristan
Member
From: Brisbane, Australia
Registered: 2007-12-05
Posts: 99

Re: Xubuntu: Fn-F2 not working

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

 

#4 2008-01-09 8:00:33 am

arturaz
New member
From: Lithuania
Registered: 2008-01-09
Posts: 6
Website

Re: Xubuntu: Fn-F2 not working

btw, you can hook any button using this technique smile

Offline

 

#5 2008-01-09 2:40:28 pm

threedaymonk
Member
From: London
Registered: 2007-12-28
Posts: 35
Website

Re: Xubuntu: Fn-F2 not working

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

 

#6 2008-01-11 4:36:32 am

fistikal
Member
Registered: 2007-11-27
Posts: 17

Re: Xubuntu: Fn-F2 not working

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

 

#7 2008-01-11 4:54:48 am

arturaz
New member
From: Lithuania
Registered: 2008-01-09
Posts: 6
Website

Re: Xubuntu: Fn-F2 not working

What command, what permissions? Details please

Offline

 

#8 2008-01-28 8:18:18 am

knox
Member
Registered: 2008-01-28
Posts: 44

Re: Xubuntu: Fn-F2 not working

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

 

#9 2008-01-28 1:46:45 pm

MarkusL
New member
Registered: 2008-01-28
Posts: 5

Re: Xubuntu: Fn-F2 not working

Thank you! This works great!

I really start to love this community wink

Offline

 

#10 2008-01-28 4:55:25 pm

mkrishnan
Moderator
From: Chicago, IL, USA
Registered: 2007-11-06
Posts: 3433

Re: Xubuntu: Fn-F2 not working

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?


Mohan

Offline

 

#11 2008-01-29 6:10:21 pm

wibbble
New member
Registered: 2007-11-06
Posts: 5

Re: Xubuntu: Fn-F2 not working

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

 

#12 2008-01-30 9:45:55 am

knox
Member
Registered: 2008-01-28
Posts: 44

Re: Xubuntu: Fn-F2 not working

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

 

#13 2008-01-30 10:06:14 am

wibbble
New member
Registered: 2007-11-06
Posts: 5

Re: Xubuntu: Fn-F2 not working

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

 

#14 2008-02-01 6:44:37 am

kazuki
New member
Registered: 2008-02-01
Posts: 1

Re: Xubuntu: Fn-F2 not working

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

 

#15 2008-02-01 8:48:47 am

mkrishnan
Moderator
From: Chicago, IL, USA
Registered: 2007-11-06
Posts: 3433

Re: Xubuntu: Fn-F2 not working

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:

Code:

/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)


Mohan

Offline

 

#16 2008-02-03 3:15:31 pm

mkrishnan
Moderator
From: Chicago, IL, USA
Registered: 2007-11-06
Posts: 3433

Re: Xubuntu: Fn-F2 not working

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?


Mohan

Offline

 

#17 2008-05-11 1:45:09 pm

keju
Member
Registered: 2008-01-22
Posts: 10

Re: Xubuntu: Fn-F2 not working

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

 

#18 2008-08-19 9:02:44 pm

CodeHead
New member
Registered: 2008-08-13
Posts: 9

Re: Xubuntu: Fn-F2 not working

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

 

Board footer

Powered by PunBB 1.2.15
© Copyright 2002–2005 Rickard Andersson