OpenAnnePro / qmk_firmware

This has since been merged back to mainline QMK. Please use qmk/qmk_firmware
https://qmk.fm
GNU General Public License v2.0
196 stars 64 forks source link

[Feature Request] Turn off Led on Computer Suspend #27

Open fegies opened 3 years ago

fegies commented 3 years ago

If suspend_power_down_user() is defined, keyboard_post_init_user() and suspend_wakeup_init_user() are not called correctly. Furthermore, the keyboard is not detected after suspend (on linux 5.10) and has to be replugged.

If the function is not defined, the board will wake the pc correctly and be detected on wake, but the leds will remain on.

thomazmoura commented 3 years ago

Codetector recently did something similar on the Kemove port here. I took a look on the code and most of it seems to be Kemove specific, but that might help you discover what has to be changed (if it's even doable with AP2, that is). I suppose that are annepro2 equivalent functions to most of those snowfox ones.

Codetector1374 commented 3 years ago

oh yeah I did that because you sent this PR actually

So the very likely problem is that you need to change they way our mutex are initialized. Because the suspend / wake up is actually called before first call to matrix_init so the lock up came from trying to lock an uninitialized mutex On Jan 25, 2021, 8:29 PM -0500, Thomaz Moura notifications@github.com, wrote:

Codetector recently did something similar on the Kemove port here. I took a look on the code and most of it seems to be Kemove specific, but that might help you discover what has to be changed (if it's even doable with AP2, that is). I suppose that are annepro2 equivalent functions to most of those snowfox ones. — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.