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,027
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
  • K3Nv2 @ K3Nv2:
    They make good burning plastic
  • BigOnYa @ BigOnYa:
    Makes me wonder if the Pi5 can play PS2? If there's even a core for it yet.
  • K3Nv2 @ K3Nv2:
    Pi5 should be able to do ps2
  • Psionic Roshambo @ Psionic Roshambo:
    Try Dragon Quest VIII it ran perfectly on a core 2 Duo I had
  • Psionic Roshambo @ Psionic Roshambo:
    Easiest game to run I found
  • K3Nv2 @ K3Nv2:
    Ps2 emulation is cake compared to 3 years ago
  • Psionic Roshambo @ Psionic Roshambo:
    Hardest is probably Gran Turismo 4
  • Psionic Roshambo @ Psionic Roshambo:
    It's much better now yes but Gran Turismo 4 is still the hardest one to emulate that I have in my collection
  • Psionic Roshambo @ Psionic Roshambo:
    Runs perfectly fine but it's as if I can feel it always on the boarder line of dropping a frame lol
  • BigOnYa @ BigOnYa:
    I ordered a spin ball couple days ago to add to my arcade cabinet, will be nice for games like golden tee, or bowling
  • Psionic Roshambo @ Psionic Roshambo:
    I always wanted a controller for like Ikari Warriors, Time Soldiers, Heavy Barrel, Forgotten Worlds games like those
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    Not even sure what to call that controller
  • Xdqwerty @ Xdqwerty:
    an online friend I've known since 2021 left me :( bc my attitude is "cutty"
  • Psionic Roshambo @ Psionic Roshambo:
    Sylvester Stallone should have played Kyle Reese lol Arnold still as the Terminator
  • BakerMan @ BakerMan:
    TF DOES "CUTTY" EVEN MEAN?
  • Xdqwerty @ Xdqwerty:
    @BakerMan, he is peruvian so it's probably an idiom
  • BigOnYa @ BigOnYa:
    I thought Cutty was a west coast rapper
  • K3Nv2 @ K3Nv2:
    Cutter
  • Psionic Roshambo @ Psionic Roshambo:
    Dr Cutty
  • Psionic Roshambo @ Psionic Roshambo:
    It's from House MD lol
  • K3Nv2 @ K3Nv2:
    I took too much viagra Dr cutty oh wait
    +1
  • Ligudink @ Ligudink:
    What in the goddamn
  • Xdqwerty @ Xdqwerty:
    @Ligudink, welcome to the gbatemp chat
    +1
  • Ligudink @ Ligudink:
    I've sen enough HAHAHA
    +1
    Ligudink @ Ligudink: I've sen enough HAHAHA +1