Fn+F5 stopped working with Bluetooth on Ubuntu

Solaris, RedHat, FreeBSD and the like
Post Reply
Message
Author
kebomix
Posts: 25
Joined: Sat Aug 09, 2008 1:14 pm
Location: Cairo , Egypt

Fn+F5 stopped working with Bluetooth on Ubuntu

#1 Post by kebomix » Tue Sep 30, 2008 7:17 am

hello , fn + f5 dont work on my ubuntu anymore
first Fn+F5 dont open only on ubuntu , but it work when i open my thinkpad on boot before it load ubuntu when i press fn+f5 it open bluetooth , but after it load ubuntu fn + f5 dont work anymore

lsusb

Code: Select all

ahmed@Ubuntu-pc:~$ lsusb
Bus 005 Device 001: ID 0000:0000  
Bus 004 Device 001: ID 0000:0000  
Bus 003 Device 001: ID 0000:0000  
Bus 002 Device 003: ID 1241:1166 Belkin optical mouse w/ scrollwheel
Bus 002 Device 001: ID 0000:0000  
Bus 001 Device 001: ID 0000:0000  


lspci

Code: Select all

root@Ubuntu-pc:/home/ahmed# lspci
00:00.0 Host bridge: Intel Corporation Mobile 915GM/PM/GMS/910GML Express Processor to DRAM Controller (rev 03)
00:02.0 VGA compatible controller: Intel Corporation Mobile 915GM/GMS/910GML Express Graphics Controller (rev 03)
00:02.1 Display controller: Intel Corporation Mobile 915GM/GMS/910GML Express Graphics Controller (rev 03)
00:1c.0 PCI bridge: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) PCI Express Port 1 (rev 03)
00:1c.2 PCI bridge: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) PCI Express Port 3 (rev 03)
00:1d.0 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #1 (rev 03)
00:1d.1 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #2 (rev 03)
00:1d.2 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #3 (rev 03)
00:1d.3 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #4 (rev 03)
00:1d.7 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB2 EHCI Controller (rev 03)
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev d3)
00:1e.2 Multimedia audio controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) AC'97 Audio Controller (rev 03)
00:1e.3 Modem: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) AC'97 Modem Controller (rev 03)
00:1f.0 ISA bridge: Intel Corporation 82801FBM (ICH6M) LPC Interface Bridge (rev 03)
00:1f.2 IDE interface: Intel Corporation 82801FBM (ICH6M) SATA Controller (rev 03)
00:1f.3 SMBus: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) SMBus Controller (rev 03)
02:00.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5751M Gigabit Ethernet PCI Express (rev 11)
04:00.0 CardBus bridge: Texas Instruments PCI4510 PC card Cardbus Controller (rev 03)
04:00.1 FireWire (IEEE 1394): Texas Instruments PCI4510 IEEE-1394 Controller (rev 01)
04:02.0 Network controller: Intel Corporation PRO/Wireless 2200BG Network Connection (rev 05)

dmesg | grep "Bluetooth"

Code: Select all

root@Ubuntu-pc:/home/ahmed# dmesg | grep "Bluetooth" 
[   65.954644] Bluetooth: Core ver 2.11
[   65.955458] Bluetooth: HCI device and connection manager initialized
[   65.955465] Bluetooth: HCI socket layer initialized
[   30.478705] Bluetooth: L2CAP ver 2.9
[   30.478709] Bluetooth: L2CAP socket layer initialized
[   30.527332] Bluetooth: RFCOMM socket layer initialized
[   30.527359] Bluetooth: RFCOMM TTY layer initialized
[   30.527362] Bluetooth: RFCOMM ver 1.8
and after press fn+f5

Code: Select all

root@Ubuntu-pc:/home/ahmed# dmesg | grep "Bluetooth" 
[   65.954644] Bluetooth: Core ver 2.11
[   65.955458] Bluetooth: HCI device and connection manager initialized
[   65.955465] Bluetooth: HCI socket layer initialized
[   30.478705] Bluetooth: L2CAP ver 2.9
[   30.478709] Bluetooth: L2CAP socket layer initialized
[   30.527332] Bluetooth: RFCOMM socket layer initialized
[   30.527359] Bluetooth: RFCOMM TTY layer initialized
[   30.527362] Bluetooth: RFCOMM ver 1.8
Free Programming Ebooks With Direct lInks
http://request-ebooks.blogspot.com/

poshgeordie
ThinkPadder
ThinkPadder
Posts: 1101
Joined: Sat Feb 09, 2008 6:19 pm
Location: Newcastle upon Tyne, UK
Contact:

#2 Post by poshgeordie » Tue Sep 30, 2008 12:49 pm

<EDIT> Starting again

The information you want should be here:

http://www.thinkwiki.org/wiki/How_to_setup_Bluetooth

and mentions the Fn-F5 button too.


If Bluetooth is disabled and you have Ibm-acpi running you could enable/disable bluetooth by entering:
#

Code: Select all

echo enable > /proc/acpi/ibm/bluetooth 
or
#

Code: Select all

echo disable > /proc/acpi/ibm/bluetooth 
You should also be able to toggle bluetooth with Fn+F5 keys.

------------------------
Can you try:

Code: Select all

echo enable > /proc/acpi/ibm/bluetooth 
Also the critical phrase there is

If IBM-acpi is running. If it's not it may explain why you're also getting the higher temps as in your other post.

I'll get back with checking how to make sure IBM-acpi is running

poshgeordie
ThinkPadder
ThinkPadder
Posts: 1101
Joined: Sat Feb 09, 2008 6:19 pm
Location: Newcastle upon Tyne, UK
Contact:

#3 Post by poshgeordie » Tue Sep 30, 2008 1:40 pm

Good old Lightweight to the rescue :D

In one of his other posts he lists the commands to show the state of ibm-acpi.

So could you post back the outputs of:

Code: Select all

lsmod |egrep "acpi|ibm|think"
and

Code: Select all

ls /proc/acpi 
Thanks Lightweight for that!

kebomix
Posts: 25
Joined: Sat Aug 09, 2008 1:14 pm
Location: Cairo , Egypt

#4 Post by kebomix » Tue Sep 30, 2008 7:49 pm

Code: Select all

echo enable > /proc/acpi/ibm/bluetooth 
echo disable > /proc/acpi/ibm/bluetooth 
thanks , those 2 commands works to open and close bluetooth .

lsmod |egrep "acpi|ibm|think"

Code: Select all

ahmed@Ubuntu-pc:~$ lsmod |egrep "acpi|ibm|think"
thinkpad_acpi          51836  0 
nvram                   9992  2 thinkpad_acpi
pata_acpi               8320  0 
libata                159344  4 ahci,ata_piix,ata_generic,pata_acpi
ls /proc/acpi

Code: Select all

ahmed@Ubuntu-pc:~$ ls /proc/acpi 
ac_adapter  button               event  ibm             processor     video
alarm       dsdt                 fadt   info            sleep         wakeup
battery     embedded_controller  fan    power_resource  thermal_zone
i wonder if lightweight know code change Fn+F5 to open wireless
then he should know how to turn it back to open bluetooth !!!

thx for help Nick
Free Programming Ebooks With Direct lInks
http://request-ebooks.blogspot.com/

poshgeordie
ThinkPadder
ThinkPadder
Posts: 1101
Joined: Sat Feb 09, 2008 6:19 pm
Location: Newcastle upon Tyne, UK
Contact:

#5 Post by poshgeordie » Wed Oct 01, 2008 3:58 am

Good that the commands switch bluetooth on & off.

I'm sure I found a post last night about enabling the Fn-F5 button & I'll have a look around tonight for the post. I'm fairly sure it was in Ubuntu forums if you want to have a look yourself - do an advanced search under 'bluetooth'.

In the meantime, you may be able to create two Desktop launchers - one to switch bt on, and the other to turn it off:

Accessing Desktop launcher:

Desktop - right mouse click > Create launcher.
New launcher window opens

-------------------------------------------------
Launcher for turning bluetooth on:

Type: select 'Application in Terminal'
Name: Bluetooth On (call this anything you want)
Command: copy the code below into this box:

Code: Select all

echo enable > /proc/acpi/ibm/bluetooth
Comment: leave blank.

At the top left handside of the window there's a spring like symbol. Click on this and select a suitable icon for your launcher (not necessary but makes it look better!).

-------------------------------------------------

Launcher for turning bluetooth off:

Type: select 'Application in Terminal'
Name: Bluetooth Off (call this anything you want)
Command: copy the code below into this box:

Code: Select all

echo disable > /proc/acpi/ibm/bluetooth
Comment: leave blank.

As above for a launcher icon.

---------------------------------------

When you click either icon there'll be a brief flash on the screen as the terminal opens to run the command, and hopefully bluetooth will be switched on or off.

Assuming this works, you only have a single mouse click rather than two fingers to operate the keyboard!

kebomix
Posts: 25
Joined: Sat Aug 09, 2008 1:14 pm
Location: Cairo , Egypt

#6 Post by kebomix » Wed Oct 01, 2008 5:49 pm

Type: select 'Application in Terminal'
Name: Bluetooth On (call this anything you want)
Command: copy the code below into this box:

Code:
echo enable > /proc/acpi/ibm/bluetooth
hello , i was doing this way on windows

and i tried it on ubuntu as u said , but dont know why it don work when i press on shortcut !!!?
Free Programming Ebooks With Direct lInks
http://request-ebooks.blogspot.com/

lightweight
Sophomore Member
Posts: 234
Joined: Sat Jun 30, 2007 10:56 pm
Location: L. A.

#7 Post by lightweight » Thu Oct 02, 2008 1:35 am

(even if you get an error, post the output. Basically post anything your terminal spits out during the steps below -- errors are useful.)

What happens if you just call the target of Fn+F5 directly?

Code: Select all

sudo /etc/acpi/ibm-wireless.sh
If bluetooth does turn on, there's some problem with acpi calling the script, or with the script itself.
- do this, press Fn+F5, and paste the output. We're looking to see if acpid calls an error before, after, or while it tries to talk to the hardware abstraction layer.

Code: Select all

sudo tail -f /var/log/messages
(in a second terminal)

Code: Select all

sudo tail -f /var/log/acpid
- and this, to make sure all users can call the script.

Code: Select all

ls -l /etc/acpi/ibm-wireless.sh
- and make sure acpi has the right keymap to call the right script

Code: Select all

cat /etc/acpi/events/ibm-wireless
If bluetooth does not turn on, it sounds like the script was not backed up or restored correctly. It should look like this (notice that it only sanity checks if bluetooth is on, then echos enable or disable into /proc/acpi as poshgeordie instructed you to before. Linux is cool ;) )

Code: Select all

#!/bin/sh

test -f /usr/share/acpi-support/power-funcs || exit 0

# Find and toggle wireless of bluetooth devices on ThinkPads

. /usr/share/acpi-support/state-funcs

BLUETOOTH=/proc/acpi/ibm/bluetooth

if [ -r $BLUETOOTH ]; then
    grep -q disabled $BLUETOOTH
    bluetooth_state=$?
fi

# Note that this always alters the state of the wireless!
toggleAllWirelessStates;

# Sequence is Both on, Bluetooth only, Wireless only, Both off
if ! isAnyWirelessPoweredOn; then
    # Wireless was turned off
    if [ -w $BLUETOOTH ]; then
        if [ "$bluetooth_state" = 0 ]; then
            echo enable > $BLUETOOTH;
        else
            echo disable > $BLUETOOTH
        fi
    fi
fi
'case anyone else wants to make Fn+F5 toggle wireless, its the same concept except you're doing an ifconfig up and down for the wireless interface. Battery-minded folk can save some time if they load and unload their wireless card's modules as well. You can either edit the ibm-wireless event (to call your new script) or the target (/etc/acpi/ibm-wireless.sh). Make sure the target script is executable by the acpi daemon.

Anyway, HTH.
Have: x60s ultralight 1705-CTO, Debian SiD, Linux 2.6.25-2 | x61s ultralight 7668-CTO, Debian SiD/Experimental, Linux 2.6.27-git5 | Model M 1391401, white label, 07-17-91
Had: x22, Debian Testing/SiD, Linux 2.6.18-22

Post Reply
  • Similar Topics
    Replies
    Views
    Last post

Return to “Linux Questions”

Who is online

Users browsing this forum: No registered users and 1 guest