Jump to content


Ubuntu Fn Keys Operational How To


31 replies to this topic

#1 Longhorn Engineer

    Advanced Member

  • Members
  • PipPipPip
  • 60 posts
  • LocationAustin, Tx

Posted 28 November 2007 - 02:03 PM

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

http://forum.eeeuser...pic.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.

cd /etc/acpi/
Edit the volume up script
sudo gedit volupbtn.sh
replace the contents with
#!/bin/bash

action= amixer set Front 3.20dB+ unmute
Edit the volume down script
sudo gedit voldownbtn.sh
replace the contents with
#!/bin/bash

action= amixer set Front 3.20dB+ unmute
Edit the mute script
sudo gedit mutebtn.sh
replace the contents with
#!/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
sudo rm asus-brn-down.sh
sudo rm asus-brn-up.sh
Now we need something to read the Fn keys

Type

cd events
Edit the Volume down file
sudo gedit asus-volume-down
replace the contents with
event=hotkey ATKD 00000014
action=/etc/acpi/voldownbtn.sh
Edit the Volume up file
sudo gedit asus-volume-up
replace the contents with
event=hotkey ATKD 00000015
action=/etc/acpi/volupbtn.sh
Edit the mute file
sudo gedit asus-volume-mute
replace the contents with
event=hotkey ATKD 00000013
action=/etc/acpi/mutebtn.sh
Now to have asus_acpi start up on boot

 sudo gedit /etc/modules
add the following after the last comment

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.

Edited by Longhorn Engineer, 28 November 2007 - 02:24 PM.


#2 Shades

    Advanced Member

  • Members
  • PipPipPip
  • 43 posts

Posted 28 November 2007 - 05:37 PM

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?

#3 Longhorn Engineer

    Advanced Member

  • Members
  • PipPipPip
  • 60 posts
  • LocationAustin, Tx

Posted 28 November 2007 - 10:49 PM

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?

#4 gh3

    Advanced Member

  • Members
  • PipPipPip
  • 82 posts
  • Locationitaly

Posted 30 November 2007 - 03:12 PM

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

#5 Longhorn Engineer

    Advanced Member

  • Members
  • PipPipPip
  • 60 posts
  • LocationAustin, Tx

Posted 30 November 2007 - 11:14 PM

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.

#6 Shades

    Advanced Member

  • Members
  • PipPipPip
  • 43 posts

Posted 30 November 2007 - 11:43 PM

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

#7 mobad

    Advanced Member

  • Members
  • PipPipPip
  • 47 posts

Posted 01 December 2007 - 12:38 AM

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

#8 benob

    Advanced Member

  • Members
  • PipPipPip
  • 45 posts

Posted 01 December 2007 - 12:48 AM

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.

#9 Longhorn Engineer

    Advanced Member

  • Members
  • PipPipPip
  • 60 posts
  • LocationAustin, Tx

Posted 01 December 2007 - 01:04 AM

where did you get the driver from?

#10 samiux

    New member

  • Members
  • 6 posts
  • LocationHong Kong

Posted 01 December 2007 - 03:20 AM

Hi Longhorn Engineer,

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

Samiux

#11 mobad

    Advanced Member

  • Members
  • PipPipPip
  • 47 posts

Posted 01 December 2007 - 04:10 AM

Quote

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.

Edited by mobad, 01 December 2007 - 04:10 AM.


#12 Greenie

    Advanced Member

  • Members
  • PipPipPip
  • 50 posts
  • LocationUK

Posted 01 December 2007 - 10:49 PM

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

http://snapshots.mad...20071018.tar.gz
http://madwifi.org/a...atch?format=raw

originally from here: http://madwifi.org/t...192#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 :)

Edited by Greenie, 01 December 2007 - 11:38 PM.

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

#13 SuperDad

    Member

  • Members
  • 23 posts

Posted 02 December 2007 - 12:32 AM

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

#14 Greenie

    Advanced Member

  • Members
  • PipPipPip
  • 50 posts
  • LocationUK

Posted 02 December 2007 - 12:39 AM

Quote

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 /

#15 SmallFootprint

    Senior Member

  • Members
  • 102 posts

Posted 02 December 2007 - 01:43 AM

Quote

Edit the volume down script
sudo gedit voldownbtn.sh
replace the contents with
#!/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
sudo gedit mutebtn.sh
replace the contents with
#!/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

cd events
Edit the Volume down file
sudo gedit asus-volume-down
replace the contents with
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...

Edited by SmallFootprint, 02 December 2007 - 01:51 AM.


#16 samiux

    New member

  • Members
  • 6 posts
  • LocationHong Kong

Posted 02 December 2007 - 02:00 AM

Hi Longhorn Engineer,

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

Samiux

#17 samiux

    New member

  • Members
  • 6 posts
  • LocationHong Kong

Posted 02 December 2007 - 02:05 AM

Hi Longhorn Engineer,

The wireless driver is here :

http://wiki.eeeuser....madwifi_drivers

Samiux

#18 mobad

    Advanced Member

  • Members
  • PipPipPip
  • 47 posts

Posted 02 December 2007 - 02:23 AM

Can anyone post updated scripts? That would be great.

#19 Longhorn Engineer

    Advanced Member

  • Members
  • PipPipPip
  • 60 posts
  • LocationAustin, Tx

Posted 02 December 2007 - 02:29 AM

Quote

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.

Edited by Longhorn Engineer, 02 December 2007 - 02:48 AM.


#20 SuperDad

    Member

  • Members
  • 23 posts

Posted 02 December 2007 - 03:04 AM

Quote

Edit the volume down script
sudo gedit voldownbtn.sh
replace the contents with
#!/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.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users