Would anyone know how to solve this mouse stutter issue on Linux? When I press the side buttons at the same time as keyboard input, it causes the graphics rendering to stall. It’s not just while gaming, it happens no matter what app is running. This is on elementary OS using Pantheon.
The issue is apparently not present on Wayland, but then my game performance tanks significantly. Pantheon has proper performance, but the mouse + keyboard stutter. Anyone know a fix?
I’ve seen posts about this online, but they were focused on gnome and mutter. I have an Nvidia GPU.
- I was mistaken about the DE it seems. Choosing Wayland in elementary also changes the DE to GNOME. I’m not sure if that plays a role here but it might be worth mentioning. I believe the default setting (called “Classic Session”) is the one that uses Pantheon. 
- Dont know a fix to the stutter, but cant you make individual applications run through X11 while using wayland. Xwayland is what its called i think. Maybe worth a try. - Xwayland is an X11 server that runs under Wayland. It acts as a compatibility layer so that programs that are native X11 programs that don’t support Wayland can still be run. The system largely determines when to use Xwayland; it’s not generally something the user does. - Wine, and it’s derivative for gaming Proton are normally run as X11 applications. There is a Wayland driver for wine - it’s not perfect, and not widely used by default yet, but it does generally work. Still, at the moment usually wine and Proton are by default running with X11 (and so xwayland) even on Wayland. - When there are issues under Wayland it’s generally to do with Nvidia drivers rather than xwayland or x11. But the wine Wayland.drv can still give a performance boost. It can also causes its own issues so is best used on a case by case basis. - Some people do set wine or proton to use the Wayland drivers when using Wayland; for example with Steam and Proton-GE just add PROTON_ENABLE_WAYLAND=1 into the games launch options and it’ll run directly under Wayland. - It may be a way for OP to switch to Wayland and see if they can get good gaming performance in wine/Proton. However it’s more likely the Nvidia drivers are the cause of the performance issues under Wayland. - I’ll keep this in mind. Admittedly I didn’t yet test a Steam game for performance under Wayland, only a GoG game using Bottles to run the GoG Galaxy client (the game crashes using Proton; I have to set Bottles to use regular Wine). At the time I was more focused on the input stutter issue before I ran into a Wayland performance bottleneck. - I have read that Nvidia drivers are a problem under Wayland. I’ll have to do more testing to confirm what happens on my system. 
 
- I’m not sure how to do that. I’m rather new to Linux so I’ve just been learning as I go. But upon a quick search it sounds like something I should try anyway for better compatibility. Thanks for the suggestion. 
 
- Did you install the Nvidia driver? - Yeah, I’m using 580 proprietary and have a 3070 Ti. 
 
- So to be clear Wayland + Pantheon resolves the issue but with a performance hit in games? X11 + Pantheon has the issue but with otherwise good performance in games? - Presumably all the system packages and software is up to date. If not then do a update. - Starting with the basics, what kind of mouse and keyboard do you have? If they are wireless, how are they connecting to your device? Note some manufacturers don’t provide drivers for Linux so it’s worth seeing if your brand and device is supported (E.g. Logitech and it’s wireless dongle; you need Solaar to get basic support and switching to Bluetooth may be best if available). - If they are wired, have you tried plugging the keyboard and mouse into different ports on your PC? If they’re on the same USB Bus that could be contributing to the problem. Although that really shouldn’t be an issue at all with modern devicss, it might be enough to get round whatever the issue is if one of your devices is conflicting. - Presumably if there is a power profile in Pantheon, and if so you’ve set it to performance, not something like balanced? This ensures that everything is running at full capacity. There are rare polling issues with wine and some USB devices, and one solution is ensuring the CPU is in performance rather balanced power settings to prevent a bottleneck. - If the issue is still persisting then I would next install a different Desktop Environment to see if the issue persists. This may help check if it’s an issue with Pantheon itself. Install a lightweight desktop environment such as XFCE. Try out XFCE in both X11 and Wayland, and see if the problem persists. If it doesn’t then submit a bug report to the Pantheon makers and consider switching to another DE (such as KDE or Gnome). If not then it at least helps seemingly exclude pantheon as the cause. It can be messy installing another DE and difficult to remove cleanly so one method is create a backup of your system using Timeshift, and then restore it after trying XFCE to bring your system back to its original state. - If the issue persists you could also try switching to an older version of the Nvidia drivers or the open Noevaeu drivers. If it resolves it that helps narrow the problem although if it doesn’t resolve it you still can’t entirely exclude the graphics drivers as the cause. - I think assuming all the basics make no difference, the most telling test will be if switching from Pantheon to another DE helps - in X11 and Wayland. Pantheon is relatively niche and DEs are also important factors in themselves when it comes to performance and also bugs. If it persists beyond a DE test, then I’d be most suspicious it’s a driver issue either with the devices themselves or the graphics drivers. - Not much more I can think of beyond that at the moment sorry. - Thanks for the suggestions. Everything is up-to-date. Your recap of the issue is correct. I’m using a Razer Naga Trinity. The issue happened before and after installing openrazer and Polychromatic (to change dpi and polling rate). I’ve tried changing the usb port, but only once, I have yet to try the other ports. Keyboard is a Preonic V3. - Power is set to performance, and checking in both Monitor and Mission Center reports normal resource usage. - I’ll try changing the graphics drivers and DE, although given my experience with Wayland and comments I’ve read online, it makes me suspect the window system’s handling of device inputs. It’s easy to see in a browser window. If I scroll while simultaneously mashing keys and mouse side buttons, the rendering freezes entirely until I stop. - I new to Linux and haven’t changed a DE before, so I’ll have to check a guide and report back. 
 
- As a debug step, try running - killall ibus-daemonbefore you launch the game. See if anything changes.


