You are not logged in.
I never use bluetooth on my laptop, but every time I boot arch the radio and light are both on. I tried unloading the bluetooth module, using bluez and other tools to shut off bluetooth, etc., but that radio just stays on. After searching the web for a while, I finally found the solution: cut off power to the device. I can do that with this command:
echo "0" > /sys/devices/platform/sony-laptop/bluetoothpower
And turn it back on by changing "0" to "255". The only problem is, I can't run this as a normal user, and I can't even run it with sudo! Here is the output:
$ echo "0" > /sys/devices/platform/sony-laptop/bluetoothpower
zsh: permission denied: /sys/devices/platform/sony-laptop/bluetoothpower
$ sudo echo "0" > /sys/devices/platform/sony-laptop/bluetoothpower
zsh: permission denied: /sys/devices/platform/sony-laptop/bluetoothpower
(I'm using zsh but this also happens with bash)
However, I can su to root and run this command successfully
$ su
Password:
# echo "0" > /sys/devices/platform/sony-laptop/bluetoothpower
And off goes the light. I would like to somehow turn off bluetooth at boot, but I don't know how to have Arch run a command as the root user at boot after loading the modules (to ensure the bluetooth radio is not started up again). It seems that bluetoothpower is created at each boot, because I tried changing the permissions to read & write for all, then adding the command to my .xinitrc. This worked, but only during that session. After rebooting I had the same problem.
Help?
Last edited by Allamgir (2009-07-29 13:44:40)
дɭɭɑӎɠїɾ
Offline
Put it in /etc/rc.local
Last edited by stray (2009-07-28 23:17:15)
Offline
You have to do funny things to get sudo to work with redirection. What they are precisely, I cannot recall. However a sudo -s would achieve the same thing. Also, a script. But as stray said, putting it in rc.local is probably your best bet.
Offline
Hooray! it works! I can now save power by not using bluetooth!
Unfortunately, the bluetooth radio still comes on after suspending and resuming. How can I have this command run as root immediately after resuming from suspend to RAM? I use pm-utils.
дɭɭɑӎɠїɾ
Offline
Check the pm-utils wiki page. It's pretty comprehensive.
Offline
with sudo try:
sudo 'echo "0" > /sys/devices/platform/sony-laptop/bluetoothpower'
Offline
Yes! Yet again the wiki has saved me! I followed this part: http://wiki.archlinux.org/index.php/Pm- … _own_hooks
I just set it to turn off bluetooth upon resume, and it works! yay!
Thanks everyone!
дɭɭɑӎɠїɾ
Offline