Tutorial Fix for Linux Battery issue

Crystalseed

New Member
OP
Newbie
Joined
Jun 24, 2018
Messages
1
Trophies
0
Age
42
XP
117
Country
United States
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: 1,939
Last edited by Crystalseed,

Notex

Well-Known Member
Newcomer
Joined
Mar 21, 2017
Messages
68
Trophies
0
Age
25
XP
540
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
38
XP
578
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
32
XP
68
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
32
XP
68
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
25
XP
540
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
32
XP
68
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
30
XP
139
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
32
XP
68
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
30
XP
139
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
32
XP
68
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
0
Age
31
XP
2,744
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
31
Location
Inside the code
XP
1,066
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
 
General chit-chat
Help Users
    C @ CommanderCool: Any good places mirroring Sea of Harkinian lately besides their shitty discord?