Announcement

Collapse
No announcement yet.

How to keep Bluetooth from starting?

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How to keep Bluetooth from starting?

    Somewhere, Kubuntu is starting up Bluetooth support automatically. Where does this take place? It is probably not the only thing running which I do not need.

    Thanks in advance.
    'I must have a prodigious quantity of mind; it takes me as much as a week sometimes to make it up.' Mark Twain

    #2
    Re: How to keep Bluetooth from starting?

    /etc/dbus-1/system.d/bluetooth.conf
    /etc/init.d/bluetooth
    /etc/rc0.d/K74bluetooth
    /etc/rc1.d/K74bluetooth
    /etc/rc2.d/S25bluetooth
    /etc/rc3.d/S25bluetooth
    /etc/rc4.d/S25bluetooth
    /etc/rc5.d/S25bluetooth
    /etc/rc6.d/K74bluetooth
    Windows no longer obstructs my view.
    Using Kubuntu Linux since March 23, 2007.
    "It is a capital mistake to theorize before one has data." - Sherlock Holmes

    Comment


      #3
      Re: How to keep Bluetooth from starting?

      That was fast!

      However, having looked at those files and the README, it is not obvious what to do to stop bluetooth from starting, since, e.g., rc0.d/K74bluetooth says

      #currently this init script exists only because of what appears to be
      #an egg and chicken problem
      # bluetoothd normally starts up by udev rules. it needs dbus to function,
      # but dbus doesn't start up until after udev finishes triggering

      Also, the README says

      Generally it is not necessary to alter the scripts in this directory.
      Their purpose is to stop all services and to make the system ready
      for shutdown.

      In spite of the fact that K74bluetooth says "# Short-Description: Start bluetoothd" and the README also says

      The scripts in this directory are executed once when entering runlevel 0.

      meaning at boot time.

      I admit to being confused here. Are these scripts for startup or shutdown? And without them would bluetooth be started by udev, whatever that may be?
      'I must have a prodigious quantity of mind; it takes me as much as a week sometimes to make it up.' Mark Twain

      Comment


        #4
        Re: How to keep Bluetooth from starting?

        Do you perhaps mean kbluetooth (the bluetooth icon in the tray)?

        That is started by /usr/share/autostart/kbluetooth.desktop

        Comment


          #5
          Re: How to keep Bluetooth from starting?

          Can't help you with that. I'm not sure which of those files is actually 'starting' KBluetooth, if any of them are. But one (or more) are almost certainly involved.
          Windows no longer obstructs my view.
          Using Kubuntu Linux since March 23, 2007.
          "It is a capital mistake to theorize before one has data." - Sherlock Holmes

          Comment


            #6
            Re: How to keep Bluetooth from starting?

            You shouldn't have to worry about udev/init scripts with bluetooth.

            udev should start bluetooth service when a bluetooth device is added or enabled, when there is no bluetooth device on the system, the service shouldn't be running.

            you can test whether the service is running with:
            Code:
            service bluetooth status

            Comment


              #7
              Re: How to keep Bluetooth from starting?

              Ok, I have renamed /usr/share/autostart/kbluetooth.desktop to something else and will see if that does the trick.

              Thanks, all.
              'I must have a prodigious quantity of mind; it takes me as much as a week sometimes to make it up.' Mark Twain

              Comment


                #8
                Re: How to keep Bluetooth from starting?

                Originally posted by joneall
                Ok, I have renamed /usr/share/autostart/kbluetooth.desktop to something else and will see if that does the trick.
                That should work, but upgrades to kbluetooth will add the file back, so you'll need to redo it when you upgrade kbluetooth (or kde). A more permanent solution would be to uninstall kbluetooth if you don't need it.

                Unfortunately, kbluetooth.desktop doesn't include an "autostart-condition" tag (like many of the other autostart .desktop files) which would allow you to disable autostarting in kbluetoothrc file (that way the setting would persist over upgrades)

                Comment


                  #9
                  Re: How to keep Bluetooth from starting?

                  If you don't need Bluetooth support, the simplest solution is to just uninstall it, that will take care of the problem permanently.
                  Cry 'Havoc' and let slip the dogs of War!

                  Comment


                    #10
                    Re: How to keep Bluetooth from starting?

                    Interesting question and Snowhog was spot on - disable the daemon.

                    Do the Xbuntus use upstart or still init? If the latter, then it should only be a matter of some research on the Ubuntu wiki to be able to manipulate which daemons get started during boot and which get backgrounded for a faster boot experience.

                    That is the kind of control I like to have over a system - for example, who needs cups if you haven't got a printer on the laptop or bluetooth if you have no device or avahi if you don't fancy talking to your local network. The list goes on...

                    One could of course put a couple of lines into rc.local to that effect (am just cranking up ye olde virtualbox to see whether kubuntu has that file and yes it does) but that would be starting and stopping, i.e. merely as a power saving measure for laptops..
                    Once your problem is solved please mark the topic of the first post as SOLVED so others know and can benefit from your experience! / FAQ

                    Comment


                      #11
                      Re: How to keep Bluetooth from starting?

                      Like I said before, bluetoothd (the daemon) should be started by udev only when there is a bluetooth device on the system (or when one is enabled).

                      And if you have one, it's probably a good thing to have it running (the daemon is very light on resources).

                      if you really want to stop it, you can use 'sudo service bluetooth stop', but that doesn't really affect power consumption. If you want to save power you need to disable the device either by hardware (most laptops have a keyboard shortcut for this) or by software (with rfkill, for example).

                      If one uses bluetooth infrequently (or does not have a bluetooth device), one can stop kbluetooth (the KDE bluetooth front-end) from autostarting by removing/renaming the kbluetooth.desktop file (or uninstalling kbluetooth if you do not have a device) to save a few MBs of memory or just hide the icon fron notification tray settings if you only want to clean up the tray.

                      Comment


                        #12
                        Re: How to keep Bluetooth from starting?

                        Ah, thanks for the clarification Definitely sounds like upstart then.
                        Once your problem is solved please mark the topic of the first post as SOLVED so others know and can benefit from your experience! / FAQ

                        Comment


                          #13
                          Re: How to keep Bluetooth from starting?

                          Originally posted by toad
                          Ah, thanks for the clarification Definitely sounds like upstart then.
                          It still uses init (the 'service' command also works with init scripts).

                          But the init script only runs an udev trigger with 'start' action (if no bluetooth devices, no daemon).
                          The 'stop' action simply stops the daemon.

                          Comment


                            #14
                            Re: How to keep Bluetooth from starting?

                            Ah, okay. This service thing was a mystery for me as well having suddenly appeared out of nowhere... Thanks, kubicle
                            Once your problem is solved please mark the topic of the first post as SOLVED so others know and can benefit from your experience! / FAQ

                            Comment

                            Working...
                            X