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 2007-11-28 9:03:23 am

Longhorn Engineer
Member
From: Austin, Tx
Registered: 2007-11-12
Posts: 60
Website

Ubuntu Fn Keys Operational How To

To get your Fn Keys working first install the asus_acpi via this link (thanks quagga!)

http://forum.eeeuser.com/viewtopic.php?id=3413

Open up your service manager (System>Administration>Services) and make sure both Power Management options are filled (acpid and acmd).

In terminal type the following to stick you in the right directory to edit the scripts the Fn keys will call.

Code:

cd /etc/acpi/

Edit the volume up script

Code:

sudo gedit volupbtn.sh

replace the contents with

Code:

#!/bin/bash

action= amixer set Front 3.20dB+ unmute

Edit the volume down script

Code:

sudo gedit voldownbtn.sh

replace the contents with

Code:

#!/bin/bash

action= amixer set Front 3.20dB+ unmute

Edit the mute script

Code:

sudo gedit mutebtn.sh

replace the contents with

Code:

#!/bin/bash

action= amixer set Front toggle

Then delete some files to prevent conflicits. These two files where messing up all the FN keys into thinking that they where brightness keys

Code:

sudo rm asus-brn-down.sh
sudo rm asus-brn-up.sh

Now we need something to read the Fn keys

Type

Code:

cd events

Edit the Volume down file

Code:

sudo gedit asus-volume-down

replace the contents with

Code:

event=hotkey ATKD 00000014
action=/etc/acpi/voldownbtn.sh

Edit the Volume up file

Code:

sudo gedit asus-volume-up

replace the contents with

Code:

event=hotkey ATKD 00000015
action=/etc/acpi/volupbtn.sh

Edit the mute file

Code:

sudo gedit asus-volume-mute

replace the contents with

Code:

event=hotkey ATKD 00000013
action=/etc/acpi/mutebtn.sh

Now to have asus_acpi start up on boot

Code:

 sudo gedit /etc/modules

add the following after the last comment

Code:

asus_acpi

Restart your EEE and see if it worked! What doesn't work is wireless on/off, F5 thing, and F6 thing.

I am close to the wireless but I need some of the files from the original OS (/etc/acpi/wlan.sh) to make it work I think. I someone can email me that file I can hopefully get it to work.

The F6 key is event 00000012. F5 jey is event 00000030, 00000031, 00000032. F2 is event 00000010.

edit// I should mention that F1 and the brightness keys still work and are functional after this. The only Fn keys that don't work are F2,F5,F6. Will a little bit of hunting the script for the F5 should be found and the script for the wireless shuold be easy. I couldn't get F6 to work because I tried to get the script to run gnome-session-manager and for some reason the key function wouldn't work even tho the script worked.

Last edited by Longhorn Engineer (2007-11-28 9:24:57 am)

Offline

 

#2 2007-11-28 12:37:56 pm

Shades
Member
Registered: 2007-11-08
Posts: 43

Re: Ubuntu Fn Keys Operational How To

My F5 only reports 30, not 31 and 32. It would be easier to create the xrandr scripts if it actually reported different acpi codes. I wonder if I have done anything wrong?

Offline

 

#3 2007-11-28 5:49:40 pm

Longhorn Engineer
Member
From: Austin, Tx
Registered: 2007-11-12
Posts: 60
Website

Re: Ubuntu Fn Keys Operational How To

Well the 31 and 32 events are taken from the hotkey.sh files on the original OS. I betcha if you took the files from /etc/acpi and etc/acpi/events on the original OS you could get all the scripts working. Are these files located somewhere on the install CD or do I have to install the OS to get the files?

Offline

 

#4 2007-11-30 10:12:05 am

gh3
Member
From: italy
Registered: 2007-11-11
Posts: 82
Website

Re: Ubuntu Fn Keys Operational How To

i tried to have get F5 working looking at this http://forum.eeeuser.com/viewtopic.php?id=2770 but no way... any advice on how to get it working?

Offline

 

#5 2007-11-30 6:14:05 pm

Longhorn Engineer
Member
From: Austin, Tx
Registered: 2007-11-12
Posts: 60
Website

Re: Ubuntu Fn Keys Operational How To

OK update time

I have working

F1 Sleeps
F3-F4 Brightness
F5 changes video output (swaps between LCD External LCD/External)
F6 opens gnome-system-monitor
F7-F9 volume
Closing the Lid puts it into sleep mode
Hitting the power button brings up the shutdown choices

Only thing that doesn't work 100% is the dam wireless on/off

I know how it turns off but getting it working after turning it back on is troublesome.

Offline

 

#6 2007-11-30 6:43:50 pm

Shades
Member
Registered: 2007-11-08
Posts: 43

Re: Ubuntu Fn Keys Operational How To

Nice! I hope you will let us know how you did it when it's all done.

Offline

 

#7 2007-11-30 7:38:16 pm

mobad
Member
Registered: 2007-11-01
Posts: 47

Re: Ubuntu Fn Keys Operational How To

I found this http://forum.eeeuser.com/viewtopic.php?id=2890 a while ago, I haven't tried it but I hope this will fix the wireless issues.

Offline

 

#8 2007-11-30 7:48:09 pm

benob
Member
Registered: 2007-11-29
Posts: 45

Re: Ubuntu Fn Keys Operational How To

I used scripts from http://cliffhacks.blogspot.com/ along with the binary drivers (no ndiswrapper). it supports wifi on/off and suspend. for the hotkeys, I literally copied the xandros file to my ubuntu and it works great.

Offline

 

#9 2007-11-30 8:04:41 pm

Longhorn Engineer
Member
From: Austin, Tx
Registered: 2007-11-12
Posts: 60
Website

Re: Ubuntu Fn Keys Operational How To

where did you get the driver from?

Offline

 

#10 2007-11-30 10:20:13 pm

samiux
New member
From: Hong Kong
Registered: 2007-11-30
Posts: 6
Website

Re: Ubuntu Fn Keys Operational How To

Hi Longhorn Engineer,

You can get the source code of the wireless driver at ftp://ftp.asus.com/pub/ASUS/EeePC/701

Samiux

Offline

 

#11 2007-11-30 11:10:06 pm

mobad
Member
Registered: 2007-11-01
Posts: 47

Re: Ubuntu Fn Keys Operational How To

samiux wrote:

Hi Longhorn Engineer,

You can get the source code of the wireless driver at ftp://ftp.asus.com/pub/ASUS/EeePC/701

Samiux

...No you can't, at least not that I can see.  There is the LAN driver and the modem driver and unless you mean the kernel than it's not there.  If it exists, a link would be greatly appreciated.

Last edited by mobad (2007-11-30 11:10:35 pm)

Offline

 

#12 2007-12-01 5:49:53 pm

Greenie
Member
From: UK
Registered: 2007-12-01
Posts: 50

Re: Ubuntu Fn Keys Operational How To

the driver works using this version of madwifi with a patch (all from the eeeuser ubuntu wiki)

http://snapshots.madwifi.org/madwifi-ng … 018.tar.gz
http://madwifi.org/attachment/ticket/16 … format=raw

originally from here: http://madwifi.org/ticket/1192#comment:186

EDIT:

Longhorn Engineer: This driver seems to work fine coming back after suspend, so this should work awesomely with your acpi shortcut button howto, which when i get five minutes i will sort out for my eee smile

Last edited by Greenie (2007-12-01 6:38:26 pm)


/ Black Eee 901 (Ubuntu 9.10/Moblin V2) / 2GB RAM /

Offline

 

#13 2007-12-01 7:32:07 pm

SuperDad
Member
Registered: 2007-11-15
Posts: 23

Re: Ubuntu Fn Keys Operational How To

I updated all the scripts, with mixed results.

Volume down (f9) works, but volume up (f8) doesn't do anything.  Mute (f7) will mute the volume if it's on, but it won't turn it back on if it's already muted.

F1 Sleep and f11 NumLock, both seem to work.

What kind of mistakes can I look for?

I'm not entirely sure that I properly installed the acpi module from Quagga's instructions.  Is there a way that I can check that?

Thanks

Offline

 

#14 2007-12-01 7:39:52 pm

Greenie
Member
From: UK
Registered: 2007-12-01
Posts: 50

Re: Ubuntu Fn Keys Operational How To

SuperDad wrote:

I updated all the scripts, with mixed results.

Volume down (f9) works, but volume up (f8) doesn't do anything.  Mute (f7) will mute the volume if it's on, but it won't turn it back on if it's already muted.

F1 Sleep and f11 NumLock, both seem to work.

What kind of mistakes can I look for?

I'm not entirely sure that I properly installed the acpi module from Quagga's instructions.  Is there a way that I can check that?

Thanks

if the asus_acpi.ko file compiled correctly, and was copied over the previous asus_acpi.ko, then it will be working.

its most probably a mistype or spelling mistake in the files you edited, when i did it, everything worked except volume down until i re-copied the text from the tutorial in.. i spent ages looking at the file wondering what was wrong.


/ Black Eee 901 (Ubuntu 9.10/Moblin V2) / 2GB RAM /

Offline

 

#15 2007-12-01 8:43:32 pm

SmallFootprint
Senior Member
Registered: 2007-09-17
Posts: 102

Re: Ubuntu Fn Keys Operational How To

Longhorn Engineer wrote:

Edit the volume down script

Code:

sudo gedit voldownbtn.sh

replace the contents with

Code:

#!/bin/bash

action= amixer set Front 3.20dB+ unmute

SHOULD BE "3.20dB-" i.e. sound to go down by 3.2 dB.

Edit the mute script

Code:

sudo gedit mutebtn.sh

replace the contents with

Code:

#!/bin/bash

action= amixer set Front toggle

I have set this, and can monitor the changes that occur to the mixer using "alsamixergui" and can see that it does
indeed toggle the Front channel, but it does not toggle the actual sound being played, e.g. an mp3 file played with Totom; odd.  Toggling the "Headset" option toggles the headset sound o.k.

Now we need something to read the Fn keys

Type

Code:

cd events

Edit the Volume down file

Code:

sudo gedit asus-volume-down

replace the contents with

Code:

event=hotkey ATKD 00000014
action=/etc/acpi/voldownbtn.sh

F5 key is event 00000030, 00000031, 00000032.

Will a little bit of hunting the script for the F5 should be found ....

Well, one script would be "xrandr --output VGA --right-of LVDS --mode 1024x768".   Or just "xrandr --auto" should work to toggle between vga out and LCD as one plugged/unplugged VGA.  Is this a matter of just editing "/etc/acpi/events/videobtn" and "/etc/acpi/videobtn.sh"to give it the right event number?  What does it mean to have three event numbers?  Does it cycle between them (LCD, VGA, LCD&VGA?)?

And I see one can see the events using "cat /var/log/acpid"!  That's useful...

Last edited by SmallFootprint (2007-12-01 8:51:32 pm)

Offline

 

#16 2007-12-01 9:00:49 pm

samiux
New member
From: Hong Kong
Registered: 2007-11-30
Posts: 6
Website

Re: Ubuntu Fn Keys Operational How To

Hi Longhorn Engineer,

Please post your hard work here, thanks.  I am waiting for it for a long time.

Samiux

Offline

 

#17 2007-12-01 9:05:36 pm

samiux
New member
From: Hong Kong
Registered: 2007-11-30
Posts: 6
Website

Re: Ubuntu Fn Keys Operational How To

Hi Longhorn Engineer,

The wireless driver is here :

http://wiki.eeeuser.com/ubuntu#wireless … fi_drivers

Samiux

Offline

 

#18 2007-12-01 9:23:27 pm

mobad
Member
Registered: 2007-11-01
Posts: 47

Re: Ubuntu Fn Keys Operational How To

Can anyone post updated scripts?  That would be great.

Offline

 

#19 2007-12-01 9:29:01 pm

Longhorn Engineer
Member
From: Austin, Tx
Registered: 2007-11-12
Posts: 60
Website

Re: Ubuntu Fn Keys Operational How To

mobad wrote:

Can anyone post updated scripts?  That would be great.

I will once I am 100% certain they are working.

I will post the entire files so all you will have to do is drop them in and they *should* work if you have everything installed correctly.

Wifi button is still sketchy but it is working about 90% of the time.

Update on Wifi!

Ok I figured out that it only doesn't work on the first turn on of the wifi

That is if you do

Off-On it doesn't work but if you do

Off-On-Off-On it does work...How strange.. so I just modified the script and had it run the "on" function twice in a row and it worked. I am going to have to go through and see what really is the problem.

Last edited by Longhorn Engineer (2007-12-01 9:48:22 pm)

Offline

 

#20 2007-12-01 10:04:11 pm

SuperDad
Member
Registered: 2007-11-15
Posts: 23

Re: Ubuntu Fn Keys Operational How To

SmallFootprint wrote:

Edit the volume down script

Code:

sudo gedit voldownbtn.sh

replace the contents with

Code:

#!/bin/bash

action= amixer set Front 3.20dB+ unmute

SHOULD BE "3.20dB-" i.e. sound to go down by 3.2 dB.

..

Sweet, thanks dude, that worked for me.

So if the volume up, volume down and sleep keys are working, can I assume I correctly made and copied the asus_acip.ko?

I appreciate all the help given here.

Offline

 

#21 2007-12-01 10:36:10 pm

Longhorn Engineer
Member
From: Austin, Tx
Registered: 2007-11-12
Posts: 60
Website

Re: Ubuntu Fn Keys Operational How To

SuperDad in a day or so I will make a sleek how to on how to get the hotkeys up in running on the EEE. Just have to do some more testing before I release the scripts.

Offline

 

#22 2007-12-01 10:52:17 pm

SmallFootprint
Senior Member
Registered: 2007-09-17
Posts: 102

Re: Ubuntu Fn Keys Operational How To

So one way, at least to get video out with the hot key:

(1) edit /etc/acpi/events/videobtn to read

Code:

event=hotkey ATKD 00000030
action=/etc/acpi/videobtn.sh

(2) edit /etc/acpi/videobtn.sh to read

Code:

#!/bin/sh

action= xrandr -display :0.0 --output VGA --right-of LVDS --mode 1024x768

Then either reboot or restart the /etc/init.d/acpid daemon (learned that one the hardway).  This turns on my VGA out.

It would be nicer to have it toggle VGA-out on/VGA-out off....  Perhaps a fancy script of some kind?

In my case, I like this key because I can use it right before giving a presentation, rather than fumble with some line command.  And in this case, what happens after the presentation is not so critical; I can turn VGA-out off by hand.  But it would be nice to have a toggle...

Offline

 

#23 2007-12-01 11:26:59 pm

Longhorn Engineer
Member
From: Austin, Tx
Registered: 2007-11-12
Posts: 60
Website

Re: Ubuntu Fn Keys Operational How To

smallfootprint

my scripts toggle the video to LCD, VGA/LCD, VGA

They default to 800x600 on VGA but you can change it by going to the display settings and change the resolution there.

Offline

 

#24 2007-12-02 10:02:07 am

gh3
Member
From: italy
Registered: 2007-11-11
Posts: 82
Website

Re: Ubuntu Fn Keys Operational How To

Longhorn Engineer wrote:

OK update time

I have working

F1 Sleeps
F3-F4 Brightness
F5 changes video output (swaps between LCD External LCD/External)
F6 opens gnome-system-monitor
F7-F9 volume
Closing the Lid puts it into sleep mode
Hitting the power button brings up the shutdown choices

Only thing that doesn't work 100% is the dam wireless on/off

I know how it turns off but getting it working after turning it back on is troublesome.

can you post here or in wiki how to get these things working?

Offline

 

#25 2007-12-02 2:42:28 pm

Longhorn Engineer
Member
From: Austin, Tx
Registered: 2007-11-12
Posts: 60
Website

Re: Ubuntu Fn Keys Operational How To

I will once I get it all done. Right now my wifi script is working but its kinda hack and slash. Also F6 is causing problems because gnome-system-monitor only wants to open once per session by the way I am calling it.

Offline

 

Board footer

Powered by PunBB 1.2.15
© Copyright 2002–2005 Rickard Andersson