Closed bes1002t closed 4 years ago
I think you have to use nvidia prime or anyother method to use dedicated gpu though you have use it with leagueoflegends
command.
see about it here https://wiki.archlinux.org/index.php/Hybrid_graphics
@mmtrt as far as I know the optimus technology is already implemented in nvidia driver for RTX2060. So this should work in my humble opinion.
I think that doesn't work with snaps so users have to use it manually.
I noticed this post: https://forum.snapcraft.io/t/general-question-about-nvidia-on-demand-and-snaps/15931
when using the shell script
!/bin/bash
NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME="nvidia" VK_LAYER_NV_optimus=NVIDIA_only TERM=xterm $@
and call in terminal 'script leagueoflegends', nvidia-smi shows that the rtx2060 is used. +-----------------------------------------------------------------------------+ | NVIDIA-SMI 440.82 Driver Version: 440.82 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 RTX 2060 Off | 00000000:01:00.0 Off | N/A | | N/A 47C P8 4W / N/A | 208MiB / 5934MiB | 8% Default | +-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+ | Processes: GPU Memory | | GPU PID Type Process name Usage | |=============================================================================| | 0 1635 G /usr/libexec/Xorg 14MiB | | 0 2185 G /usr/libexec/Xorg 45MiB | | 0 9408 G ...e of Legends/Game/League of Legends.exe 145MiB | +-----------------------------------------------------------------------------+
I don't know whether it is possible to include this in the snap, but would be cool.
you can create desktop file launching that script file for convenience.
@mmtrt yes this solution works for me, but everyone else has to search for this issue to find my solution. It would be easier for each consumer of this snap if this is integrated to the snap somehow.
can you upgrade snap and test changes see if it uses NV gpu with this command or also test desktop file in menu for nv optimus.
leagueoflegendsnv
I've updated my snap but there is no command 'leagueoflegendsnv'. I tried using the default command without my script and it is not using the nvidia graphics card.
Maybe I did something wrong while updating the snap? I explicitly updated the leagueoflegends snap using the dev mode arg, to make sure this snap is up to date.
oops my bad actual command is this,
leagueoflegends.leagueoflegendsnv
yes it works quite well :) thanks for integrating this!
When playing the game the cli tool nvidia-smi returns the following information which leads to the assumption that my nvidia graphics card is not used:
Mon Apr 20 01:09:19 2020
+-----------------------------------------------------------------------------+ | NVIDIA-SMI 440.82 Driver Version: 440.82 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 RTX 2060 Off | 00000000:01:00.0 Off | N/A | | N/A 54C P8 3W / N/A | 31MiB / 5934MiB | 0% Default | +-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+ | Processes: GPU Memory | | GPU PID Type Process name Usage | |=============================================================================| | 0 1617 G /usr/libexec/Xorg 14MiB | | 0 2197 G /usr/libexec/Xorg 14MiB | +-----------------------------------------------------------------------------+
Laptop: MSI GL63 8SE OS: Fedora 31
Nvidia drivers are installed via rpmfusion and it should work, because as you can see Xorg is already using the nvidia graphics card.