Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Broken sleep mode in 6.0.0 when using debug mode #119

Closed
novalkun opened this issue Sep 20, 2018 · 23 comments
Closed

Broken sleep mode in 6.0.0 when using debug mode #119

novalkun opened this issue Sep 20, 2018 · 23 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@novalkun
Copy link

i cannot sleep the switch with 4.1 release. is it normal?

@ErichMoraga
Copy link

ErichMoraga commented Sep 20, 2018

Did you transfer the extra file?
libsys_lp0.bso as seen here...
https://github.com/CTCaer/hekate/blob/master/README.md

@novalkun
Copy link
Author

i have that libsys_lp0.bso directly from hekate sdfiles 9.0.1. but it's not working

@CTCaer
Copy link
Owner

CTCaer commented Sep 20, 2018

v4 works?
Also do you see any warning about sleep mode in main screen?

EDIT:
What fw version are you on?

@novalkun
Copy link
Author

v4 works fine.

yes. when i click the power touch button, it says some warning before my switch goes to sleep. and then i choose sleep. after i click it, my switch goes to black screen, but when i press any button, the switch does not wake up.
i test with SX OS, to see if anything wrong with the 6.0 firmware, but my switch can sleep and wake up fine.

i do not know if it is a sleep problem or a wake up problem

@CTCaer
Copy link
Owner

CTCaer commented Sep 20, 2018

Which ini and boot entry you used?
In Stock through hekate it works?

EDIT:
Also how it works with v4? It didn't have 6.0 support..

@novalkun
Copy link
Author

I choose CFW boot option.

I have not used ctcaer 4.0 for 6.0 firmware yet. I'll try to run that later.

@CTCaer
Copy link
Owner

CTCaer commented Sep 20, 2018

Don't try hekate v4.0.
Try the Stock option

@novalkun
Copy link
Author

Isn't stock for ofw boot loading?

@CTCaer
Copy link
Owner

CTCaer commented Sep 20, 2018

It's not exactly stock. It's stock as far as kips go.
It still goes through hekate (hw config) and hekate patches secmon and loads sleep mode (lp0) config.

@novalkun
Copy link
Author

i have tried stock option. sleep mode works (yes). why cfw option is not working T_T

@novalkun
Copy link
Author

novalkun commented Sep 21, 2018

ah i am sorry. think the option for using CFW+sys-netcheat or stock+sysnetcheat have made the sleep mode broken. if i am using only CFW or stock, it's fine

@Reisyukaku
Copy link
Contributor

Guess I'll mention this here, but on 6.0, the sleepmode issue reported on reinx exists on hekate too. It's the debug svc kernel patch. I had someone in my server test.

@novalkun
Copy link
Author

yes. it seems recent debugmode is not compatible to 6.0. thanks. i am waiting for good news

@CTCaer
Copy link
Owner

CTCaer commented Sep 22, 2018

It is compatible with 6. It's just that secmon added checks for debug mode.
The thing is that debugmode and full svc perms are not supposed to be used all the time.
Dunno how much of a wanted fix that is.

@Reisyukaku
Copy link
Contributor

Ah, didn't know about the checks. That explains why atmo is fine. I'll put that at the end of my list since i dont know many people that use it lol.

@CTCaer CTCaer changed the title sleep mode Broken sleep mode in 6.0.0 when using debug mode Sep 23, 2018
@plutooo
Copy link

plutooo commented Dec 9, 2018

will you fix this?

@plutooo
Copy link

plutooo commented Dec 11, 2018

ping

@Reisyukaku
Copy link
Contributor

pong

@CTCaer
Copy link
Owner

CTCaer commented Dec 12, 2018

@plutooo
I plan to.
For now I haven't found why cpu suspend is not called and the best result/reaction I got was a light yellow panic screen.
Additionally, enabling debug mode via secmon and not kernel produces the same problem ("black screen w/o backlight").

@CTCaer CTCaer added bug Something isn't working help wanted Extra attention is needed labels Jan 14, 2019
@SciresM
Copy link

SciresM commented Jan 22, 2019

It's because the kernel will try to output debug stuff over UART, and UART is not set up. Exosphere currently fixes this (and thus ams has debugmode on by default), but you can probably just set uart up yourself before handover to tz.

Relevant code:

https://github.com/Atmosphere-NX/Atmosphere/blob/e0f1e637f79a6eae88178a6576a3a74a953d1929/exosphere/src/bootup.c#L218-L220

https://github.com/Atmosphere-NX/Atmosphere/blob/e0f1e637f79a6eae88178a6576a3a74a953d1929/exosphere/src/warmboot_main.c#L59-L64

@CTCaer
Copy link
Owner

CTCaer commented Jan 22, 2019

@SciresM
There were some jokes about this ("inb4 it's uart that hangs it"), even if it made sense because usage of soc parts with clock off hang the SoC.

The thing is that I tried to enable UARTA via hekate before 2 months when I saw that commit.
But it was always failing (maybe sth wrong with the old and new uart init).

I also tried stubbing functions that use it before and most of the times got hangs and sometimes a panic (probably missed some).

Anyway, now that I have your confirmation, I can try again and focus only to uart.

@SciresM
Copy link

SciresM commented Jan 23, 2019

@CTCaer yeah, when I added those commits all debugmode issues related to sleep went away for ams, so I'm pretty confident.

In addition to enabling it yourself, you'll probably need to patch the secure monitor to enable it on retail units after warmboot, or else a hang will occur on second sleep?

@CTCaer
Copy link
Owner

CTCaer commented Feb 11, 2019

b3f8961

@CTCaer CTCaer closed this as completed Feb 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

6 participants