[Bug] Key backlight indicators for OS state stay lit when host is put to sleep
qacha opened this issue · comments
Describe the Bug
keyboards/keychron/k10_pro/iso/rgb/config.h contains:
# define NUM_LOCK_INDEX 37 // NumLock
This turns the num lock key backlight white when num lock is turned on. This backlight stays on when the host computer is put to sleep (tested only using USB connection). I imagine this is a bug (it's certainly not how I expect it to work).
The reason is that when the host goes to sleep, rgb_matrix_set_suspend_state(true) in quantum/rgb_matrix/rgb_matrix.c gets called, which in turn calls rgb_task_render(0) to turn off the backlighting. This then calls rgb_matrix_none -> rgb_matrix_none_indicators -> rgb_matrix_none_indicators_kb, which is defined in keyboards/keychron/bluetooth/indicator.c as LED_NONE_INDICATORS_KB, and calls os_state_indicate. I imagine this is there so the OS state indicators still work even if the user uses rgb_matrix_config.mode == RGB_MATRIX_NONE, but it ends up keeping them lit even when rgb_matrix is supposed to be suspended.
Keyboard Used
keychron/k10_pro/iso/rgb
Link to product page (if applicable)
Operating System
Windows, Linux
qmk doctor Output
Ψ QMK Doctor is checking your environment.
Ψ CLI version: 1.1.2
Ψ QMK home: /mnt/silicon/home/hunor/src/qmk/qmk_firmware
Ψ Detected Linux (Gentoo Linux).
Ψ Git branch: bluetooth_playground
Ψ Repo version: 0.14.29
⚠ The official repository does not seem to be configured as git remote "upstream".
Ψ CLI installed in virtualenv.
☒ Can't find avr-gcc in your path.
☒ Can't find avrdude in your path.
☒ Can't find dfu-programmer in your path.
Would you like to install dependencies? [Y/n] n
Ψ Found arm-none-eabi-gcc version 13
⚠ Unknown version for avr-gcc
⚠ Unknown version for avrdude
⚠ Unknown version for dfu-programmer
Ψ Found dfu-util version 0.11
Ψ Submodules are up to date.
Ψ Submodule status:
Ψ - lib/chibios: 2022-09-18 10:01:17 +0000 -- (0e9d558b5)
Ψ - lib/chibios-contrib: 2022-10-03 18:09:41 +0200 -- (bb8356fb)
Ψ - lib/googletest: 2021-06-11 06:37:43 -0700 -- (e2239ee6)
Ψ - lib/lufa: 2022-08-26 12:09:55 +1000 -- (549b97320)
Ψ - lib/vusb: 2022-06-13 09:18:17 +1000 -- (819dbc1)
Ψ - lib/printf: 2022-06-29 23:59:58 +0300 -- (c2e3b4e)
Ψ - lib/pico-sdk: 2022-09-19 18:02:44 +0200 -- (8d56ea3)
Ψ - lib/lvgl: 2022-04-11 04:44:53 -0600 -- (e19410f8)
Ψ Major problems detected, please fix these problems before proceeding.
Ψ Check out the FAQ (https://docs.qmk.fm/#/faq_build) or join the QMK Discord (https://discord.gg/Uq7gcHh) for help.
Is AutoHotKey / Karabiner installed
- AutoHotKey (Windows)
- Karabiner (macOS)
Other keyboard-related software installed
No response
Additional Context
No response