Page 1 of 1

Gutsy x61 bluetooth button

Posted: Sat Jan 05, 2008 3:04 pm
by aliencam
Hi, I'm using ubuntu gutsy x64 and the fn-f5 key has worked to activate/deactivate wifi and bluetooth (not very easily, it seems the first time i press it it turns on both, then it turns off wifi, then turns off bluetooth, then turns on wifi, but sometimes it is different it would be nice if i could find an actual writeup of what order it goes in)

anyway, it just stopped working out of nowhere (i don't remember doing anything to break it, or the exact time that it stopped) the fn-f3 button to show battery info still works, and brightness and volume (not mute) work fine, and the thinklight button doesn't do anything (not surprising since the x61t doesn't have a thinklight) and lock (fn-f2) works fine. (i don't want to try sleep right now because i'll loose this post if it crashes on wakeup)

thinkwiki (http://www.thinkwiki.org/wiki/Thinkpad-acpi) says to try

Code: Select all

echo enable,0xffffffff >/proc/acpi/ibm/hotkey
but here is what happens to me:

Code: Select all

cameron@camubuntux61tab:~$ uname -a
Linux camubuntux61tab 2.6.22-14-generic #1 SMP Tue Dec 18 05:28:27 UTC 2007 x86_64 GNU/Linux
cameron@camubuntux61tab:~$ sudo modprobe thinkpad-acpi
Password or swipe finger: 
cameron@camubuntux61tab:~$ sudo echo enable,0xffffffff >/proc/acpi/ibm/hotkey
bash: /proc/acpi/ibm/hotkey: Permission denied
cameron@camubuntux61tab:~$ sudo modprobe ibm-acpi
cameron@camubuntux61tab:~$ sudo echo enable,0xffffffff >/proc/acpi/ibm/hotkey
bash: /proc/acpi/ibm/hotkey: Permission denied
cameron@camubuntux61tab:~$ 

i'm not so worried about the hotkeys as I am about just being able to turn on and off bluetooth and wifi (i'm really concerned about power usage, so I can't leave on bluetooth all the time, so if theres any way to turn on and off bluetooth, then please tell me.

Posted: Sat Jan 05, 2008 3:32 pm
by aaa
Redirected output is not privileged. So while echo gets run as root, the shell (which is not running as root) is the one who attempts to access the file.

Off the top of my head, try this:
echo enable,0xffffffff | sudo tee /proc/acpi/ibm/hotkey

Posted: Sat Jan 05, 2008 7:08 pm
by aliencam
amazing, worked perfectly.

Code: Select all

cameron@camubuntux61tab:~$ echo enable,0xffffffff | sudo tee /proc/acpi/ibm/hotkey
[sudo] password for cameron:
enable,0xffffffff
cameron@camubuntux61tab:~$ 
thank you.


now the thinkwiki says
To make this permanent, add the following line to /etc/modprobe.d/thinkpad_acpi:

options thinkpad_acpi hotkey=enable,0xfffftffff experimental=1
but my ~/thinkpad_acpi file does not exist yet... how would I make this permanant??

Posted: Sat Jan 05, 2008 8:45 pm
by aaa
It has to be the file in the /etc folder. For some reason mine is named /etc/modprobe.d/thinkpad_acpi.modprobe .

Posted: Tue Jan 08, 2008 12:26 am
by aliencam
actually as soon as I ran that command you gave me it works automatically on restart, without adding anything to the thinkpad_acpi file...

Posted: Thu Jan 10, 2008 10:32 am
by dickeywang
aliencam wrote:actually as soon as I ran that command you gave me it works automatically on restart, without adding anything to the thinkpad_acpi file...
try either "sudo -i" or "sudo su" first.

Posted: Thu Jan 10, 2008 1:15 pm
by aliencam
dickeywang wrote: try either "sudo -i" or "sudo su" first.
regular sudo worked fine, didn't need to be logged in as super user.

and why? is it improper conventions to only pass sudo on the second command? echo doesn't really need to be super user from what i understand.

i try to login as the super user as little as possible, sudo is good enough for most commands (in ubuntu/debian)