You are not logged in.

#1 2024-08-06 20:25:59

Caocoa
Member
Registered: 2010-11-11
Posts: 27

[solved] Built-in keyboard freezes randomly

I recently installed Arch Linux on a laptop. A weird keyboard lag appears now and then.

  • For example when changing windows on Gnome 46 (alt + tab) I need to press tab repeatedly to move the selection.

  • When I type (this message for example) I need to wait unpractical amounts of time at random intervals. When it freezes at times Gnomes asks me if I want to kill the application that has become unresponsive.

  • It happens randomly, sometimes I can work for a few hours with no noticeable issue, some other time it’s really unhelpful.

  • It happens with Gedit, Emacs, Firefox, and even the Gnome searchbox. Edit: switching to TTY 3 with ctrl+alt+F3 and editing an Emacs buffer is not impacted by the issue. Reverting back to the GUI of Gnome and editing the same buffer still has the same issue.

  • I have tried on battery and on wire with no difference.

  • I do not use `powertop` or any other power management.

  • I am not able to try with an external keyboard because I don’t have any at the moment.

  • During the freeze time, if the mouse is on the window it disappears, however it can still be seen if moved out of it.

  • The option « Disabling touchpad while typing » doesn’t change the issue if active or not. Disabling the touchpad itself doesn’t change anything either.

$ libinput debug-events --verbose
-event2   DEVICE_ADDED            Video Bus                         seat0 default group1  cap:k
-event0   DEVICE_ADDED            Lid Switch                        seat0 default group2  cap:S
-event1   DEVICE_ADDED            Power Button                      seat0 default group3  cap:k
-event3   DEVICE_ADDED            Framework Laptop 16 Keyboard Module - ISO seat0 default group4  cap:k
-event4   DEVICE_ADDED            Framework Laptop 16 Keyboard Module - ISO System Control seat0 default group4  cap:k
-event5   DEVICE_ADDED            Framework Laptop 16 Keyboard Module - ISO Consumer Control seat0 default group4  cap:kp scroll-nat
-event6   DEVICE_ADDED            Framework Laptop 16 Keyboard Module - ISO Wireless Radio Control seat0 default group4  cap:k
-event7   DEVICE_ADDED            Framework Laptop 16 Keyboard Module - ISO Keyboard seat0 default group4  cap:k
-event12  DEVICE_ADDED            PIXA3854:00 093A:0274 Mouse       seat0 default group5  cap:p left scroll-nat scroll-button
-event13  DEVICE_ADDED            PIXA3854:00 093A:0274 Touchpad    seat0 default group5  cap:pg  size 124x77mm tap(dl off) left scroll-nat scroll-2fg-edge click-buttonareas-clickfinger dwt-on dwtp-on

…
[and then quite correlated with my typing]:
event13 - palm: keyboard timeout
…
event13 - PIXA3854:00 093A:0274 Touchpad: kernel bug: Touch jump detected and discarded.
See https://wayland.freedesktop.org/libinput/doc/1.26.1/touchpad-jumping-cursors.html for details

When I actually place my real palm on the touchpad I can see:

1053: event13 - palm: touch 0 (TOUCH_BEGIN), palm detected (typing)
  ... event13 - button state: touch 0 from BUTTON_STATE_NONE    event BUTTON_EVENT_IN_AREA     to BUTTON_STATE_AREA   
 event7   KEYBOARD_KEY            +72.194s      *** (-1) released
1091: event13 - button state: touch 0 from BUTTON_STATE_AREA    event BUTTON_EVENT_UP          to BUTTON_STATE_NONE   
 event7   KEYBOARD_KEY            +72.291s      *** (-1) released
1099: event13 - palm: keyboard timeout
1100: event13 - button state: touch 0 from BUTTON_STATE_NONE    event BUTTON_EVENT_IN_AREA     to BUTTON_STATE_AREA   
  ... event13 - gesture state GESTURE_STATE_NONE → GESTURE_EVENT_FINGER_DETECTED → GESTURE_STATE_UNKNOWN
1106: event13 - gesture state GESTURE_STATE_UNKNOWN → GESTURE_EVENT_HOLD_TIMEOUT → GESTURE_STATE_HOLD
-event13  GESTURE_HOLD_BEGIN      +74.461s      1
1111: event13 - gesture state GESTURE_STATE_HOLD → GESTURE_EVENT_HOLD_AND_MOTION → GESTURE_STATE_HOLD_AND_MOTION

It happens even I do absolutely not touch the touchpad in any way. It’s like the keyboard would stop responding, but then all the keys are pressed very quickly. It happens even if I type very very lightly on the keyboard, far from the touchpad.

When looking in evtest’s output, you can see I just hit backspace at timestamp 1722968903.198551 and there is nothing special going on.

sudo evtest                  
[sudo] password for caocoa: 
No device specified, trying to scan all of /dev/input/event*
Available devices:
/dev/input/event0:      Lid Switch
/dev/input/event1:      Power Button
/dev/input/event10:     HD-Audio Generic HDMI/DP,pcm=7
/dev/input/event11:     HD-Audio Generic HDMI/DP,pcm=8
/dev/input/event12:     PIXA3854:00 093A:0274 Mouse
/dev/input/event13:     PIXA3854:00 093A:0274 Touchpad
/dev/input/event2:      Video Bus
/dev/input/event3:      Framework Laptop 16 Keyboard Module - ISO
/dev/input/event4:      Framework Laptop 16 Keyboard Module - ISO System Control
/dev/input/event5:      Framework Laptop 16 Keyboard Module - ISO Consumer Control
/dev/input/event6:      Framework Laptop 16 Keyboard Module - ISO Wireless Radio Control
/dev/input/event7:      Framework Laptop 16 Keyboard Module - ISO Keyboard
/dev/input/event8:      PC Speaker
/dev/input/event9:      HD-Audio Generic HDMI/DP,pcm=3
Select the device event number [0-13]: 7
Event: time 1722968903.161876, type 1 (EV_KEY), code 14 (KEY_BACKSPACE), value 2
Event: time 1722968903.161876, -------------- SYN_REPORT ------------
Event: time 1722968903.198551, type 1 (EV_KEY), code 14 (KEY_BACKSPACE), value 2
Event: time 1722968903.198551, -------------- SYN_REPORT ------------
Event: time 1722968903.235229, type 1 (EV_KEY), code 14 (KEY_BACKSPACE), value 2
Event: time 1722968903.235229, -------------- SYN_REPORT ------------

I saw nothing obvious when looking at journalctl or dmseg. I am very puzzled hmm

Anyone suffering from this bug? It makes a laptop pretty much unusable.

Configuration:

$ inxi -aFz
System:
  Kernel: 6.10.3-arch1-1 arch: x86_64 bits: 64 compiler: gcc v: 14.2.1
    clocksource: tsc avail: hpet,acpi_pm parameters: BOOT_IMAGE=/vmlinuz-linux
    root=UUID=3e1f6f3c-d98f-494b-ad60-600b275b8ec9 rw loglevel=3 quiet
  Desktop: GNOME v: 46.4 tk: GTK v: 3.24.43 wm: gnome-shell
    tools: gsd-screensaver-proxy dm: GDM v: 46.2 Distro: Arch Linux
Machine:
  Type: Laptop System: Framework product: Laptop 16 (AMD Ryzen 7040 Series)
    v: A7 serial: <superuser required>
  Mobo: Framework model: FRANMZCP07 v: A7 serial: <superuser required>
    part-nu: FRAGAACP07 uuid: <superuser required> UEFI: INSYDE v: 03.02
    date: 01/23/2024
Battery:
  ID-1: BAT1 charge: 54.8 Wh (61.2%) condition: 89.5/85.1 Wh (105.1%)
    volts: 15.7 min: 15.5 model: NVT FRANDBA type: Li-ion serial: <filter>
    status: discharging cycles: 20
CPU:
  Info: model: AMD Ryzen 7 7840HS w/ Radeon 780M Graphics bits: 64
    type: MT MCP arch: Zen 4 gen: 5 level: v4 note: check built: 2022+
    process: TSMC n5 (5nm) family: 0x19 (25) model-id: 0x74 (116) stepping: 1
    microcode: 0xA704103
  Topology: cpus: 1x cores: 8 tpc: 2 threads: 16 smt: enabled cache:
    L1: 512 KiB desc: d-8x32 KiB; i-8x32 KiB L2: 8 MiB desc: 8x1024 KiB
    L3: 16 MiB desc: 1x16 MiB
  Speed (MHz): avg: 568 high: 1874 min/max: 400/5137 scaling:
    driver: amd-pstate-epp governor: powersave cores: 1: 400 2: 400 3: 400
    4: 1624 5: 400 6: 400 7: 400 8: 400 9: 400 10: 400 11: 1874 12: 400
    13: 400 14: 400 15: 400 16: 400 bogomips: 121431
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
  Vulnerabilities:
  Type: gather_data_sampling status: Not affected
  Type: itlb_multihit status: Not affected
  Type: l1tf status: Not affected
  Type: mds status: Not affected
  Type: meltdown status: Not affected
  Type: mmio_stale_data status: Not affected
  Type: reg_file_data_sampling status: Not affected
  Type: retbleed status: Not affected
  Type: spec_rstack_overflow status: Vulnerable: Safe RET, no microcode
  Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via
    prctl
  Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer
    sanitization
  Type: spectre_v2 mitigation: Enhanced / Automatic IBRS; IBPB:
    conditional; STIBP: always-on; RSB filling; PBRSB-eIBRS: Not affected;
    BHI: Not affected
  Type: srbds status: Not affected
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: AMD Phoenix1 vendor: Framework driver: amdgpu v: kernel
    arch: RDNA-3 code: Phoenix process: TSMC n4 (4nm) built: 2023+ pcie: gen: 4
    speed: 16 GT/s lanes: 16 ports: active: eDP-1 empty: DP-1, DP-2, DP-3,
    DP-4, DP-5, DP-6, DP-7, DP-8, Writeback-1 bus-ID: c1:00.0
    chip-ID: 1002:15bf class-ID: 0300 temp: 40.0 C
  Device-2: Generic Laptop Camera driver: uvcvideo type: USB rev: 2.0
    speed: 480 Mb/s lanes: 1 mode: 2.0 bus-ID: 3-1:2 chip-ID: 0bda:5634
    class-ID: 0e02 serial: <filter>
  Display: wayland server: Xwayland v: 24.1.1 compositor: gnome-shell
    driver: gpu: amdgpu display-ID: 0
  Monitor-1: eDP-1 model: BOE Display 0x0bc9 built: 2022 res: 2560x1600
    dpi: 188 gamma: 1.2 size: 345x215mm (13.58x8.46") diag: 407mm (16")
    ratio: 16:10 modes: max: 2560x1600 min: 640x480
  API: EGL v: 1.5 hw: drv: amd radeonsi platforms: device: 0 drv: radeonsi
    device: 1 drv: swrast gbm: drv: kms_swrast surfaceless: drv: radeonsi
    wayland: drv: radeonsi x11: drv: radeonsi
  API: OpenGL v: 4.6 compat-v: 4.5 vendor: amd mesa v: 24.1.5-arch1.1
    glx-v: 1.4 direct-render: yes renderer: AMD Radeon 780M (radeonsi
    gfx1103_r1 LLVM 18.1.8 DRM 3.57 6.10.3-arch1-1) device-ID: 1002:15bf
    memory: 500 MiB unified: no display-ID: :0.0
  API: Vulkan v: 1.3.279 layers: N/A device: 0 type: integrated-gpu name: AMD
    Radeon 780M (RADV GFX1103_R1) driver: mesa radv v: 24.1.5-arch1.1
    device-ID: 1002:15bf surfaces: xcb,xlib,wayland
Audio:
  Device-1: AMD Rembrandt Radeon High Definition Audio vendor: Framework
    driver: snd_hda_intel v: kernel pcie: gen: 4 speed: 16 GT/s lanes: 16
    bus-ID: c1:00.1 chip-ID: 1002:1640 class-ID: 0403
  Device-2: AMD ACP/ACP3X/ACP6x Audio Coprocessor vendor: Framework
    driver: snd_pci_ps v: kernel alternate: snd_pci_acp3x, snd_rn_pci_acp3x,
    snd_pci_acp5x, snd_pci_acp6x, snd_acp_pci, snd_rpl_pci_acp6x,
    snd_sof_amd_renoir, snd_sof_amd_rembrandt, snd_sof_amd_vangogh,
    snd_sof_amd_acp63 pcie: gen: 4 speed: 16 GT/s lanes: 16 bus-ID: c1:00.5
    chip-ID: 1022:15e2 class-ID: 0480
  Device-3: AMD Family 17h/19h HD Audio vendor: Framework
    driver: snd_hda_intel v: kernel pcie: gen: 4 speed: 16 GT/s lanes: 16
    bus-ID: c1:00.6 chip-ID: 1022:15e3 class-ID: 0403
  API: ALSA v: k6.10.3-arch1-1 status: kernel-api tools: N/A
  Server-1: JACK v: 1.9.22 status: off tools: N/A
  Server-2: PipeWire v: 1.2.2 status: active with: 1: pipewire-pulse
    status: active 2: wireplumber status: active
    tools: pactl,pw-cat,pw-cli,wpctl
Network:
  Device-1: MEDIATEK MT7922 802.11ax PCI Express Wireless Network Adapter
    driver: mt7921e v: kernel pcie: gen: 2 speed: 5 GT/s lanes: 1
    bus-ID: 01:00.0 chip-ID: 14c3:0616 class-ID: 0280
  IF: wlan0 state: up mac: <filter>
  Info: services: NetworkManager, ntpd, systemd-timesyncd, wpa_supplicant
Bluetooth:
  Device-1: MediaTek Wireless_Device driver: btusb v: 0.8 type: USB rev: 2.1
    speed: 480 Mb/s lanes: 1 mode: 2.0 bus-ID: 1-5:5 chip-ID: 0e8d:e616
    class-ID: e001 serial: <filter>
  Report: btmgmt ID: hci0 rfk-id: 0 state: down bt-service: enabled,running
    rfk-block: hardware: no software: yes address: <filter> bt-v: 5.2 lmp-v: 11
    status: discoverable: no pairing: no
Drives:
  Local Storage: total: 931.51 GiB used: 766.07 GiB (82.2%)
  SMART Message: Required tool smartctl not installed. Check --recommends
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Western Digital
    model: WD BLACK SN850X 1000GB size: 931.51 GiB block-size: physical: 512 B
    logical: 512 B speed: 63.2 Gb/s lanes: 4 tech: SSD serial: <filter>
    fw-rev: 620361WD temp: 36.9 C scheme: GPT
Partition:
  ID-1: / raw-size: 914.51 GiB size: 914.51 GiB (100.00%)
    used: 765.91 GiB (83.8%) fs: btrfs dev: /dev/nvme0n1p3 maj-min: 259:3
  ID-2: /boot raw-size: 1024 MiB size: 1022 MiB (99.80%)
    used: 171.4 MiB (16.8%) fs: vfat dev: /dev/nvme0n1p1 maj-min: 259:1
Swap:
  Kernel: swappiness: 60 (default) cache-pressure: 100 (default) zswap: yes
    compressor: zstd max-pool: 20%
  ID-1: swap-1 type: partition size: 16 GiB used: 0 KiB (0.0%) priority: -2
    dev: /dev/nvme0n1p2 maj-min: 259:2
Sensors:
  System Temperatures: cpu: 53.0 C mobo: 42.0 C gpu: amdgpu temp: 42.0 C
  Fan Speeds (rpm): N/A
Info:
  Memory: total: 64 GiB available: 62 GiB used: 5.96 GiB (9.6%)
  Processes: 422 Power: uptime: 2h 47m states: freeze,mem,disk
    suspend: s2idle wakeups: 1 hibernate: platform avail: shutdown, reboot,
    suspend, test_resume image: 24.78 GiB services: gsd-power,upowerd
    Init: systemd v: 256 default: graphical tool: systemctl
  Packages: pm: pacman pkgs: 1336 libs: 328 tools: gnome-software,yay
    pm: flatpak pkgs: 0 Compilers: clang: 18.1.8 gcc: 14.2.1 Shell: Zsh v: 5.9
    running-in: emacs inxi: 3.3.35

Last edited by Caocoa (2024-08-09 14:47:38)


caocoa@C40C04 ~:

Offline

#2 2024-08-08 09:54:39

bonbon12
Member
Registered: 2024-08-08
Posts: 7

Re: [solved] Built-in keyboard freezes randomly

What you could try is:

Update your system: sudo pacman -Syu

updating/reinstalling libinput

Log into an X11 session instead of Wayland


Have a great day smile

Create website designs

Offline

#3 2024-08-09 13:27:05

Caocoa
Member
Registered: 2010-11-11
Posts: 27

Re: [solved] Built-in keyboard freezes randomly

Hello, thanks for your help! I do not use X11. The issue was caused by a Gnome misconfiguration. I was able to get rid of it with a mini-reset of Gnome:

$ dconf reset -f /org/gnome/

caocoa@C40C04 ~:

Offline

#4 2024-08-09 14:46:40

seth
Member
Registered: 2012-09-03
Posts: 58,659

Re: [solved] Built-in keyboard freezes randomly

\o/
Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.

Offline

#5 2024-11-19 00:41:54

erahhal
Member
Registered: 2024-11-19
Posts: 1

Re: [solved] Built-in keyboard freezes randomly

@Caocoa how did you determine to do

dconf reset -f /org/gnome

I'm running into the exact same issue but in Hyprland, and the gnome reset trick isn't working.

Last edited by erahhal (2024-11-19 01:01:08)

Offline

Board footer

Powered by FluxBB