# Workaround for the RetroPie Bluetooth Security Bug

**URL:** <https://forum.core-electronics.com.au/t/workaround-for-the-retropie-bluetooth-security-bug/10623>\
**Category:** Guides\
**Created:** [9 July 2021 07:50 UTC](https://forum.core-electronics.com.au/t/workaround-for-the-retropie-bluetooth-security-bug/10623 "2021-07-09T07:50:54Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![James](https://yyz2.discourse-cdn.com/flex028/user_avatar/forum.core-electronics.com.au/james/32/4400_2.png) [@James](https://forum.core-electronics.com.au/u/James)\
**Post date:** [9 July 2021 07:50 UTC](https://forum.core-electronics.com.au/t/workaround-for-the-retropie-bluetooth-security-bug/10623/1 "2021-07-09T07:50:54Z")

</div>

We have just shared a new tutorial: [**“Workaround for the RetroPie Bluetooth Security Bug”**](http://core-electronics.com.au/tutorials/workaround-for-the-retropie-bluetooth-security-bug.html)  
  
 ![](https://core-electronics.com.au/media/kbase/Workaround-for-the-RetroPie-Bluetooth-Security-Bug.png)

## 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!

[Read more](http://core-electronics.com.au/tutorials/workaround-for-the-retropie-bluetooth-security-bug.html)

---

<div class="post-metadata">

**Author:** ![David170175](https://avatars.discourse-cdn.com/v4/letter/d/ea666f/32.png) [@David170175](https://forum.core-electronics.com.au/u/David170175)\
**Post date:** [31 July 2021 04:42 UTC](https://forum.core-electronics.com.au/t/workaround-for-the-retropie-bluetooth-security-bug/10623/2 "2021-07-31T04:42:06Z")

</div>

okay I get into sudo/nano bluetooth and change Execstart to #Execstart but I dont know how to exit or save these changes what do I do from there?

---

<div class="post-metadata">

**Author:** ![David170175](https://avatars.discourse-cdn.com/v4/letter/d/ea666f/32.png) [@David170175](https://forum.core-electronics.com.au/u/David170175)\
**Post date:** [31 July 2021 04:43 UTC](https://forum.core-electronics.com.au/t/workaround-for-the-retropie-bluetooth-security-bug/10623/3 "2021-07-31T04:43:22Z")

</div>

okay I go into sudo nano bluetooth.service and change Execstart to #Exec and add --noplugin. But I dont know how to exit or save these changes. What do I do?

---

<div class="post-metadata">

**Author:** ![Trent5487676](https://yyz2.discourse-cdn.com/flex028/user_avatar/forum.core-electronics.com.au/trent5487676/32/4583_2.png) [@Trent5487676](https://forum.core-electronics.com.au/u/Trent5487676)\
**Post date:** [3 August 2021 02:45 UTC](https://forum.core-electronics.com.au/t/workaround-for-the-retropie-bluetooth-security-bug/10623/4 "2021-08-03T02:45:11Z")

</div>

Hi David,

I’ve linked a nano text editor guide below, to summarise:

If you want to save the changes you’ve made, press Ctrl + O. To exit nano, type Ctrl + X. If you ask nano to exit from a modified file, it will ask you if you want to save it. Just press N in case you don’t, or Y in case you do. It will then ask you for a filename. Just type it in and press Enter.

[https://wiki.gentoo.org/wiki/Nano/Basics\_Guide#:~:text=other%20bad%20things.-,Saving%20and%20exiting,you%20want%20to%20save%20it](https://wiki.gentoo.org/wiki/Nano/Basics_Guide#:~:text=other%20bad%20things.-,Saving%20and%20exiting,you%20want%20to%20save%20it).

---

<div class="post-metadata">

**Author:** ![J180847](https://avatars.discourse-cdn.com/v4/letter/j/7993a0/32.png) [@J180847](https://forum.core-electronics.com.au/u/J180847)\
**Post date:** [13 October 2021 08:27 UTC](https://forum.core-electronics.com.au/t/workaround-for-the-retropie-bluetooth-security-bug/10623/5 "2021-10-13T08:27:59Z")

</div>

Hi James,

Thanks your workaround is great and I have been able to connect my 8but do controllers to my pi4 using it, however I wondered if there was a way to get them to connect on boot rather than having to use the workaround every time. Currently when I reboot they do not pair automatically.

Thanks very much for your efforts and any help that you can offer

---

<div class="post-metadata">

**Author:** ![James](https://yyz2.discourse-cdn.com/flex028/user_avatar/forum.core-electronics.com.au/james/32/4400_2.png) [@James](https://forum.core-electronics.com.au/u/James)\
**Post date:** [14 October 2021 04:31 UTC](https://forum.core-electronics.com.au/t/workaround-for-the-retropie-bluetooth-security-bug/10623/6 "2021-10-14T04:31:27Z")

</div>

Hi J,

Hmmm, if you followed the guide, they should remain paired between restarts (or at least that’s what I found). Do they appear on the list of already paired devices after a restart? You should just be able to hit start to get the controller to attempt connection.

Keen to get to the bottom of this!  
-James

---

<div class="post-metadata">

**Author:** ![J180847](https://avatars.discourse-cdn.com/v4/letter/j/7993a0/32.png) [@J180847](https://forum.core-electronics.com.au/u/J180847)\
**Post date:** [17 October 2021 08:47 UTC](https://forum.core-electronics.com.au/t/workaround-for-the-retropie-bluetooth-security-bug/10623/7 "2021-10-17T08:47:02Z")

</div>

Hi James,

Thanks for your quick response. I’ve not been home for the last few days, but the controller did remain on the list of registered devices. When I get back home next week, I will try a fresh install and give the workaround another go and update with my findings.

Thanks for your help

Best wishes  
James

---

<div class="post-metadata">

**Author:** ![Martin72150](https://avatars.discourse-cdn.com/v4/letter/m/b4bc9f/32.png) [@Martin72150](https://forum.core-electronics.com.au/u/Martin72150)\
**Post date:** [21 October 2021 23:47 UTC](https://forum.core-electronics.com.au/t/workaround-for-the-retropie-bluetooth-security-bug/10623/8 "2021-10-21T23:47:34Z")

</div>

Hi J,

If you go into the bluetooth setup in the retropie script, there is an option for ‘Configure Bluetooth Connect Mode’. If you set that to ‘Background’ it should auto connect your bluetooth controllers on startup.

---

<div class="post-metadata">

**Author:** ![Martin72150](https://avatars.discourse-cdn.com/v4/letter/m/b4bc9f/32.png) [@Martin72150](https://forum.core-electronics.com.au/u/Martin72150)\
**Post date:** [21 October 2021 23:50 UTC](https://forum.core-electronics.com.au/t/workaround-for-the-retropie-bluetooth-security-bug/10623/9 "2021-10-21T23:50:42Z")

</div>

Anyone had any luck getting 8BitDo Pro 2 controllers working on their Pi4? I’ve been pulling my hair out!

I have them paired to my Pi4 but they wont connect ☹ They work if I connect using USB-C and the controllers work on my windows pc, but i’ve spent hours trying to fault find with no joy.

I’ve tried the above security workaround.

---

<div class="post-metadata">

**Author:** ![James](https://yyz2.discourse-cdn.com/flex028/user_avatar/forum.core-electronics.com.au/james/32/4400_2.png) [@James](https://forum.core-electronics.com.au/u/James)\
**Post date:** [22 October 2021 01:09 UTC](https://forum.core-electronics.com.au/t/workaround-for-the-retropie-bluetooth-security-bug/10623/10 "2021-10-22T01:09:14Z")

</div>

Hi Martin,

Have you made sure you’re using Xinput or DirectInput (X + Start, B + Start when turning on respectively)?

That’s the only thing I can think of, but I’ll look into this further if the above doesn’t work  
-James

EDIT: have you set your region with raspi-config? Bluetooth and WiFi are blocked before doing that I believe

---

<div class="post-metadata">

**Author:** ![Oliver](https://yyz2.discourse-cdn.com/flex028/user_avatar/forum.core-electronics.com.au/oliver/32/3315_2.png) [@Oliver](https://forum.core-electronics.com.au/u/Oliver)\
**Post date:** [22 October 2021 01:11 UTC](https://forum.core-electronics.com.au/t/workaround-for-the-retropie-bluetooth-security-bug/10623/11 "2021-10-22T01:11:55Z")

</div>

Hi Martin,

Yes, it’s always worked fine for me, though I know some people have run into bluetooth issues. Here’s a forum post I made in the past explaining my process:

> [@Bluetooth issues with 8BitDo SN30pro on Rasp Pi 4 with Retropie](https://forum.core-electronics.com.au/t/bluetooth-issues-with-8bitdo-sn30pro-on-rasp-pi-4-with-retropie/10119/16):
>
> Hi All, I was able to pair both an SN30 Pro+ and a Pro 2 without issue - I’m not sure what the issue may be that you’re all facing thinking The procedure I followed was: Grab a preloaded RetroPie SD card from our shelf stock Boot it up on a Pi 4 8GB Setup a USB keyboard Open up the Bluetooth configuration Press and Hold Start + Y (Switch mode) and then immediately hit Enter on "Register and Connect to Bluetooth Device Quickly tap down the manual to select Pro Controller, then hit Enter Hit…

---

<div class="post-metadata">

**Author:** ![J180847](https://avatars.discourse-cdn.com/v4/letter/j/7993a0/32.png) [@J180847](https://forum.core-electronics.com.au/u/J180847)\
**Post date:** [23 October 2021 12:52 UTC](https://forum.core-electronics.com.au/t/workaround-for-the-retropie-bluetooth-security-bug/10623/12 "2021-10-23T12:52:01Z")

</div>

Hi James and Martin,

Sorry for the delayed response to you both, I haven’t been home for a bit and only just got a chance to dabble with my pi this morning.

Thanks for your suggestions, but I still haven’t been able to get this to reconnect on start up. I already had retropie set to background so tried a fresh install. Followed the workaround as per the instructions and then pair, Trust connect in  
Bluetoothctl

Controller connects fine but then when I shutdown or reboot it won’t connect automatically. It still shows as a paired device in Bluetoothctl and shows up as a registered and connected device in the retropie config settings, however it doesn’t connect when selecting connect to all registered devices within retropie.

It connects straight away if I use bluetoothctl and manually connect.

This doesn’t seem to be the case for other people so I’m wondering if I’m missing something or if it’s possible to run a script to auto connect at start / in the background?

Thanks for any help possible

Best wishes  
J

---

<div class="post-metadata">

**Author:** ![James](https://yyz2.discourse-cdn.com/flex028/user_avatar/forum.core-electronics.com.au/james/32/4400_2.png) [@James](https://forum.core-electronics.com.au/u/James)\
**Post date:** [25 October 2021 04:51 UTC](https://forum.core-electronics.com.au/t/workaround-for-the-retropie-bluetooth-security-bug/10623/13 "2021-10-25T04:51:49Z")

</div>

Hi J,

My understanding is that when you push a button on the controller with it off, it’ll try and connect to its last paired device, which should be your Pi.

If it doesn’t behave like this, you can definitely run a script to connect automatically!

> <https://raspberrypi.stackexchange.com/questions/53408/automatically-connect-trusted-bluetooth-speaker>

let us know how you go!  
-James

---

<div class="post-metadata">

**Author:** ![J180847](https://avatars.discourse-cdn.com/v4/letter/j/7993a0/32.png) [@J180847](https://forum.core-electronics.com.au/u/J180847)\
**Post date:** [25 November 2021 21:58 UTC](https://forum.core-electronics.com.au/t/workaround-for-the-retropie-bluetooth-security-bug/10623/14 "2021-11-25T21:58:24Z")

</div>

Hi James, thanks for your help.  
I finally got some time at the weekend to come back to this and was able to get my Bluetooth controller to connect automatically using step 2.5 of the process linked below

[https://retropie.org.uk/docs/Bluetooth-Controller/](https://retropie.org.uk/docs/Bluetooth-Controller/)

It says it’s for older pi moulders but I tried it and it works. Now trying to find a way to have multiple controllers that will connect automatically.

Thanks to everyone who helped me with this, I hope the above helps someone else

Best wishes  
J

---

<div class="post-metadata">

**Author:** ![Core195909](https://yyz2.discourse-cdn.com/flex028/user_avatar/forum.core-electronics.com.au/core195909/32/6417_2.png) [@Core195909](https://forum.core-electronics.com.au/u/Core195909)\
**Post date:** [13 March 2022 21:32 UTC](https://forum.core-electronics.com.au/t/workaround-for-the-retropie-bluetooth-security-bug/10623/15 "2022-03-13T21:32:46Z")

</div>

Hi and thanks for posting

I struggled with getting an xbox360 controller to work over bluetooth and this did the trick. After picking up a second controller, however I find that I can’t connect either one. Interestingly, I’m able to pair them using the bluetooth configuration (I’ve installed the xpad driver) but they never show a solid light indicating they are connected.

I can even go to the remove bluetooth devices tab and I can see one of them, but it is non-functional. I’m getting authentication errors or time out when I’m trying to pair, even though the bluetooth configuration tool shows the xbox controller that I’m trying to connect. Some text shows up at the bottom of the screen and disappears quickly.

Please let me know if you can help with this. I finally thought I had it working and just needed one more controller but now I can’t get either of them to work even if I only try to pair one.

---

<div class="post-metadata">

**Author:** ![Zane218896](https://avatars.discourse-cdn.com/v4/letter/z/b782af/32.png) [@Zane218896](https://forum.core-electronics.com.au/u/Zane218896)\
**Post date:** [19 December 2022 05:14 UTC](https://forum.core-electronics.com.au/t/workaround-for-the-retropie-bluetooth-security-bug/10623/16 "2022-12-19T05:14:33Z")

</div>

I did all the stuff at top and now I can’t do anything since after loading it’s a grey screen

---

<div class="post-metadata">

**Author:** ![Zane218896](https://avatars.discourse-cdn.com/v4/letter/z/b782af/32.png) [@Zane218896](https://forum.core-electronics.com.au/u/Zane218896)\
**Post date:** [19 December 2022 05:29 UTC](https://forum.core-electronics.com.au/t/workaround-for-the-retropie-bluetooth-security-bug/10623/17 "2022-12-19T05:29:13Z")

</div>

I also accidentally put double pixel thing I forgot what it was called. Might have something to do with it

---

<div class="post-metadata">

**Author:** ![Gianluca283053](https://avatars.discourse-cdn.com/v4/letter/g/22d042/32.png) [@Gianluca283053](https://forum.core-electronics.com.au/u/Gianluca283053)\
**Post date:** [18 November 2024 00:05 UTC](https://forum.core-electronics.com.au/t/workaround-for-the-retropie-bluetooth-security-bug/10623/18 "2024-11-18T00:05:57Z")

</div>

I followed your steps to connect a bluetooth keyboard. Now that I have entered your changes the error has changed to Timeout. Why the hell can’t I use the bluetooth keyboard? The Xbox controller worked right away. Damn

 ![PXL_20241109_020456049](https://canada1.discourse-cdn.com/flex028/uploads/core_electronics/original/2X/7/78839648e1d7b172e80b0bcf02755c954a43d358.jpeg)  
 ![PXL_20241109_020524518](https://canada1.discourse-cdn.com/flex028/uploads/core_electronics/original/2X/2/28f92191832c82a4737816c2341d09f66cda4c71.jpeg)  
 ![PXL_20241109_020543137](https://canada1.discourse-cdn.com/flex028/uploads/core_electronics/original/2X/8/87871b012229997a92a6dbe6f651eb3b57879906.jpeg)

.

---

<div class="post-metadata">

**Author:** ![Jack](https://yyz2.discourse-cdn.com/flex028/user_avatar/forum.core-electronics.com.au/jack/32/9287_2.png) [@Jack](https://forum.core-electronics.com.au/u/Jack)\
**Post date:** [18 November 2024 00:21 UTC](https://forum.core-electronics.com.au/t/workaround-for-the-retropie-bluetooth-security-bug/10623/19 "2024-11-18T00:21:08Z")

</div>

Hi @Gianluca283053,

Welcome to the forum, this is a bit of an annoying issue. Were there any more steps in this process, e.g. being prompted to trust the keyboard?

Have you previously had the keyboard working?
