Saturday, May 18, 2024
 Popular · Latest · Hot · Upcoming
5
rated 0 times [  5] [ 0]  / answers: 1 / hits: 2571  / 2 Years ago, fri, may 13, 2022, 8:22:18

Platform: Ubuntu 22.04 (installed yesterday)


Problem: Running most programs with DRI_PRIME=1 doesn't work. I first discovered it when trying to run Minecraft (MultiMC) because it wouldn't use the discrete GPU. I tried using env DRI_PRIME=1 but it doesn't change anything.
I tried running glxinfo | grep Device to see if it's only a game-related problem:


okonio@rokonio-Dell-G15-5510:~$ glxinfo | grep Device
Device: Mesa Intel(R) UHD Graphics (CML GT2) (0x9bc4)
rokonio@rokonio-Dell-G15-5510:~$ DRI_PRIME=0 glxinfo | grep Device
Device: Mesa Intel(R) UHD Graphics (CML GT2) (0x9bc4)
rokonio@rokonio-Dell-G15-5510:~$ DRI_PRIME=1 glxinfo | grep Device
libGL error: failed to create dri screen
libGL error: failed to load driver: nouveau
Device: Mesa Intel(R) UHD Graphics (CML GT2) (0x9bc4)

Apparently no, and there's an error when trying to launch it with the discrete gpu.
I finally tried glxgears and weirdly enough it's working:


rokonio@rokonio-Dell-G15-5510:~$ glxgears
Running synchronized to the vertical refresh. The framerate should be
approximately the same as the monitor refresh rate.
605 frames in 5.0 seconds = 120.873 FPS
rokonio@rokonio-Dell-G15-5510:~$ DRI_PRIME=0 glxgears
Running synchronized to the vertical refresh. The framerate should be
approximately the same as the monitor refresh rate.
640 frames in 5.0 seconds = 127.938 FPS
rokonio@rokonio-Dell-G15-5510:~$ DRI_PRIME=1 glxgears
libGL error: failed to create dri screen
libGL error: failed to load driver: nouveau
Running synchronized to the vertical refresh. The framerate should be
approximately the same as the monitor refresh rate.
40009 frames in 5.0 seconds = 8001.736 FPS

Addendum: The graphic card I have is a TU117M [GeForce GTX 1650 Mobile / Max-Q] (running lshw -C display). I have installed ubuntu 22.04 yesterday and didn't change any graphic drivers, but when I go to Additional drivers, it says "Continue using a manually installed driver" and I can't select any different one.


More From » drivers

 Answers
5

It now works, I needed to install drivers with ubuntu-drivers install and then instead of using DRI_PRIME=1, use __NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia


[#479] Saturday, May 14, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
atchcommo

Total Points: 114
Total Questions: 130
Total Answers: 101

Location: Cook Islands
Member since Sat, Oct 16, 2021
3 Years ago
atchcommo questions
;