averne / Fizeau

Color management on the Nintendo Switch
GNU General Public License v2.0
339 stars 15 forks source link

Error 2165-1001 when plugging in/ unplugging switch from wall or dock charger #62

Closed theimpatientsamurai closed 1 year ago

theimpatientsamurai commented 1 year ago

I want to try to explain as best I can so this issue can get fixed for me and others:

The error is related to sleep mode, which works properly out of dock/wall charge, and in dock/wall charge mode, but as soon as I pull it out of the dock/wall charge or plug it in, it 100% chance crashes. I deleted all mods and it functions properly. I tried this and Tesla as the only thing in the Atmosphere/contents folder, and deleted all other ovl's, and it occurs 100% of the time, so it has to be because of this HB program. It's not Tesla, as it works just fine by itself, and alongside all other HB I have.

Switch is original 2017 model, low serial, no modchip. FW Version is 16.0.2, but it also occurred on 15.0.0 Atmosphere is current (1.5.2) Hekate is current: (6.0.3)

Nothing else should be interfering with it on the switch; there are no other modules or Atmosphere mods enabled/installed. Hopefully we can get to the bottom of this, as it makes it hard to swap between docked and handheld play.

I can upload Error screen if you need it

theimpatientsamurai commented 1 year ago

IMG_20230512_155310931 Here is the error itself. It took me a while to narrow it down, but I can get it consistently with Tesla and Fizeau enabled only, and can't get it at all with the rest enabled, so it's definitely this. I really like this program though, so getting to the bottom of this to fix would be fantastic.

The error happened on Fw15 as well before I updated to 16.0.2, I thought updating might fix it but it seems it didn't.

After looking on here:

https://www.eliboa.com/switch/nca.php and here: https://switchbrew.org/wiki/Title_list which led me to here: https://switchbrew.org/wiki/OMM_services

0100000000000045, the omm-sysmodule, seems to have been introduced in 14.0.0, which makes sense why on my 13.0.0 FW switch it worked fine. It's "a sysmodule responsible for arbitrating the operation changes between docked and handheld modes," which makes sense for the docked/undocked issue, but not when I plug/unplug the charger cord, unless it checks for it whenever plugged in at all, thus the crash. Not sure what this program is doing when turned on/off from sleep mode when plugged in/unplugged, as I'm not a switch developer myself, and I wish I could help more with deciphering what's going on in the backend, but I can continue testing more things if you need me to. I'll help in any way to get this fixed, as this program is very useful.

Oh, and config I haven't touched, but it looks enabled in the config file, and presets look good as well.

averne commented 1 year ago

Hi, thank you for the detailed report. Indeed Fizeau holds and uses an omm session to query whether to use the internal or external screen, so it would it's posible it's causing an error. What I don't get is that I've been using my sysmodule for a while without having this issue at all. I can plug in the charger, go in and out of docked mode without any error. Your setup is also similar to mine (rcmable switch, latest firm/ams/hekate)

Could you give me steps I need to take to reproduce the error? Thanks.

theimpatientsamurai commented 1 year ago

Thanks for the reply! I made sure that the atmosphere/contents folder was clear, minus nx-ovloader, or tesla, v1.2.2. I had nxthemesinstaller installed in exefs patches, but after removing it, it still happens. I can replicate it by just removing it or adding it to the dock a few times, plugging it in or unplugging it, or turning it on/off while it's plugged in to the wall. I can even video it for you if you want to see what I'm doing. It usually takes less than 10 on/off presses or plugs/unplugs. It's not every time though, which makes this problem a real nasty one to figure out unfortunately :/ It also just crashes when left in the charger on occasion. I'll leave and come back and just see it crashed after around 5 minutes. seems like it takes a few minutes after starting up for the error to appear, but that could just be coincidence.

I'll do more testing, but I have some more info: I do have sigpatches installed to play my dumped games, but upon examination it seems none use the "omm" sysmodule, so I don't think that's the issue. I deleted them and it still does it. I have a 512 GB SD I'm using that's fat32. Shouldn't be an issue but thought I'd mention it I'm using an emuNAND on the SD, not the file access version, but again, that shouldn't matter I don't think. There is nothing other than Tesla v1.2.2 running along with Atmosphere is current (1.5.2), so I'm not sure what the problem could be, as it was an issue for me on 15.0.0 as previously stated.

I do want to help get this fixed though, as you made a great program, and using it has been fantastic in the past, but the random crashes have just been preventing me from using it anymore since FW 13.0.0

theimpatientsamurai commented 1 year ago

Upon closer examination, it seems it only crashes while plugged in, whether that's the dock or the charger. It won't crash while unplugged no matter how many times I try to replicate it. So that's the best lead I've gotten.

My switch's serial # is xaw1006862... btw, in case that mattered. Lower, but not actually super low

theimpatientsamurai commented 1 year ago

I found that deleting the error logs and temp file folders make it stop crashing, but when they fill up with files again it starts crashing again. No idea why but that temporarily fixes the issue