You are not logged in.

#1 2021-09-26 12:04:17

realitaetsverlust
Member
Registered: 2021-09-07
Posts: 52

[SOLVED] prime-run doesn't work consistently across all applications

First of all, I hope this is the right place to ask this question. If not, feel free to move or even delete it if it's not the right place for this forum. Also, the error is pretty confusing and I don't quite understand it, so I'm sorry if this post is a bit vague and lacks details.

So, I've recently installed arch and the majority of stuff is working very nicely. However, there is one pain point that I'm unable to solve by myself, and that is prime-run. I'm using a Dell XPS 15 7590 with an integrated nvidia GPU. It runs a Intel UHD Graphics 630 and a NVIDIA GeForce GTX 1650 Mobile. I previously used manjaro on this laptop and in order to use the nvidia GPU, I made use of prime-run, which worked flawlessly. Now, I tried the same on arch, but it's not working consistently across all applications.

One of the examples would be factorio.

I downloaded the demo of factorio to ensure there are no issues with steam. When I run the demo via "./bin/x64/factorio", it runs without issues. However, when I run it with "prime-run bin/x64/factorio", it doesn't and in the logs, it throws the following error:

0.000 2021-09-26 13:03:04; Factorio 1.1.39 (build 58937, linux64, demo)
   0.007 Operating system: Linux (Arch rolling)
   0.007 Program arguments: "bin/x64/factorio" 
   0.007 Read data path: /home/realitaetsverlust/Downloads/factorio/data
   0.007 Write data path: /home/realitaetsverlust/Downloads/factorio [731904/927573MB]
   0.007 Binaries path: /home/realitaetsverlust/Downloads/factorio/bin
   0.014 System info: [CPU: Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz, 12 cores, RAM: 15637 MB]
   0.014 Environment: DISPLAY=:0.0 WAYLAND_DISPLAY=<unset> DESKTOP_SESSION=xfce XDG_SESSION_DESKTOP=<unset> 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.015 Display options: [FullScreen: 1] [VSync: 1] [UIScale: automatic (100.0%)] [Native DPI: 1] [Screen: 255] [Special: lmw] [Lang: en]
X Error of failed request:  BadAlloc (insufficient resources for operation)
  Major opcode of failed request:  152 (GLX)
  Minor opcode of failed request:  5 (X_GLXMakeCurrent)
  Serial number of failed request:  0
  Current serial number in output stream:  97

Now, I've already been to the factorio forums since I suspected it's a factorio problem, but it's not. One of the supporters over there said:

I think this error is quite telling. It seems that Factorio can't talk to the rest of the windowing system to even display an error message box.

Now, there are other games that won't work, like Surviving the Aftermath (running via steam as "prime-run %command%), but the error is completely different. It's actually throwing a wine error:

93.323:0020:0024:err:ntdll:RtlpWaitForCriticalSection section 6EDBB3A0 "../src-wine/dlls/user32/user_main.c: user_section" wait timed out in thread 0024, blocked by 00b8, retrying (60 sec)

Now, again, the game works if I run it without prime-run. However, the performance is, obviously, significantly worse.

Lastly, there is "They are Billions" (running via steam as "prime-run %command%). This game also won't run with prime-run, but the proton logs say something very interesting:

119.949:00b4:00b8:err:winediag:nodrv_CreateWindow Application tried to create a window, but no driver could be loaded.
119.949:00b4:00b8:err:winediag:nodrv_CreateWindow Unknown error (998).

Now, this error is very similar to the one I got in factorio. So, my initial thought would be that I, somehow, messed up the installation of XFCE, but in general, it works very well. I start XFCE manually via "startx" (since I don't need a desktop for work) when I want to play games, but I don't know if that's a "good" thing to do.

However, the more confusing thing is that prime-run actually seems to work:

realitaetsverlust@ultima: ~  
$ prime-run inxi -F | grep "OpenGL: renderer"
           OpenGL: renderer: NVIDIA GeForce GTX 1650/PCIe/SSE2 v: 4.6.0 NVIDIA 470.74 
realitaetsverlust@ultima: ~  
$ inxi -F | grep "OpenGL: renderer"
           OpenGL: renderer: Mesa Intel UHD Graphics 630 (CFL GT2) v: 4.6 Mesa 21.2.2 

And it does work with several games, like rimworld or dota underlords.

I'm not quite sure how to debug this problem and I am well aware that this is very confusing and probably even specific to my system. I'm really not that good with stuff like GPU debugging so I'm hoping someone understands this issue and is able to lead me into the right direction. Again, I'm not sure what kind of logs you need, so please just tell me and I will provide them. There was nothing in the xorg log which was the first place I looked at. Also, if you need the full logs of proton, I'll post them should they be necessary, but I thought since it's not exactly arch related, I only picked the "important" stuff.

System info:

$ inxi -F
System:    Host: ultima Kernel: 5.14.7-arch1-1 x86_64 bits: 64 Desktop: Xfce 4.16.0 Distro: Arch Linux 
Machine:   Type: Laptop System: Dell product: XPS 15 7590 v: N/A serial: <superuser required> 
           Mobo: Dell model: 0VYV0G v: A00 serial: <superuser required> UEFI: Dell v: 1.8.1 date: 07/03/2020 
Battery:   ID-1: BAT0 charge: 74.1 Wh (100.0%) condition: 74.1/97.0 Wh (76.4%) 
CPU:       Info: 6-Core model: Intel Core i7-9750H bits: 64 type: MT MCP cache: L2: 12 MiB 
           Speed: 3434 MHz min/max: 800/4500 MHz Core speeds (MHz): 1: 3434 2: 3460 3: 3502 4: 3458 5: 3452 6: 3477 7: 3487 
           8: 3328 9: 3455 10: 3453 11: 3377 12: 3444 
Graphics:  Device-1: Intel CoffeeLake-H GT2 [UHD Graphics 630] driver: i915 v: kernel 
           Device-2: NVIDIA TU117M [GeForce GTX 1650 Mobile / Max-Q] driver: nvidia v: 470.74 
           Device-3: Microdia Integrated_Webcam_HD type: USB driver: uvcvideo 
           Display: server: X.org 1.20.13 driver: loaded: modesetting resolution: <missing: xdpyinfo> 
           OpenGL: renderer: Mesa Intel UHD Graphics 630 (CFL GT2) v: 4.6 Mesa 21.2.2 
Audio:     Device-1: Intel Cannon Lake PCH cAVS driver: snd_hda_intel 
           Sound Server-1: ALSA v: k5.14.7-arch1-1 running: yes 
           Sound Server-2: PulseAudio v: 15.0 running: yes 
Network:   Device-1: Intel Wi-Fi 6 AX200 driver: iwlwifi 
           IF: wlp59s0 state: up mac: 8c:c6:81:e3:12:96 
           IF-ID-1: br-3bcab3286c10 state: down mac: 02:42:e4:51:c0:ec 
           IF-ID-2: br-452f7e3a6a8a state: down mac: 02:42:9b:81:b6:d2 
           IF-ID-3: br-4c46d381fae4 state: down mac: 02:42:5d:7e:bb:44 
           IF-ID-4: br-65ae310baf30 state: down mac: 02:42:f0:ef:2a:0d 
           IF-ID-5: br-68e8d422107c state: down mac: 02:42:73:f0:6b:9d 
           IF-ID-6: br-e35d178f2c34 state: down mac: 02:42:43:c5:f4:c6 
           IF-ID-7: br-fef8dff37d84 state: down mac: 02:42:03:b4:66:f0 
           IF-ID-8: docker0 state: down mac: 02:42:63:d4:65:62 
Bluetooth: Device-1: Intel AX200 Bluetooth type: USB driver: btusb 
           Report: rfkill ID: hci0 rfk-id: 1 state: down bt-service: not found rfk-block: hardware: no software: no 
           address: see --recommends 
Drives:    Local Storage: total: 953.87 GiB used: 145.51 GiB (15.3%) 
           ID-1: /dev/nvme0n1 vendor: KIOXIA model: KXG60ZNV1T02 NVMe 1024GB size: 953.87 GiB 
Partition: ID-1: / size: 905.83 GiB used: 145.45 GiB (16.1%) fs: ext4 dev: /dev/nvme0n1p3 
           ID-2: /boot size: 511 MiB used: 67.1 MiB (13.1%) fs: vfat dev: /dev/nvme0n1p1 
Swap:      ID-1: swap-1 type: partition size: 32 GiB used: 0 KiB (0.0%) dev: /dev/nvme0n1p2 
Sensors:   System Temperatures: cpu: 82.0 C mobo: N/A 
           Fan Speeds (RPM): cpu: 4933 fan-2: 4884 
Info:      Processes: 286 Uptime: 7m Memory: 15.27 GiB used: 2.79 GiB (18.2%) Shell: Bash inxi: 3.3.06

Last edited by realitaetsverlust (2021-09-26 16:55:58)

Offline

#2 2021-09-26 12:09:00

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,645

Re: [SOLVED] prime-run doesn't work consistently across all applications

is lib32-nvidia-utils and lib32-mesa installed?

Offline

#3 2021-09-26 12:11:08

realitaetsverlust
Member
Registered: 2021-09-07
Posts: 52

Re: [SOLVED] prime-run doesn't work consistently across all applications

V1del wrote:

is lib32-nvidia-utils and lib32-mesa installed?

Yes, both of these packages are installed:

realitaetsverlust@ultima: ~  
$ pacman -Ss lib32-nvidia-utils
multilib/lib32-nvidia-utils 470.74-1 [installed]
    NVIDIA drivers utilities (32-bit)
realitaetsverlust@ultima: ~  
$ pacman -Ss lib32-mesa
multilib/lib32-mesa 21.2.2-1 [installed]
    An open-source implementation of the OpenGL specification (32-bit)

Offline

#4 2021-09-26 13:47:57

kokoko3k
Member
Registered: 2008-11-14
Posts: 2,393

Re: [SOLVED] prime-run doesn't work consistently across all applications

from vulkan-tools and mesa-demos, try to start vkcube and glxgears via prime-run
Do they run?


Help me to improve ssh-rdp !
Retroarch User? Try my koko-aio shader !

Offline

#5 2021-09-26 13:51:41

realitaetsverlust
Member
Registered: 2021-09-07
Posts: 52

Re: [SOLVED] prime-run doesn't work consistently across all applications

kokoko3k wrote:

from vulkan-tools and mesa-demos, try to start vkcube and glxgears via prime-run
Do they run?

Yes, they both run via prime-run.

Offline

#6 2021-09-26 14:27:23

seth
Member
Registered: 2012-09-03
Posts: 50,957

Re: [SOLVED] prime-run doesn't work consistently across all applications

The error yells software rasterizer…

prime-run glxinfo -B

and your xorg log, please.
https://wiki.archlinux.org/title/Xorg#General

Offline

#7 2021-09-26 14:38:03

realitaetsverlust
Member
Registered: 2021-09-07
Posts: 52

Re: [SOLVED] prime-run doesn't work consistently across all applications

seth wrote:

The error yells software rasterizer…

prime-run glxinfo -B

and your xorg log, please.
https://wiki.archlinux.org/title/Xorg#General

Okay, so this is interesting. Sometimes, when I run prime-run glxinfo -B, it throws an error which is the exact same as the one I get in factorio. However, sometimes it does work. It's around 50% chance of working. I've added both outputs below.

$ prime-run glxinfo -B
name of display: :0.0
X Error of failed request:  BadAlloc (insufficient resources for operation)
  Major opcode of failed request:  152 (GLX)
  Minor opcode of failed request:  5 (X_GLXMakeCurrent)
  Serial number of failed request:  0
  Current serial number in output stream:  28

realitaetsverlust@ultima: ~  
$ prime-run glxinfo -B
name of display: :0.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: 3911 MB
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: NVIDIA GeForce GTX 1650/PCIe/SSE2
OpenGL core profile version string: 4.6.0 NVIDIA 470.74
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 470.74
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 470.74
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
$ grep -e Log -e tty Xorg.0.log
[    67.752] (==) Log file: "/var/log/Xorg.0.log", Time: Sat Sep  4 19:26:52 2021
[    67.758] (--) controlling tty is VT number 1, auto-enabling KeepTty

Xorg.0.log:

https://pastebin.com/u204CgeM

Offline

#8 2021-09-26 15:41:43

realitaetsverlust
Member
Registered: 2021-09-07
Posts: 52

Re: [SOLVED] prime-run doesn't work consistently across all applications

Okay, so one more thing:

I played around a bit with vkcube, glxgears and found something called "fire". Now, sometimes, when I run these with prime-run, they don't display anything but a black window. I got a screenshot right here

https://i.imgur.com/5sznHgT.png

However, it does run more often than it doesn't:

https://i.imgur.com/FDEVgeb.png

The only application that consistently displays the window is vkcube. glxgears and fire both display black windows every now and then.

Maybe this helps you in pinpointing the problem ... or it causes even more confusion.

Last edited by realitaetsverlust (2021-09-26 15:43:21)

Offline

#9 2021-09-26 16:06:44

seth
Member
Registered: 2012-09-03
Posts: 50,957

Re: [SOLVED] prime-run doesn't work consistently across all applications

Sometimes, when I run prime-run glxinfo -B, it throws an error which is the exact same as the one I get in factorio. However, sometimes it does work. It's around 50% chance of working.

Is "sometimes" in direct succession or does it require a reboot/re-login to get out of the present condition?
Do you configure anything powersaving specific for the nvidia chip (bbswitch/acpi…)?

Offline

#10 2021-09-26 16:15:28

realitaetsverlust
Member
Registered: 2021-09-07
Posts: 52

Re: [SOLVED] prime-run doesn't work consistently across all applications

seth wrote:

Sometimes, when I run prime-run glxinfo -B, it throws an error which is the exact same as the one I get in factorio. However, sometimes it does work. It's around 50% chance of working.

Is "sometimes" in direct succession or does it require a reboot/re-login to get out of the present condition?
Do you configure anything powersaving specific for the nvidia chip (bbswitch/acpi…)?

It's in direct succession. There is no rebooting or anything going on. This is literally me entering the command once, getting and error, ctrl + C, and reentering it, seeing it work.

I don't configure anything myself. As I said, I'm not really knowledgeable enough about this topic so I basically left everything as it is when I installed it. Also, I checked the bios just in case there is anything, however, I could not find anything related to the nvidia GPU. The only thing I found was "fastboot", which was set to minimal, but I'm not sure if that is related to this issue.

Last edited by realitaetsverlust (2021-09-26 16:15:53)

Offline

#11 2021-09-26 16:22:04

seth
Member
Registered: 2012-09-03
Posts: 50,957

Re: [SOLVED] prime-run doesn't work consistently across all applications

not sure if that is related to this issue

Nope.

Do you use https://wiki.archlinux.org/title/Xfwm#Composite_manager or xcompmgr or picom or anything like that?
https://wiki.archlinux.org/title/PRIME# … ack_screen sounds weird, but hey…

Offline

#12 2021-09-26 16:33:52

realitaetsverlust
Member
Registered: 2021-09-07
Posts: 52

Re: [SOLVED] prime-run doesn't work consistently across all applications

seth wrote:

not sure if that is related to this issue

Nope.

Do you use https://wiki.archlinux.org/title/Xfwm#Composite_manager or xcompmgr or picom or anything like that?

Nope, I don't, at least not that I knew of. However, the command xfwm4-tweaks-settings exists on my system, so it probably got installed together with XFCE. I've never setup anything with it tho.

seth wrote:

I've checked what the wiki says (so Menu > Settings > Window Manager Tweaks > Compositor), but the compositor was already enabled. I didn't try to enable the DRI3 option for the intel GPU for now, since I wasn't sure if that was the issue and I honestly wouldn't even know where to create the config file.

Last edited by realitaetsverlust (2021-09-26 16:39:23)

Offline

#13 2021-09-26 16:39:55

kokoko3k
Member
Registered: 2008-11-14
Posts: 2,393

Re: [SOLVED] prime-run doesn't work consistently across all applications

Does pacman -R xf86-video-intel and rebooting make any difference?


Help me to improve ssh-rdp !
Retroarch User? Try my koko-aio shader !

Offline

#14 2021-09-26 16:48:18

realitaetsverlust
Member
Registered: 2021-09-07
Posts: 52

Re: [SOLVED] prime-run doesn't work consistently across all applications

kokoko3k wrote:

Does pacman -R xf86-video-intel and rebooting make any difference?

Yes. Every game that didn't run before runs now, I've tested 4 different games and it all works.

This was rather anti-climatic, I thought the issue would've been ... a bit more complicated lol. Would you mind explaining me why this was a problem? If it's not too much to write, of course. smile

Last edited by realitaetsverlust (2021-09-26 16:49:36)

Offline

#15 2021-09-26 16:52:39

kokoko3k
Member
Registered: 2008-11-14
Posts: 2,393

Re: [SOLVED] prime-run doesn't work consistently across all applications

...empirically, lucky shot:
- seth pointed in the rasterizer direction
- I learned that sometimes running the compositor fixes similar issues
- the compositor runs on the igp
- intel driver is known to be left in the cold
- Maybe on manjaro you didn't bothered to install the intel driver and just used the default  modesetting one

It was worth a try, but why it was broken is beyond me, honestly.

edit: please, prepend [SOLVED] to the topic title.

Last edited by kokoko3k (2021-09-26 16:56:08)


Help me to improve ssh-rdp !
Retroarch User? Try my koko-aio shader !

Offline

#16 2021-09-26 16:57:36

realitaetsverlust
Member
Registered: 2021-09-07
Posts: 52

Re: [SOLVED] prime-run doesn't work consistently across all applications

kokoko3k wrote:

...empirically, lucky shot:
- seth pointed in the rasterizer direction
- I learned that sometimes running the compositor fixes similar issues
- the compositor runs on the igp
- intel driver is known to be left in the cold
- Maybe on manjaro you didn't bothered to install the intel driver and just used the default  modesetting one

It was worth a try, but why it was broken is beyond me, honestly.

edit: please, prepend [SOLVED] to the topic title.

Sick, thank you so so much, and also thanks to everyone else in here smile

On manjaro, I usually installed the drivers via mhwd and yes, I probably never installed an intel driver now that I think about it. Only the nvidia driver was installed via mhwd.

Offline

Board footer

Powered by FluxBB