Games stuttering - solved
-
Hi, I'm posting this so as to help others with the same issue.
I have been running RetroPie on a Pi Zero W (specifically Atari 2600 emulator), and noticed intermittent stuttering of the game. Doing a search for "stuttering" returns dozens of posts describing a similar issue here.
After a bit of debugging I may have found the cause, this script:
/opt/retropie/supplementary/bluetooth/connect.sh
runs a loop which every ten seconds tries to connect to a bluetooth device that is not connected (in my case over 20 devices). This occasionally causes the stutter in the games. If I kill this process the games run buttery smooth (RetroPie Atari 2600 emulation uses between 20% and 50% CPU on a Pi Zero, so no problems at all).
I am replacing that script with one that only checks and reconnects to my game controller's MAC address.
Hope this helps others with the same problem.
Also, perhaps the develops can replace this script with one that does not cause this issue (e.g. the setup script could save the MAC address of the controller, and the connect script could just check and connect if necessary to that specific MAC address instead of every bluetooth device). -
@hmoazed said in Games stuttering - solved:
After a bit of debugging I may have found the cause, this script:
/opt/retropie/supplementary/bluetooth/connect.shYou mean
/home/pi/RetroPie-Setup/scriptmodules/supplementary/bluetooth/connect.sh
?Also, perhaps the develops can replace this script with one that does not cause this issue..
This script is only used when the Bluetooth connect mode is set to Force connecting to devices in the background, which is not the default and it's not recommended. Did you configure this yourself ?
-
@mitu yes, that is the file. Unfortunately I don't recall if I configured it with the Forced option during my install, but if you say that script is used only in the Force mode then I very likely did. Let me go back and reinstall to see.
Regardless, if that mode is available, some people will use it, and will run into this issue, even if as you say it is not recommended. In such cases hopefully their search will turn up this post.
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.