No Bluetooth (keyboard) before login after reboot

I want to start by saying, Bluetooth works at the login screen if you sign out. Meaning signing back in is not a problem. Bluetooth also works at the lock screen if you are away from the computer for a while. Meaning, unlocking your computer is also not a problem.

The problem is, if you reboot your computer and attempt to sign in, you cannot, because it does not appear Bluetooth is available. This requires you to use either a wired keyboard (or 2.4Ghz wireless) keyboard to sign in. As a result, I now keep a 2nd keyboard (wired) plugged in all the time, just for those moments when I reboot (or power off and on).

I suspect this is a bug, but I would not want to report this bug before confirming with other people. I am also not 100% sure what information you would want (please be very specific) if it were a bug. I have encountered this issue on both Fedora (Ultramarine Linux, KDE Plasma edition) and Kubuntu (Ubuntu’s KDE edition). I believe I also encountered this issue on an immutable distro (Universal Blue Aurora, based on Fedora KDE Spin).

Bluetooth is operable only after the operating system is loaded

I am confused by your reply. The operating system is loaded and, furthermore, this is a semi-recent development. That is to say, this issue first appeared sometime during Fedora 39 (and with Kubuntu around the same time). If I am not clear, you could previous log-in with a Bluetooth keyboard.

This is a low priority issue since I do have a wired keyboard to circumvent this annoyance and I assumed, incorrectly, that it would eventually be reported and resolved. Clearly, that has not happened, but now that I am brining this up, I would like to see it addressed (please).

Furthermore, the last time I was using Gnome / Gdm (I am not a fan of Gnome), it worked. I do not currently have a system running Gnome / Gdm at this time, but I would assume that is still the case.

But I digress. Your reply is confusing.

I think “Bluetooth is operable only after the operating system is loaded” is a pretty clear statement.

If you believe bluetooth is failing after this then it seems to a fault in either loading the bluetooth components, or in their operation which is a bug and should be reported as such.

Just BTW I have as much power to “see it addressed” as you do, but reporting the problem as a bug seems to be a reasonable first step

I am unsure how you’re not understanding, as I previously stated, the operating system is already loaded. I can see the log-in screen and using that login screen after a reboot, with a Bluetooth keyboard, used to work (with KDE / SDDM). To my knowledge, it works just fine with Gnome / GDM, for example (last I checked).

That said, do you know where I would best report this in bugs ?

I suppose, since this could also be a “ssdm” issue, I should forward this to that community as well. And that is what I worry, that I’ll be playing “whack a mole” between developments.

Edit: I switched to KDE’s LightDM just to be sure and can confirm the issue remains.

KDE bugs are at https://bugs.kde.org/

It sounds like Bluetooth isn’t operational when the system turns on, but then becomes operational after you log in. I know for a fact that we do have a thing in Plasma that enables bluetooth after login, but what happens before login is unfortunately beyond our control at the moment. For this reason, many distros have an “automatically enable Bluetooth on boot” package.

This is one of many reasons why I prefer wired input devices, FWIW.

I have found a solution that seems to be a universal fix across all distros…

  1. sudo nano /etc/bluetooth/main.conf
  2. press ctrl+w , type autoenable , press ENTER
  3. The last line of the paragraph should show “#AutoEnable=False” … uncomment this line and edit it to show “AutoEnable = true”
  4. press ctrl+s followed by ctrl+x
  5. exit the terminal and reboot your computer…
    (My Bluetooth mouse started functioning after maybe 5 seconds at the sddm login screen immideately after I rebooted my laptop. HOPE THS HELPS!!!)

Just to clarify, the reason Linux-is-Best was confused is because he apparently understands how Linux works, and you do not. He is complaining that Bluetooth is not available at the login screen, i.e. gdm/sddm/etc, the “greeter.” Your statement “Bluetooth is operable only after the operating system is loaded” is both true, and unhelpful, because if the greeter is being displayed, the operating system has loaded. It would be impossible for the greeter to be displayed if the operating system is not loaded.

One year to late!? :slightly_smiling_face:

But otherwise welcome.

First, thanks for the support @mercster

To everyone else, this was a year ago, and things have changed. For example, I stop using Fedora Linux, and am now using NixOS. That said, while using NixOS, the same issue came up.

The best solution is to stop using SDDM and use GDM – The reality is Gnome Display Manager is going to help you, because if your Bluetooth keyboard does not connect upon the login screen after a reboot, GDM has the option to connect the Bluetooth manually in the top right corner. GDM has some tools you can use before logging in (top right corner).

That said, most Bluetooth devices are either Bluetooth dongles plugged into a USB port, or a PCIe card with a wire connecting to a Bluetooth header on the motherboard. Unless yours is a newer motherboard with Bluetooth build in, but many of those to seem to use the USB pathways (there are those that don’t and have it completely isolated and independent, but I’ve seen so few).

As I said, in GDM, if your Bluetooth does not connect automatically upon a reboot, you can just click the top right corner and click on connect. Simple.

But assume you’re also using a Bluetooth mouse (along with that keyboard), that would pose an issue. That said, in NixOS, I learned this simple command will completely solve the Bluetooth issue:

boot.kernelParams = [ "usbcore.autosuspend=-1" ];

That command prevent the kernel from suspending USB devices globally. Because despite having power saving disabled on the Bios and disabled within the operating system, oddly your USB can still end up suspended at the login screen.

If you’re using NixOS, I also add this line to ensure USB is loaded at boot, first, so there is no racing issue.

boot.kernelModules = [ "usb" "xhci_hcd" "btusb" "bluetooth" ];

I hope this post is helpful and gives some useful insight.

A small follow up, because I would not want to leave people hanging who are using Fedora or Ubuntu (Debian).

You can apply the same fix if using Grub (see SystemD Boot fix below).

sudo nano /etc/default/grub

Look for:

GRUB_CMDLINE_LINUX=

Add:

usbcore.autosuspend=-1

So when done it may look similar to this (may not be exact):

GRUB_CMDLINE_LINUX=“quiet splash usbcore.autosuspend=-1”

If you’re using SystemD Boot (I know it’s not spelled that way, but I am making it easier for those with accessibility issues). If memory serves me right, you’ll want to look into:

/boot/loader/entries/

You’re looking for a file that likely reflects your operating system. For example:

sudo nano /boot/loader/entries/fedora.conf

It’s best to look into that directory and discover the name yourself.

Look for the line the reads “options” and add the command. When done, it should look similar to this (but may not be exact):

options root=UUID=xxxxxxx rw quiet splash usbcore.autosuspend=-1

I hope this helpful.

If you want to ensure there is no racing issue. Regardless if you’re using SystemD or Grub:

sudo nano /etc/modules-load.d/custom.conf

Add the follow (each on its own line)

usb
xhci_hcd
btusb
bluetooth

If that does not work, and something else is preventing it loading right away.

In Fedora (see Ubuntu / Debian below).

/etc/dracut.conf.d/custom.conf

Add

add_drivers+=" usb xhci_hcd btusb bluetooth "

Then run this command:

sudo dracut -f

On Ubuntu / Debian, you want to:

sudo nano /etc/initramfs-tools/modules

You want to add this (each on their own line):

usb
xhci_hcd
btusb
bluetooth

Then you want to run this command:

sudo update-initramfs -u

I once again, hope this is helpful. :slight_smile:

Now is a good time to remind everyone, that in NixOS, all it took was 2 lines of code in 1 file. /etc/nixos/configuration.nix

No worries. :slight_smile:

This would of course work with any Linux distribution, going back many years. It would have worked in Fedora.

You’d think so, but no — not always. I’m not sure whether it was a custom kernel or a module that prevented it.

Likely PEBCAK. :slight_smile: