Back to the main site

Discrete graphics driver ingored even with Optirun

I’m running Lutris in Fedora 31 on Lenovo X1 Extreme Gen 1.

When I launch Darksiders 3 with optirun/virtualgl option enabled in the settings, it still looks like it’s using the Intel graphics for the game. It should be using the NVidia drivers.

Running optirun --status shows the following:

optirun --status
Bumblebee status: Ready (3.2.1). X is PID 4687, 1 applications using bumblebeed.

Here is the output of Lutris when started in the terminal with lutris:

lutris
2019-12-30 14:43:37,534: Running Lutris 0.5.3
2019-12-30 14:43:37,534: Using NVIDIA drivers 440.44 for x86_64
2019-12-30 14:43:37,534: GPU: GeForce GTX 1050 Ti with Max-Q Design
2019-12-30 14:43:37,535: GPU: 8086:3E9B 17AA:2267 using i915 drivers
2019-12-30 14:43:37,603: Vulkan is supported
2019-12-30 14:43:37,604: Updating DXVK versions
2019-12-30 14:43:37,749: Connected to lutris.net as mbbaig
2019-12-30 14:43:38,308: Updating D9VK versions
2019-12-30 14:43:41,213: Replacing /home/mohamed/Games/darksiders-iii/drive_c/windows/system32/dxgi with DXVK version
2019-12-30 14:43:41,214: Replacing /home/mohamed/Games/darksiders-iii/drive_c/windows/system32/d3d11 with DXVK version
2019-12-30 14:43:41,214: Replacing /home/mohamed/Games/darksiders-iii/drive_c/windows/system32/d3d10core with DXVK version
2019-12-30 14:43:41,214: Replacing /home/mohamed/Games/darksiders-iii/drive_c/windows/system32/d3d10_1 with DXVK version
2019-12-30 14:43:41,214: Replacing /home/mohamed/Games/darksiders-iii/drive_c/windows/system32/d3d10 with DXVK version
2019-12-30 14:43:41,214: Replacing /home/mohamed/Games/darksiders-iii/drive_c/windows/system32/d3d9 with DXVK version
2019-12-30 14:43:41,215: Replacing /home/mohamed/Games/darksiders-iii/drive_c/windows/syswow64/dxgi with DXVK version
2019-12-30 14:43:41,215: Replacing /home/mohamed/Games/darksiders-iii/drive_c/windows/syswow64/d3d11 with DXVK version
2019-12-30 14:43:41,215: Replacing /home/mohamed/Games/darksiders-iii/drive_c/windows/syswow64/d3d10core with DXVK version
2019-12-30 14:43:41,215: Replacing /home/mohamed/Games/darksiders-iii/drive_c/windows/syswow64/d3d10_1 with DXVK version
2019-12-30 14:43:41,215: Replacing /home/mohamed/Games/darksiders-iii/drive_c/windows/syswow64/d3d10 with DXVK version
2019-12-30 14:43:41,215: Replacing /home/mohamed/Games/darksiders-iii/drive_c/windows/syswow64/d3d9 with DXVK version
Running primusrun /home/mohamed/.local/share/lutris/runners/wine/lutris-4.20-x86_64/bin/wine /home/mohamed/Games/darksiders-iii/drive_c/GOG Games/Darksiders III/Darksiders3.exe
gamemodeauto: 
gamemodeauto: 
esync: up and running.
gamemodeauto: 
info:  Game: Darksiders3-Win64-Shipping.exe
info:  DXVK: v1.5
info:  Built-in extension providers:
info:    Win32 WSI
info:    OpenVR
warn:  OpenVR: Failed to locate module
info:  Enabled instance extensions:
info:    VK_KHR_get_physical_device_properties2
info:    VK_KHR_surface
info:    VK_KHR_win32_surface
info:  Intel(R) UHD Graphics 630 (Coffeelake 3x8 GT2):
info:    Driver: 19.2.8
info:    Vulkan: 1.1.102
info:    Memory Heap[0]: 
info:      Size: 22652 MiB
info:      Flags: 0x1
info:      Memory Type[0]: Property Flags = 0xf
info:    Memory Heap[1]: 
info:      Size: 1024 MiB
info:      Flags: 0x1
info:      Memory Type[1]: Property Flags = 0xf
info:  D3D11CoreCreateDevice: Probing D3D_FEATURE_LEVEL_11_0
info:  D3D11CoreCreateDevice: Using feature level D3D_FEATURE_LEVEL_11_0
info:  Device properties:
info:    Device name:     : Intel(R) UHD Graphics 630 (Coffeelake 3x8 GT2)
info:    Driver version   : 19.2.8

The output is the same when I run Lutris using optirun lutris

This source of the game is GOG if that makes a difference.

Thanks in advance.

I thought virtualgl is an extension of vnc protocol to deliver image to remote host. If that’s true (and you run virtualgl separately), give me information how do you run virtualgl.

Did you ever manage to resolve this?

Do you have nvidia-settings installed? (Might show as NVIDIA X-Server settings).
fire it up from the console, if need be.
Under the section: PRIME Profiles, check GPU is enabled (and using performance profile).
This setting is not kept between reboots by default.
Multi GPU config/profile tools can interfere with each other, so if you running the NVidia driver (now on 450.66) Remove Optimus, Bumblebee etc.

In Lutris game config, system options, do you have NVidia Prime offload enabled?

Alternatively, check on cli:
prime-select query

Options are: nvidia|intel|on-demand|query

nvidia-settings --help

The other way, is to poke around with xrandr, specifically the render and offloading options - but I only needed this for an older AMD Radeon GPU.

nvidia-xconfig -A

Note: --prime, --no-prime
Enable PRIME for the generated X config file. Cannot be run with --no-busid or --no-allow-empty-initial-configuration. On a
system with more than 1 GPU, specify the GPU to use for PRIME with --busid or the first available will be chosen. Note that
to enable PRIME it is necessary to run “xrandr --setprovideroutputsource modesetting NVIDIA-0” and “xrandr --auto” after
completion.

–use-display-device=DISPLAY-DEVICE, --no-use-display-device
Force the X driver to use the display device specified.