Page 1 of 1

[2.0.43] with wayland doesn't use dedicated GPU

Posted: Mon May 05, 2025 10:27 am
by FlameBear
I'm trying to run factorio with wayland and it seems to be only using the integrated gpu.

I'm starting factorio like this:

Code: Select all

__NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia  ./bin/x64/factorio 
   0.000 2025-05-05 11:14:23; Factorio 2.0.43 (build 82163, linux64, full, space-age)
   0.012 Operating system: Linux (Ubuntu 24.04)
   0.012 Program arguments: "./bin/x64/factorio" 
   0.012 Config path: REDACTED
   0.012 Read data path: REDACTED
   0.012 Write data path: REDACTED [61126/196166MB]
   0.012 Binaries path: REDACTED
   0.024 System info: [CPU: 12th Gen Intel(R) Core(TM) i5-12500H, 16 cores, RAM: 31799 MB]
   0.024 Environment: DISPLAY=:1 WAYLAND_DISPLAY=wayland-0 DESKTOP_SESSION=ubuntu-wayland XDG_SESSION_DESKTOP=ubuntu-wayland XDG_CURRENT_DESKTOP=ubuntu:GNOME SDL_VIDEODRIVER=<unset> __GL_FSAA_MODE=<unset> __GL_LOG_MAX_ANISO=<unset> __GL_SYNC_TO_VBLANK=<unset> __GL_SORT_FBCONFIGS=<unset> __GL_YIELD=<unset>
   0.039 Display options: [FullScreen: true] [VSync: true] [UIScale: automatic (100.0%)] [Native DPI: true] [Screen: 0] [Special: lmw] [Lang: en]
   0.084 Video driver: wayland
   0.084 Available displays: 2
   0.084  [0]: Dell Inc. 25" - {[1920,0], 2560x1440, SDL_PIXELFORMAT_RGB888, 60Hz}
   0.084  [1]: Built-in display - {[0,0], 1920x1080, SDL_PIXELFORMAT_RGB888, 144Hz}
   0.195 Initialised OpenGL:[0] Mesa Intel(R) Graphics (ADL GT2); driver: 4.6 (Core Profile) Mesa 24.2.8-1ubuntu1~24.04.1
   0.195   [Extensions] s3tc:yes; KHR_debug:yes; ARB_clear_texture:yes, ARB_copy_image:yes, ARB_pipeline_statistics_query:yes, ARB_gl_spirv:yes, ARB_ES2_compatibility:yes
   0.195   [Version] 4.6
   0.253 Graphics settings preset: integrated-gpuhigh
   0.253   Dedicated video memory size 15899 MB (detected from Intel(R) Graphics (ADL GT2); VendorID: 0x8086; DeviceID: 0x46a6)
   0.292 Graphics options: [Graphics quality: high] [Video memory usage: all] [DXT: low-quality]
   0.292                   [Max threads (load/render): 32/16] [Max texture size: 8192] [Tex.Stream.: false] [Rotation quality: low] [Other: sTDCwtl] [B:0,C:0,S:100]
This results in no GPU utilisation in nvidia-smi as expected. vlc seems to be able to utilise the GPU just fine.

With x11 the startup looked like this:

Code: Select all

   0.000 2025-05-05 10:26:05; Factorio 2.0.43 (build 82163, linux64, full, space-age)
   0.010 Operating system: Linux (Ubuntu 24.04)
   0.010 Program arguments: "./bin/x64/factorio" 
   0.010 Config path: REDACTED
   0.010 Read data path: REDACTED
   0.010 Write data path: REDACTED [61159/196166MB]
   0.010 Binaries path: REDACTED
   0.021 System info: [CPU: 12th Gen Intel(R) Core(TM) i5-12500H, 16 cores, RAM: 31799 MB]
   0.021 Environment: DISPLAY=:1 WAYLAND_DISPLAY=<unset> DESKTOP_SESSION=ubuntu XDG_SESSION_DESKTOP=ubuntu XDG_CURRENT_DESKTOP=ubuntu:GNOME SDL_VIDEODRIVER=<unset> __GL_FSAA_MODE=<unset> __GL_LOG_MAX_ANISO=<unset> __GL_SYNC_TO_VBLANK=<unset> __GL_SORT_FBCONFIGS=<unset> __GL_YIELD=<unset>
   0.033 Display options: [FullScreen: true] [VSync: true] [UIScale: automatic (100.0%)] [Native DPI: true] [Screen: 255] [Special: lmw] [Lang: en]
   0.064 Video driver: x11
   0.064 Available displays: 2
   0.064  [0]: 0 - {[0,0], 1920x1080, SDL_PIXELFORMAT_RGB888, 144Hz}
   0.064  [1]: DELL U2520D 25" - {[1920,0], 2560x1440, SDL_PIXELFORMAT_RGB888, 60Hz}
   0.295 Initialised OpenGL:[0] NVIDIA GeForce RTX 3060 Laptop GPU/PCIe/SSE2; driver: 3.3.0 NVIDIA 570.133.07
   0.295   [Extensions] s3tc:yes; KHR_debug:yes; ARB_clear_texture:yes, ARB_copy_image:yes, ARB_pipeline_statistics_query:yes, ARB_gl_spirv:yes, ARB_ES2_compatibility:yes
   0.295   [Version] 3.3
   0.308 Graphics settings preset: very-high
   0.308   Dedicated video memory size 6144 MB
   0.342 Graphics options: [Graphics quality: high] [Video memory usage: all] [DXT: high-quality]
   0.342                   [Max threads (load/render): 32/16] [Max texture size: 0] [Tex.Stream.: false] [Rotation quality: normal] [Other: STDCWTl] [B:0,C:0,S:100]
Am I configuring something wrong so that factorio isn't picking up the dedicated gpu?
I was getting full display freezing with x11 and with wayland I only get ~25FPS when I move factorio to the external display.

Re: [2.0.43] with wayland doesn't use dedicated GPU

Posted: Fri Jun 20, 2025 8:09 pm
by its a me
I just had the same issue, did you ever find a fix?

Re: [2.0.43] with wayland doesn't use dedicated GPU

Posted: Fri Jun 20, 2025 10:25 pm
by _aD
Executing with

Code: Select all

DRI_PRIME=1
solved this for me.

Re: [2.0.43] with wayland doesn't use dedicated GPU

Posted: Fri Jun 20, 2025 11:37 pm
by its a me
It looks like that didn't work for me. i wonder if its steam vs just the executable from the website

Re: [2.0.43] with wayland doesn't use dedicated GPU

Posted: Wed Jul 16, 2025 10:07 pm
by FlameBear
If I set DRI_PRIME=1 I get less than 10 fps.