Bug 465622

Summary: regression: 8000hz mouse polling does not work properly
Product: [Plasma] kwin Reporter: khrole
Component: inputAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: john, nate, ngompa, travier
Priority: NOR Keywords: regression
Version First Reported In: 5.27.0   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description khrole 2023-02-12 11:57:07 UTC
SUMMARY
***
Since upgrading to Plasma 5.26.90 I can't use 8000hz mouse polling. In 5.26.5 it worked fine.
***


STEPS TO REPRODUCE
Boot into Fedora Kinoite 38 on Plasma 5.26.90.
Does not happen when I boot back into FK37 with Plasma 5.26.5.

OBSERVED RESULT
Sluggish and erratic mouse behaviour.

EXPECTED RESULT
Precise mouse control.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Fedora Kinoite
KDE Plasma Version: 5.26.90
KDE Frameworks Version: 5.103.0
Qt Version: 5.15.8
Comment 1 khrole 2023-02-17 07:35:57 UTC
Issue on Fedora 37 Kinoite with Plasma 5.27.0 too.
Comment 2 Vlad Zahorodnii 2023-02-20 09:49:48 UTC
Does KWIN_DRM_NO_AMS=1 envvar make any different?
Comment 3 khrole 2023-02-20 19:13:57 UTC
(In reply to Vlad Zahorodnii from comment #2)
> Does KWIN_DRM_NO_AMS=1 envvar make any different?

I looked up setting variables and came across https://userbase.kde.org/Session_Environment_Variables

I've made $HOME/.config/plasma-workspace/env/mouse.sh containing
#!/bin/bash
KWIN_DRM_NO_AMS=1

Rebooted and set mouse firmware to 8000hz. No change in erratic mouse behaviour.

I can't stop thinking there's a flaw in my process and I wonder how I can test if that variable has been set. Could you point me in the right direction?
Comment 4 Vlad Zahorodnii 2023-02-22 08:39:54 UTC
(In reply to Rick Scholten from comment #3)
> (In reply to Vlad Zahorodnii from comment #2)
> > Does KWIN_DRM_NO_AMS=1 envvar make any different?
> 
> I looked up setting variables and came across
> https://userbase.kde.org/Session_Environment_Variables
> 
> I've made $HOME/.config/plasma-workspace/env/mouse.sh containing
> #!/bin/bash
> KWIN_DRM_NO_AMS=1
> 
> Rebooted and set mouse firmware to 8000hz. No change in erratic mouse
> behaviour.
> 
> I can't stop thinking there's a flaw in my process and I wonder how I can
> test if that variable has been set. Could you point me in the right
> direction?

Run "qdbus org.kde.KWin /KWin supportInformation | grep Atomic"

if the envvar is properly set, you should see

Atomic Mode Setting on GPU 0: false
Comment 5 khrole 2023-02-22 10:52:23 UTC
(In reply to Vlad Zahorodnii from comment #4)
> (In reply to Rick Scholten from comment #3)
> > (In reply to Vlad Zahorodnii from comment #2)
> > > Does KWIN_DRM_NO_AMS=1 envvar make any different?
> > 
> > I looked up setting variables and came across
> > https://userbase.kde.org/Session_Environment_Variables
> > 
> > I've made $HOME/.config/plasma-workspace/env/mouse.sh containing
> > #!/bin/bash
> > KWIN_DRM_NO_AMS=1
> > 
> > Rebooted and set mouse firmware to 8000hz. No change in erratic mouse
> > behaviour.
> > 
> > I can't stop thinking there's a flaw in my process and I wonder how I can
> > test if that variable has been set. Could you point me in the right
> > direction?
> 
> Run "qdbus org.kde.KWin /KWin supportInformation | grep Atomic"
> 
> if the envvar is properly set, you should see
> 
> Atomic Mode Setting on GPU 0: false

Ty! 

"Atomic Mode Setting on GPU 0: false" appears both with and without manually setting KWIN_DRM_NO_AMS=1, and in both cases 8000hz does not work properly.
Comment 6 khrole 2023-04-19 07:43:33 UTC
Did a clean Fedora 38 Kinoite install and now 8000hz works fine.