You are not logged in.
Pages: 1
Hey there,
I've recently come to face the oblivion that is Optimus laptops with Nvidia graphics. I tackled problem after problem but I'm stuck now.
My goal currently is to get League of Legends running on the dGPU, which has proven itself as an incredible challenge.
I tried with envycontrol and using the hybrid mode, thinking it would automagically switch the process to be using the dGPU, but no such miracle was performed.
I also tried playing around with Xorg.conf, but I only get a black screen if I add the following text:
Section "Device"
Identifier "nvidia"
Driver "nvidia"
BusID "PCI:1:0:0"
EndSectionLastly, I tried using prime-run, but that resulted in the following error
X Error of failed request: BadMatch (invalid parameter attributes)
Major opcode of failed request: 156 (NV-GLX)
Minor opcode of failed request: 43 ()
Serial number of failed request: 454
Current serial number in output stream: 455
0500:err:xrandr:xrandr14_get_adapters Failed to get adapters
055c:err:xrandr:xrandr14_get_adapters Failed to get adaptersFor context, i'm using https://github.com/kyechou/leagueoflegends and i'm starting it via
prime-run leagueoflegends start
Last edited by Fractal-Tess (2023-10-25 18:35:07)
Offline
oblivion … I'm stuck … incredible challenge … automagically … no such miracle was performed
No. Of course not. Computers generally do not work by magic.
Lastly, I tried using prime-run, but that resulted in the following error
That kinda should™ have been "firstly"
Please post your Xorg log, https://wiki.archlinux.org/title/Xorg#General
Offline
Hey @seth o/
Thank you so much for taking the time to try and help me troubleshoot this.
Here is the Xorg log https://pastebin.com/ZnJwbSCg
Offline
Remove every single xf86-video-* package you've installed and enable https://wiki.archlinux.org/title/NVIDIA … de_setting to get rid of the simpledrm device.
Youre running on the AMD chip, nvidia is available for prime and
[ 143.533] (II) Loading /usr/lib/nvidia/xorg/libglxserver_nvidia.so
[ 143.628] (II) Initializing extension NV-GLXso there's no immediate reason for "Major opcode of failed request: 156 (NV-GLX)"
There're no outputs attached to the nvidia chip, so deactivating the AMD one isn't an option.
Edit: if this doesn't fix it, post an updated xorg log and the output of "prime-run glxinfo -B"
You might simply lack the multilib packages (lib32-nvidia-utils and perhaps some others) if this is a 32bit game
Last edited by seth (2023-10-25 21:13:17)
Offline
I went ahead and uninstalled what was left of the xf86-video-* packages from the base arch install, namely ..video-ati and ..video-vmware.
After that, I followed your instructions and added the nvidia_drm.modeset=1 to GRUB_CMDLINE_LINUX, and here is cat of /proc/cmdline
BOOT_IMAGE=/vmlinuz-linux root=UUID=7afecc66-15f4-41f0-ab4c-978719171361 rw rootfstype=ext4 nvidia-drm.modeset=1 loglevel=3You might simply lack the multilib packages (lib32-nvidia-utils and perhaps some others) if this is a 32bit game
I already lib32-nvidia-utils installed.
I tried running the game again with prime-run, but same result.
Here is output from prime-run glxinfo -B:
prime-run glxinfo -B
name of display: :0
display: :0 screen: 0
direct rendering: Yes
Memory info (GL_NVX_gpu_memory_info):
Dedicated video memory: 4096 MB
Total available memory: 4096 MB
Currently available dedicated video memory: 3700 MB
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: NVIDIA GeForce GTX 1650 Ti/PCIe/SSE2
OpenGL core profile version string: 4.6.0 NVIDIA 535.113.01
OpenGL core profile shading language version string: 4.60 NVIDIA
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL version string: 4.6.0 NVIDIA 535.113.01
OpenGL shading language version string: 4.60 NVIDIA
OpenGL context flags: (none)
OpenGL profile mask: (none)
OpenGL ES profile version string: OpenGL ES 3.2 NVIDIA 535.113.01
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20And finally, here is new xorg log https://pastebin.com/YSpqVx8u.
Last edited by Fractal-Tess (2023-10-25 21:56:30)
Offline
There's nothing even remotely wrong w/ your prime setup anymore and the glxinfo output reflects that - the issue is gonna be w/ the specific game.
Does "prime-run glxgears" work?
wrt the 32bit situation:
glxinfo32 -B
prime-run glxinfo32 -BYou might in addition need to export DRI_PRIME=pci-0000_01_00_0
Offline
There's nothing even remotely wrong w/ your prime setup anymore and the glxinfo output reflects that - the issue is gonna be w/ the specific game.
Does "prime-run glxgears" work?wrt the 32bit situation:
glxinfo32 -B prime-run glxinfo32 -BYou might in addition need to export DRI_PRIME=pci-0000_01_00_0
Here is the output:
❯ glxinfo32 -B
name of display: :0
display: :0 screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
Vendor: AMD (0x1002)
Device: AMD Radeon Graphics (renoir, LLVM 16.0.6, DRM 3.54, 6.5.8-arch1-1) (0x1636)
Version: 23.2.1
Accelerated: yes
Video memory: 512MB
Unified memory: no
Preferred profile: core (0x1)
Max core profile version: 4.6
Max compat profile version: 4.6
Max GLES1 profile version: 1.1
Max GLES[23] profile version: 3.2
Memory info (GL_ATI_meminfo):
VBO free memory - total: 202 MB, largest block: 202 MB
VBO free aux. memory - total: 3599 MB, largest block: 3599 MB
Texture free memory - total: 202 MB, largest block: 202 MB
Texture free aux. memory - total: 3599 MB, largest block: 3599 MB
Renderbuffer free memory - total: 202 MB, largest block: 202 MB
Renderbuffer free aux. memory - total: 3599 MB, largest block: 3599 MB
Memory info (GL_NVX_gpu_memory_info):
Dedicated video memory: 512 MB
Total available memory: 4191 MB
Currently available dedicated video memory: 202 MB
OpenGL vendor string: AMD
OpenGL renderer string: AMD Radeon Graphics (renoir, LLVM 16.0.6, DRM 3.54, 6.5.8-arch1-1)
OpenGL core profile version string: 4.6 (Core Profile) Mesa 23.2.1-arch1.2
OpenGL core profile shading language version string: 4.60
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL version string: 4.6 (Compatibility Profile) Mesa 23.2.1-arch1.2
OpenGL shading language version string: 4.60
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile
OpenGL ES profile version string: OpenGL ES 3.2 Mesa 23.2.1-arch1.2
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20❯ prime-run glxinfo32 -B
name of display: :0
display: :0 screen: 0
direct rendering: Yes
Memory info (GL_NVX_gpu_memory_info):
Dedicated video memory: 4096 MB
Total available memory: 4096 MB
Currently available dedicated video memory: 3673 MB
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: NVIDIA GeForce GTX 1650 Ti/PCIe/SSE2
OpenGL core profile version string: 4.6.0 NVIDIA 535.113.01
OpenGL core profile shading language version string: 4.60 NVIDIA
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL version string: 4.6.0 NVIDIA 535.113.01
OpenGL shading language version string: 4.60 NVIDIA
OpenGL context flags: (none)
OpenGL profile mask: (none)
OpenGL ES profile version string: OpenGL ES 3.2 NVIDIA 535.113.01
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20Also, I saw somewhere that I could technically run in dGPU mode only (not hybrid) with
xrandr --setprovideroutputsource modesetting NVIDIA-G0However, that also gives me a similar error
X Error of failed request: BadValue (integer parameter out of range for operation)
Major opcode of failed request: 140 (RANDR)
Minor opcode of failed request: 35 (RRSetProviderOutputSource)
Value in failed request: 0x27c
Serial number of failed request: 16
Current serial number in output stream: 17As for as the game is concerned, I will try tomorrow with lutris instead.
Offline
Also, I saw somewhere that I could technically run in dGPU mode only (not hybrid) with
No, you can't. You could run on the dGPU but you cannot avoid the IGP.
For that to work you'd also have to configure the server to run on the dGPU and check "xrandr --listproviders" for the proper provider names.
You're lib32 setup works as well, please post the complete game output - lutris or wine.
Offline
Today, i found it difficult to even install the game using lutris.
The Lutris installer was hanging on creating the wine prefix.
After I manually created the prefix at the specific path, the installer went through, however, the game window client didn't spawn (it was either invisible or not there at all, but i could tell something was happening because my network was being used by the client for downloading assets).
Now after the install, if I run the game through lutris, i get the following log in the console:
lutris
2023-10-26 17:50:37,726: Starting Lutris 0.5.13
2023-10-26 17:50:37,729: Using NVIDIA drivers 535.113.01 for x86_64
2023-10-26 17:50:37,729: GPU: NVIDIA GeForce GTX 1650 Ti
2023-10-26 17:50:37,729: GPU: 1002:1636 1043:16DF (amdgpu drivers)
2023-10-26 17:50:37,729: GPU: 10DE:1F95 1043:16DF (nvidia drivers)
2023-10-26 17:50:37,821: vulkaninfo not available, unable to list GPUs
2023-10-26 17:50:37,822: vulkaninfo not available, unable to list GPUs
2023-10-26 17:50:37,822: vulkaninfo not available, unable to list GPUs
2023-10-26 17:50:37,823: vulkaninfo not available, unable to list GPUs
2023-10-26 17:50:37,823: vulkaninfo not available, unable to list GPUs
(lutris:609658): Gtk-WARNING **: 17:50:38.010: Creating a portal monitor failed: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: No such interface “org.freedesktop.portal.Inhibit” on object at path /org/freedesktop/portal/desktop
Traceback (most recent call last):
File "/usr/lib/python3.11/site-packages/lutris/style_manager.py", line 77, in _call_cb
values = obj.call_finish(result)
^^^^^^^^^^^^^^^^^^^^^^^
gi.repository.GLib.GError: g-dbus-error-quark: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: No such interface “org.freedesktop.portal.Settings” on object at path /org/freedesktop/portal/desktop (19)
(lutris:609658): Gtk-WARNING **: 17:50:41.399: Calling org.freedesktop.portal.Inhibit.Inhibit failed: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: No such interface “org.freedesktop.portal.Inhibit” on object at path /org/freedesktop/portal/desktop
lutris-wrapper: League of Legends
Started initial process 610321 from /home/fractal-tess/.local/share/lutris/runners/wine/lutris-ge-lol-p8-12-x86_64/bin/wine /home/fractal-tess/Games/league-of-legends/drive_c/Riot Games/Riot Client/RiotClientServices.exe --locale=en_US --launch-product=league_of_legends --launch-patchline=live
Start monitoring process.
fsync: up and running.
wine: Using setpriority to control niceness in the (-19,19) range
wine client error:1c0: write: Bad file descriptorNvidia prime render offload was NOT enabled, but even if it was, it didn't change anything in the behavior of the game.
However, before I even started playing around with the Nvidia drivers trying to get the game to run on the dGPU, I was comfortably able to run it through Lutris without any problems.
Any clue as to what might be going on?
Last edited by Fractal-Tess (2023-10-26 15:08:30)
Offline
LoL in general is very hit and miss and can break with every update of the LoL client.
For the general case of "can I dGPU" can you test some native games/stuff that's verified for proton on Steam or so? And potentially make a new thread for game/lol specific problems?
FWIW from that output that doesn't really tell anything and is standard wine startup stuff, it's that all there is to it and do you not get any further output from that point on?
Offline
Another thing I would like to report is that
nvidia-xconfig
generates a config that results in a black screen when using startx. (Not fully black screen, but kind of like a pause after the initial log from xorg starts and then freezes on that log.)
I tried singling out the potential breaking code, and I was left with the following
Section "Device"
Identifier "nvidia"
Driver "nvidia"
BusID "1:0:0"
Option "AllowEmptyInitialConfiguration"
EndSectionIs this perhaps an expected behavior, or something else?
Here is the output of xrandr --listproviders
Providers: number : 2
Provider 0: id: 0x44 cap: 0xf, Source Output, Sink Output, Source Offload, Sink Offload crtcs: 4 outputs: 2 associated providers: 1 name:modesetting
Provider 1: id: 0x27c cap: 0x2, Sink Output crtcs: 4 outputs: 2 associated providers: 1 name:NVIDIA-G0And the output of lspci | rg -i VGA
01:00.0 VGA compatible controller: NVIDIA Corporation TU117M [GeForce GTX 1650 Ti Mobile] (rev a1)
05:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Renoir (rev c7)Offline
LoL in general is very hit and miss and can break with every update of the LoL client.
For the general case of "can I dGPU" can you test some native games/stuff that's verified for proton on Steam or so? And potentially make a new thread for game/lol specific problems?
FWIW from that output that doesn't really tell anything and is standard wine startup stuff, it's that all there is to it and do you not get any further output from that point on?
it's that all there is to it and do you not get any further output from that point on?
That is correct, there are no more logs.
Offline
Another thing I would like to report is that nvidia-xconfig
will "break" your system because you've no output attached to the nvidia GPU
Status quote at #7 was that the prime setup generally is ok, we only need to worry about your game.
Now after the install, if I run the game through lutris, i get the following log in the console:
Does that still mean
it was either invisible or not there at all, but i could tell something was happening because my network was being used by the client for downloading assets
What kind of desktop environment do you use?
Offline
What kind of desktop environment do you use?
I'm using leftwm as a window manager and picom as a compositor.
Offline
Step #1: kill picom.
Step #2: try openbox
Offline
Step #1: kill picom.
Step #2: try openbox
I just did and the window is also not showing up there.
My guess is that it has to do something with either wine, or some of the xf86-video-* now being not there.
In any case, I believe this to be a lost cause now.
Offline
LoL in general is very hit and miss and can break with every update of the LoL client.
For the general case of "can I dGPU" can you test some native games/stuff that's verified for proton on Steam or so?
Offline
:thumbsup:
Thanks for the help @Seth
Last edited by Fractal-Tess (2023-10-26 15:56:12)
Offline
I have a laptop that requires 'prime-run' in order to use my dGPU and have had issues with this with all WINE 8+ flavors outside of Steam. Specifically WINE-GE, which is required by most non-steam games.
Anyways, I noticed that adding the games that wouldn't work without Steam, would work with Steam if added as a non-steam game. So after hunting down the env vars that Steam uses, I found the following.
By adding gameoverlayrenderer.so with LD_PRELOAD, it solves this issue. Just make sure you have Steam installed and add the following globally.
LD_PRELOAD=${HOME}/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so:${HOME}/.local/share/Steam/ubuntu12_64/gameoverlayrenderer.so
So far, this is the only solution I've discovered to resolve this issue without initiating Xorg solely with my NVIDIA driver.
The problem is listed at 5.8 here https://wiki.archlinux.org/title/PRIME
*Note: this seems to be an odd solution. Possibly Valve found this issue and fixed it internally within the gameoverlayrenderer.so through preload. Without adding this everything uses my Intel GFX card and with it, they use my NVIDIA card -- as verified by nvidia-smi.
Last edited by mitigd (2024-02-20 15:05:24)
Offline
Pages: 1