SUMMARY I just updated my Arch system to KDE Plasma 6.4 and the rendering performance of Factorio using the Wayland backend has seriously degraded. The performance of the X11 backend appears to be the same as before. You can reproduce in a brand new standard scenario game or just from the main menu using game's free demo. https://factorio.com/download STEPS TO REPRODUCE 1. Launch Factorio in a Wayland session 2. Settings > Graphics > Select Wayland backend and restart OBSERVED RESULT Extremely poor rendering performance and large CPU usage. EXPECTED RESULT Normal CPU usage and 60 fps. SOFTWARE/OS VERSIONS Operating System: Arch Linux KDE Plasma Version: 6.4.0 KDE Frameworks Version: 6.15.0 Qt Version: 6.9.1 Kernel Version: 6.15.3-2-cachyos (64-bit) Graphics Platform: offscreen Processors: 32 × AMD Ryzen 9 9950X3D 16-Core Processor Memory: 64 GiB of RAM (62.4 GiB usable) ADDITIONAL INFORMATION A Factorio bug report was filed at https://forums.factorio.com/viewtopic.php?t=129517. It is unlikely to be a Factorio issue, but it could be an SDL issue.
I also have the issue described above. Operating System: Arch Linux KDE Plasma Version: 6.4.0 KDE Frameworks Version: 6.15.0 Qt Version: 6.9.1 Kernel Version: 6.15.2-arch1-1 (64-bit) Graphics Platform: Wayland Processors: 24 × AMD Ryzen 9 7900X 12-Core Processor Memory: 32 GiB of RAM (30.5 GiB usable) Graphics Processor 1: NVIDIA GeForce RTX 4070 Ti SUPER/PCIe/SSE2 Graphics Processor 2: NVIDIA GeForce RTX 4070 Ti SUPER/PCIe/SSE2 Manufacturer: ASUS
Do you know whether factorio uses SDL?
> Do you know whether factorio uses SDL? Yes, it does. They statically link it. (https://www.factorio.com/blog/post/fff-408)
(In reply to Vlad Zahorodnii from comment #2) > Do you know whether factorio uses SDL? Factorio does use SDL you can see confirmation of that about half way through this blog post. https://www.factorio.com/blog/post/fff-408 The setting that they mentioned adding in 2.0 "Preferred Video Driver" is the one that we are changing from "Wayland" to "X11" in order to restore performance.
A forum member pointed out from the log that Factorio had fallen off to software rendering (llvmpipe). So something is preventing SDL from initializing a hardware context. I have an Nvidia GPU using the Arch packaged drivers (575.64 as of right now).
The issue appears to in fact only reproduce with the Steam version of the game. Even with the Steam overlay disabled, the llvmpipe OpenGL implementation gets picked. The same game version downloaded from the web site with the same config properly loads my GPU vendor (Nvidia)'s OpenGL driver.
I just tested it after updating KDE to 6.4.1 (on Arch) and the issue is gone. Factorio (Steam version) now properly detects my NVIDIA card. Someone else on Factorio forums also reported that 6.4.1 fixes the problem.
Could be the direct scanout fix in 6.4.1. Good news, and thanks for following up!
(In reply to Nate Graham from comment #8) > Could be the direct scanout fix in 6.4.1. Good news, and thanks for > following up! I just did some regression testing on this using the changelog, and it's actually "Wayland_server: re-enable wl_drm by default." https://invent.kde.org/plasma/kwin/-/commit/3fbcdf475b67faf129034baacfcef8b38d8306af. I'm guessing the steam API or overlay or some other component they inject depends on wl_drm, and if it fails, it fails the entire OpenGL context creation, which causes SDL to fallback to software. Probably something KDE could follow up with Valve, and probably worth an additional comment in the code.