nowrep / obs-vkcapture

OBS Linux Vulkan/OpenGL game capture
GNU General Public License v2.0
532 stars 25 forks source link

[Nobara 36 X11, Optimus Laptop] "Cannot create EGLImage: Arguments are inconsistent" Error on iGPU (Mesa driver) #114

Closed Aurontime777 closed 1 year ago

Aurontime777 commented 1 year ago

I tried setting "obs-gamecapture" and "obs-vkcapture" commands to capture VTube Studio, and it worked on iGPU once during my testing, until I set them to run both on dGPU. Then it appeared as an empty source with "Cannot create EGLImage: Arguments are inconsistent" error, even when I switched back to iGPU.

I've attached the log here. https://obsproject.com/logs/C8PreBuBzOSDewP8

Edit: Forgot to mention: I tried using OBS_USE_EGL=1 on OBS, OBS_VKCAPTURE=1 and OBS_VKCAPTURE_LINEAR=1 and it didn't work. I got the same error everytime, with the exception for OBS_VKCAPTURE_LINEAR=1 which makes OBS hang when I run them.

nowrep commented 1 year ago

Please try to build from git, Nobara package is outdated.

Aurontime777 commented 1 year ago

I used built one from git, then changed to mihawk's version of OBS because my overlay uses "Lua Clock Source" script. Did this break things in the process?

Edit: I misclicked and closed the issue accidentally. Sorry.

nowrep commented 1 year ago

I used built one from git

Right, I missed this in the log. My bad.

The log you uploaded is OBS running on intel gpu. Please show a log when both OBS and game runs on nvidia gpu.

Aurontime777 commented 1 year ago

https://obsproject.com/logs/1rPkwkgHGf5z8hIJ

I got commands like __NV_PRIME_RENDER_OFFLOAD=1 and DRI_PRIME=1 (as GE repackaged driver files himself now) and OBS was still running in iGPU... Weird.

nowrep commented 1 year ago
18:17:04.566: Initializing OpenGL...
18:17:04.590: Loading up OpenGL on adapter Intel Mesa Intel(R) Xe Graphics (TGL GT2)
18:17:04.590: OpenGL loaded successfully, version 4.6 (Core Profile) Mesa 22.3.0, shading language 4.60

Still running on Intel.

Aurontime777 commented 1 year ago

It worked perfectly. maybe it was not running on the same GPU, but to think about it... I did run OBS and VTube Studio on both iGPU and dGPU and it didn't work. Maybe some kind of driver issue?

Edit: Forgot the log: https://obsproject.com/logs/T2IpHJ185dsfAqVv Edit 2: Forgot I did try with both running on iGPU and dGPU.

nowrep commented 1 year ago

As long as you can't make it both run on the same gpu, I can't help you. It may or may not work when running on different gpus (and you likely need OBS_VKCAPTURE_LINEAR=1 here).

Aurontime777 commented 1 year ago

I tried running on iGPU, and it works perfectly, except for the encoding, which is an issue I should ask for OBS community support. I'm closing this now.

For my case, enabling OBS_VKCAPTURE_LINEAR=1 always make OBS hang on capturing a game running on my dGPU with OBS running in my iGPU in my earlier times, but I don't know how different setups of Nvidia+Intel GPUs/GPUs used to run OBS and the game/drivers version will fare, so I'm not sure you should add this to your readme yet.

nowrep commented 1 year ago

For my case, enabling OBS_VKCAPTURE_LINEAR=1 always make OBS hang on capturing a game running on my dGPU

Sounds like a driver bug then.