I am using an old AM3+ AMD PC with Ubuntu 22.04.2 LTS. Unlike my other more modern PC's, this one is having severe problems with mouse cursor lag and stuttering. After a lot of investigation I have figured out that the stutter is related to some aspect of the UI. For example, if I move the cursor around the empty desktop, it moves smoothly, but when the cursor moves over an icon such as a directory on the Desktop, there is often an immediate stutter and lag in the cursor.
This happens in other situations as well. If I open the Settings menu, mousing over the clickable elements all cause the cursor to stutter and lag, but moving the cursor off the Settings window and over the empty desktop results in no lag again. If I click on the empty desktop, there is a huge lag spike as the Settings window becomes greyed out and de-focused, and another lag spike if I click back into the Settings window.
The same thing happens when moving the cursor over the Menu Bar and the Dock, huge lag and stuttering when the cursor comes into contact with any selectable element. On a web page in Firefox, there is huge lag and stuttering all over when trying to navigate the page.
To be clear, this is not an issue of lack of resources; I have 32GB RAM, 8 CPU cores, a modern GPU, etc.. htop and btop both show the system is pretty much completely idle and there is no discernible CPU activity spike to match the behavior seen. Regardless, the constant cursor stuttering makes the system nearly impossible to use interactively on the desktop. It is also not a hardware issue, because the same system booted into Windows 10 has no such issue and the mouse works perfectly.
I have looked into other reports and solutions for such issues in past versions of Ubuntu which suggested to turn off transparency effects and opacity of UI elements. However this does not appear to be an option anymore in the 22.04 Settings.