softhddevice - Fehler: [xcb] Most likely this is a multi-threaded client and XInitThreads has not been called

  • Hallo zusammen,


    seit einer Woche experimentiere ich - leider erfolglos. Der Fehler tritt beim Start des VDR auf und ist nicht reproduzierbar.

    - aktuelles softhddevice 1.0.6 von Inj https://github.com/ua0lnj/vdr-plugin-softhddevice - mit älteren Versionen gleiches Problem

    - kurz nach dem Start des PCs taucht's fast immer auf - unabhängig wie viel später nach dem dem X-Start

    - vor allem mit cuda, mit vdpau seltener

    - zu Beginn dachte ich, es würde am Skindesigner liegen, doch NEIN - einzige Plugins derzeit: remote und satip

    - manchmal klappt es beim fünften Start und manchmal geht's sofort

    - Opensuse 15.1 oder 15.2 , unabhängig von z.B. xcb, glew, nvidia-Treiber-Versionen - unabhängig ob von Repositories oder selber kompiliert

    - Geforce GT630 oder GTX 1650

    - vdr 2.4.4 oder Git


    Wäre toll, wenn mir jemand auf die Sprünge helfen könnte.


    Danke

    Stefan


    Was mich bei softhddevice wundert, dass da die libGLX angezogen wird und nichts von nvidia.

    Fehlt bei mir was oder wird beim Bau von softhddevice zu viel angezogen?

    ffmpeg habe ich 4.3.1 oder neueste Version aus dem Gut getestet.

  • Wie startest du den X-Server und mit welchen Startargumenten? Gibt es es einen Window-Manager oder ist der VDR der einzige X-Client?


    Der Zugriff auf OpenGL wird mittlerweile von https://github.com/NVIDIA/libglvnd abstrahiert, daher braucht es da kein direktes Linken gegen nvidia-Bibliotheken.


    Je nachdem mit welchen Optionen man softhddevice baut, ändern sich die Bibliotheken, gegen die gelinkt wird etwas - im Vollausbau mit VAAPI und CUVID-Unterstützung sieht das unter Ubuntu 20.04 so aus:

    yaVDR-Dokumentation (Ceterum censeo enchiridia esse lectitanda.)

  • Thanks a lot for your response, Seahawk an Inj!


    I have now tested a few more times with vdpau without crashing. It only occurs with cuvid. Excuse me!

    With vdpau, the taskbar is always in front of the softhddevice-window... - cause of the openglosd-Window? Do I have to create a rule here in icewm?

    And when I start with -w disable-ogl-osd the OSD has wrong colors and wrong layout (a few characters shifted when scrolling down).

    With softhdcuvid from jojo there's isn't any xcb-Error. But this doesn't run so smooth/ nice like your Plugin, Inj, black screen after minimize and maximize the window and so on - sorry for my bad english, I'm still learning...:)


    I start with following arguments. When I start detached, then it crashes with the attach-command.

    Code
    1. -a hw:NVidia,7 -d :0.0 -f -g 1920x1080+0+0 -v cuvid -w still-hw-decoder -w alsa-driver-broken


    Thank you for the listing the libraries. Much more than for me. Should I install the missing libraries?

    But there is also nothing against cuvid or cuda here. The shd-plugin doesn't need the libglvnd from nvidia?

    I have icewm installed and the X-Server doesn't start with softhddevice.


    Thanks a lot

    Stefan

  • But there is also nothing against cuvid or cuda here.

    ffmpeg needs to be built against the cuda headers - instead of installing multiple gigabytes of nvidia libraries and SDKs it is sufficient to use this trimmed down header package: https://github.com/FFmpeg/nv-codec-headers (and to install the drivers and libraries required on the target pc).

    The shd-plugin doesn't need the libglvnd from nvidia?

    Not directly, but the OpenGL-Libraries use libGLdispatch (see https://github.com/NVIDIA/libglvnd#code-overview) to access the vendor library (in your case provided by the nvidia driver).

    yaVDR-Dokumentation (Ceterum censeo enchiridia esse lectitanda.)

  • Yes, Seahawk, you are right! I had completely forgotten that. I took the nv-codec-headers into account when building ffmpeg. See the end of my ffmpeg-config:

    Code
    1. ./configure --prefix=/usr/local --libdir=/usr/local/lib64 --shlibdir=/usr/local/lib64 --enable-shared --enable-nonfree --enable-cuda --enable-cuvid --enable-nvenc --enable-vdpau --enable-vaapi --extra-cflags=-I/usr/local/include/ffnvcodec/include/

    Am I the only one getting the xcb error on Cuda?

    That can't be because of ffmpeg, right?

    What could I test? Or configure ffmpeg differently? How?

    Is there something missing in my xorg.conf?


    Thanks

    Stefan

  • I use xorg with windomanager icewm - my xorg-log in the attachment.


    Am I the only one getting the xcb error on Cuda?

    Apparently yes, because no one answered.

    I don't necessarily need Cuda, I just thought it was more modern than vdpau.


    With vdpau I have the problem that the openglosd-Window is in focus. The softhddevice-window ist marked with "whole screen (ganzer Bildschirm, per rechter Maustaste)". What can I do to focus the softhddevice-window?


    Thanks a lot for all the support

    Stefan


    Not directly, but the OpenGL-Libraries use libGLdispatch (see https://github.com/NVIDIA/libglvnd#code-overview) to access the vendor library (in your case provided by the nvidia driver).

    Vielen Dank für den interessanten Link. Sorry, das hattest Du ja auch schon im Beitrag weiter oben geschrieben. Jetzt hab ich's verstanden!

    Files

    • Xorg.txt

      (31.1 kB, downloaded 5 times, last: )
  • Here jojo61 writes that he has built in the XInitThread:

    softhdcuvid with hevc and UHD

    It must have happened at this point - but I don't understand this...?(

    https://github.com/jojo61/vdr-…59b4a7989fc9fd8d9e6ab1683

    I don't understand what he's doing. Maybe it will help you.


    Please tell me if I can do anything else.


    Stefan



    Before that, I found the following contributions with the error:

    softhdcuvid with hevc and UHD

    softhdcuvid with hevc and UHD

  • This patch solves the problem with cuvid. The error no longer apeared. Maybe you or anybody else can test it. Not that it causes unwanted side effects.

    The sources for this were the two commits from Jojo61 softhddevice to video.c

    https://github.com/jojo61/vdr-…bbfb20807388b923632d0b7ec

    https://github.com/jojo61/vdr-…59b4a7989fc9fd8d9e6ab1683


    All the best

    Stefan

    Files

    • video.c.diff

      (2 kB, downloaded 1 times, last: )