CTCaer / hekate

hekate - A GUI based Nintendo Switch Bootloader
GNU General Public License v2.0
6.8k stars 578 forks source link

Update.bin not loading properly with Hekate 4.2 [Black Screen] #156

Closed 16BitWonder closed 5 years ago

16BitWonder commented 6 years ago

I was using a dongle with Hekate 4.2 flashed and extracted the latest release to my SD and placed the new Hekate 4.5 in bootloader/update.bin.

Every time the 4.2 payload was pushed it would result in a black screen when update.bin was present, removing it allowed 4.2 to boot normally. I then flashed 4.5 to my dongle to avoid using update.bin and it's working fine that way.

I additionally tested on a different dongle with the same setup (Hekate 4.2 flashed, 4.5 as bootloader/update.bin) and encountered the same black screen until 4.5 was flashed and update.bin removed.

I'm not sure how relevant of an issue this is considering it can be fixed by just flashing the newer payload, but figured to put this up in case others were having the same problem, or if it's something that needs fixing.

CTCaer commented 5 years ago

It is a relevant issue. I will investigate..

CTCaer commented 5 years ago

I managed to check it again (on exfat and fat32 cards) and it works as intended. Can you overwrite the update.bin with v4.5 again?

16BitWonder commented 5 years ago

Put 4.5 back in bootloader/update.bin and reflashed my dongle with 4.2 and it's working now. I'm not sure what, but I must have done something wrong last night. Sorry!

Edit: Scratch that, it's happening again. It starting black-screening again after rebooting from HOS. I'm going to try a couple more times and see if it can be replicated.

CTCaer commented 5 years ago

You use exFAT?

Maybe a homebrew is corrupting your sd card and takes hekate with it. Even if one bit changed and it's placed where it shouldn't the boot will hang.

I'll investigate more.

EDIT: With the same failing setup, If you power off, it happens again?

16BitWonder commented 5 years ago

My SD is formatted as fat32

Pushing 4.5 and then shutting down from RCM let 4.2->4.5 work again.

Trying to push 4.2->4.5 after rebooting from HOS (6.2.0 Atmo-v0.8.1) 4.2->4.5 results in a black screen. (Including after full shut down)

Pushing 4.5 and shutting down from RCM this time did not let 4.2->4.5 work again.

I'm still trying to figure out a good way of getting 4.2->4.5 working again after the black-screens start up.

Edit: I've also just compared the update.bin currently on my SD with the 4.5 release using HxD and it's saying they're identical.

16BitWonder commented 5 years ago

I'm not sure if this will work 100% of the time, but I got 4.2->4.5 booting again by:

After I got it working I tried launching Atmosphere with Hekate rather than chain-loading Fusee.

CTCaer commented 5 years ago

Do you see hekate's logo before the black screen? If yes, that's Auto HOS power off. You can disable it in Options.

16BitWonder commented 5 years ago

No hekate's logo is not displayed, nor is Auto HOS power off enabled.

I made a quick video after getting it working again to show what I'm experiencing. In it I'm pushing hekate 4.2 with 4.5 in bootloader/update.bin. I'm using TegraRCMGUI in the video since it's faster to test with than a dongle and the issue shows up with it too. https://www.youtube.com/watch?v=fOjrdFGyd_c&feature=youtu.be

CTCaer commented 5 years ago

Try what fails for you by injecting this special 4.2 hekate_ctcaer_4.23.zip

16BitWonder commented 5 years ago

Pushed it a few times, still displayed a black-screen and had to be powered off manually. I additionally tested a different exFat recovery SD I had to make sure it's not a faulty card and it's also black-screening with 4.2 and 4.23.

Edit: I've also found that once it starts black screening, the best way to get it working again is to delete and then copy over a new update.bin, rather than moving it to another directory or renaming it temporarily. Which is odd since they're showing up as identical on my end.

CTCaer commented 5 years ago

I don't think it's the sd card or the copy of update.bin. I had it my self after letting the device sit for some minutes in rcm (which is not consistent, most of the times it loads). Otherwise it never happens. And it happens consistently for you, so I suspect diffs in hw.

Today I'll try to debug it. Can you go to RetroNX discord and hit me with a msg?

CTCaer commented 5 years ago

Try with this update bin: update.zip

Based on tests I did, it seems that the Display controller fails to init.

If you remove autoboot, you'll see that the menu works. With autoboot on, it halts at last stage because it tries to deinit display again even though it is in a deinitialized state.

Our different experiences may also come because different DSI logic revisions.

EDIT: I removed this: https://github.com/CTCaer/hekate/blob/master/bootloader/main.c#L1149 in that payload. So it will always do the full hw config

16BitWonder commented 5 years ago

After rebooting with the new update.bin from Hekate->Fusee->Atmospherev0.8.2 it continues to black-screen, sorry I missed your earlier message. I'll get on Discord.

CTCaer commented 5 years ago

Based on testing with 16BitWonder, it seems that this happens only when fusee is used. Full atmo with exosphere does not produce that.

It will have to wait for now, because no time to investigate more.

CTCaer commented 5 years ago

https://github.com/CTCaer/hekate/commit/98d715243a3d806a25ca06c1260d9ea1f7c62d83

Issue https://github.com/CTCaer/hekate/issues/160 is also the same.

Thank you all for testing.

CTCaer commented 5 years ago

This is a breaking change. That means that your dongle/modchip must be updated with the release that will include that fix.