1. Crystalseed

    OP Crystalseed Newbie
    Newcomer

    Joined:
    Jun 24, 2018
    Messages:
    1
    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.
     

    Attached Files:

    Last edited by Crystalseed, Jun 24, 2018
  2. Notex

    Notex Advanced Member
    Newcomer

    Joined:
    Mar 21, 2017
    Messages:
    67
    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.
     
    machine69_420 likes this.
  3. x0x0

    x0x0 GBAtemp Fan
    Member

    Joined:
    Nov 15, 2017
    Messages:
    305
    Country:
    Poland
    Lol 1 post guy, dont use it...
    EDIT: THIS IS WORKING THANK YOU OP
     
    Last edited by x0x0, Jun 24, 2018
    Ty_, lordelan, Extrasklep and 2 others like this.
  4. Soluble

    Soluble GBAtemp Advanced Fan
    Member

    Joined:
    Mar 12, 2017
    Messages:
    609
    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.
     
  5. Benoit934

    Benoit934 GBAtemp Regular
    Member

    Joined:
    Oct 31, 2016
    Messages:
    129
    Country:
    France
    Source code ?
    I mean can you please give us the source code ?
     
    Dionicio3 and Notex like this.
  6. LeRepex

    LeRepex Member
    Newcomer

    Joined:
    Nov 8, 2016
    Messages:
    12
    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
     
  7. Notex

    Notex Advanced Member
    Newcomer

    Joined:
    Mar 21, 2017
    Messages:
    67
    Country:
    Australia
    You are brave. I guess you are our guinea pig :P
     
    NoNAND likes this.
  8. Clydefrosch

    Clydefrosch GBAtemp Guru
    Member

    Joined:
    Jan 2, 2009
    Messages:
    5,665
    Country:
    Germany
    or he's another sock puppet trying to sucker you into bricking your switches
     
  9. LeRepex

    LeRepex Member
    Newcomer

    Joined:
    Nov 8, 2016
    Messages:
    12
    Country:
    Germany
    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%

    — Posts automatically merged - Please don't double post! —

    If you want i can post pics
     
  10. Notex

    Notex Advanced Member
    Newcomer

    Joined:
    Mar 21, 2017
    Messages:
    67
    Country:
    Australia
    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.
     
  11. LeRepex

    LeRepex Member
    Newcomer

    Joined:
    Nov 8, 2016
    Messages:
    12
    Country:
    Germany
    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
     
    Type_O_Dev likes this.
  12. Benoit934

    Benoit934 GBAtemp Regular
    Member

    Joined:
    Oct 31, 2016
    Messages:
    129
    Country:
    France
    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 ...
     
  13. LeRepex

    LeRepex Member
    Newcomer

    Joined:
    Nov 8, 2016
    Messages:
    12
    Country:
    Germany
    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, Jun 24, 2018
  14. Benoit934

    Benoit934 GBAtemp Regular
    Member

    Joined:
    Oct 31, 2016
    Messages:
    129
    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
     
  15. rajkosto

    rajkosto GBAtemp Advanced Fan
    Member

    Joined:
    Apr 6, 2017
    Messages:
    819
    Country:
    Source code posting along with the binaries is actually REQUIRED since this is based on the fusee payload code base (GPLv2 licence)... don't run this until someone else has compiled it and verified the binaries are similar.
     
  16. LeRepex

    LeRepex Member
    Newcomer

    Joined:
    Nov 8, 2016
    Messages:
    12
    Country:
    Germany
    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, Jun 24, 2018
    Type_O_Dev likes this.
  17. xXxSwagnemitexXx

    xXxSwagnemitexXx meme machine
    Member

    Joined:
    Dec 7, 2016
    Messages:
    657
    Country:
    United Kingdom
    doubtful, ill probably try it though
     
  18. rajkosto

    rajkosto GBAtemp Advanced Fan
    Member

    Joined:
    Apr 6, 2017
    Messages:
    819
    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.
     
    gnmmarechal, otto888, daxtsu and 9 others like this.
  19. x0x0

    x0x0 GBAtemp Fan
    Member

    Joined:
    Nov 15, 2017
    Messages:
    305
    Country:
    Poland
    GL post results.

    I will be really surprised if this is a real fix
     
  20. dark_samus3

    dark_samus3 GBAtemp Addict
    Member

    Joined:
    May 30, 2015
    Messages:
    2,372
    Country:
    United States
    EDIT: looks like it was already posted above :|
     
Draft saved Draft deleted
Loading...

Hide similar threads Similar threads with keywords - Battery, Linux, issue