I'm experiencing similar issues on my ThinkPad T14s Gen 3 AMD (Ryzen 7 6850U, ELAN Touchpad/Trackpoint) and Kubuntu 22.10 (current Beta).
Kernel: 5.19.0
AMDGPU: 22.0.0
The mouse pointer will randomly freeze, no matter what input device I am using: Touchpad, Trackpoint, external USB/BT mouse.
How to reproduce: Move the mouse pointer in a circle, while no other (visual) activity is present on-screen. The mouse pointer will randomly freeze for several seconds. A simple energy saving state of a normal USB receiver/BT mouse would be just a fraction of a second.
I've tried disabling USB autosuspend, disabling both internal input devices in the BIOS, changing power management profiles and daemons (TLP instead of power-profiles-daemon). No luck.
This issue could be reproduced with Manjaro 21.2.0, Kernel 5.19.16 but not Kernel 6.0.2.
Relevant for troubleshooting:
How to regain control of the mouse pointer/prevent this (initial workaround / quick&dirty): This can be prevented by having visual activity like video playback or running top in a terminal. If your mouse pointer freezes, only it's rendered image freezes but the actual pointer still moves around and it will be redrawn if it hits some interactive area like a menu with mouse-over effects (better to reproduce: open a terminal and write a letter if your pointer freezes).
This led me to the conclusion that it's a rendering issue of the current AMDGPU module. My solution for this problem is described here: https://wiki.archlinux.org/title/AMDGPU#Cursor_corruption
Add the line
Option "SWCursor" "True"
to your existing X11 AMDGPU config or if it does not exist (in my case and also probably yours): Create the X11 config file /etc/X11/xorg.conf.d/20-amdgpu.conf
with the content:
Section "Device"
Identifier "AMD"
Driver "amdgpu"
Option "SWCursor" "True"
EndSection
Quote from the X11 documentation:
Option "HWcursor"
For chipsets that support hardware cursors, this option enforces their use, even for cases that are known to cause problems on some machines. Note that it is overridden by the "SWcursor" option. Hardware cursors effectively speeds all graphics operations as the job of ensuring that the cursor remains on top is now given to the hardware. It also reduces the effect of cursor flashing during graphics operations.
Option "SWcursor"
This disables use of the hardware cursor provided by the chip. Try this if the cursor seems to have problems.
Using this option should therefore lead to some reduced performance but that's still better than the current glitches.
Kernel 6.0.2 brings several improvements to the AMDGPU module, so I'm hoping that this issue will be resolved when Ubuntu finally will ship this new version (23.04 probably).