elsampsa / valkka-live

OpenSource Video Surveillance Program
GNU Affero General Public License v3.0
31 stars 12 forks source link

Error "Resource temporarily unavailable" when I run valkker-alive #16

Closed chanwitkepha closed 5 months ago

chanwitkepha commented 5 months ago

Operating System: Ubuntu 20.04.6 LTS CPU: Core i7-7700 RAM: 64 GB GPU: Nvidia GTX 1080 x 2 NVidia Driver: 550.54.15 CUDA: 12.4

When I run valkker-live, It show error.

OpenGLThread: loadExtensions: no swap control: there's something wrong with your graphics driver: Resource temporarily unavailable However, When I check my GPU with nvidia-smi, all 2 GPUs are avaliable.

Please advise how to solve this problem. Thank you.

image

image

image

image

elsampsa commented 5 months ago

Hi. Thanks for the report.

The renderer that dumps video frames on your screen, is using OpenGL extension called GLX_SGI_swap_control.

So the first thing we should check is that its enabled, so please run:

glxinfo | grep -i "GLX_SGI_swap_control"

You can also attach (as a separate file) the whole output of glxinfo.

You can also check if you're running Wayland instead of X.Org with

echo $XDG_SESSION_TYPE

Please also try glxgears:

glxgears
chanwitkepha commented 5 months ago

Hi. Thanks for the report.

The renderer that dumps video frames on your screen, is using OpenGL extension called GLX_SGI_swap_control.

So the first thing we should check is that its enabled, so please run:

glxinfo | grep -i "GLX_SGI_swap_control"

You can also attach (as a separate file) the whole output of glxinfo.

You can also check if you're running Wayland instead of X.Org with

echo $XDG_SESSION_TYPE

Please also try glxgears:

glxgears

Here is output of glxinfo. Should I change from Xorg (X11) to Wayland or not?

devteam@devteam-pc:/ssd-disk2/home/devteam$ glxinfo | grep -i "GLX_SGI_swap_control"
    GLX_SGI_make_current_read, GLX_SGI_swap_control, GLX_SGI_video_sync
devteam@devteam-pc:/ssd-disk2/home/devteam$ echo $XDG_SESSION_TYPE
x11
devteam@devteam-pc:/ssd-disk2/home/devteam$ 
elsampsa commented 5 months ago

You should definitely keep X11.

Everything looks allright. I am baffled. Were you able to run glxgears ?

How is your monitor setup? You have two GPUs, each one connected to a separate monitor?

Can you please also run echo $DISPLAY

From your provided output screencaps I can see that libValkka tries to start OpenGLThread with (your default?) XScreen: :10.0 which seems suspiciously exotic value.

That's display 10 on screen 0. It could be that there's a bug in valkka-live that reads/converts that $DISPLAY env variable in a wrong way and then tries to start the OpenGLThread on some weird (like here that value :10.0) Xscreen.

So it's important to see what is your actual $DISPLAY.

Please also attach a screecap from your nvidia-settings commands, of the "X Screen N" tabs in that app.

To recap:

Thank you

chanwitkepha commented 5 months ago

You should definitely keep X11.

Everything looks allright. I am baffled. Were you able to run glxgears ?

How is your monitor setup? You have two GPUs, each one connected to a separate monitor?

Can you please also run echo $DISPLAY

From your provided output screencaps I can see that libValkka tries to start OpenGLThread with (your default?) XScreen: :10.0 which seems suspiciously exotic value.

That's display 10 on screen 0. It could be that there's a bug in valkka-live that reads/converts that $DISPLAY env variable in a wrong way and then tries to start the OpenGLThread on some weird (like here that value :10.0) Xscreen.

So it's important to see what is your actual $DISPLAY.

Please also attach a screecap from your nvidia-settings commands, of the "X Screen N" tabs in that app.

To recap:

  • did you run glxgears?
  • echo $DISPLAY
  • screencaps of the nvidia-settings app

Thank you

  1. Yes, I can run glxgears.

image

  1. echo $DISPLAY
(base) devteam@devteam-pc:~$ echo $DISPLAY
:13.0
(base) devteam@devteam-pc:~$ 
  1. screenshot of nvidia-settings

image

image

image

image

image

elsampsa commented 5 months ago

In your original screencaps, the program reports that

GPUHandler: starting OpenGLThread with :10.0

But according to your $DISPLAY variable, it should start it at :13.0.

That value is de&reconstructed in here and I just double-checked that it works correctly for your particular value :13.0.

Mysteriously, your nvidia-settings program is missing the "X Server Display Configuration" and the "X Screen 0" etc. tabs (see the attached image) so I am not sure if you are using the nvidia GPUs with your displays or not - at least you are using some glx-compatible GPU since you are able to run glx gears.

Please check that you are running the latest version of valkka-live (i.e. installed from the git repo master branch). As a last resort you migh try to edit that aforementioned code line yourself and "hard-code" the correct display variable there in.

There is too much weirdo stuff going on here: the discrepancy with the $DISPLAY reported by the program (:10.0) and by your cli command (:13.0) and the fact that there is no X server tabs in your nvidia-settings, so I don't think there is much I can do with this right now.

If you have success in running the program in the future, please do comment it in here.