qmk / qmk_firmware

Open-source keyboard firmware for Atmel AVR and Arm USB families
https://qmk.fm
GNU General Public License v2.0
18.39k stars 39.6k forks source link

[Bug] annepro2/c18 glitchy rgb matrix effects #23900

Open OmegaLambda1998 opened 5 months ago

OmegaLambda1998 commented 5 months ago

Describe the Bug

For certain rgb matrix effects, when all (or most) LED's are blank, random keys will flash a random colour. This seems to (subjectively) be focused on keys in the bottom right quadrant (last 2-3 rows, and coloums to the right of space) but I've seen this behaviour across the entire keyboard. This behaviour seems similar to #23619 though with different triggers, as I see the flashing when no effect occurs, rather than when an effect reaches a particular part of the matrix.

The affected rbg matrix effects include:

Keyboard Used

annepro2/c18

Link to product page (if applicable)

No response

Operating System

Arch Linux

qmk doctor Output

Ψ QMK Doctor is checking your environment.
Ψ CLI version: 1.1.5
Ψ QMK home: /home/*redacted*/User/Development/Bash/annepro2/qmk_firmware
Ψ Detected Linux (Arch Linux).
Ψ Userspace enabled: False
Ψ Git branch: master
Ψ - Latest master: 2024-06-12 10:24:04 +1000 (eb30f377d8) -- Simplify keymap to isolate bug
Ψ - Latest upstream/master: 2024-06-10 01:23:25 +0100 (8b5cdfabf5) -- Re-implement `eeprom_write_qword` as define (#23890)
Ψ - Latest upstream/develop: None
Ψ - Common ancestor with upstream/master: 2024-06-07 14:25:20 +0100 (e7a08ef1a9) -- Fix broken link in PR checklist (#23877)
Ψ - Common ancestor with upstream/develop: None
Ψ All dependencies are installed.
Ψ Found arm-none-eabi-gcc version 14.1.0
Ψ Found avr-gcc version 8.5.0
Ψ Found avrdude version 7.3
Ψ Found dfu-programmer version 1.1.0
Ψ Found dfu-util version 0.11
Ψ Submodules are up to date.
Ψ Submodule status:
Ψ - lib/chibios: 2024-02-17 19:20:06 +0000 --  (be44b3305)
Ψ - lib/chibios-contrib: 2024-04-03 20:39:24 +0800 --  (77cb0a4f)
Ψ - 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: 2023-02-12 20:19:37 +0100 --  (a3398d8)
Ψ - lib/lvgl: 2022-04-11 04:44:53 -0600 --  (e19410f8)
Ψ QMK is ready to go

Is AutoHotKey / Karabiner installed

Other keyboard-related software installed

AnnePro-Shine (https://github.com/OpenAnnePro/AnnePro2-Shine)

Additional Context

I have an Anne Pro 2 (C18) flashed with almost the default keymap (see https://github.com/OmegaLambda1998/qmk_firmware/tree/master/keyboards/annepro2/keymaps/OmegaLambda). I then flash AnnePro-Shine to get lighting functionality. I have flagged this issue with the OpenAnnePro team as well.

bombonatti commented 1 month ago

Same issue here, a workaround that I found is to set stick led on space bar (did not look why it removes glitchy).

Basically, I declare a layer (I named as MASKSET) and set a value for space bar:

 [MASKSET] = LAYOUT_60_ansi( /* MASKSET */
    _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
    _______, _______,    _______,    _______,    _______,    _______, _______, _______, _______, _______, _______, _______, _______,  _______,
    _______, _______,    _______,    _______,    _______,    _______, _______, _______, _______, _______, _______, _______, _______,
    _______,             _______,    _______,    _______,    _______, _______, _______, _______, _______, _______,  _______,  _______,
    _______, _______,    _______,                                     KC_GRV,                   _______, _______, _______, _______
 ),

on function layer_state_set_user, I added a loop to stick led color:

    for(i=0; i<MATRIX_ROWS; i++) {
        for(j=0; j<MATRIX_COLS; j++) {
            if(keymaps[MASKSET][i][j]!=_______)
                ap2_led_sticky_set_key(i,j, color[0]);
        }
    }

I am attaching my keymap.c for reference, maybe it may help someone to debug/fix.

keymap.zip