Page 1 of 1

[2.0.28] Nvidia GPU only used when on X11 driver

Posted: Wed Jan 08, 2025 3:21 am
by phro
When I launch Factorio on Steam (installed via Flatpak on Fedora Atomic Sway) with Steam launch options

Code: Select all

__NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia %command%
and the video driver set to X11, Factorio is launched on the Nvidia GPU (albeit with some stuttering during the menu simulation of attacking biter nests with PLD, as well as running at half-resolution on a 4K monitor). nvidia-smi output:

Code: Select all

+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 565.77                 Driver Version: 565.77         CUDA Version: 12.7     |
|-----------------------------------------+------------------------+----------------------+
| GPU  Name                 Persistence-M | Bus-Id          Disp.A | Volatile Uncorr. ECC |
| Fan  Temp   Perf          Pwr:Usage/Cap |           Memory-Usage | GPU-Util  Compute M. |
|                                         |                        |               MIG M. |
|=========================================+========================+======================|
|   0  NVIDIA GeForce GTX 1650 ...    Off |   00000000:01:00.0 Off |                  N/A |
| N/A   58C    P0             11W /   30W |    3615MiB /   4096MiB |      9%      Default |
|                                         |                        |                  N/A |
+-----------------------------------------+------------------------+----------------------+
                                                                                         
+-----------------------------------------------------------------------------------------+
| Processes:                                                                              |
|  GPU   GI   CI        PID   Type   Process name                              GPU Memory |
|        ID   ID                                                               Usage      |
|=========================================================================================|
|    0   N/A  N/A    452839      G   ...ps/common/Factorio/bin/x64/factorio       3613MiB |
+-----------------------------------------------------------------------------------------+
However, when launched with the Wayland driver (which respects the scaling properties of Wayland and operates on a 4K monitor at full resolution), the Nvidia GPU is no longer active. nvidia-smi output:

Code: Select all

+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 565.77                 Driver Version: 565.77         CUDA Version: 12.7     |
|-----------------------------------------+------------------------+----------------------+
| GPU  Name                 Persistence-M | Bus-Id          Disp.A | Volatile Uncorr. ECC |
| Fan  Temp   Perf          Pwr:Usage/Cap |           Memory-Usage | GPU-Util  Compute M. |
|                                         |                        |               MIG M. |
|=========================================+========================+======================|
|   0  NVIDIA GeForce GTX 1650 ...    Off |   00000000:01:00.0 Off |                  N/A |
| N/A   50C    P8              1W /   30W |       1MiB /   4096MiB |      0%      Default |
|                                         |                        |                  N/A |
+-----------------------------------------+------------------------+----------------------+
                                                                                         
+-----------------------------------------------------------------------------------------+
| Processes:                                                                              |
|  GPU   GI   CI        PID   Type   Process name                              GPU Memory |
|        ID   ID                                                               Usage      |
|=========================================================================================|
|  No running processes found                                                             |
+-----------------------------------------------------------------------------------------+
Given that no other settings were changed, I expected to be able to use the Nvidia GPU with the Wayland driver, especially since I am able to with the X11 driver on sway (presumably through xwayland?).

Thanks!

Re: [2.0.28] Nvidia GPU only used when on X11 driver

Posted: Wed Jan 08, 2025 8:55 pm
by Wicla
Hi,

Could this be related to viewtopic.php?f=29&t=119246&sid=b82768d ... 0f1c98b29c? It starts correctly on Wayland outside of Steam but when started from Steam it (appears) to attempt to use nouveau (for me, maybe for you it falls back to intel?) instead. Try starting steam from CLI and see if it looks similar to the linked bug.

Re: [2.0.28] Nvidia GPU only used when on X11 driver

Posted: Mon Jan 13, 2025 8:58 pm
by raiguard
Yes, please try the standalone release and see if it makes a difference.