this post was submitted on 14 May 2025
6 points (80.0% liked)

Linux Gaming

19218 readers
93 users here now

Discussions and news about gaming on the GNU/Linux family of operating systems (including the Steam Deck). Potentially a $HOME away from home for disgruntled /r/linux_gaming denizens of the redditarian demesne.

This page can be subscribed to via RSS.

Original /r/linux_gaming pengwing by uoou.

No memes/shitposts/low-effort posts, please.

Resources

WWW:

Discord:

IRC:

Matrix:

Telegram:

founded 2 years ago
MODERATORS
 

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!

top 10 comments
sorted by: hot top controversial new old
[–] Ludrol@szmer.info 1 points 1 day ago* (last edited 12 hours ago) (1 children)

Can you provide all the games that are affected by that stuttering? as agar.io, slither.io and diep.io aren't affected for me and survev.io is VERY poorly optimised.

[–] sykaster@feddit.nl 1 points 12 hours ago

Interesting, which browser did you use? I remember agar.io also being very laggy. Haven't tried slither, but other browser games were laggy too. I'd need to reinstall Linux since I have since removed it again. I'll let you know when I find something!

In the meantime I'm really curious for anything you find that could help.

[–] Ludrol@szmer.info 1 points 1 day ago (2 children)

The mystery deepens: disabled Nvidia and on only integrated it lags. IMO there is some bug in firmware.

https://web.basemark.com/

run the benchmark and https://web.basemark.com/run/tests/30/graphics_suite/canvas_test/ is VERY laggy

[–] sykaster@feddit.nl 1 points 12 hours ago* (last edited 12 hours ago) (1 children)

You mean on only integrated the other games like agar.io lag as well? I tried with integrated and the RTX3060 both, and it's baggy on both.

Did agar and survev not lag when you used the RTX3060?

[–] Ludrol@szmer.info 1 points 12 hours ago* (last edited 12 hours ago)

One reply:

diep.io agar.io slither.io are fine on firefox flatpak with nvidia or without
canvas benchmark is bad on firefox flatpak and firefox ubuntu snap

diep.io agar.io and canvas benchmark is fine on chrome flatpak with nvidia

survev.io is bad on both chrome and firefox and on both cards

it's not firmware. there possibly two bugs:

  1. survev is a bad game that has too much stuff going on outside of screen. don't use it as indicator of quality.
  2. benchmark makes firefox skip frames for some reason.
[–] Ludrol@szmer.info 1 points 1 day ago* (last edited 1 day ago) (1 children)

flatpak chrome works fine for me for the benchmark but not for the game.

[–] sykaster@feddit.nl 1 points 12 hours ago

That's so weird, what firmware do you think it could be?

[–] tal@lemmy.today 1 points 1 month ago* (last edited 1 month ago) (1 children)

Do you have a test case game and resolution that you're running it at? I mean, it's kind of hard to say much or do comparisons without any idea of what the thing is using. HTML5 Canvas?

[–] sykaster@feddit.nl 2 points 1 month ago* (last edited 1 month ago) (1 children)

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!

[–] tal@lemmy.today 1 points 1 month ago* (last edited 1 month ago)

but as I said it’s all browser 2D animations

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 is false. 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.