Sofware renderer used with Nvidia graphics on linux

Anything that prevents you from playing the game properly. Do you have issues playing for the game, downloading it or successfully running it on your computer? Let us know here.
Post Reply
egyptianbman
Burner Inserter
Burner Inserter
Posts: 11
Joined: Sat Feb 22, 2020 9:02 am
Contact:

Sofware renderer used with Nvidia graphics on linux

Post by egyptianbman »

Unfortunately, the latest version of Factorio doesn't recognize the GPU on Linux and resorts to software rendering, leading to an unplayable 1-3 FPS. I see in the log that Factorio does claims to have initialized the OpenGL:

Code: Select all

   0.067 System info: [CPU: Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz, 8 cores, RAM: 64376 MB]
   0.067 Environment: DISPLAY=:0.0 WAYLAND_DISPLAY=<unset> DESKTOP_SESSION=xubuntu XDG_SESSION_DESKTOP=xubuntu XDG_CURRENT_DESKTOP=XFCE __GL_FSAA_MODE=<unset> __GL_LOG_MAX_ANISO=<unset> __GL_SYNC_TO_VBLANK=<unset> __GL_SORT_FBCONFIGS=<unset> __GL_YIELD=<unset>
   0.067 Display options: [FullScreen: 0] [VSync: 1] [UIScale: automatic (100.0%)] [Native DPI: 1] [Screen: 255] [Special: lmw] [Lang: en]
   0.509 Graphics backend type: 1
   0.509 Available displays: 6
   0.509  [0]: 0 - {[3840,1080], 1920x1080, SDL_PIXELFORMAT_RGB888, 0Hz}
   0.509  [1]: 1 - {[1920,1080], 1920x1080, SDL_PIXELFORMAT_RGB888, 0Hz}
   0.509  [2]: 2 - {[0,1080], 1920x1080, SDL_PIXELFORMAT_RGB888, 0Hz}
   0.509  [3]: 3 - {[0,0], 1920x1080, SDL_PIXELFORMAT_RGB888, 0Hz}
   0.509  [4]: 4 - {[1920,0], 1920x1080, SDL_PIXELFORMAT_RGB888, 0Hz}
   0.509  [5]: 5 - {[3840,0], 1920x1080, SDL_PIXELFORMAT_RGB888, 0Hz}
   0.510 Create window: displayIndex=3, width=1856, height=1016, flags=000020a6
   0.678 Window created.
   0.679 Done setup icon.
   0.679 Done setup cursors.
   0.822 Initialised OpenGL:[3] GeForce GTX 1080 Ti/PCIe/SSE2; driver: 3.3.0 NVIDIA 440.59
   0.822   [Extensions] s3tc:yes; KHR_debug:yes; ARB_clear_texture:yes, ARB_copy_image:yes
   0.822   [Version] 3.3
   0.822 Verbose GraphicsInterfaceOpenGL.cpp:823: [Caps] Tex:32768, TexArr:2048, TexBufSz:131072kB; TexUnits:192; UboSz:64kB
   0.822 OpenGL Debug Layer enabled.
   0.822 Forced graphics settings preset: extreme
   0.899 Verbose PipelineStateObject.cpp:83: Time to load shaders: 0.077103 seconds.
   0.923 Graphics options: [Graphics quality: high] [Video memory usage: all] [Light scale: 25%] [DXT: high-quality] [Color: 32bit]
   0.923                   [Max threads (load/render): 32/8] [Max texture size: 0] [Tex.Stream.: 0] [Rotation quality: normal] [Other: STDC]
   1.093 OpenGL [PERFORMANCE-MEDIUM]:131218; Program/shader state performance warning: Vertex shader in program 3 is being recompiled based on GL state.
   1.273 Loading mod core 0.0.0 (data.lua)
   1.424 Loading mod base 0.17.79 (data.lua)
   1.749 Loading mod base 0.17.79 (data-updates.lua)
   2.094 Checksum for core: 2035938594
   2.094 Checksum of base: 4156627525
   2.379 Prototype list checksum: 2767119397
   2.506 Verbose ModManager.cpp:473: Time to load mods: 1.23547
But unfortunately, no matter what combinations of flags I try, it just won't utilize the gpu. I do see a factorio process in nvidia-smi consuming gpu memory -- around 1.5GB -- but it doesn't actually use it for rendering.

glxinfo: https://gist.github.com/egyptianbman/4f ... 0ae979bc8c

nvidia-smi shows:

Code: Select all

+-----------------------------------------------------------------------------+
| NVIDIA-SMI 440.59       Driver Version: 440.59       CUDA Version: 10.2     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  GeForce GTX 108...  Off  | 00000000:01:00.0  On |                  N/A |
| 33%   53C    P0    64W / 250W |   2260MiB / 11170MiB |      5%      Default |
+-------------------------------+----------------------+----------------------+
|   1  GeForce GTX 108...  Off  | 00000000:02:00.0  On |                  N/A |
| 28%   61C    P0    73W / 250W |   2224MiB / 11178MiB |     10%      Default |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
|    0     25309      G   ...amapps/common/Factorio/bin/x64/factorio  1313MiB |
|    0     13215      G   ...oy/.local/share/Steam/ubuntu12_32/steam    29MiB |
|    0     13235      G   ./steamwebhelper                               6MiB |
|    1     13215      G   ...oy/.local/share/Steam/ubuntu12_32/steam    25MiB |
|    1     13235      G   ./steamwebhelper                               6MiB |
|    1     25309      G   ...amapps/common/Factorio/bin/x64/factorio  1290MiB |
+-----------------------------------------------------------------------------+
Installed driver

Code: Select all

➜ apt list --installed | grep nvidia                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                                                              
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.                                                                                                                                                                                               
                                                                                                                                                                                                                                                                              
libnvidia-cfg1-440/bionic,now 440.59-0ubuntu0.18.04.1 amd64 [installed,automatic]                                                                                                                                                                                             
libnvidia-common-440/bionic,bionic,now 440.59-0ubuntu0.18.04.1 all [installed,automatic]                                                                                                                                                                                      
libnvidia-compute-440/bionic,now 440.59-0ubuntu0.18.04.1 amd64 [installed,automatic]                                                                                                                                                                                          
libnvidia-container-tools/bionic,now 1.0.7-1 amd64 [installed,automatic]                                                                                                                                                                                                      
libnvidia-container1/bionic,now 1.0.7-1 amd64 [installed,automatic]                                                                                                                                                                                                           
libnvidia-decode-440/bionic,now 440.59-0ubuntu0.18.04.1 amd64 [installed,automatic]                                                                                                                                                                                           
libnvidia-encode-440/bionic,now 440.59-0ubuntu0.18.04.1 amd64 [installed,automatic]                                                                                                                                                                                           
libnvidia-fbc1-440/bionic,now 440.59-0ubuntu0.18.04.1 amd64 [installed,automatic]                                                                                                                                                                                             
libnvidia-gl-440/bionic,now 440.59-0ubuntu0.18.04.1 amd64 [installed,automatic]                                                                                                                                                                                               
libnvidia-ifr1-440/bionic,now 440.59-0ubuntu0.18.04.1 amd64 [installed,automatic]                                                                                                                                                                                             
nvidia-compute-utils-440/bionic,now 440.59-0ubuntu0.18.04.1 amd64 [installed,automatic]                                                                                                                                                                                       
nvidia-container-runtime/bionic,now 3.1.4-1 amd64 [installed,automatic]                                                                                                                                                                                                       
nvidia-container-toolkit/bionic,now 1.0.5-1 amd64 [installed,automatic]                                                                                                                                                                                                       
nvidia-dkms-440/bionic,now 440.59-0ubuntu0.18.04.1 amd64 [installed,automatic]
nvidia-docker2/bionic,now 2.2.2-1 all [installed]
nvidia-driver-440/bionic,now 440.59-0ubuntu0.18.04.1 amd64 [installed]
nvidia-kernel-common-440/bionic,now 440.59-0ubuntu0.18.04.1 amd64 [installed,automatic]
nvidia-kernel-source-440/bionic,now 440.59-0ubuntu0.18.04.1 amd64 [installed,automatic]
nvidia-prime/bionic-updates,bionic-updates,now 0.8.8.2 all [installed,automatic]
nvidia-settings/bionic,now 440.44-0ubuntu0.18.04.1 amd64 [installed,automatic]
nvidia-utils-440/bionic,now 440.59-0ubuntu0.18.04.1 amd64 [installed,automatic]
xserver-xorg-video-nvidia-440/bionic,now 440.59-0ubuntu0.18.04.1 amd64 [installed,automatic]
Image

I've seen a few related threads, but nobody seems to have been able to find a solution. I'd appreciate any help in trying to resolve this issue; thanks!

Honktown
Smart Inserter
Smart Inserter
Posts: 1025
Joined: Thu Oct 03, 2019 7:10 am
Contact:

Re: Unplayable on Linux

Post by Honktown »

I see a few references to Nvidia+Wayland or Wayland+distro being unable to use OpenGL properly:

https://wiki.gnome.org/Initiatives/Wayland/NVIDIA
There is currently no accelerated GLX support when running a GNOME Wayland session no top of the NVIDIA drivers, meaning X11 OpenGL applications will use software rendering.
https://devtalk.nvidia.com/default/topi ... ipe-only-/
The nvidia driver currently only supports software rendering (llvmpipe) when used in Xwayland.
https://bugs.launchpad.net/ubuntu/+sour ... ug/1823516

Don't know if the nouveau driver would work any better. One post from ~2 years ago said it just straight froze their system on login:
https://www.reddit.com/r/kde/comments/7 ... or_nvidia/
I have mods! I guess!
Link


egyptianbman
Burner Inserter
Burner Inserter
Posts: 11
Joined: Sat Feb 22, 2020 9:02 am
Contact:

Re: Sofware renderer used with Nvidia graphics on linux

Post by egyptianbman »

Sorry for the delayed response. I never got any e-mails -- and I see now that I can check a box to be notified of replies.

I'm not using wayland, I use I3 which still uses X. It did work before, before the revamp.

I've tried this on both Ubuntu 18.04 and have now switched to Arch on the same machine. The same issue still exists. I've tried setting force-opengl in ~/.factorio/config/config.ini to true to no avail.

posila
Factorio Staff
Factorio Staff
Posts: 5201
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: Sofware renderer used with Nvidia graphics on linux

Post by posila »

The game is initialized with correct GPU driver, so from the game's side rendering should just be accellerated by GPU.

I am convinced it is some driver/Linux issue related to having multiple GPUs in the system. I don't know how to help.
You could try to change preferred screen option in Graphics settings and test if it starts working on different screen. (Or maybe just try dragging the game window to different screens).

User avatar
ptx0
Smart Inserter
Smart Inserter
Posts: 1507
Joined: Wed Jan 01, 2020 7:16 pm
Contact:

Re: Sofware renderer used with Nvidia graphics on linux

Post by ptx0 »

egyptianbman wrote:
Sat May 16, 2020 12:50 am
It did work before, before the revamp.
before which revamp? do any other games have similar issue?

egyptianbman
Burner Inserter
Burner Inserter
Posts: 11
Joined: Sat Feb 22, 2020 9:02 am
Contact:

Re: Sofware renderer used with Nvidia graphics on linux

Post by egyptianbman »

posila wrote:
Sat May 16, 2020 5:32 am
The game is initialized with correct GPU driver, so from the game's side rendering should just be accellerated by GPU.

I am convinced it is some driver/Linux issue related to having multiple GPUs in the system. I don't know how to help.
You could try to change preferred screen option in Graphics settings and test if it starts working on different screen. (Or maybe just try dragging the game window to different screens).
Thank you for responding! You may be right regarding the multiple screens. Unfortunately, moving the game from one monitor to another (from one gpu to another) made no difference except when the game was on monitors run by "the other gpu" -- not the gpu that the game loaded on, colors were off, etc. I tried updating the configs to load from different screens, no help.

Post Reply

Return to “Technical Help”