Hi all, I’m going crazy trying to fix persistent stuttering in 2D browser games on my Lenovo Legion 5 Pro (Ryzen 7 5800H + RTX 3060). This happens across EVERY distro I’ve tried (Debian 12, Fedora 42, Mint Cinnamon, EndeavourOS, Nobara, PopOS) and EVERY browser (Firefox, Brave, Chromium).
Key symptoms:
- 2D browser games stutter badly with low framerate
- 3D WebGL browser games actually run fine (???)
- Native games run perfectly (Captain Claw via Lutris works great)
- Same exact game runs perfectly on Windows 10 on the same laptop
Someone else with an RTX 3060 tested the exact same game, seeing the same ~20W power draw, but has zero stutter issues.
Here’s everything I’ve tried so far:
- Graphics drivers: Both nouveau and NVIDIA proprietary drivers (570.133.07), both with open and proprietary kernels
- Display settings: Tested at both 60Hz and 160Hz refresh rates
- Hardware acceleration: Enabled and disabled in all browsers
- Power modes: BIOS set to both Dynamic and Discrete graphics
- BIOS tweaks: Disabled virtualization, no power management features available in BIOS apart from that
- Performance forcing: Locked GPU clocks manually (nvidia-smi -lgc 1200,2100 and -lmc 7000,7000). Enabled persistence mode
- Added kernel parameters for power management (pcie_aspm=off acpi_osi=Linux)
- Lenovo-specific: Installed the Lenovo Legion Linux drivers from johnfanv2/LenovoLegionLinux
- NVIDIA power management: Tried enabling Nvidia dynamic boost with nvidia-powerd.service
I’ve monitored GPU power draw during gameplay and it hovers at 20-25W even when the light is red (performance mode) and the card is locked at P0 performance state. This is considerably lower than the ~80W it should be able to draw under load. It might not need to draw much more, but right now it’s not drawing any more.
When I run the Firefox profiler to see what’s happening, I can see the frame drops but there’s no clear cause. And the fact that 3D browser games work fine but 2D ones stutter makes no sense to me.
Does anyone have other ideas or have you encountered this specific issue? I’m wondering if it’s something specific to how 2D content is rendered in browsers on the RTX 3060 with Linux.
Thanks in advance for any help!
The game I use as a test is survev.io, but as I said it’s most browser 2D animations, regardless of whether I’m using the iGPU or the RTX3060.
One strange part is that in that game the menu screen workd smoothly and it only stutters during gameplay. When I die, the fade in of the death screen is smooth again, though the background still stutters.
Thanks for wanting to help, it’s much appreciated!
Right, but there are different ways that it could display it.
I don’t do much Web dev, but looking at that page in Firefox’s Inspector, it looks like a canvas element is covering the whole thing, so I expect that it’s using HTML5 Canvas.
Just visually, without benchmarking, it seems smooth to me on Firefox 128.10.0esr at 2560x1440 at 165 Hz (AMD Radeon RX 7900 XTX, 7950X3D CPU).
considers
When I go to
about:support
in Firefox, “ACCELERATED_CANVAS2D” is listed as" default" and “available”, which from some skimming online, seems to indicate whether hardware acceleration is available for HTML Canvas. Do you see the same?EDIT: Based on:
https://old.reddit.com/r/firefox/comments/dlknks/why_is_firefoxs_gpuhardware_acceleration_still/
It sounds like WebRender is disabled by default on Firefox on Linux. Some user there is saying that it works fine for him if he switches it on. It sounds like it relates to some sort of 2D hardware acceleration, though I’ve no prior experience with it.
For me, if I go to
about:config
in Firefox,gfx.webrender.all
isfalse
. It’s smooth here with it false, but maybe I’m just throwing a lot of hardware at the thing. I haven’t read deeply into it, but it might be worth toggling it and reopening Firefox and seeing if the problem disappears for you, as I doubt that it’d cause much harm if it doesn’t work (well, I guess it might crash Firefox or something…) Might also do nothing, as it sounds like all platforms have been using it for some time, and so maybe it’s active regardless of whether this setting is on. <shrugs>