Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

My laptop has hardware switch for enabling and disabling wireless adapters. This includes both bluetooth and wlan. I rarely use bluetooth and would like to keep it disabled (soft blocked) unless I manually enable it. Is this possible?

rfkill list when HW-switch disabled:

1: tpacpi_bluetooth_sw: Bluetooth
    Soft blocked: yes
    Hard blocked: yes
2: phy0: Wireless LAN
    Soft blocked: yes
    Hard blocked: yes

HW-switch enabled:

1: tpacpi_bluetooth_sw: Bluetooth
    Soft blocked: no
    Hard blocked: no
2: phy0: Wireless LAN
    Soft blocked: no
    Hard blocked: no
7: hci0: Bluetooth
    Soft blocked: no
    Hard blocked: no

This is what I would like to have when HW-switch is enabled:

1: tpacpi_bluetooth_sw: Bluetooth
    Soft blocked: yes
    Hard blocked: no
2: phy0: Wireless LAN
    Soft blocked: no
    Hard blocked: no

I have ThinkPad X61s with Ubuntu 11.04.

share|improve this question

1 Answer 1

To add a soft-block you would use the syntax:

sudo rfkill block bluetooth

To unblock:

sudo rfkill unblock bluetooth

Possibly, if the softblock isnt remembered after a reboot I think you can run this without sudo on Natty

rfkill block bluetooth 

If the above works for you, you can add this as part of your start-up applications.

share|improve this answer
    
Using the hw-switch unblocks bluetooth even if it's manually soft blocked. –  Seppo Erviälä Sep 12 '11 at 13:57
    
This however works if I have hardware switch enabled when I boot so it does help a bit. –  Seppo Erviälä Sep 12 '11 at 13:59
    
Seppo - not sure what you mean "help a bit" - can you add to your question what the new values are when hardware switch is enabled and what happens when you block/unblock as above. Thanks. –  fossfreedom Sep 12 '11 at 14:06
    
Running sudo rfkill block bluetooth results in the desired state where bluetooth is soft blocked. However if I disable hw-switch and reenable it then bluetooth is no longer blocked. –  Seppo Erviälä Sep 12 '11 at 18:56
    
It helps a bit as I created a startup task that disables bluetooth. However this doesn't help if hw-switch is disabled during boot-up and I enable it after booting as bluetooth gets reenabled. –  Seppo Erviälä Sep 12 '11 at 18:58

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.