Hardware Android JoyCon Lag

Does this happen to you?

  • Yes

  • No


Results are only viewable after voting.

MK73DS

Non-commutative algebra
Member
Joined
Feb 23, 2015
Messages
575
Trophies
0
Age
25
Location
France
Website
www.youtube.com
XP
1,536
Country
France
Tested on an older device with Android 4.4.4 and there is no lag. Sorry for the poor gif quality but hopefully you can see that there isn't any lag :)

ezgif-4-79648f651c.gif


--------------------- MERGED ---------------------------

So this is most likely a software issue and not a hardware one. I hope someone can bring Android 4.X Bluetooth drivers to Android 5.X and above :D
 
Last edited by MK73DS,

jt_1258

Ella
Member
Joined
Aug 21, 2016
Messages
3,055
Trophies
2
Age
24
XP
4,902
Country
United States
Tested on an older device with Android 4.4.4 and there is no lag. Sorry for the poor gif quality but hopefully you can see that there isn't any lag :)

View attachment 119698

--------------------- MERGED ---------------------------

So this is most likely a software issue and not a hardware one. I hope someone can bring Android 4.X Bluetooth drivers to Android 5.X and above :D
alas, we have us down here on 4.x have wished for a similar thing. Wii remotes don't work on 4.x sadly since an update to the Bluetooth broke support
 

igloo

Member
Newcomer
Joined
Jan 3, 2018
Messages
5
Trophies
0
XP
65
Country
Switzerland
I have done some debugging and found the cause of the lag problem.

Because the Joy-Con and Pro Controller don't have the HIDSSRHostMaxLatency attribute in their SDP record, the Android Bluetooth stack enables sniff subrating (SSR) with max latency default value 500 ms (according to Bluetooth spec). This causes the input report rate to slow down to 2 reports per second.

Nintendo could fix this with a controller fimware update by adding the HIDSSRHostMaxLatency attribute with an attribute value of 15 ms.

It could also be fixed in the Android Bluetooth stack instead by lowering the default value or by disabling SSR for the Switch controllers. The 500 ms SSR max latency default value is hardcoded in /system/lib/hw/bluetooth.default.so.

The Bluetooth stack in older Android devices doesn't support SSR, that's why they don't lag with the Switch controller.
 

MK73DS

Non-commutative algebra
Member
Joined
Feb 23, 2015
Messages
575
Trophies
0
Age
25
Location
France
Website
www.youtube.com
XP
1,536
Country
France
I have done some debugging and found the cause of the lag problem.

Because the Joy-Con and Pro Controller don't have the HIDSSRHostMaxLatency attribute in their SDP record, the Android Bluetooth stack enables sniff subrating (SSR) with max latency default value 500 ms (according to Bluetooth spec). This causes the input report rate to slow down to 2 reports per second.

Nintendo could fix this with a controller fimware update by adding the HIDSSRHostMaxLatency attribute with an attribute value of 15 ms.

It could also be fixed in the Android Bluetooth stack instead by lowering the default value or by disabling SSR for the Switch controllers. The 500 ms SSR max latency default value is hardcoded in /system/lib/hw/bluetooth.default.so.

The Bluetooth stack in older Android devices doesn't support SSR, that's why they don't lag with the Switch controller.

Is there a way to hack /system/lib/hw/bluetooth.default.so and rewrite the value of HIDSSRHostMaxLatency ?
Or can an app bypass, or overwrite, this attribute ?
 

dpad_5678

Ape weak on own. Ape strong in unity.
Member
Joined
Nov 19, 2015
Messages
2,219
Trophies
1
XP
2,880
Country
United States
Is there a way to hack /system/lib/hw/bluetooth.default.so and rewrite the value of HIDSSRHostMaxLatency ?
Or can an app bypass, or overwrite, this attribute ?
*.so files in Android are compiled binaries. It may be easier to perform a memory edit instead.
 

guily6669

GbaTemp is my Drug
Member
Joined
Jun 3, 2013
Messages
2,350
Trophies
1
Age
34
Location
Doomed Island
XP
2,145
Country
United States
Use a different Bluetooth manager and I think it will be fixed... DS4 on android is the same it works fine for like 30 seconds and then is like 1 second lag...
BY _DUSTY_ from XDA forums:
1. First download and install Bluetooth Auto Connect

The reason we need this app is that for some reason the controllers input starts to lagg after about 30sec after pairing it with the tablet, the only solution I found was using this application.

2. So now that we have the bluetooth application installed aswell we can open the app.
*If the app asks you to turn on Bluetooth just hit OK.
3. Now scroll down to the bottom and tap on "Advanced Options" in here you want to change the following settings:
Rety Count = 1
Rety After(Sec) = 1
Device Timeout(Sec) = 5
Continuous Connect = 2
4. When you changed these settings you can turn on the DS4 controller by pressing on the PS button.
5. Now press on the "Connect Now" button at the bottom of the Advanced Options page.

After 2-3 seconds you will be asked if it is oke to pair the controller with the tablet, select yes and tadaaaaa you have a working DS4 controller on the Nvidia Shield Tablet
biggrin.gif


So for everything works for me, even the button mapper that can be accessed by holding the Options button on the DS4.

I hope this helps a couple of people !
smile.gif
This worked for me on my Nvidia Shield with Dual Shock 4 from PS4 without needing root, else I would need the sixaxis app which requires root to use DS3\DS4 on android devices without Dualshock drivers...

It will probably work with Joy-cons, but sometimes it still lags, try again until it stays connected without lag, after no lag is present it will keep working unless you disconnect the controller...
 
  • Like
Reactions: TotalInsanity4

igloo

Member
Newcomer
Joined
Jan 3, 2018
Messages
5
Trophies
0
XP
65
Country
Switzerland
For custom roms it can be fixed by changing the default value in the source code and then building the whole custom rom from source.

The value to change is in system/bt/bta/include/bta_hh_api.h
Code:
#define BTA_HH_SSR_MAX_LATENCY_DEF 800 /* 500 ms*/
Changing this to 0 will disable SSR if the controller doesn't specify HIDSSRHostMaxLatency.
 
  • Like
Reactions: StraightArrow

StraightArrow

Member
Newcomer
Joined
Apr 9, 2018
Messages
7
Trophies
0
Age
26
XP
55
Country
United States
For custom roms it can be fixed by changing the default value in the source code and then building the whole custom rom from source.

The value to change is in system/bt/bta/include/bta_hh_api.h
Code:
#define BTA_HH_SSR_MAX_LATENCY_DEF 800 /* 500 ms*/
Changing this to 0 will disable SSR if the controller doesn't specify HIDSSRHostMaxLatency.
Are you saying this method only works with roms? I am trying to do what you have outlined but cannot find the bt/bta/include folders (I have an s7 edge). I have been able to find the bluetooth.default.so but as someone stated above it is in binary form. I have opened it using a hex editor but I don't know much to do past that. I also don't know what a memory editor is and tried downloading some but got spooked from the human verification nonsense. I feel like I'm getting close, any more help please. anyone?
 

Attachments

  • latency bug.PNG
    latency bug.PNG
    34.1 KB · Views: 457

MK73DS

Non-commutative algebra
Member
Joined
Feb 23, 2015
Messages
575
Trophies
0
Age
25
Location
France
Website
www.youtube.com
XP
1,536
Country
France
Are you saying this method only works with roms? I am trying to do what you have outlined but cannot find the bt/bta/include folders (I have an s7 edge). I have been able to find the bluetooth.default.so but as someone stated above it is in binary form.

As mentioned in this thread on XDA , Samsung does not give the full source code of their kernel and therefore the only option you have is to try modifying AOSP kernels, which are very buggy on S7 and S7E.
 

StraightArrow

Member
Newcomer
Joined
Apr 9, 2018
Messages
7
Trophies
0
Age
26
XP
55
Country
United States
As mentioned in XDA , Samsung does not give the full source code of their kernel and therefore the only option you have is to try modifying AOSP kernels, which are very buggy on S7 and S7E.
I see... Why did he write us off on it not working with samsung? There are other android devices that his fix could work for, right? Pixel, Nexus, HTC... I'm surely not the only one working on this.
 

StraightArrow

Member
Newcomer
Joined
Apr 9, 2018
Messages
7
Trophies
0
Age
26
XP
55
Country
United States
Forgive me for being a complete noob about this but here is my thought process so far.
1. I was thinking of downgrading my s7 firmware to 4.0 but that is apparently impossible given the s7 came with 6.0 stock.
2. Since samsung is bad about AOSP, I try to modify the stock rom somehow without having to build from source. I think I may have to root my phone for this part to gain access to the .h file as I still have been unable to find it (with a root file browser from ASUS). I have no idea if this will work and I will need to give myself write access to these files.
3. Flash a custom rom like lineage OS and either see if the Bluetooth works natively, or fiddle with the files from there.
4. Flash a modified samsung source rom?
Is there anything else I should try? Which would be the best way to go about this? I'm going to start with number 2 first.
Someone would probably have a way easier time with this on a different device since samsung is notoriously closed off to modding, so please feel free to try what @igloo suggested above and let us know what happens.
 

guily6669

GbaTemp is my Drug
Member
Joined
Jun 3, 2013
Messages
2,350
Trophies
1
Age
34
Location
Doomed Island
XP
2,145
Country
United States
Before customizing or modding files on your android, have you tried what I told above on my last post? It works for me with DS4 which has the same lag too.

Its a official free app from playstore -> https://play.google.com/store/apps/details?id=org.myklos.btautoconnect

BY _DUSTY_ from XDA forums:
1. First download and install Bluetooth Auto Connect

The reason we need this app is that for some reason the controllers input starts to lagg after about 30sec after pairing it with the tablet, the only solution I found was using this application.

2. So now that we have the bluetooth application installed aswell we can open the app.
*If the app asks you to turn on Bluetooth just hit OK.
3. Now scroll down to the bottom and tap on "Advanced Options" in here you want to change the following settings:
Rety Count = 1
Rety After(Sec) = 1
Device Timeout(Sec) = 5
Continuous Connect = 2
4. When you changed these settings you can turn on the DS4 controller by pressing on the PS button.
5. Now press on the "Connect Now" button at the bottom of the Advanced Options page.

After 2-3 seconds you will be asked if it is oke to pair the controller with the tablet, select yes and tadaaaaa you have a working DS4 controller on the Nvidia Shield Tablet
biggrin.gif


So for everything works for me, even the button mapper that can be accessed by holding the Options button on the DS4.

I hope this helps a couple of people !
smile.gif
Just download it and change the settings as reported above, if it still lags, turn off bluetooth then on until it stays constantly lag free after 30 seconds which is when lag starts.
 

MK73DS

Non-commutative algebra
Member
Joined
Feb 23, 2015
Messages
575
Trophies
0
Age
25
Location
France
Website
www.youtube.com
XP
1,536
Country
France
Forgive me for being a complete noob about this but here is my thought process so far.
1. I was thinking of downgrading my s7 firmware to 4.0 but that is apparently impossible given the s7 came with 6.0 stock.
2. Since samsung is bad about AOSP, I try to modify the stock rom somehow without having to build from source. I think I may have to root my phone for this part to gain access to the .h file as I still have been unable to find it (with a root file browser from ASUS). I have no idea if this will work and I will need to give myself write access to these files.
3. Flash a custom rom like lineage OS and either see if the Bluetooth works natively, or fiddle with the files from there.
4. Flash a modified samsung source rom?
Is there anything else I should try? Which would be the best way to go about this? I'm going to start with number 2 first.
Someone would probably have a way easier time with this on a different device since samsung is notoriously closed off to modding, so please feel free to try what @igloo suggested above and let us know what happens.

2. Having root acces does not give you access the .h files. There are part of the source code of the ROM, which is not present in your phone. Think of it like changing the recipe of a cake : the .h files are the ingredients (well, a part of them). Once you have your cake, it is not possible to modify the ingredients you put in ! The only way to have a different cake is to make it with different ingredients :)
3. I already tried with both 14.1 and 15.1 Lineage OS and lags are still there
4. Since Samsung does not give the full source of their ROM, it is not possible to edit the required file.

Before customizing or modding files on your android, have you tried what I told above on my last post? It works for me with DS4 which has the same lag too.

Its a official free app from playstore -> https://play.google.com/store/apps/details?id=org.myklos.btautoconnect


Just download it and change the settings as reported above, if it still lags, turn off bluetooth then on until it stays constantly lag free after 30 seconds which is when lag starts.

It doesn't work for me unfortunately :/
 

tunip3

[debugger active]
Banned
Joined
Oct 31, 2016
Messages
1,675
Trophies
0
XP
1,661
Country
United Kingdom
It's just a galaxy tab 4 SM-T230NU tablet, and have you tried again recently, the lag went away eventually for me, also, try rebooting the device

--------------------- MERGED ---------------------------


I believe it worked on older version the wii mote but newer android versions broke it and it now asks for a pin iirc
leave the pin blank
 

MK73DS

Non-commutative algebra
Member
Joined
Feb 23, 2015
Messages
575
Trophies
0
Age
25
Location
France
Website
www.youtube.com
XP
1,536
Country
France
if it still lags, turn off bluetooth then on until it stays constantly lag free after 30 seconds which is when lag starts.

The lags don't appear after some time : they are always there and not consistent at all (sometime a single short press is not registered, other times it lasts half a second, all of that being delayed by XXXXms)
 

guily6669

GbaTemp is my Drug
Member
Joined
Jun 3, 2013
Messages
2,350
Trophies
1
Age
34
Location
Doomed Island
XP
2,145
Country
United States
The lags don't appear after some time : they are always there and not consistent at all (sometime a single short press is not registered, other times it lasts half a second, all of that being delayed by XXXXms)
That was supposed to be used with the app I said not turning off then on without using the app it doesn't work...
It doesn't work for me unfortunately :/
Sometimes it didn't work 4 me either, but messing a bit after some point I get solid lag free connection that just keep working while using the Bluetooth autoconnect app with DS4 controller on my tablet. Without the app it's always 1 second lag and also don't register short button presses.

It's exactly what ppl reports here with the joy-cons so I think the app should work.
 
Last edited by guily6669,

jt_1258

Ella
Member
Joined
Aug 21, 2016
Messages
3,055
Trophies
2
Age
24
XP
4,902
Country
United States
leave the pin blank
I thought you were forced to type something into the field? I'll have to try later but I remember reading quite a few instances of it just being impossible with the newer android versions...well, newer at the time being 4.x.x
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • Jayro @ Jayro:
    Eventhough the New 3DS XL is more powerful, I still feel like the DS Lite was a more polished system. It's a real shame that it never got an XL variant keeping the GBA slot. You'd have to go on AliExpress and buy an ML shell to give a DS phat the unofficial "DS Lite" treatment, and that's the best we'll ever get I'm afraid.
    +1
  • Jayro @ Jayro:
    The phat model had amazingly loud speakers tho.
    +1
  • SylverReZ @ SylverReZ:
    @Jayro, I don't see whats so special about the DS ML, its just a DS lite in a phat shell. At least the phat model had louder speakers, whereas the lite has a much better screen.
    +1
  • SylverReZ @ SylverReZ:
    They probably said "Hey, why not we combine the two together and make a 'new' DS to sell".
  • Veho @ Veho:
    It's a DS Lite in a slightly bigger DS Lite shell.
    +1
  • Veho @ Veho:
    It's not a Nintendo / iQue official product, it's a 3rd party custom.
    +1
  • Veho @ Veho:
    Nothing special about it other than it's more comfortable than the Lite
    for people with beefy hands.
    +1
  • Jayro @ Jayro:
    I have yaoi anime hands, very lorge but slender.
  • Jayro @ Jayro:
    I'm Slenderman.
  • Veho @ Veho:
    I have hands.
  • BakerMan @ BakerMan:
    imagine not having hands, cringe
    +1
  • AncientBoi @ AncientBoi:
    ESPECIALLY for things I do to myself :sad:.. :tpi::rofl2: Or others :shy::blush::evil:
    +1
  • The Real Jdbye @ The Real Jdbye:
    @SylverReZ if you could find a v5 DS ML you would have the best of both worlds since the v5 units had the same backlight brightness levels as the DS Lite unlockable with flashme
  • The Real Jdbye @ The Real Jdbye:
    but that's a long shot
  • The Real Jdbye @ The Real Jdbye:
    i think only the red mario kart edition phat was v5
  • BigOnYa @ BigOnYa:
    A woman with no arms and no legs was sitting on a beach. A man comes along and the woman says, "I've never been hugged before." So the man feels bad and hugs her. She says "Well i've also never been kissed before." So he gives her a kiss on the cheek. She says "Well I've also never been fucked before." So the man picks her up, and throws her in the ocean and says "Now you're fucked."
    +1
  • BakerMan @ BakerMan:
    lmao
  • BakerMan @ BakerMan:
    anyways, we need to re-normalize physical media

    if i didn't want my games to be permanent, then i'd rent them
    +1
  • BigOnYa @ BigOnYa:
    Agreed, that why I try to buy all my games on disc, Xbox anyways. Switch games (which I pirate tbh) don't matter much, I stay offline 24/7 anyways.
  • AncientBoi @ AncientBoi:
    I don't pirate them, I Use Them :mellow:. Like I do @BigOnYa 's couch :tpi::evil::rofl2:
    +1
  • cearp @ cearp:
    @BakerMan - you can still "own" digital media, arguably easier and better than physical since you can make copies and backups, as much as you like.

    The issue is DRM
  • cearp @ cearp:
    You can buy drm free games / music / ebooks, and if you keep backups of your data (like documents and family photos etc), then you shouldn't lose the game. but with a disk, your toddler could put it in the toaster and there goes your $60

    :rofl2:
  • cearp @ cearp:
    still, I agree physical media is nice to have. just pointing out the issue is drm
    cearp @ cearp: still, I agree physical media is nice to have. just pointing out the issue is drm