LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 03-25-2013, 03:53 PM   #1
daf1kpp
LQ Newbie
 
Registered: Feb 2013
Posts: 16

Rep: Reputation: Disabled
Auto starting bluetooth after hibernate


Hi,
I used to use hibernate at my slack 14.0 (kde).

I have problem annoying me and I want to fix it somehow, hope you will help me.

Scenario is like...
i use hibernate. pc turned off. i power on pc. pc is up. i log in. all is ok - all windows/apps back + bluettoth manager and bluetooth is ON.


why is it ON ? how to keep it off ? well i know i could do it like
chmod -x /etc/rc.d/rc.bluetooth
but i use bluetooth sometimes and i want to use it, but why the hell is it starting up after hibernate ?


ty for help
 
Old 03-25-2013, 04:04 PM   #2
Mike_M
Member
 
Registered: Mar 2011
Location: California
Distribution: Slackware
Posts: 116

Rep: Reputation: 50
I used to have the same issue before I disabled bluetooth completely on my laptop (I only very rarely use it).

To work around this I wrote the following script:

Code:
#!/bin/sh
#
# In order to help save power on my laptop, I want the Bluetooth radio
# to be disabled unless I need to use it.  I already turn it off at boot
# time from rc.local.  But it is re-enabled after a resume from suspend.
#

case "$1" in
   hibernate|suspend)
      # Nothing to do during suspend
      ;;
   thaw|resume)
      # Wait a few seconds for the system to resume, otherwise one of
      # the other scripts may keep the Bluetooth radio enabled.  No
      # doubt there is a more elegant solution to this.
      sleep 5
      /usr/sbin/rfkill block bluetooth
      ;;
   *) exit $NA
      ;;
esac
I saved that as /etc/pm/sleep.d/00disable_bluetooth and made it executable. This turned the bluetooth radio off after a resume, but still allowed me to turn it on via the bluetooth applet when I needed it.
 
1 members found this post helpful.
Old 06-05-2013, 11:13 AM   #3
dklovedoctor
LQ Newbie
 
Registered: Nov 2010
Posts: 6

Rep: Reputation: 0
Quote:
Originally Posted by Mike_M View Post
I used to have the same issue before I disabled bluetooth completely on my laptop (I only very rarely use it).

To work around this I wrote the following script:

Code:
#!/bin/sh
#
# In order to help save power on my laptop, I want the Bluetooth radio
# to be disabled unless I need to use it.  I already turn it off at boot
# time from rc.local.  But it is re-enabled after a resume from suspend.
#

case "$1" in
   hibernate|suspend)
      # Nothing to do during suspend
      ;;
   thaw|resume)
      # Wait a few seconds for the system to resume, otherwise one of
      # the other scripts may keep the Bluetooth radio enabled.  No
      # doubt there is a more elegant solution to this.
      sleep 5
      /usr/sbin/rfkill block bluetooth
      ;;
   *) exit $NA
      ;;
esac
I saved that as /etc/pm/sleep.d/00disable_bluetooth and made it executable. This turned the bluetooth radio off after a resume, but still allowed me to turn it on via the bluetooth applet when I needed it.
Searching the forum, I found this post as the closest to my problem.
I also want to take some actions after the resume takes place. I used your solution when I hibernated my system with the pm-hibernate command. That worked ok.
However, for some reason I cannot find, pm-hibernate does not work at my system any more and I use this command to hibernate my system:
echo disk > /sys/power/state
However, since now pm-hibernate is not used, the solution offered does not work. Do you have anything else to suggest?
I use opesuse 12.1 MileStone 3 (Asparagus)
Many thanx.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Tool for auto resume after hibernate/standby ubuntuv Linux - Software 1 01-29-2010 10:05 PM
auto-hibernate schlabs Linux - Software 3 10-19-2009 07:44 AM
bluetooth logitech mouse doesn't work after standby or hibernate mexx20 Slackware 3 01-18-2009 08:27 PM
hibernate starting by itself, where to configure? browny_amiga Linux - Desktop 3 12-27-2006 11:06 AM
Auto Hibernate Problems freddyfish Linux - Software 0 04-20-2006 08:54 AM


All times are GMT -5. The time now is 06:14 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration