qmk / qmk_firmware

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

[Bug] Anne Pro2 'g' key press issue #23226

Closed hitsmaxft closed 8 months ago

hitsmaxft commented 8 months ago

Describe the Bug

Compiling annepro2 fw from master would make key 'G' not response to normal press down, but it did input g while i'm pressing exetremly hard.

after merging branch annepro2_core_matrix, this key 'G' is easier to press, mostly show up as expect, but lost input in a 10% rate, well, hard press it will show up.

Since long press G didn't make it input , so it's not a tap or delay input.

press very very hard always make it input

this problem will gone while flash stock firmware, so its a fw issue, not hardware bug.

update: installing same firmware on my another annepro2 c18, nothing wrong happened, so it's a hardware related fw issue

Keyboard Used

annepro2/c18

Link to product page (if applicable)

No response

Operating System

macos

qmk doctor Output

❯ qmk doctor
Ψ QMK Doctor is checking your environment.
Ψ CLI version: 1.1.5
Ψ QMK home: /Users/qixiang/Projects/keyboards/qmk_firmware
Ψ Detected macOS 14.3.1 (Apple Silicon).
Ψ Userspace enabled: False
Ψ Git branch: annepro2_core_matrix
Ψ Repo version: 0.24.2
⚠ Git has unstashed/uncommitted changes.
⚠ The official repository does not seem to be configured as git remote "upstream".
Ψ CLI installed in virtualenv.
Ψ All dependencies are installed.
Ψ Found arm-none-eabi-gcc version 12.3.1
Ψ Found avr-gcc version 8.5.0
Ψ Found avrdude version 7.3
Ψ Found dfu-programmer version 0.7.2
Ψ Found dfu-util version 0.11
Ψ Submodules are up to date.
Ψ Submodule status:
Ψ - lib/chibios: 2023-04-15 13:48:04 +0000 --  (11edb16)
Ψ - lib/chibios-contrib: 2023-11-27 18:15:44 +0100 --  (9d7a7f9)
Ψ - lib/googletest: 2021-06-11 06:37:43 -0700 --  (e2239ee)
Ψ - lib/lufa: 2022-08-26 12:09:55 +1000 --  (549b973)
Ψ - 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 --  (e19410f)
Ψ - keyboards/annepro2/keymaps/macvim: 2024-03-05 20:03:29 +0800 --  (a9c190c)

Is AutoHotKey / Karabiner installed

Other keyboard-related software installed

no

Additional Context

https://github.com/hitsmaxft/qmk-annepro2-keymap-macvim/actions/runs/8167501678 this fw is compile by my github action

if you own an annepro2 can try it

hitsmaxft commented 8 months ago

@zvecr thanks for you pr make annepro2 better, is there any chance to make it work perfectly again

zvecr commented 8 months ago

is there any chance to make it work perfectly again

Given I cannot reproduce the issue, and I dont use the keyboard outside testing purposes, probably not.

Some areas to look into:

My primary concern of #23221 was to remove completely redundant code (that I had previously said was not required at the time of the keyboards PR). Its unlikely I would look into the issue myself.

tzarc commented 8 months ago

Just confirming that I can't reproduce the issue with the 'g' key on my AP2/C18 either.

hitsmaxft commented 8 months ago

is there any chance to make it work perfectly again

Given I cannot reproduce the issue, and I dont use the keyboard outside testing purposes, probably not.

Some areas to look into:

* Different compiler version?

Compiling firmware by Github Action from qmk-firmware repo has issue to , confirms that not a compiler issue.

* Larger values of `MATRIX_IO_DELAY` over the default of `30`? ?

* Any Intermittent communication issues with uart

  * Disable/rip out bluetooth and rgb_matrix code?禁用/删除蓝牙和 rgb_matrix 代码?

My primary concern of #23221 was to remove completely redundant code (that I had previously said was not required at the time of the keyboards PR). Its unlikely I would look into the issue myself.

Since there are other user in annepro2 discord reproduce this issue too, maybe a version related issue of annepro2 itself I will try your suggestions . Thanks again.

hitsmaxft commented 8 months ago

update: installing same firmware on my another annepro2 c18, nothing wrong happened, so it's a hardware related but likely fixed in stock firmware

lukevanlukevan commented 8 months ago

Joining to say I experience the same issue, g and 1 key are intermittent but stock firmware does work. Maybe a bad switch that now operates under a certain threshold when using QMK that the main firmware still reads correctly.

hitsmaxft commented 8 months ago

Joining to say I experience the same issue, g and 1 key are intermittent but stock firmware does work. Maybe a bad switch that now operates under a certain threshold when using QMK that the main firmware still reads correctly.

I've fixed the issue by config debounce to 3ms base on develop branch (which just updated annepro2' matrix scan code)

this problem did triggered by some hardware related issue. lower debounce works on my keyboard. you may try it

hitsmaxft commented 8 months ago

is there any chance to make it work perfectly again

Given I cannot reproduce the issue, and I dont use the keyboard outside testing purposes, probably not.

Some areas to look into:

* Different compiler version?

* Larger values of `MATRIX_IO_DELAY` over the default of `30`? 

* Any Intermittent communication issues with uart
  与 uart 的任何间歇性通信问题
  * Disable/rip out bluetooth and rgb_matrix code?禁用/删除蓝牙和 rgb_matrix 代码?

My primary concern of #23221 was to remove completely redundant code (that I had previously said was not required at the time of the keyboards PR). Its unlikely I would look into the issue myself.

I just figure it out that lower debounce will fix this problem , but since it not a common issue , may i create a pull request , just add solution into read me instead of apply it directly to the config.h

hitsmaxft commented 8 months ago

After two day's testing, I found that using lower DEBOUNCE will causing multiple inputs in one click.

Here is my solution for key missing on annepro2 c18

in config.h make DEBOUNCE as default value 5 or higher

#define DEBOUNCE 7

use DEBOUNCE_TYPE asym_eager_defer_pk

DEBOUNCE_TYPE = asym_eager_defer_pk