Open Mikastiv opened 9 months ago
To make sure, when updating the config, have you flashed both sides?
Yes I did. I tried multiple times and it doesn't work for me. I would actually be willing to work on this if no body does and someone could guide me a bit; it annoys me to see my keyboard with half the lights on 😅
I tried to investigate a bit and from what I understood, the master keyboard is stuck in a loop in protocol_pre_task during suspend and never sends to the slave that is should suspend, but maybe I'm wrong
I found why it was not working on my keyboard; here: https://github.com/qmk/qmk_firmware/blob/dcc47ea31b3f4ef097a2fc677bdbb9b2560d905a/tmk_core/protocol/lufa/lufa.c#L858-L860
USB_Device_RemoteWakeupEnabled
is false for me so suspend_wakeup_condition()
is never run and the lights suspend state is never synced to the keyboard slave. For myself. I added a matrix_scan call inside the suspend loop to run the same code from suspend_wakeup_condition()
and it works. I don't know if this is a good solution or not. Thoughts?
I would propose this as a fix
const bool wakeup = suspend_wakeup_condition();
if (USB_Device_RemoteWakeupEnabled && wakeup) {
...
}
I've been having the same issue (altough I think it didn't always happened on PC turn off) - I have been mitigating it by suspending RGB after 20s of idle / not using keyboard (which has some other issue, details below). Seems yours proposed fix helped!
(The other issue I have, which I thought could be related, is after calling rgblight_suspend
the slave sometimes doesn't set it's rgblight_config.enable to the one indicated by master - maybe there is some race or maybe just serial comm error, but I haven't seen any. I have fixed it with (in rgblight_update_sync
which I always call in rgblight_handlers_slave
):
if (syncinfo->config.enable != rgblight_config.enable)
syncinfo->status.change_flags |= RGBLIGHT_STATUS_CHANGE_MODE;
if (syncinfo->status.change_flags == 0) // not needed really
return;
to force slave's enable
update if changed (as the whole config is synced periodically either way, not just on status change)
But this seems to me other issue / PR, as yours fix solved PC turn off issue, I may yet to check mine rgb_suspend fix alone after turning off PC)
Describe the Bug
The define only works for the master keyboard on my setup when my pc is turned off. I am using a corne keyboard
Keyboard Used
corne/rev1
Link to product page (if applicable)
No response
Operating System
windows 10
qmk doctor Output
Is AutoHotKey / Karabiner installed
Other keyboard-related software installed
No response
Additional Context
I have pro-micro microcontrollers https://keebmaker.com/collections/parts/products/controllers-pro-micro-c?_pos=1&_fid=bdf159e90&_ss=c