You are not logged in.

#26 2022-08-20 23:54:47

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,178

Re: Autorepeat rate and delay in KDE suddenly excruciatingly slow

seth wrote:

heisenbug - we'll wait whether and until it re-appears and until then you get to enjoy backspace races cool
It might have been a corruption in the installation of the previous xorg-server, though I'd rather expect stuff to crash in that case…

Thanks for all your time. I really appreciate your help and I'm sorry not to provide a more satisfactory problem! (I hate it when things just stop not working almost as much as when they just stop working.)

I won't mark this solved quite yet because this thing is so frustrating, I'll probably jinx it if I do (and being able to type somewhat accurately is kind of useful). wink


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#27 2022-08-21 03:39:48

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,178

Re: Autorepeat rate and delay in KDE suddenly excruciatingly slow

Apparently I didn't need to jinx anything.

I'm now seeing the problem again, though it is not  as bad (yet?). But the keyboard is less responsive than it should be and making changes in KDE settings has no effect. I have not rebooted or changed anything (except just now in the settings). The journal has this:

Aws 21 04:20:28 Comp kwin_x11[10430]: qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 6678, resource id: 75497488, major code: 18 (ChangeProperty), minor code: 0
Aws 21 04:20:29 Comp systemsettings5[19712]: QLayout::removeWidget: Cannot remove a null widget.
Aws 21 04:20:30 Comp systemsettings5[19712]: kf.configwidgets: A widget named ' "kcfg_osdKbdLayoutChangedEnabled" ' was found but there is no setting named ' "osdKbdLayoutChangedEnabled" '
Aws 21 04:20:30 Comp systemsettings5[19712]: kf.configwidgets: A widget named ' "kcfg_repeatRate" ' was found but there is no setting named ' "repeatRate" '
Aws 21 04:20:30 Comp systemsettings5[19712]: kf.configwidgets: A widget named ' "kcfg_repeatDelay" ' was found but there is no setting named ' "repeatDelay" '
Aws 21 04:20:30 Comp systemsettings5[19712]: kf.configwidgets: A widget named ' "kcfg_resetOldXkbOptions" ' was found but there is no setting named ' "resetOldXkbOptions" '
Aws 21 04:20:30 Comp systemsettings5[19712]: kf.configwidgets: A widget named ' "kcfg_configureLayouts" ' was found but there is no setting named ' "configureLayouts" '
Aws 21 04:20:30 Comp systemsettings5[19712]: kf.configwidgets: A widget named ' "kcfg_repeatRate" ' was found but there is no setting named ' "repeatRate" '
Aws 21 04:20:30 Comp systemsettings5[19712]: kf.configwidgets: A widget named ' "kcfg_repeatDelay" ' was found but there is no setting named ' "repeatDelay" '
Aws 21 04:20:30 Comp systemsettings5[19712]: qml: The item SubCategoryPage_QMLTYPE_83(0x55d39fa83420) is already in the PageRow

However, I don't know if this is just a symptom of the problem? KDE complains so much in the logs, it's hard to tell when any of it means anything.

Last edited by cfr (2022-08-21 03:40:41)


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#28 2022-08-21 06:03:17

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,446

Re: Autorepeat rate and delay in KDE suddenly excruciatingly slow

Let's rule out KDE: does this also happen w/ an openbox session?

Offline

#29 2022-08-22 16:58:32

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,178

Re: Autorepeat rate and delay in KDE suddenly excruciatingly slow

Update: I get the KDE complaints even when the settings work as expected, but I should probably test this in the old xorg-server version, too. I also don't always get those complaints if I adjust the autorepeat settings, even with the current xorg.

seth wrote:

Let's rule out KDE: does this also happen w/ an openbox session?

Installing openbox pulled in a bunch of updates, so I tested first in KDE but I still have the problem there, though not at first. (I'm starting to wonder if my own reports are in any way reliable. The slipperiness is driving me nuts.)

Do you mean start a KDE/openbox session offered by sddm? (To rule out kwin etc.?) Or should I also exclude sddm?

What exactly do I want to exclude? Since I'm seeing the problem in the middle of an X session, I need to be able to do stuff in openbox. Ideally, I'd use konsole and kile, but I don't want to do that if it will mess up the test.

I realise there may be no absolutely correct answer to this, but you have much more idea what combination is worth testing and what probably isn't.

Last edited by cfr (2022-08-22 17:00:21)


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#30 2022-08-23 14:14:25

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,446

Re: Autorepeat rate and delay in KDE suddenly excruciatingly slow

Do you mean start a KDE/openbox session offered by sddm? (To rule out kwin etc.?) Or should I also exclude sddm?

There should be a session that's just openbox, no KDE. I can't say what in KDE might mess w/ those settings, but KWin is on the bottom of the list and some keyboard config daemon very much on the top.
Clients like konsole & kile are rather unsuspicious.

Since I'm seeing the problem in the middle of an X session

Woawoawoaaa…  that one was lost on me.

Is it maybe after an S3 or DPMS (in case the keyboard hangs on a hub attached to your monitor)?
When you inspect your xorg log right after the repeat rate changes, does it look like a "new" keyboard just showed up?
https://wiki.archlinux.org/title/Xorg#General

https://wiki.archlinux.org/title/Xorg/K … ion_option
Check

grep -ri autorepeat /{usr/share,etc}/X11/xorg.conf*

and maybe add a configlet drop-in w/ the desired rate and see whether that "stabilizes" the aurorepeat settings…

Offline

#31 2022-08-24 05:32:15

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,178

Re: Autorepeat rate and delay in KDE suddenly excruciatingly slow

seth wrote:

Since I'm seeing the problem in the middle of an X session

Woawoawoaaa…  that one was lost on me.

It's my fault. Probably, anyway.

What seems to be happening now is that things seem OK initially. Then, at some point, things get slower. Then there's either a sudden shift to much less responsive or the rate of slowing is just much faster.

When I first had the problem it seemed to be all-or-nothing and I didn't notice any sudden shifts. It either worked fine in X or it didn't. But I'm wondering now whether I just didn't notice. There's certainly a point when I can't make the autorepeat too fast to be comfortable, but it feels fine as it is. But trying to make my keyboard uncomfortable to work on wasn't really high on my list of hobbies prior to this. Indeed, I'm not sure I'd ever changed the settings for autorepeat or tried to adjust the delay when I pressed keys at all. Touch/mouse stuff I always want more sensitive than the default, but keyboads usually feel OK except for key mappings.

Is it maybe after an S3 or DPMS (in case the keyboard hangs on a hub attached to your monitor)?

There's no jump associated with sleep or with battery/AC changes that I've been able to discern. I've definitely had it happen when I'm in the middle of typing in Kile. Sleep sometimes seems to make KDE change other settings, though, because my pointer config sometimes needs resetting. (That's not a given unless the mouse is unplugged, though.)

seth wrote:

When you inspect your xorg log right after the repeat rate changes, does it look like a "new" keyboard just showed up?

I can't see anything which looks like this after the beginning, but I'll try to look right after I notice a jump in slowness.

I will try the  configuration fragment, but I would like to rule out KDE first.


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#32 2022-08-24 06:41:24

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,446

Re: Autorepeat rate and delay in KDE suddenly excruciatingly slow

I've definitely had it happen when I'm in the middle of typing in Kile.

Does the general problem happen w/ the external keyboards as well?
(Though the autorepeat events are synthetic and your previous xev output didn't really suggest some bouncing)

Offline

#33 2022-08-29 01:03:37

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,178

Re: Autorepeat rate and delay in KDE suddenly excruciatingly slow

seth wrote:

I've definitely had it happen when I'm in the middle of typing in Kile.

Does the general problem happen w/ the external keyboards as well?
(Though the autorepeat events are synthetic and your previous xev output didn't really suggest some bouncing)

I'm not sure. I will test this. I gave back the keyboard I borrowed when I thought the problem had gone away, but I'm sure I can borrow it again.

Adding configuration for autorepeat into my xorg keyboard configuration had no discernible effect.

# Written by systemd-localed(8), read by systemd-localed and Xorg. It's
# probably wise not to edit this file manually. Use localectl(1) to
# instruct systemd-localed to update it.

# hacked gan cfr
# ref.: man pages for xorg.conf.d xkeyboard-config (and some more, i think)

Section "InputClass"
        Identifier "cfr evdev keyboard"
        MatchIsKeyboard "on"
        MatchDevicePath "/dev/input/event*"
        MatchProduct "AT Translated Set 2 keyboard"
        Option "XkbLayout" "us"
        Option "XkbModel" "pc105+inet"
        Option "XkbVariant" "euro"
        Option "XkbOptions" "terminate:ctrl_alt_bksp+eurosign:5+compose:caps+shift:both_capslock_cancel"
        Option "AutoRepeat" "250 30"
        Driver "evdev"
EndSection

I've changed the '30' to '60' now because I found 30 too slow in openbox (but not anything like as slow as it gets in KDE - just slower than I start with).

It is starting to look KDE related, though I won't feel confident until I've used openbox for a bit longer. openbox is driving me slightly nuts, but at least I can delete things easily!

There are scripts associated with autorepeat in KDE which are supposed to compensate for an earlier bug which caused settings not to be applied correctly. However, as far as I can tell, this should only affect whether autorepeat is toggled on or off.

~/.config/kcminputrc

[$Version]
update_info=delete_cursor_old_default_size.upd:DeleteCursorOldDefaultSize,kcminputrc_fix_botched_5_21_0.upd:kcminputrc_fix_botched_5_21_0_pre,kcminputrc_fix_botched_5_21_0.upd:kcminputrc_fix_botched_5_21_0,kcminputrc_repeat.upd:kcminputrc_migrate_key_repeat

[Keyboard]
KeyRepeat=repeat
NumLock=2
RepeatDelay=250
RepeatRate=100

[Mouse]
Acceleration=2
MouseButtonMapping=RightHanded
ReverseScrollPolarity=false
Threshold=4
X11LibInputXAccelProfileFlat=false
XLbInptLeftHanded=true
cursorTheme=Breeze_Snow

[Tmp]
update_info=delete_cursor_old_default_size.upd:DeleteCursorOldDefaultSize

I'm sure it is irrelevant. I'm just suspicious of fixes for bugs that make things vastly more complicated. (As far as I can ascertain the point of the scripts is so that people who disabled autorepeat in order to enable it don't have to re-enable it now the bug is fixed.)

One other thing I do in KDE which shouldn't have any affect on anything keyboard related as far as I know is run the following (highly ungrammatical!) script multiple times:

#!/bin/bash -
#set -x
PATH=/usr/bin
export PATH

allan=0

usage="Usage: $0 
Ceisio dadwneud kdminit sy'n torri config llygoden, touchpad a trackpoint."
error () {
        echo "$@" 1>&2
        ((allan++))
        usage_and_exit $allan
}
warning () {
        echo "$@" 1>&2
        ((allan++))
        return 1
}
usage () {
        printf %b "$usage\n"
}
usage_and_exit () {
        usage
        exit $1
}
try () {
        xinput set-prop $1 "$2" $3 || warning "Gwall: na allaf gosod  "$2" $3 am $4."
}

tempargs=$(getopt -o h --long help -- "$@")
if [ $? != 0 ];
then
        usage_and_exit
fi
eval set -- "$tempargs"

while true
do
        case "$1"
        in
                -h | --help)
                        usage;
                        exit $allan;;
                --)
                        shift;
                        break;;
                *)
                        error Unrecognised option "$1".
        esac
done


touch=$(xinput list --id-only "SynPS/2 Synaptics TouchPad")
track=$(xinput list --id-only "TPPS/2 IBM TrackPoint")
mouse=$(xinput list  | grep "Mouse" | sed 's/^.*id=\([0-9][0-9]*\)[^0-9].*$/\1/')

[[ "$mouse" != "" ]] && xinput set-prop $mouse "libinput Left Handed Enabled" 1

try $track "libinput Left Handed Enabled" 0  TrackPoint
try $track "libinput Accel Speed" 1 TrackPoint
try $track "libinput Accel Profile Enabled" "0, 1" TrackPoint
try $touch "libinput Accel Speed" 1 TouchPad
try $touch "libinput Tapping Enabled" 1 TouchPad
try $touch "libinput Tapping Drag Lock Enabled" 1 TouchPad
try $touch "libinput Left Handed Enabled" 0 TouchPad


exit $allan
# vim: set nospell: 

But I can't see why running xinput on pointers should affect anything keyboard related, however many times it gets invoked?


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#34 2022-08-29 14:27:43

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,446

Re: Autorepeat rate and delay in KDE suddenly excruciatingly slow

however many times it gets invoked?

Maybe more like "how frequent" - though if the input gets slowed down because of the server not being able to keep track of the events (input manipulation or CPU overload) you should see warning itr. in the xorg log.
Also the delay looked to regular at 500ms to be caused by such.

What's in "/usr/share/kconf_update/kcminputrc_repeat.upd"?

Offline

#35 2022-08-30 15:54:35

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,178

Re: Autorepeat rate and delay in KDE suddenly excruciatingly slow

It is definitely KDE/Plasma related. I'm not getting the same slowing in openbox (or else it takes much, much longer to manifest but I'm going with not happening for now).

seth wrote:

however many times it gets invoked?

Maybe more like "how frequent" - though if the input gets slowed down because of the server not being able to keep track of the events (input manipulation or CPU overload) you should see warning itr. in the xorg log.
Also the delay looked to regular at 500ms to be caused by such.

It's not run that frequently. It gets triggered automatically  (e.g. from ~/.config/autostart/kcminit-undo.desktop), but mostly it gets run manually when pointer buttons don't work as they should. (KDE doesn't let me have a left-handed mouse but right-handed trackpoint/trackpad.)

seth wrote:

What's in "/usr/share/kconf_update/kcminputrc_repeat.upd"?

/usr/share/kconf_update/kcminputrc_repeat.upd

Version=5

Id=kcminputrc_migrate_key_repeat
File=kcminputrc
Group=Keyboard
Script=kcminputrc_migrate_repeat_value.py

/usr/share/kconf_update/kcminputrc_migrate_repeat_value.py

#!/usr/bin/env python3
import sys

for line in sys.stdin:
    line = line.rstrip()
    print(line, file=sys.stderr)
    if line.startswith("KeyboardRepeating=1"):
        print("KeyRepeat=nothing")
    elif line.startswith("KeyboardRepeating="):
        print("KeyRepeat=repeat")

print("# DELETE KeyboardRepeating")

For good measure, /usr/share/kconf_update/kcminputrc_fix_botched_5_21_0.upd

#
# Every KConfig .upd file needs this magic header of "Version=5"
#
Version=5

#
# That brings us to our first migration script for this file, kcminputrc_fix_botched_5_21_0_pre.
# We need this pre-script before the actual fix in order to prepare information the main migration
# script uses.
#
Id=kcminputrc_fix_botched_5_21_0_pre
#
# We're operating on kcminputrc, the file we botched with the 5.21.0 upgrade.
#
File=kcminputrc
#
# Since our desired information is in the group called $Version, which KConfig's update process
# tries really hard to hide from the migration script, we need to copy it into another group,
# which KConfig is fine with showing to the migration script.
#
Group=$Version,Tmp
Options=copy
#
# The specific key in $Version that we want to make available is update_info, which contains
# all of the migrations that have ran on kcminputrc. We need this information in order to discern
# whether or not the botched migration was applied to kcminputrc.
#
Key=update_info

#
# After copying the information into the Tmp group, we can run our actual migration script now.
#
Id=kcminputrc_fix_botched_5_21_0
File=kcminputrc
Script=kcminputrc_fix_botched_5_21_0.py

/usr/share/kconf_update/kcminputrc_fix_botched_5_21_0.py

#!/usr/bin/env python3
#
#  SPDX-FileCopyrightText: 2021 Carson Black <uhhadd@gmail.com>
#
#  SPDX-License-Identifier: LGPL-2.0-or-later
#

# 5.21.0 botched the migration by accidentally turning enabled to disabled and disabled to enabled.
# We have two choices here: we can either break key repeat for users that manually intervened
# and enabled key repeat by inverting the value, or we can enable key repeat for users that didn't
# have it enabled and fix users that had their key repeat disabled. Only one of those sentences
# contains the word "break" so we go with the one without the word "break" ;)
# Enabling key repeat for users who disabled it is less breaking than disabling key repeat for
# users who enabled it.

#
# And that brings us to the code.
#
# We'll need to import sys in order to read stdin, which is how we receive
# the old input file to look for it.
#
import sys

#
# After that, we'll need to declare ourselves a variable to hold the contents
# of the config file we read in from stdin.
#

content: str = sys.stdin.read()

#
# That brings us to checking for the presence of the old script's effects on the underlying system:
# kconfig files are annotated with a section containing all of the config scripts that have ran
# on them.
#
# They're of the form filename.upd:migration_name.
#
if "kcminputrc_repeat.upd:kcminputrc_migrate_repeat_value" in content:
    #
    # Now we check for the presence of a disabled key repeat in the config file contents. For 5.21.0, this
    # was changed from a 0-1-2 ternary to an English-language nothing/repeat/accent.
    # The config script for migrating ternary to English-language is why we're in this
    # mess in the first place. We migrated 0 (enabled) -> nothing and 2 (disabled) -> repeat.
    #
    if "KeyRepeat=nothing" in content:
        #
        # Now we print the command instructing the kconfig updater to delete this field.
        # A deleted field essentially means "use the default" which in this case means
        # "enable key repeat." We delete instead of reassigning to "repeat" because
        # we would prefer to have a deleted field act as our "default" value.
        #
        print("# DELETE [Keyboard]KeyRepeat")

    #
    # Since we created the Tmp group as a temporary way of conveying to this script what migrations
    # were applied to the config file, we want to clean it up, as it serves no other purpose.
    #
    # We instruct KConfig to delete the Tmp group in the config file.
    #
    print("# DELETEGROUP Tmp")

Last edited by cfr (2022-08-30 15:56:21)


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#36 2022-08-30 21:02:14

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,446

Re: Autorepeat rate and delay in KDE suddenly excruciatingly slow

KDE has an a11y feature where it enables slow keys when you take a nap on the shift key, https://docs.kde.org/trunk5/en/plasma-d … index.html
Can you enforce the situation by pressing shift (I assume in isolation) for at least 8 seconds?

Offline

#37 2022-08-30 23:38:22

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,178

Re: Autorepeat rate and delay in KDE suddenly excruciatingly slow

seth wrote:

KDE has an a11y feature where it enables slow keys when you take a nap on the shift key, https://docs.kde.org/trunk5/en/plasma-d … index.html
Can you enforce the situation by pressing shift (I assume in isolation) for at least 8 seconds?

Thanks for that information. Unfortunately, no, I can't enforce the situation using shift.
Pressing shift down has no discernible effect. I also tried it with a clock just in case I wasn't letting the full 8 seconds go, but it made no difference.

I don't have an 'Activation Gestures' section under 'Accessibility' in System Settings, though the other 5 sections are present, which seems a bit odd?

EDIT: I've got 5 sections in the accessibility settings rather than 6 and I seem to have 4 files:

ls /usr/share/config.kcfg/kcmaccessibility*
/usr/share/config.kcfg/kcmaccessibilitybell.kcfg      /usr/share/config.kcfg/kcmaccessibilitymouse.kcfg
/usr/share/config.kcfg/kcmaccessibilitykeyboard.kcfg  /usr/share/config.kcfg/kcmaccessibilityscreenreader.kcfg

So I'm not sure where the options I *do* see for enabling slow keys and bounce keys are (since kcmaccessibilitykeyboard.kcfg appears to cover the modifier keys section with sticky keys).

EDIT: https://bugs.kde.org/show_bug.cgi?id=457838 (I note the reporter is also on Arch.)

Last edited by cfr (2022-08-31 12:56:07)


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#38 2022-08-31 07:07:42

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,446

Re: Autorepeat rate and delay in KDE suddenly excruciatingly slow

slowkey activation should™ be reflected in "xkbset q" pay attention whether you did something that might be interpreted as gesture next time it happens.
Can you btw fix it w/ "xkbset r rate 250 100"?

Offline

#39 2022-09-01 03:09:58

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,178

Re: Autorepeat rate and delay in KDE suddenly excruciatingly slow

seth wrote:

slowkey activation should™ be reflected in "xkbset q" pay attention whether you did something that might be interpreted as gesture next time it happens.

It seems to be too gradual to be something like this. Although it does jump, it isn't totally normal one moment and totally awful the next.

I'm often typing in Kile when it happens, but I think that's because I'm often typing in Kile. (And it certainly isn't Kile per se because I spent lots of my time in openbox typing in Kile, too.)

I can't see anything in xkbset q which should be problematic, but here's the output when things have slowed down dramatically:

Audible Bell = On
Repeat Keys = On
Repeat Delay = 250
Repeat Interval = 10
Per Key Repeat =
        00ffffffdffffbbf
        fadfffefffedffff
        9fffffffffffffff
        fff7ffffffffffff
Mouse-Keys = Off
Mouse-Keys Default Button = 1
Mouse-Keys Acceleration = On
Mouse-Keys Acceleration Delay = 160
Mouse-Keys Acceleration Interval = 40
Mouse-Keys Acceleration Time to Max = 30
Mouse-Keys Acceleration Max Speed = 30
Mouse-Keys Acceleration Curve = 500
Accessibility Features (AccessX) = Off
Sticky-Keys = Off
Two Keys Mask = On
Latch to Lock Mask = On
Slow-Keys = Off
Slow Keys Delay = 500
Bounce-Keys = Off
Debounce Delay = 500
AccessX Feedback = On
Use Fixed Pitch Bell = On
Beep when LED changes = Off
Beep on Controls on/off = On
Beep if Slow/Bounce-Keys about to be turned off = On
Beep on Slow-Key Press = On
Beep on Slow-Key Accept = On
Beep on Slow-Key Reject = Off
Beep on Slow-Key Release = Off
Beep on Bounce-Key Reject = On
Beep on Sticky-Key Actions = On
Keyboard Overlay 1 = Off
Keyboard Overlay 2 = Off
Groups Wrap Type = wrap
Groups Wrap Value = 1
Ignore Group Lock = On
Nullify Shift = Off
Nullify Caps-Lock = Off
Nullify Control = Off
Nullify Mod1 = Off
Nullify Mod2 = Off
Nullify Mod3 = Off
Nullify Mod4 = Off
Nullify Mod5 = Off
Ignore Lock of Shift = Off
Ignore Lock of Caps-Lock = Off
Ignore Lock of Control = Off
Ignore Lock of Mod1 = Off
Ignore Lock of Mod2 = Off
Ignore Lock of Mod3 = Off
Ignore Lock of Mod4 = Off
Ignore Lock of Mod5 = Off
seth wrote:

Can you btw fix it w/ "xkbset r rate 250 100"?

No. I think I tried this before, but I just checked again and it has no discernible effect.


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#40 2022-09-03 02:43:33

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,178

Re: Autorepeat rate and delay in KDE suddenly excruciatingly slow

I noticed that when the problem occurs (or, at any rate, this time it occurred) Xorg seems to be taking a very big chunk of the CPU time that's being used. top shows it as nearly 100% (high 90s/100 depending on the particular reading). This seems a bit weird because when I've just logged in (to get the keyboard working properly again), it doesn't take anything like that much.

But I still can't find anything strange in the logs.

Is this (1) probably just random noise (2) normal --- Xorg always does that (3) possibly related or (4) something else? I can't see why it should be related exactly, but it's the only oddity I've managed to identify, so thought it might just possibly be worth mentioning. Just in case, really.

I haven't checked whether this happens in openbox where I don't see the problem but I will if it might be relevant.

EDIT: I'm not sure if this should be a different thread, since I don't know whether it is related or not.

Last edited by cfr (2022-09-03 05:42:30)


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#41 2022-09-03 06:48:09

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,446

Re: Autorepeat rate and delay in KDE suddenly excruciatingly slow

If the X11 server uses an entire core, it's gonna be too busy to handle events - it's a very good eplanation for the symptoms as described so far (happens randomly, creep up, not reflected by the a11y settings)

And no, this is not normal.
The cause is usually (and likely, given that it's not happening w/ openbox) that some client bangs the shit out of the server - you'd likely see increased activity/CPU load in a different - and most likely plasma-related - process.
Killing that process should then instantly remedy the situation.

Offline

#42 2022-09-03 14:49:05

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,178

Re: Autorepeat rate and delay in KDE suddenly excruciatingly slow

seth wrote:

If the X11 server uses an entire core, it's gonna be too busy to handle events - it's a very good eplanation for the symptoms as described so far (happens randomly, creep up, not reflected by the a11y settings)

I guess I thought something like this would make other things slow, so I was looking for something specific to the keyboard stuff.

seth wrote:

The cause is usually (and likely, given that it's not happening w/ openbox) that some client bangs the shit out of the server - you'd likely see increased activity/CPU load in a different - and most likely plasma-related - process.
Killing that process should then instantly remedy the situation.

Thank-you. When I look at top, nothing else comes consistently close in terms of CPU %. This is a current snapshot. Xorg is currently taking somewhere between 35% and 45% CPU. I've been watching it on and off since I logged back in and, although it varies from reading to reading, the generally trend is really clearly up and up and up.

top - 15:34:19 up 1 day, 23:51, 18 users,  load average: 0.88, 0.70, 0.72
Tasks: 214 total,   2 running, 212 sleeping,   0 stopped,   0 zombie
%Cpu(s): 17.1 us,  4.3 sy,  0.0 ni, 75.7 id,  0.0 wa,  1.4 hi,  1.4 si,  0.0 st
MiB Mem :   7847.0 total,   1332.9 free,   3504.0 used,   3010.1 buff/cache
MiB Swap:   8192.0 total,   8187.8 free,      4.2 used.   3573.8 avail Mem 

    PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND
   8114 root      20   0 1087400 117216  80964 R  47.1   1.5  54:11.70 Xorg
   8274 <username>    20   0 2076804 200344 128808 S   5.9   2.5  22:15.68 kwin_x11
   8312 <username>    20   0 2645044 354204 153608 S   5.9   4.4  19:48.77 plasmashell
   8444 <username>    20   0 1293168 187836 124880 S   5.9   2.3   0:45.71 konsole
  10796 <username>    20   0   13140   4088   3476 R   5.9   0.1   0:00.03 top
      1 root      20   0  166860  11480   8236 S   0.0   0.1   0:03.25 systemd
      2 root      20   0       0      0      0 S   0.0   0.0   0:00.02 kthreadd
      3 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 rcu_gp
      4 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 rcu_par_gp
      5 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 netns
      7 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 kworker/0:0H-events_highpri
      9 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 mm_percpu_wq
     11 root      20   0       0      0      0 I   0.0   0.0   0:00.00 rcu_tasks_kthread
     12 root      20   0       0      0      0 I   0.0   0.0   0:00.00 rcu_tasks_rude_kthread
     13 root      20   0       0      0      0 I   0.0   0.0   0:00.00 rcu_tasks_trace_kthread
     14 root      20   0       0      0      0 S   0.0   0.0   0:23.64 ksoftirqd/0
     15 root      -2   0       0      0      0 I   0.0   0.0   0:29.83 rcu_preempt
     16 root      -2   0       0      0      0 S   0.0   0.0   0:00.00 rcub/0
     17 root      rt   0       0      0      0 S   0.0   0.0   0:00.17 migration/0
     18 root     -51   0       0      0      0 S   0.0   0.0   0:00.00 idle_inject/0
     20 root      20   0       0      0      0 S   0.0   0.0   0:00.00 cpuhp/0
     21 root      20   0       0      0      0 S   0.0   0.0   0:00.00 cpuhp/1
     22 root     -51   0       0      0      0 S   0.0   0.0   0:00.00 idle_inject/1
     23 root      rt   0       0      0      0 S   0.0   0.0   0:00.28 migration/1
     24 root      20   0       0      0      0 S   0.0   0.0   0:00.72 ksoftirqd/1
     26 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 kworker/1:0H-events_highpri
     27 root      20   0       0      0      0 S   0.0   0.0   0:00.00 cpuhp/2
     28 root     -51   0       0      0      0 S   0.0   0.0   0:00.00 idle_inject/2
     29 root      rt   0       0      0      0 S   0.0   0.0   0:00.29 migration/2
     30 root      20   0       0      0      0 S   0.0   0.0   0:00.83 ksoftirqd/2
     32 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 kworker/2:0H-events_highpri
     33 root      20   0       0      0      0 S   0.0   0.0   0:00.00 cpuhp/3
     34 root     -51   0       0      0      0 S   0.0   0.0   0:00.00 idle_inject/3
     35 root      rt   0       0      0      0 S   0.0   0.0   0:00.29 migration/3
     36 root      20   0       0      0      0 S   0.0   0.0   0:20.94 ksoftirqd/3
     38 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 kworker/3:0H-events_highpri
     39 root      20   0       0      0      0 S   0.0   0.0   0:00.00 kdevtmpfs
     40 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 inet_frag_wq
     41 root      20   0       0      0      0 S   0.0   0.0   0:00.00 kauditd
     42 root      20   0       0      0      0 S   0.0   0.0   0:00.08 khungtaskd
     43 root      20   0       0      0      0 S   0.0   0.0   0:00.00 oom_reaper
     45 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 writeback
     46 root      20   0       0      0      0 S   0.0   0.0   0:06.95 kcompactd0
     47 root      25   5       0      0      0 S   0.0   0.0   0:00.00 ksmd
     48 root      39  19       0      0      0 S   0.0   0.0   0:16.47 khugepaged
     49 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 kintegrityd
     50 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 kblockd
     51 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 blkcg_punt_bio
     54 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 ata_sff
     55 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 edac-poller
     56 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 devfreq_wq
     57 root     -51   0       0      0      0 S   0.0   0.0   0:00.00 watchdogd
     58 root       0 -20       0      0      0 I   0.0   0.0   0:07.13 kworker/1:1H-events_highpri
     60 root       0 -20       0      0      0 I   0.0   0.0   0:04.70 kworker/3:1H-events_highpri
     61 root      20   0       0      0      0 S   0.0   0.0   0:03.32 kswapd0
     68 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 kthrotld
     73 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 acpi_thermal_pm
     74 root      20   0       0      0      0 S   0.0   0.0   0:00.00 xenbus_probe
     75 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 mld
     76 root       0 -20       0      0      0 I   0.0   0.0   0:05.80 kworker/0:1H-events_highpri
     77 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 ipv6_addrconf
     82 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 kstrp
     86 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 zswap1
     87 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 zswap1
     88 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 zswap-shrink
    128 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 charger_manager
    143 root     -51   0       0      0      0 S   0.0   0.0   0:00.04 card0-crtc0
    144 root     -51   0       0      0      0 S   0.0   0.0   0:00.00 card0-crtc1
    145 root     -51   0       0      0      0 S   0.0   0.0   0:00.00 card0-crtc2
    148 root       0 -20       0      0      0 I   0.0   0.0   0:06.40 kworker/2:1H-events_highpri
    174 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 nvme-wq
    175 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 nvme-reset-wq
    176 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 nvme-delete-wq
    177 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 cryptd
    201 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 tpm_dev_wq
    210 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 kdmflush/254:0
    215 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 kcryptd_io/254:
    216 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 kcryptd/254:0
    217 root      20   0       0      0      0 S   0.0   0.0   0:02.68 dmcrypt_write/254:0
    222 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 kdmflush/254:1
    223 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 kdmflush/254:2
    225 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 kdmflush/254:3
    226 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 kdmflush/254:4
    228 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 kdmflush/254:5
    229 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 kdmflush/254:6
    262 root      20   0       0      0      0 S   0.0   0.0   0:00.00 jbd2/dm-1-8
    263 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 ext4-rsv-conver
    296 root      20   0  136876  64632  63296 S   0.0   0.8   0:04.76 systemd-journal
    308 root      20   0   32116   8472   6332 S   0.0   0.1   0:00.80 systemd-udevd
    357 root      20   0       0      0      0 S   0.0   0.0   0:02.79 jbd2/dm-5-8
    359 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 ext4-rsv-conver
    361 root      20   0       0      0      0 S   0.0   0.0   0:00.00 jbd2/dm-4-8
    362 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 ext4-rsv-conver
    364 root      20   0       0      0      0 S   0.0   0.0   0:01.08 jbd2/dm-2-8
    365 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 ext4-rsv-conver
    377 root      20   0       0      0      0 S   0.0   0.0   0:00.00 jbd2/dm-3-8
    378 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 ext4-rsv-conver
    427 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 ktpacpid
    433 root      20   0    2528   1756   1608 S   0.0   0.0   0:14.86 acpid
    434 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 cfg80211
    435 avahi     20   0    8480   3272   2856 S   0.0   0.0   0:00.19 avahi-daemon
    436 root      20   0    2604   1100    984 S   0.0   0.0   0:00.00 avahi-dnsconfd
    438 clamav    20   0 1574532   1.3g  16664 S   0.0  16.9   7:18.68 clamd
    439 dbus      20   0    9748   5340   3612 S   0.0   0.1   0:14.30 dbus-daemon
    443 root      20   0   10380   4488   3508 S   0.0   0.1   0:00.04 smartd
    444 root      20   0   48896   7984   6760 S   0.0   0.1   0:00.81 systemd-logind
    445 root      20   0  201656   9572   6744 S   0.0   0.1   0:05.51 thermald
    446 avahi     20   0    8480    416      0 S   0.0   0.0   0:00.00 avahi-daemon
    451 chrony    20   0   86744   3364   2696 S   0.0   0.0   0:00.49 chronyd
    473 root     -51   0       0      0      0 S   0.0   0.0   0:02.84 irq/135-iwlwifi
    565 root      20   0    2548    948    848 S   0.0   0.0   0:05.73 ifplugd
    703 root      20   0   15436   3648   2576 S   0.0   0.0   0:03.11 wpa_supplicant
    707 root      20   0    3416   1252   1084 S   0.0   0.0   0:02.19 wpa_cli
    708 clamav    20   0  142476  21604  18832 S   0.0   0.3   0:00.58 freshclam
    709 root      20   0   31236   9992   6372 S   0.0   0.1   0:00.22 cupsd
    713 root      20   0  143964  16692  14004 S   0.0   0.2   0:00.05 sddm
    744 colord    20   0  245924  16448   7604 S   0.0   0.2   0:00.19 colord
   1069 polkitd   20   0  310016   9764   6816 S   0.0   0.1   0:02.08 polkitd
   1116 root      20   0  235424   8456   5216 S   0.0   0.1   0:29.58 upowerd
   1163 root      20   0  392636  14376  10096 S   0.0   0.2   0:00.42 udisksd
   1246 rtkit     21   1   22784   1320   1060 S   0.0   0.0   0:01.01 rtkit-daemon
   7636 root      20   0       0      0      0 I   0.0   0.0   0:00.00 kworker/1:2-cgroup_destroy
   8152 root      20   0   67088  17356  15732 S   0.0   0.2   0:00.04 sddm-helper
   8154 <username>    20   0   19076  11516   8292 S   0.0   0.1   0:00.40 systemd
   8155 <username>    20   0  170236   3552      0 S   0.0   0.0   0:00.00 (sd-pam)
   8165 <username>    20   0  286668  45852  37736 S   0.0   0.6   0:01.61 kwalletd5
   8166 <username>    20   0  197652  36764  31688 S   0.0   0.5   0:00.14 startplasma-x11
   8203 <username>    20   0    8876   4964   4032 S   0.0   0.1   0:46.22 dbus-daemon
   8271 <username>    20   0  287108  49452  42376 S   0.0   0.6   0:02.16 ksmserver
   8273 <username>    20   0 1215860 123696  78524 S   0.0   1.5   0:11.22 kded5
   8286 <username>    20   0  284620  40264  33268 S   0.0   0.5   0:05.13 kglobalaccel5
   8290 <username>    20   0  154808   4376   3976 S   0.0   0.1   0:00.00 dconf-service
   8318 <username>    20   0  545060  34992  30244 S   0.0   0.4   0:01.73 kactivitymanage
   8319 <username>    20   0  230684  24516  19724 S   0.0   0.3   0:01.55 gmenudbusmenupr
   8320 <username>    20   0  434500  44188  38164 S   0.0   0.5   0:01.78 polkit-kde-auth
   8321 <username>    20   0  496896  44000  36048 S   0.0   0.5   0:04.73 org_kde_powerde
   8322 <username>    20   0  229640  22248  19468 S   0.0   0.3   0:01.60 xembedsniproxy
   8385 <username>    20   0  450868 146176  49708 S   0.0   1.8   2:29.72 SpiderOakONE
   8392 <username>    20   0  371584  52388  41432 S   0.0   0.7   0:03.61 kdeconnectd
   8403 <username>    20   0  287540  47876  37624 S   0.0   0.6   0:02.46 kaccess
   8412 <username>    20   0  222848  20256  17568 S   0.0   0.3   0:01.60 kscreen_backend
   8417 <username>    20   0 1307948 152288 105020 S   0.0   1.9   0:04.19 kmix
   8431 <username>     9 -11 1287192  25212  14196 S   0.0   0.3   0:00.16 pulseaudio
   8455 <username>    20   0  236372   7128   6212 S   0.0   0.1   0:00.01 gsettings-helpe
   8471 <username>    20   0 1805148 320092 143496 S   0.0   4.0   9:27.37 kile
   8494 <username>    20   0   47836   6464   5744 S   0.0   0.1   0:00.00 obexd
   8496 <username>    20   0 1426124 195152 117904 S   0.0   2.4   0:11.08 okular
   8503 <username>    20   0  485532 113780  11300 S   0.0   1.4   5:42.32 SpiderOakONE
   8561 <username>    20   0   12968   6328   4248 S   0.0   0.1   0:00.44 bash
   8563 <username>    20   0   11072   4980   3432 S   0.0   0.1   0:00.03 bash
   8567 <username>    20   0   11072   5060   3512 S   0.0   0.1   0:00.04 bash
   8585 <username>    20   0   11072   5040   3496 S   0.0   0.1   0:00.03 bash
   8602 <username>    20   0   11072   4988   3444 S   0.0   0.1   0:00.03 bash
   8618 <username>    20   0   11072   5156   3608 S   0.0   0.1   0:00.03 bash
   8633 <username>    20   0   11072   5000   3456 S   0.0   0.1   0:00.03 bash
   8646 <username>    20   0   11072   5196   3640 S   0.0   0.1   0:00.04 bash
   8662 <username>    20   0   11072   5048   3500 S   0.0   0.1   0:00.03 bash
   8678 <username>    20   0   11072   5060   3516 S   0.0   0.1   0:00.03 bash
   8691 <username>    20   0   11072   4992   3448 S   0.0   0.1   0:00.03 bash
   8706 <username>    20   0   11072   5124   3580 S   0.0   0.1   0:00.03 bash
   8742 <username>    20   0   11072   5060   3516 S   0.0   0.1   0:00.03 bash
   8751 <username>    20   0   11072   5116   3572 S   0.0   0.1   0:00.03 bash
   8755 <username>    20   0    9428   2936   2640 S   0.0   0.0   0:00.60 inotify_dir_wat
   8765 <username>    20   0   11072   5196   3652 S   0.0   0.1   0:00.03 bash
   8838 <username>    20   0   10988   5220   3584 S   0.0   0.1   0:00.03 bash
   8930 <username>    20   0   33.0g 413068 249740 S   0.0   5.1   1:32.19 chromium
   8932 <username>    20   0   32.0g   4328   4044 S   0.0   0.1   0:00.00 chrome_crashpad
   8934 <username>    20   0   32.0g   4132   3804 S   0.0   0.1   0:00.00 chrome_crashpad
   8938 <username>    20   0   32.5g 110896  96840 S   0.0   1.4   0:00.05 chromium
   8939 <username>    20   0   32.5g 111448  97388 S   0.0   1.4   0:00.05 chromium
   8941 <username>    20   0   32.5g  17980   3784 S   0.0   0.2   0:00.11 chromium
   8957 <username>    20   0  242852   9892   6696 S   0.0   0.1   0:00.00 gvfsd
   8962 <username>    20   0  378936   7560   4872 S   0.0   0.1   0:00.00 gvfsd-fuse
   8978 <username>    20   0   32.9g 159272  88572 S   0.0   2.0   1:16.34 chromium
   8981 <username>    20   0   32.6g 145340 115276 S   0.0   1.8   0:09.79 chromium
   8982 <username>    20   0   32.6g  45260  23684 S   0.0   0.6   0:01.43 chromium
   9056 <username>    20   0 1125.4g  98028  72624 S   0.0   1.2   0:00.64 chromium
   9093 <username>    20   0 1125.4g 137784  90592 S   0.0   1.7   0:53.71 chromium
   9104 <username>    20   0 1125.4g 243140  95556 S   0.0   3.0   0:06.36 chromium
   9105 <username>    20   0 1125.4g 117136  86656 S   0.0   1.5   0:00.75 chromium
   9128 <username>    20   0 1125.4g 115028  83080 S   0.0   1.4   0:00.91 chromium
   9140 <username>    20   0 1125.4g 133004  87176 S   0.0   1.7   0:00.89 chromium
   9152 <username>    20   0 1125.4g 126396  85912 S   0.0   1.6   0:01.24 chromium
   9177 <username>    20   0 1125.4g 133544  93344 S   0.0   1.7   0:01.23 chromium
   9191 <username>    20   0 1125.4g 118796  80744 S   0.0   1.5   0:00.68 chromium
   9203 <username>    20   0 1125.4g 115764  79884 S   0.0   1.4   0:00.65 chromium
   9214 <username>    20   0 1125.4g 119300  81048 S   0.0   1.5   0:00.69 chromium
   9234 <username>    20   0 1125.4g 101416  74820 S   0.0   1.3   0:00.45 chromium
   9251 <username>    20   0 1125.4g 126456  88516 S   0.0   1.6   0:00.94 chromium
   9263 <username>    20   0 1125.4g 125116  87696 S   0.0   1.6   0:01.02 chromium
   9275 <username>    20   0 1125.4g 118924  84608 S   0.0   1.5   0:00.87 chromium
   9287 <username>    20   0 1125.4g 118504  84620 S   0.0   1.5   0:00.87 chromium
   9299 <username>    20   0 1125.4g 131652  88148 S   0.0   1.6   0:01.59 chromium
   9311 <username>    20   0 1125.4g 115492  77980 S   0.0   1.4   0:00.53 chromium
   9323 <username>    20   0 1125.4g 126944  86636 S   0.0   1.6   0:01.43 chromium
   9379 root      20   0       0      0      0 I   0.0   0.0   0:00.00 kworker/2:0-events
   9746 root      20   0       0      0      0 I   0.0   0.0   0:44.10 kworker/0:2-events
   9912 root       0 -20       0      0      0 D   0.0   0.0   0:21.41 kworker/u9:0+i915_flip
  10211 <username>    20   0 1125.4g 135756  94480 S   0.0   1.7   0:03.11 chromium
  10243 root      20   0       0      0      0 I   0.0   0.0   0:04.84 kworker/0:0-events
  10431 root      20   0       0      0      0 I   0.0   0.0   0:00.00 kworker/3:3-events
  10434 root      20   0       0      0      0 I   0.0   0.0   0:00.15 kworker/u8:10-kcryptd/254:0
  10438 root      20   0       0      0      0 I   0.0   0.0   0:00.34 kworker/u8:14-i915
  10441 root      20   0       0      0      0 I   0.0   0.0   0:00.17 kworker/1:0-events
  10442 root      20   0       0      0      0 I   0.0   0.0   0:00.16 kworker/2:1-events
  10443 root      20   0       0      0      0 I   0.0   0.0   0:00.11 kworker/3:4-events
  10447 root      20   0       0      0      0 I   0.0   0.0   0:00.20 kworker/u8:20-kcryptd/254:0
  10456 root      20   0       0      0      0 I   0.0   0.0   0:00.32 kworker/u8:29-kcryptd/254:0
  10464 root      20   0       0      0      0 I   0.0   0.0   0:00.29 kworker/u8:37-kcryptd/254:0
  10470 root     -51   0       0      0      0 S   0.0   0.0   0:00.00 irq/128-mei_me
  10517 root       0 -20       0      0      0 I   0.0   0.0   0:00.02 kworker/u9:3-rb_allocator
  10663 root      20   0    6360   3744   2608 S   0.0   0.0   0:00.00 dhclient
  10766 root      20   0       0      0      0 I   0.0   0.0   0:00.02 kworker/u8:0-i915
  10797 <username>    20   0    8344   2284   2012 S   0.0   0.0   0:00.01 sed

Sometimes there's some specific process running which takes some, but that's time-limited. (E.g. a job which runs periodically.) Do I need to look at something different in top or use something different? I tried reading top's man page again but top's never leaves me much the wiser. It tells me how to change between Irix, thread and forest mode, for example, but I can't figure out whether I want to!


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#43 2022-09-03 15:12:08

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,446

Re: Autorepeat rate and delay in KDE suddenly excruciatingly slow

I'm pretty sure you'll find it relaxing at 1%-2% in the openbox session.
Next to the obvious kwin_x11 (try to disable the compositor? SHIFT+Alt+F12)* and plasmashell (your desktop and panels will be gone, you can kill that and use the rest of the system fine) maybe try to kill xembedsniproxy (systray thing)

* killing it will prevent you from activating windows, you can try "openbox --replace", though, to simply replace it

Offline

#44 2022-09-04 04:39:38

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,178

Re: Autorepeat rate and delay in KDE suddenly excruciatingly slow

Switching off compositing reduces Xorg CPU % to something more reasonable (though more than 1-2%).  If I switch compositing back on, the usage immediately jumps massively, as if it is picking up from where it left off before being temporarily disabled. (I hoped switching it on and off might provide a kind of workaround which didn't require logging out and in, but I guess that was either too optimistic or too naïve or both.)

There are reports of ridiculous CPU usage with ksysguard on KDE bugs, but I'm not running it.


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#45 2022-09-04 06:26:14

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,446

Re: Autorepeat rate and delay in KDE suddenly excruciatingly slow

Does disabling the compositor have immediately beneficial impact on the input lag?

qdbus org.kde.KWin /KWin supportInformation

Did you check the other two processes?

Offline

#46 2022-09-05 01:22:31

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,178

Re: Autorepeat rate and delay in KDE suddenly excruciatingly slow

seth wrote:

Does disabling the compositor have immediately beneficial impact on the input lag?

Pretty much, yes.

qdbus org.kde.KWin /KWin supportInformation (where do commands like this get documented?)

Version
=======
KWin version: 5.25.4
Qt Version: 5.15.5
Qt compile version: 5.15.5
XCB compile version: 1.15

Operation Mode: X11 only

Build Options
=============
KWIN_BUILD_DECORATIONS: yes
KWIN_BUILD_TABBOX: yes
KWIN_BUILD_ACTIVITIES: yes
HAVE_X11_XCB: yes
HAVE_EPOXY_GLX: yes
HAVE_WAYLAND_EGL: yes

X11
===
Vendor: The X.Org Foundation
Vendor Release: 12101004
Protocol Version/Revision: 11/0
SHAPE: yes; Version: 0x11
RANDR: yes; Version: 0x14
DAMAGE: yes; Version: 0x11
Composite: yes; Version: 0x4
RENDER: yes; Version: 0xb
XFIXES: yes; Version: 0x50
SYNC: yes; Version: 0x31
GLX: yes; Version: 0x0

Decoration
==========
Plugin: org.kde.breeze
Theme: 
Plugin recommends border size: None
onAllDesktopsAvailable: true
alphaChannelSupported: true
closeOnDoubleClickOnMenu: false
decorationButtonsLeft: 0, 2
decorationButtonsRight: 6, 3, 4, 5
borderSize: 3
gridUnit: 12
font: Sans Serif,7,-1,5,50,0,0,0,0,0,Regular
smallSpacing: 3
largeSpacing: 12

Platform
==========
Name: KWin::X11StandalonePlatform

Cursor
======
themeName: Breeze_Snow
themeSize: 24

Options
=======
focusPolicy: 1
xwaylandCrashPolicy: 
xwaylandMaxCrashCount: 3
nextFocusPrefersMouse: false
clickRaise: true
autoRaise: false
autoRaiseInterval: 750
delayFocusInterval: 300
shadeHover: true
shadeHoverInterval: 250
separateScreenFocus: false
activeMouseScreen: true
placement: 4
focusPolicyIsReasonable: true
borderSnapZone: 10
windowSnapZone: 10
centerSnapZone: 0
snapOnlyWhenOverlapping: false
rollOverDesktops: true
focusStealingPreventionLevel: 1
operationTitlebarDblClick: 5015
operationMaxButtonLeftClick: 5000
operationMaxButtonMiddleClick: 5015
operationMaxButtonRightClick: 5014
commandActiveTitlebar1: 0
commandActiveTitlebar2: 28
commandActiveTitlebar3: 2
commandInactiveTitlebar1: 4
commandInactiveTitlebar2: 28
commandInactiveTitlebar3: 2
commandWindow1: 7
commandWindow2: 8
commandWindow3: 8
commandWindowWheel: 28
commandAll1: 10
commandAll2: 3
commandAll3: 14
keyCmdAllModKey: 16777251
condensedTitle: false
electricBorderMaximize: false
electricBorderTiling: true
electricBorderCornerRatio: 0.25
borderlessMaximizedWindows: false
killPingTimeout: 5000
hideUtilityWindowsForInactive: true
compositingMode: 1
useCompositing: true
hiddenPreviews: 1
glSmoothScale: 2
glStrictBinding: true
glStrictBindingFollowsDriver: true
glPreferBufferSwap: 101
glPlatformInterface: 1
windowsBlockCompositing: true
latencyPolicy: 
renderTimeEstimator: 

Screen Edges
============
desktopSwitching: true
desktopSwitchingMovingClients: true
cursorPushBackDistance: 1x1
timeThreshold: 250
reActivateThreshold: 350
actionTopLeft: 5
actionTop: 0
actionTopRight: 0
actionRight: 0
actionBottomRight: 1
actionBottom: 0
actionBottomLeft: 0
actionLeft: 0

Screens
=======
Multi-Head: no
Active screen follows mouse:  yes
Number of Screens: 1

Screen 0:
---------
Name: eDP-1
Geometry: 0,0,1920x1080
Scale: 1
Refresh Rate: 60049
Adaptive Sync: incapable

Compositing
===========
Compositing is active
Compositing Type: OpenGL
OpenGL vendor string: Intel
OpenGL renderer string: Mesa Intel(R) HD Graphics 620 (KBL GT2)
OpenGL version string: 4.6 (Compatibility Profile) Mesa 22.1.7
OpenGL platform interface: GLX
OpenGL shading language version string: 4.60
Driver: Intel
GPU class: Kaby Lake
OpenGL version: 4.6
GLSL version: 4.60
Mesa version: 22.1.7
X server version: 1.21.1
Linux kernel version: 5.19.5
Direct rendering: Requires strict binding: yes
GLSL shaders:  yes
Texture NPOT support:  yes
Virtual Machine:  no
OpenGL 2 Shaders are used

Loaded Effects:
---------------
kwin4_effect_fullscreen
kwin4_effect_logout
kwin4_effect_fadingpopups
kwin4_effect_frozenapp
kwin4_effect_sessionquit
kwin4_effect_windowaperture
kwin4_effect_dialogparent
kwin4_effect_maximize
kwin4_effect_morphingpopups
kwin4_effect_scale
kwin4_effect_squash
kwin4_effect_login
colorpicker
blendchanges
screenshot
screenedge
zoom
slidingpopups
diminactive
slide
desktopgrid
highlightwindow
overview
windowview
blur
contrast
startupfeedback
kscreen

Currently Active Effects:
-------------------------
diminactive
blur
contrast

Effect Settings:
----------------
kwin4_effect_fullscreen:
pluginId: kwin4_effect_fullscreen
isActiveFullScreenEffect: false

kwin4_effect_logout:
pluginId: kwin4_effect_logout
isActiveFullScreenEffect: false

kwin4_effect_fadingpopups:
pluginId: kwin4_effect_fadingpopups
isActiveFullScreenEffect: false

kwin4_effect_frozenapp:
pluginId: kwin4_effect_frozenapp
isActiveFullScreenEffect: false

kwin4_effect_sessionquit:
pluginId: kwin4_effect_sessionquit
isActiveFullScreenEffect: false

kwin4_effect_windowaperture:
pluginId: kwin4_effect_windowaperture
isActiveFullScreenEffect: false

kwin4_effect_dialogparent:
pluginId: kwin4_effect_dialogparent
isActiveFullScreenEffect: false

kwin4_effect_maximize:
pluginId: kwin4_effect_maximize
isActiveFullScreenEffect: false

kwin4_effect_morphingpopups:
pluginId: kwin4_effect_morphingpopups
isActiveFullScreenEffect: false

kwin4_effect_scale:
pluginId: kwin4_effect_scale
isActiveFullScreenEffect: false

kwin4_effect_squash:
pluginId: kwin4_effect_squash
isActiveFullScreenEffect: false

kwin4_effect_login:
pluginId: kwin4_effect_login
isActiveFullScreenEffect: false

colorpicker:

blendchanges:

screenshot:

screenedge:

zoom:
zoomFactor: 1.2
mousePointer: 0
mouseTracking: 0
focusTrackingEnabled: false
textCaretTrackingEnabled: false
focusDelay: 350
moveFactor: 20
targetZoom: 1

slidingpopups:
slideInDuration: 150
slideOutDuration: 250

diminactive:
dimStrength: 50
dimPanels: false
dimDesktop: false
dimKeepAbove: false
dimByGroup: true
dimFullScreen: true

slide:
horizontalGap: 45
verticalGap: 20
slideDocks: false
slideBackground: true

desktopgrid:
gridRows: 3
gridColumns: 4
animationDuration: 200
layout: 1
partialActivationFactor: 0
gestureInProgress: false
showAddRemove: true
desktopNameAlignment: 0
desktopLayoutMode: 0
customLayoutRows: 2

highlightwindow:

overview:
animationDuration: 200
layout: 1
ignoreMinimized: false
blurBackground: true
partialActivationFactor: 0
gestureInProgress: false

windowview:
animationDuration: 200
layout: 1
ignoreMinimized: false
mode: 0
partialActivationFactor: 0
gestureInProgress: false
searchText: 

blur:

contrast:

startupfeedback:
type: 1

kscreen:


Loaded Plugins:
---------------
kwin5_plugin_krunner
kwin5_plugin_nightcolor

Available Plugins:
------------------
kwin5_plugin_colord
kwin5_plugin_krunner
kwin5_plugin_nightcolor

It says not to post it in a support thread, so if you'd rather I posted it to a pastebin, let me know. I tend to think threads are more useful if they're self-contained, as long as it's just text and not large images or similar.

seth wrote:

Did you check the other two processes?

Replacing kwin with openbox also brings xorg usage right down (further than just disabling compositing, though it obviously also disables compositing).
Replacing openbox with kwin returns xorg usage to roughly where it is at the start of a session (even though compositing is reenabled).

I'll test plasmashell and the systray thing in a bit. (I need to wait for xorg usage to go back up first as I've effectively reset it.)


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#47 2022-09-05 03:17:21

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,446

Re: Autorepeat rate and delay in KDE suddenly excruciatingly slow

"kwin --replace" will likely have the same impact.
Is the supportInformation still from when it's overloading X11?

It seems like kwin goes into a frenzy, the compositor repaints like crazy and this caues X11 overload.
But the state causing this isn't in the compositor or its plugins (since that should™ be cleared by restarting the compositor)

Refresh Rate: 60049

I hope that's in mHz …

Offline

#48 2022-09-05 10:28:51

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,178

Re: Autorepeat rate and delay in KDE suddenly excruciatingly slow

seth wrote:

"kwin --replace" will likely have the same impact.

You mean 'kwin_x11 --replace' should have the same effect as 'openbox --replace' followed by 'kwin_x11 --replace'? I don't actually have a 'kwin'. Probably I should have mentioned that before.

seth wrote:

Is the supportInformation still from when it's overloading X11?

It's from when it is going up but it might be before it went completely ballistic.

seth wrote:

It seems like kwin goes into a frenzy, the compositor repaints like crazy and this caues X11 overload.

It would make more sense to me if it was triggered by my doing something different. Does it just get fed up?! Is the compositor a distinct process I can look at?

seth wrote:

But the state causing this isn't in the compositor or its plugins (since that should™ be cleared by restarting the compositor)

Which the shift+alt+f12 does, right? That restarts the compositor? As opposed to restarting kwin_x11?

seth wrote:
Refresh Rate: 60049

I hope that's in mHz …

Indeed. I saw that number, but it was somewhat meaningless without units. (I hate that computer systems use numbers in readouts for humans without units.) I get the same rate if I turn compositing off, though. I also get exactly the same rate now, which suggests it likely isn't tracking the increase in xorg activity, though I'll check it again to make sure I'm not just startlingly good at picking the moment it hits that rate.


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#49 2022-09-05 13:46:03

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,446

Re: Autorepeat rate and delay in KDE suddenly excruciatingly slow

You mean 'kwin_x11 --replace' should have the same effect as 'openbox --replace' followed by 'kwin_x11 --replace'? I don't actually have a 'kwin'.

Yes. Sorry for the sloppy process naming. (When I was young, ther was only one kwin binary wink)

Your output likely has a 60.049Hz refresh rate.
Yes, shift+alt+f12 toggles the compositor, it's not a distinct process but a feature of kwin

Machines rarely throw a tantrum, but event driven systems can stumble over what is essentially unexpected input (could event be event timestamps if the clock drifts) and of course everything is prone to overflows/wraps.

This is gonna be hard to debug sinec KWin predominantly responds to other clients itself.
Because of the plasmashell CPU "load" and the trackrecord of xembedsniproxy (just an example) I'd shoot them first and see whether this gets the job (get the Xorg CPU load to a reasonable degree) done as well.

Offline

#50 2022-09-06 19:21:38

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,178

Re: Autorepeat rate and delay in KDE suddenly excruciatingly slow

This couldn't depend on the power supply, could it?

I've been waiting for Xorg CPU % to go up so I could test whether plasmashell and/or xembedsniproxy affect the problem, but I'm not currently seeing it go up much at all. I've not been watching it especially carefully as I've been distracted by bonkers battery readings, but Xorg CPU % is currently lower than it has been even at the start of a session and I've been in this one for some time. The only difference I can think of is that I  think I rebooted on battery. I thought yesterday it seemed to be going up more slowly when I was on battery, but I'm not sure that was true and it certainly was high, but I'd switched to battery from AC in that case.

Maybe it's just a random blip, but top is giving me remarkably sane looking numbers (most of the time). If it is possible, I'll experiment a bit more.

I'm assuming top is giving me more-or-less accurate readings. Given the readings I've been getting for battery charge, I'm hoping that's still a reasonably safe assumption.


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

Board footer

Powered by FluxBB