Tutorial  Updated

Fix for Linux Battery issue

Here's a quick and easy fix for the turning off at 40% battery issue that people are seeing after running Linux. This is effectively the same fix as unplugging the battery, but does so without having to take apart the Switch.

Step 1: Download attached fusee-linux-battery-fix.rar
Step 2: Extract and load the binary with your favorite RCM Smash tool (I'm using TegraRcmSmash).
Step 3: You should see the typical fusee screen, at this point unplug the USB cable. The screen should go off.
Step 4 (optional?): Hold the power button for 10 seconds. Your switch won't turn on at this point, that's desired.
Step 5: Plug in a USB cable. Switch will turn on, and you're done.

This worked to fix my Switch, let me know if it works for you.

Edit:

Source is here:

github/crystalseedgba/BatteryFix/blob/master/fusee/src/main.c (Sorry it's not letting me post hyperlinks)

This doesn't fix the Linux bug, this is really just a crude workaround. At first I suspected that Linux is somehow mangling the battery gauge but this doesn't seem to be the case. The battery gauge reports around 40% and decent battery voltage when my Switch would turn off. I think Linux is misconfiguring some undervoltage lockout somewhere, but I don't know where.

Thanks to jjbredesen for his "How to make a custom Fusee payloads" tutorial.
 

Attachments

  • fusee-linux-battery-fix.rar
    14.2 KB · Views: 2,030
Last edited by Crystalseed,

Notex

Well-Known Member
Newcomer
Joined
Mar 21, 2017
Messages
68
Trophies
0
Age
26
XP
550
Country
Australia
What exactly does this do to fix the battery? Did you code this or did you find it somewhere? I'm kinda anxious about just running a random binary on my switch.
 
  • Like
Reactions: machine69_420

Soluble

Well-Known Member
Member
Joined
Mar 12, 2017
Messages
609
Trophies
0
Age
39
XP
588
Country
Yeah I don't have the issue, but this is a good time to remind everyone NOT to use random payloads we know nothing about.
 

LeRepex

Member
Newcomer
Joined
Nov 8, 2016
Messages
12
Trophies
0
Age
33
XP
79
Country
Germany
just tried it out for me it seems to work. having my switch playing some games now to waste some battery and see if it turns off
 

LeRepex

Member
Newcomer
Joined
Nov 8, 2016
Messages
12
Trophies
0
Age
33
XP
79
Country
Germany
You are brave. I guess you are our guinea pig :P
it was more just "yes finaly i can fix my switch than thinking about the risks :D"

also i can say my switch is running super mario odysee right now with 35% without turning off so it seems to have fixed it before the limit was about 40%

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

or he's another sock puppet trying to sucker you into bricking your switches
If you want i can post pics
 

Notex

Well-Known Member
Newcomer
Joined
Mar 21, 2017
Messages
68
Trophies
0
Age
26
XP
550
Country
Australia
also i can say my switch is running super mario odysee right now with 35% without turning off so it seems to have fixed it before the limit was about 40%
That's great news. I am going to wait until a few more people try it first though before I try. It just seems very sketchy that someone new to the forum has posted this fix.
 

LeRepex

Member
Newcomer
Joined
Nov 8, 2016
Messages
12
Trophies
0
Age
33
XP
79
Country
Germany
That's great news. I am going to wait until a few more people try it first though before I try. It just seems very sketchy that someone new to the forum has posted this fix.
Thought the same at first but only the chance to fix my switch without taking it apart was enough for me to try it :D
 
  • Like
Reactions: Type_O_Dev

Benoit934

Well-Known Member
Member
Joined
Oct 31, 2016
Messages
129
Trophies
0
Age
31
XP
150
Country
France
If you want i can post pics

Even a video capture wouldn't be enough because you can run a dummy payload letting the think it's working but actually sending a bad payload.
I don't know why someone might do this but for avoiding the paranoia around here the best way is to have the source code that we compile ourselves after checking after what it's doing.
They fear TX too so ...
 

LeRepex

Member
Newcomer
Joined
Nov 8, 2016
Messages
12
Trophies
0
Age
33
XP
79
Country
Germany
Even a video capture wouldn't be enough because you can run a dummy payload letting the think it's working but actually sending a bad payload.
I don't know why someone might do this but for avoiding the paranoia around here the best way is to have the source code that we compile ourselves after checking after what it's doing.
They fear TX too so ...
Yes thats actually a good point but still if you want i can post pics maybe also a video with download process

EDIT: 30% and still running fine
 
Last edited by LeRepex,

Benoit934

Well-Known Member
Member
Joined
Oct 31, 2016
Messages
129
Trophies
0
Age
31
XP
150
Country
France
@LeRepex I beleive you and I'll not blame the newcomer for being a newcomer but it would be great if he share the source code, it's a fix there is no reasons to not share it
 

LeRepex

Member
Newcomer
Joined
Nov 8, 2016
Messages
12
Trophies
0
Age
33
XP
79
Country
Germany
@LeRepex I beleive you and I'll not blame the newcomer for being a newcomer but it would be great if he share the source code, it's a fix there is no reasons to not share it
Yes thats actually true :D

EDIT: 20% and still running Mario Odyssey just fine
EDIT 2: 10% Still running i will now charge my switch up again. who ever made this fix i love you
 
Last edited by LeRepex,
  • Like
Reactions: Type_O_Dev

rajkosto

Well-Known Member
Member
Joined
Apr 6, 2017
Messages
819
Trophies
1
XP
2,775
Country
Code:
  init_i2c_controller(0);
  i2c_read_register((int)v2, 1u, 0, 0x6B, 0xA);
  if ( v2[0] != 0x2F )
  {
    printk("ERROR: charger part number mismatch got: 0x%02x want: 0x%02x\n\n   ", v2[0], 0x2F);
    while ( 1 )
      ;
  }
  i2c_read_register((int)&v2[1], 1u, 0, 0x6B, 5);
  v2[1] &= 0xCFu;
  i2c_write_register(0, 0x6B, 5, &v2[1], 1);
  i2c_read_register((int)&v2[2], 1u, 0, 0x6B, 7);
  v2[2] |= 0x20u;
  i2c_write_register(0, 107, 7, &v2[2], 1);
  printk("\n\nBATFET is now disabled, disconnect the USB cable.\n\n");

reverse engineered code, so doesnt seem too malicious.
 

x0x0

Well-Known Member
Member
Joined
Nov 15, 2017
Messages
300
Trophies
0
Age
32
Location
Inside the code
XP
1,101
Country
Poland
doubtful, ill probably try it though
GL post results.

Code:
  init_i2c_controller(0);
  i2c_read_register((int)v2, 1u, 0, 0x6B, 0xA);
  if ( v2[0] != 0x2F )
  {
    printk("ERROR: charger part number mismatch got: 0x%02x want: 0x%02x\n\n   ", v2[0], 0x2F);
    while ( 1 )
      ;
  }
  i2c_read_register((int)&v2[1], 1u, 0, 0x6B, 5);
  v2[1] &= 0xCFu;
  i2c_write_register(0, 0x6B, 5, &v2[1], 1);
  i2c_read_register((int)&v2[2], 1u, 0, 0x6B, 7);
  v2[2] |= 0x20u;
  i2c_write_register(0, 107, 7, &v2[2], 1);
  printk("\n\nBATFET is now disabled, disconnect the USB cable.\n\n");

reverse engineered code, so doesnt seem too malicious.

I will be really surprised if this is a real fix
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • 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."
    +2
  • 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.
    +1
  • 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
    +1
  • 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
    +1
  • rqkaiju2 @ rqkaiju2:
    i like physical media because it actually feels like you own it. thats why i plan on burning music to cds
  • cearp @ cearp:
    It's nice to not have to have a lot of physical things though, saves space
    +1
  • AncientBoi @ AncientBoi:
    Nor clothes 🤮 . Saves on time, soap, water and money having to wash them. :D
  • SylverReZ @ SylverReZ:
    @rqkaiju2, Physical media is a great source for archiving your data, none of that cloud storage shiz.
    +1
  • AncientBoi @ AncientBoi:
    [squeezes @SylverReZ onto a physical media, then archives you in my old stuff box] :tpi::rofl2::tpi:
    +1
  • BakerMan @ BakerMan:
    guys, should i change my pfp to one of these or keep it the same?
    iu

    iu

    (i guess i could change it to one of my other pfps too, but i just want to see what you guys think first)
  • SylverReZ @ SylverReZ:
    @BakerMan, Up to you.
  • BakerMan @ BakerMan:
    smug sonic time lmao
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    Chronic The HempHog
  • DilllyDabDharma @ DilllyDabDharma:
    I'm new! Hi!
  • cearp @ cearp:
    Welcome
  • DilllyDabDharma @ DilllyDabDharma:
    What are your favorite topics?
    DilllyDabDharma @ DilllyDabDharma: What are your favorite topics?