Mint 21 slight keyboard lag

Questions about applications and software
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
Redsandro
Level 4
Level 4
Posts: 201
Joined: Sun Jul 17, 2011 6:40 pm
Contact:

Mint 21 slight keyboard lag

Post by Redsandro »

After upgrading from Mint 20 to Mint 21, I notice a slight keyboard lag. There is like 80 milliseconds delay between hitting a key, and the key showing up on the screen. The only relevant mention I can find when using the search is the following:
rossdv8 wrote: Mon Aug 08, 2022 4:47 am There's some 'lag' when typing things like this post.
The most annoying thing is the slight keyboard lag.
This might be the same issue. Does anyone know what causes this?

I have one hypothesis, but I haven't tested it yet. I notice that the sticky keys with English (US alt. intl.) now preview the current "value" with a line under it.

E.g. when pressing quote followed by space:

Mint 20: -> "
Mint 21: ¨̲ -> "

Or pressing quote twice:

Mint 20: -> ¨
Mint 21: ¨̲ -> ¨

Theoretically this is an improvement. But I suspect that this new feature causes the keyboard lag, and I'd like to turn it off if so. However, there's no mention of it in Settings > Keyboard. Does anyone know what this feature is called and where/how I can turn it off?
Last edited by LockBot on Thu Feb 09, 2023 11:00 pm, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
🤘 Amp.lol. No bloat, just radio.
Ninite-killer. 1000+ packages.
User avatar
rossdv8
Level 7
Level 7
Posts: 1736
Joined: Wed Apr 23, 2014 4:48 am
Location: Within 2,000 kilometres of Alice Springs, Australia
Contact:

Re: Mint 21 slight keyboard lag

Post by rossdv8 »

The keyboard lag I experienced really annoyed me right after I upgraded to Mint 21, however it seemed to decrease over the next day or so.
Enough that as I type this it is not noticeable at all at the moment.
I have not attempted to fix it, nor even to investigate why it happened, because I was busy doing other stuff, like checking what MintUpgrade had removed from my system, which happened to be very little. Just a few proprietary programs that could not be replaced automatically.

So perhaps give it a day or so to se if it settles down. I did the usual sudo apt update and sudo apt upgrade after I did the upgrade to 21 just o be sure I had everything, but the lag was still there. The only other updates coming through since have been to my browser.

I am using a Logitech wireless mouse and keyboard. In my case there's always a possibility that I had something on my desk interfering with the wifi from the keyboard on my desk - to the computer almost two metres (6 foots) away in front of the monitor.

I would be interested to see if yours also 'settles in' and the problem goes away - or if there's some sort of driver thing happening.
Current main OS: MInt 21.3 with KDE Plasma 5.27 (using Compiz as WM) - Kernel: 6.5.0-15 on Lenovo m900 Tiny, i5-6400T (intel HD 530 graphics) 16GB RAM.
Sharks usually only attack you if you are wet
User avatar
restrepo
Level 1
Level 1
Posts: 17
Joined: Tue Sep 15, 2020 2:26 pm
Location: Seattle, WA / USA

Re: Mint 21 slight keyboard lag

Post by restrepo »

Hello,

I recently upgraded (fresh re-install) to LM21. I have been having some serious issues with an erratic keyboard lag. Sometimes, the keystrokes just don't show up, other times they show up multiple times. On occasion, the keyboard just freezes for minutes at a time The CPU is not running hard, with minor loads and despite this the keyboard problem is annoying to say the least. By the way, I always use the English (US, Intl., with dead keys) layout as I deal in multiple languages. Any clues? Thanks in advance for any suggestions.

Here is the output for the inxi -Fxxxrz

Code: Select all

System:
  Kernel: 5.15.0-43-generic x86_64 bits: 64 compiler: gcc v: 11.2.0
    Desktop: Cinnamon 5.4.9 tk: GTK 3.24.33 wm: Mutter vt: 7 dm: LightDM 1.30.0
    Distro: Linux Mint 21 Vanessa base: Ubuntu 22.04 jammy
Machine:
  Type: Desktop System: Gigabyte product: B365M DS3H v: N/A
    serial: <superuser required>
  Mobo: Gigabyte model: B365M DS3H v: x.x serial: <superuser required>
    UEFI: American Megatrends v: F6e date: 08/18/2020
Battery:
  Device-1: hidpp_battery_0 model: Logitech K350 serial: <filter>
    charge: 70% (should be ignored) rechargeable: yes status: Discharging
  Device-2: hidpp_battery_1 model: Logitech Wireless Mouse MX Master 3
    serial: <filter> charge: 100% (should be ignored) rechargeable: yes
    status: Discharging
CPU:
  Info: 8-core model: Intel Core i7-9700 bits: 64 type: MCP
    smt: <unsupported> arch: Coffee Lake rev: D cache: L1: 512 KiB L2: 2 MiB
    L3: 12 MiB
  Speed (MHz): avg: 800 min/max: 800/4700 cores: 1: 800 2: 800 3: 800
    4: 800 5: 800 6: 800 7: 800 8: 800 bogomips: 48000
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
Graphics:
  Device-1: Intel CoffeeLake-S GT2 [UHD Graphics 630] vendor: Gigabyte
    driver: i915 v: kernel ports: active: none
    empty: DP-1, HDMI-A-1, HDMI-A-2, HDMI-A-3 bus-ID: 00:02.0
    chip-ID: 8086:3e98 class-ID: 0380
  Device-2: NVIDIA TU106 [GeForce RTX 2070] vendor: Gigabyte driver: nvidia
    v: 515.65.01 pcie: speed: 2.5 GT/s lanes: 16 ports: active: none off: DP-2
    empty: DP-3,DP-4,HDMI-A-4 bus-ID: 01:00.0 chip-ID: 10de:1f02
    class-ID: 0300
  Display: x11 server: X.Org v: 1.21.1.3 driver: X:
    loaded: modesetting,nvidia unloaded: fbdev,nouveau,vesa gpu: i915,nvidia
    display-ID: :0 screens: 1
  Screen-1: 0 s-res: 2560x1080 s-dpi: 97 s-size: 670x283mm (26.4x11.1")
    s-diag: 727mm (28.6")
  Monitor-1: DP-0 res: 2560x1080 hz: 60 dpi: 97
    size: 673x284mm (26.5x11.2") diag: 730mm (28.8")
  OpenGL: renderer: NVIDIA GeForce RTX 2070/PCIe/SSE2
    v: 4.6.0 NVIDIA 515.65.01 direct render: Yes
Audio:
  Device-1: Intel 200 Series PCH HD Audio vendor: Gigabyte
    driver: snd_hda_intel v: kernel bus-ID: 00:1f.3 chip-ID: 8086:a2f0
    class-ID: 0403
  Device-2: NVIDIA TU106 High Definition Audio vendor: Gigabyte
    driver: snd_hda_intel v: kernel pcie: speed: 8 GT/s lanes: 16
    bus-ID: 01:00.1 chip-ID: 10de:10f9 class-ID: 0403
  Device-3: GN Netcom Jabra Engage 75 type: USB
    driver: jabra,snd-usb-audio,usbhid bus-ID: 1-6.1.3:12 chip-ID: 0b0e:111e
    class-ID: 0300 serial: <filter>
  Device-4: Texas Instruments PCM2902 Audio Codec type: USB
    driver: hid-generic,snd-usb-audio,usbhid bus-ID: 1-6.2:11
    chip-ID: 08bb:2902 class-ID: 0300
  Sound Server-1: ALSA v: k5.15.0-43-generic running: yes
  Sound Server-2: JACK v: 1.9.20 running: no
  Sound Server-3: PulseAudio v: 15.99.1 running: yes
  Sound Server-4: PipeWire v: 0.3.48 running: yes
Network:
  Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet
    vendor: Gigabyte driver: r8169 v: kernel pcie: speed: 2.5 GT/s lanes: 1
    port: d000 bus-ID: 07:00.0 chip-ID: 10ec:8168 class-ID: 0200
  IF: enp7s0 state: up speed: 1000 Mbps duplex: full mac: <filter>
Drives:
  Local Storage: total: 11.38 TiB used: 3.3 TiB (29.0%)
  ID-1: /dev/nvme0n1 vendor: Intel model: SSDPEMKF512G8 NVMe 512GB
    size: 476.94 GiB speed: 31.6 Gb/s lanes: 4 type: SSD serial: <filter>
    rev: 7003 temp: 36.9 C scheme: GPT
  ID-2: /dev/nvme1n1 vendor: Samsung model: SSD 970 EVO Plus 2TB
    size: 1.82 TiB speed: 31.6 Gb/s lanes: 4 type: SSD serial: <filter>
    rev: 2B2QEXM7 temp: 43.9 C scheme: GPT
  ID-3: /dev/sda vendor: Seagate model: ST2000DM008-2FR102 size: 1.82 TiB
    speed: 6.0 Gb/s type: HDD rpm: 7200 serial: <filter> rev: 0001 scheme: GPT
  ID-4: /dev/sdb type: USB vendor: Seagate model: One Touch HDD
    size: 4.55 TiB type: N/A serial: <filter> rev: 0002 scheme: GPT
  ID-5: /dev/sdc type: USB vendor: Western Digital
    model: WD My Passport 0827 size: 2.73 TiB type: N/A serial: <filter>
    rev: 1012 scheme: MBR
Partition:
  ID-1: / size: 91.11 GiB used: 22.33 GiB (24.5%) fs: ext4
    dev: /dev/nvme1n1p7
  ID-2: /boot size: 920.3 MiB used: 511.4 MiB (55.6%) fs: ext4
    dev: /dev/nvme1n1p5
  ID-3: /boot/efi size: 96 MiB used: 30.2 MiB (31.5%) fs: vfat
    dev: /dev/nvme1n1p1
  ID-4: /home size: 1.43 TiB used: 946.12 GiB (64.6%) fs: ext4
    dev: /dev/nvme1n1p8
Swap:
  ID-1: swap-1 type: partition size: 29.8 GiB used: 872 KiB (0.0%)
    priority: -2 dev: /dev/nvme1n1p6
Sensors:
  System Temperatures: cpu: 27.8 C mobo: 16.8 C gpu: nvidia temp: 47 C
  Fan Speeds (RPM): N/A gpu: nvidia fan: 0%
Repos:
  Packages: 3022 note: see --pkg apt: 2994 flatpak: 18 snap: 10
  No active apt repos in: /etc/apt/sources.list
  Active apt repos in: /etc/apt/sources.list.d/additional-repositories.list
    1: deb http://download.webmin.com/download/repository sarge contrib
  Active apt repos in: /etc/apt/sources.list.d/google-earth-pro.list
    1: deb [arch=amd64] http://dl.google.com/linux/earth/deb/ stable main
  Active apt repos in: /etc/apt/sources.list.d/nordvpn.list
    1: deb https://repo.nordvpn.com/deb/nordvpn/debian stable main
  Active apt repos in: /etc/apt/sources.list.d/obsproject-obs-studio-jammy.list
    1: deb http://ppa.launchpad.net/obsproject/obs-studio/ubuntu jammy main
  Active apt repos in: /etc/apt/sources.list.d/official-package-repositories.list
    1: deb https://mirrors.ocf.berkeley.edu/linuxmint-packages vanessa main upstream import backport
    2: deb http://ftp.hosteurope.de/mirror/archive.ubuntu.com jammy main restricted universe multiverse
    3: deb http://ftp.hosteurope.de/mirror/archive.ubuntu.com jammy-updates main restricted universe multiverse
    4: deb http://ftp.hosteurope.de/mirror/archive.ubuntu.com jammy-backports main restricted universe multiverse
    5: deb http://security.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse
  Active apt repos in: /etc/apt/sources.list.d/opera-stable.list
    1: deb https://deb.opera.com/opera-stable/ stable non-free
  Active apt repos in: /etc/apt/sources.list.d/qbittorrent-team-qbittorrent-stable-jammy.list
    1: deb http://ppa.launchpad.net/qbittorrent-team/qbittorrent-stable/ubuntu jammy main
  Active apt repos in: /etc/apt/sources.list.d/skype-stable.list
    1: deb [arch=amd64] https://repo.skype.com/deb stable main
  Active apt repos in: /etc/apt/sources.list.d/teamviewer.list
    1: deb https://linux.teamviewer.com/deb stable main
  Active apt repos in: /etc/apt/sources.list.d/vivaldi.list
    1: deb [arch=amd64] https://repo.vivaldi.com/stable/deb/ stable main
Info:
  Processes: 525 Uptime: 4d 21h 45m wakeups: 1122 Memory: 62.56 GiB
  used: 9.91 GiB (15.8%) Init: systemd v: 249 runlevel: 5 Compilers:
  gcc: 11.2.0 alt: 11 Shell: Bash v: 5.1.16 running-in: guake inxi: 3.3.13
Last edited by restrepo on Thu Aug 11, 2022 7:38 pm, edited 1 time in total.
Redsandro
Level 4
Level 4
Posts: 201
Joined: Sun Jul 17, 2011 6:40 pm
Contact:

Re: Mint 21 slight keyboard lag

Post by Redsandro »

restrepo wrote: Wed Aug 10, 2022 6:13 pm Sometimes, the keystrokes just don't show up, other times they show up multiple times. On occasion, the keyboard just freezes for minutes at a time
This is definitely a different issue. This is about that 40ms lag between hitting a key and the character appearing.

Would you try to unplug your keyboard while Mint is running and stick it in a different port directly in the computer, see if anything changes? I've had something vaguely similar (with a mouse) before and it turned out that an updated kernel came with different drivers and if I changed ports without using my USB hub, it would work normally.

PS - Would you be so kind as to edit your post and put your logs in code-tags? That way, a humble scroll bar appears and you're not polluting the topic with your logs so much.

E.g.: [code] your logs here [/code]
🤘 Amp.lol. No bloat, just radio.
Ninite-killer. 1000+ packages.
User avatar
restrepo
Level 1
Level 1
Posts: 17
Joined: Tue Sep 15, 2020 2:26 pm
Location: Seattle, WA / USA

Re: Mint 21 slight keyboard lag

Post by restrepo »

Thanks Resandro... I inserted the "code".

By the way, my boot logs are reporting some errors at boot time. I don't know if the keyboard problem might be related to the boot problems. I see other folks reporting a number of other bugs with LM21. The boot log is below...

Code: Select all

sudo more /var/log/boot.log
------------ Thu Aug 11 15:58:06 PDT 2022 ------------
ERROR: unsupported sector size 4096 on /dev/sdd.
/dev/nvme1n1p7: clean, 589177/6111232 files, 6447984/24413952 blocks
[FAILED] Failed to start Load Kernel Module efi_pstore.
[FAILED] Failed to start Load Kernel Module pstore_blk.
[FAILED] Failed to start Load Kernel Module pstore_zone.
[  OK  ] Finished Tell Plymouth To Write Out Runtime Data.
[  OK  ] Finished Create Volatile Files and Directories.
         Starting Network Name Resolution...
         Starting Network Time Synchronization...
         Starting Record System Boot/Shutdown in UTMP...
[  OK  ] Finished Record System Boot/Shutdown in UTMP.
[  OK  ] Finished Load AppArmor profiles.
         Starting Raise network interfaces...
         Starting Load AppArmor profiles managed internally by snapd...
[  OK  ] Finished Load AppArmor profiles managed internally by snapd.
[  OK  ] Started Network Time Synchronization.
[  OK  ] Reached target System Initialization.
[  OK  ] Started ACPI Events Check.
[  OK  ] Started CUPS Scheduler.
[  OK  ] Started Start whoopsie on modification of the /var/crash directory.
[  OK  ] Started Daily Cleanup of Temporary Directories.
[  OK  ] Reached target Path Units.
[  OK  ] Reached target System Time Set.
[  OK  ] Started Trigger anacron every hour.
[  OK  ] Started Daily apt download activities.
[  OK  ] Started Daily apt upgrade and clean activities.
[  OK  ] Started Daily dpkg database backup timer.
[  OK  ] Started Periodic ext4 Online Metadata Check for All Filesystems.
[  OK  ] Started Discard unused blocks once a week.
[  OK  ] Started Refresh fwupd metadata regularly.
[  OK  ] Started Daily rotation of log files.
[  OK  ] Started Daily man-db regeneration.
[  OK  ] Started Update Manager weekly autoremove.
[  OK  ] Started Update Manager automatic upgrades.
[  OK  ] Started Message of the Day.
[  OK  ] Started Update the plocate database daily.
[  OK  ] Reached target Timer Units.
[  OK  ] Listening on ACPID Listen Socket.
[  OK  ] Listening on Avahi mDNS/DNS-SD Stack Activation Socket.
[  OK  ] Listening on CUPS Scheduler.
[  OK  ] Listening on D-Bus System Message Bus Socket.
         Starting Socket activation for snappy daemon...
[  OK  ] Listening on UUID daemon activation socket.
[  OK  ] Finished Raise network interfaces.
[  OK  ] Listening on Socket activation for snappy daemon.
[  OK  ] Reached target Socket Units.
[  OK  ] Reached target Basic System.
         Starting Accounts Service...
[  OK  ] Started ACPI event daemon.
         Starting Save/Restore Sound Card State...
[  OK  ] Started Run anacron jobs.
         Starting Deferred execution scheduler...
         Starting Avahi mDNS/DNS-SD Stack...
         Starting Bluetooth management mechanism...
         Starting casper-md5check Verify Live ISO checksums...
[  OK  ] Started Regular background program processing daemon.
[  OK  ] Started D-Bus System Message Bus.
         Starting Network Manager...
[  OK  ] Started Save initial kernel messages after boot.
         Starting Remove Stale Online ext4 Metadata Check Snapshots...
         Starting Detect the available GPUs and deal with any system changes...
         Starting Record successful boot for GRUB...
[  OK  ] Started irqbalance daemon.
         Starting Initialize hardware monitoring sensors...
[  OK  ] Started mintsystem.service.
         Starting Dispatcher daemon for systemd-networkd...
         Starting NVIDIA Persistence Daemon...
         Starting Authorization Manager...
         Starting Power Profiles daemon...
         Starting System Logging Service...
[  OK  ] Reached target Preparation for Logins.
         Starting Snap Daemon...
         Starting User Login Management...
         Starting Thermal Daemon Service...
         Starting Ubuntu system adjustments...
         Starting Disk Manager...
         Starting WPA supplicant...
         Starting ZFS file system shares...
[  OK  ] Started ZFS Event Daemon (zed).
[  OK  ] Started Network Name Resolution.
[  OK  ] Started Deferred execution scheduler.
[FAILED] Failed to start casper-md5check Verify Live ISO checksums.
See 'systemctl status casper-md5check.service' for details.
[  OK  ] Started NVIDIA Persistence Daemon.
[  OK  ] Finished ZFS file system shares.
[  OK  ] Finished Save/Restore Sound Card State.
[  OK  ] Started System Logging Service.
[  OK  ] Finished Record successful boot for GRUB.
[  OK  ] Reached target Host and Network Name Lookups.
[  OK  ] Reached target Sound Card.
[  OK  ] Reached target ZFS startup target.
         Starting GRUB failed boot detection...
[  OK  ] Finished Remove Stale Online ext4 Metadata Check Snapshots.
[  OK  ] Finished Detect the available GPUs and deal with any system changes.
[  OK  ] Finished Initialize hardware monitoring sensors.
[  OK  ] Finished GRUB failed boot detection.
[  OK  ] Started Thermal Daemon Service.
[  OK  ] Started Avahi mDNS/DNS-SD Stack.
[  OK  ] Started WPA supplicant.
[  OK  ] Started Network Manager.
[  OK  ] Reached target Network.
         Starting Network Manager Wait Online...
         Starting CUPS Scheduler...
         Starting OpenVPN service...
[  OK  ] Started Service for snap application gutenprint-printer-app.gutenprint-printer-app-server.
         Starting Permit User Sessions...
[  OK  ] Finished OpenVPN service.
[  OK  ] Finished Permit User Sessions.
[  OK  ] Started Authorization Manager.
         Starting Modem Manager...
         Starting Light Display Manager...
         Starting Hold until boot process finishes up...
         Starting Hostname Service...
[  OK  ] Started Power Profiles daemon.
[  OK  ] Started Accounts Service.
[  OK  ] Started CUPS Scheduler.
[  OK  ] Reached target Printer Support.
         Starting Load Kernel Module drm...
[  OK  ] Finished Ubuntu system adjustments.
[  OK  ] Finished Load Kernel Module drm.
[  OK  ] Started User Login Management.
[  OK  ] Started Dispatcher daemon for systemd-networkd.

Code: Select all

systemctl status casper-md5check.service
× casper-md5check.service - casper-md5check Verify Live ISO checksums
     Loaded: loaded (/lib/systemd/system/casper-md5check.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Thu 2022-08-11 15:58:07 PDT; 1h 7min ago
    Process: 1707 ExecStart=/usr/lib/casper/casper-md5check /cdrom /cdrom/md5sum.txt (code=exited, status=1/FAILURE)
   Main PID: 1707 (code=exited, status=1/FAILURE)
        CPU: 1ms

Aug 11 15:58:06 jer-B365M-DS3H systemd[1]: Starting casper-md5check Verify Live ISO checksums...
Aug 11 15:58:06 jer-B365M-DS3H casper-md5check[1707]: .fopen md5_file: No such file or directory
Aug 11 15:58:06 jer-B365M-DS3H casper-md5check[1707]: Checking integrity, this may take some time (or try: fsck.mode=skip)
Aug 11 15:58:07 jer-B365M-DS3H systemd[1]: casper-md5check.service: Main process exited, code=exited, status=1/FAILURE
Aug 11 15:58:07 jer-B365M-DS3H systemd[1]: casper-md5check.service: Failed with result 'exit-code'.
Aug 11 15:58:07 jer-B365M-DS3H systemd[1]: Failed to start casper-md5check Verify Live ISO checksums.
User avatar
restrepo
Level 1
Level 1
Posts: 17
Joined: Tue Sep 15, 2020 2:26 pm
Location: Seattle, WA / USA

Re: Mint 21 slight keyboard lag

Post by restrepo »

Finally found out what the issue with the keyboard lag was... The logitech wireless USB receiver started experiencing connectivity issues right after the upgrade. Although I would think this would be unrelated, the fact that it started immediately after the upgrade makes me wonder.
User avatar
rossdv8
Level 7
Level 7
Posts: 1736
Joined: Wed Apr 23, 2014 4:48 am
Location: Within 2,000 kilometres of Alice Springs, Australia
Contact:

Re: Mint 21 slight keyboard lag

Post by rossdv8 »

I found some notes on the problem that I had written some years ago when it happened in another release of Mint.
In My case it was that on 'some computers' it actually matters which USB port the USB wireless thingy is plugged into. At the time it was a known Logitech thing.

It might be worth exploring, by trying each USB port in turn for a day. In my case it was one of the rear ones that was the recommended port to use. I had assumed using a front one closer to the keyboard and mouse would be better.
On my secondary computer, the rear ones cause glitches - but the front one works with a different Logitech keyboard - although because I now run all my computers through VNC, I had to actually set that machine up with a monitor, mouse and keyboard to find out.

At any rate, as fast as I can type now, the keyboard seems to be keeping up.

BTW, I checked and saw that Logitech (at the time) suggested this:
If you're experiencing connection issues with your keyboard, please try the following troubleshooting steps that may help you find a resolution:

Wireless connection

Make sure the device is fully charged (replace with new batteries if it's not a rechargeable device).
Plug the receiver into a different USB port on your computer. If possible, don't use a USB hub or other similar device.
If you are using a USB 3.0 port try plugging the device into a USB 2.0 port.
Try reinstalling the Logitech Connection Utility software and re-pair your device.
Try testing the device on a different computer.
Disable USB Selective Suspend:
Click Start > Control Panel > Hardware and Sound > Power Options > Change Plan Settings > Change Advanced Power Settings > USB Settings > USB Selective Suspend Setting
Change both settings to Disabled.
While at the time this was not actually answering a keyboard lag question, it and another more specific reply prompted me to explore USB ports with the WiFi dongle.
Current main OS: MInt 21.3 with KDE Plasma 5.27 (using Compiz as WM) - Kernel: 6.5.0-15 on Lenovo m900 Tiny, i5-6400T (intel HD 530 graphics) 16GB RAM.
Sharks usually only attack you if you are wet
Locked

Return to “Software & Applications”