Workaround for the RetroPie Bluetooth Security Bug

Updated 09 July 2021

The Problem:

You may find that while setting up RetroPie on your Raspberry Pi that pairing new Bluetooth controllers results in something like:

  • During the "Please choose the security mode - Try the first one, then second if that fails", RetroPie feezes/stops responding
  • When pairing, you get the error "Failed to pair: org.bluez.Error.AuthenticationFailed"

If so, then read on as we have a workaround that we have tested with 8Bitdo Controllers!

The Fix:

You need to exit RetroPie settings (go back to the Emulation Station menu) and the exit Emulation Station by pressing F4. This will take you back to the console.

From there, run this command to edit a file:

sudo nano /lib/systemd/system/bluetooth.service

Replace

ExecStart=/usr/lib/bluetooth/bluetoothd

With (the # character will disable old the configuration, then add the new underneath)

#ExecStart=/usr/lib/bluetooth/bluetoothd
ExecStart=/usr/lib/bluetooth/bluetoothd --noplugin=sap

This disables the problematic plugin.

Then open this file for editing:

sudo nano /lib/systemd/system/[email protected]

Replace

[Service]
Type=simple
ExecStart=/usr/bin/bthelper %I

With (the # characters will disable the old configurations, then add the new underneath)

#[Service]
#Type=simple
#ExecStart=/usr/bin/bthelper %I

[Service]
Type=simple
ExecStartPre=/bin/sleep 2
ExecStart=/usr/bin/bthelper %I
ExecStartPost=sudo /etc/init.d/bluetooth restart

After rebooting, sudo bluetoothctl works as expected with pair, trust, and connect for the Bluetooth devices we have tested (mostly 8BitDo controllers).

If you've followed this guide and it's still giving you trouble, head on over to the relevant thread in our Maker Forum, and we'll help you out!

Have a question? Ask the Author of this guide today!

Please enter minimum 20 characters

Your comment will be posted (automatically) on our Support Forum which is publicly accessible. Don't enter private information, such as your phone number.

Expect a quick reply during business hours, many of us check-in over the weekend as well.

Comments


Loading...
Feedback

Please continue if you would like to leave feedback for any of these topics:

  • Website features/issues
  • Content errors/improvements
  • Missing products/categories
  • Product assignments to categories
  • Search results relevance

For all other inquiries (orders status, stock levels, etc), please contact our support team for quick assistance.

Note: click continue and a draft email will be opened to edit. If you don't have an email client on your device, then send a message via the chat icon on the bottom left of our website.

Makers love reviews as much as you do, please follow this link to review the products you have purchased.