nVidia Nouveau Driver

  • Boot paramers
    More precisely the parameter I am looking for is a cheatcode and is used like a boot parameter, for example "from=", see https://www.slax.org/blog/18824-Rei…tcode-from.html . I prefer dual boot in stead of booting from another hard disk of pen drive. This is more a topic for "feature requests", but it should streamline the process in my case (BIOS is sometimes not very responsive).

    EGL
    I don't know if is a bug. Slackware 15.0 is using version 21.3.5 without problems. They have patched mesa, but I don't think for EGL, see https://ftp.nluug.nl/os/Linux/distr…/source/x/mesa/ Kodi runs fine with gbm/gl

    Images
    40 minutes from scratch per image is very fast. Rebuilding without changes should take about 10 minutes for me. The results from your images:

    Nouveau (gbm/gles):
    pastekodi: https://paste.libreelec.tv/singular-civet.log
    pastecrash: https://paste.libreelec.tv/aware-catfish.log
    kodi_crashllog: https://paste.kodi.tv/eqehowusip.kodi

    Nouveau-legacy (x11/gl):
    pastekodi: https://paste.libreelec.tv/steady-doberman.log
    systemctl status xorg.service and journalctl -xeu xorg.service: https://paste.kodi.tv/podibezacu

    BTW I could not upgrade from Nouveau to Nouveau-legacy via .update It gave an error about not being compatible. I upgraded manually by coping the KERNEL and SYSTEM files.

    EDIT I tried gbm/gl and therfore I changed the file /$HOME/LibreELEC.tv/projects/Generic/devices/gbm/options:
     OPENGL="mesa", OPENGLES="no" and GRAPHIC_DRIVERS="nouveau"
    During building I got the error ../meson.build:448:3: ERROR: Feature egl cannot be enabled: EGL requires DRI, Haiku, Windows or Android

    Edited once, last by Johpin (January 21, 2025 at 3:23 PM).

  • No change to the errors, it is likely you get a working system by reverting Mesa 24 to 21.

    IIRR Mesa 21 was the latest version booting on any platform (I'm testing) without error.

  • On an RPi5 (and cross-checked on AMLGX, both are GBM) the Kodi debug log shows this sequence:

    In the Nouveau (GBM) log the last item is GL_MESA_bgra so I am assuming the CDRMUtils::SetMode and whatever that translates into with the EGL context are the changes that trigger the segfault. I don't understand why we trip and show the EGL_BAD_SURFACE error, but this is normally harmless (shows on all GBM devices).

    The crashlog shows:

    I'm not an expert in backtraces, but it looks like we are opening a new context and we do something with buffers (which I assume trips EGL_BAD_SURFACE and then we see dri_flush and the segfault:

    Code
    Jan 21 08:23:48.613409 LibreELEC kernel: nouveau 0000:02:00.0: gr: intr 00100000 [ERROR] nsource 00000002 [DATA_ERROR] nstatus 02000000 [BAD_ARGUMENT] ch 2 [00061000 kodi.bin[833]] subc 7 class 4497 mthd 0208 data 00000120
    Jan 21 08:23:48.616747 LibreELEC kernel: nouveau 0000:02:00.0: gr: intr 00100000 [ERROR] nsource 00000002 [DATA_ERROR] nstatus 02000000 [BAD_ARGUMENT] ch 2 [00061000 kodi.bin[833]] subc 7 class 4497 mthd 0208 data 00000120
    Jan 21 08:23:48.620080 LibreELEC kernel: nouveau 0000:02:00.0: gr: intr 00100000 [ERROR] nsource 00000002 [DATA_ERROR] nstatus 02000000 [BAD_ARGUMENT] ch 2 [00061000 kodi.bin[833]] subc 7 class 4497 mthd 0208 data 00000120
    Jan 21 08:23:48.623435 LibreELEC kernel: nouveau 0000:02:00.0: gr: intr 00100000 [ERROR] nsource 00000002 [DATA_ERROR] nstatus 02000000 [BAD_ARGUMENT] ch 2 [00061000 kodi.bin[833]] subc 7 class 4497 mthd 0208 data 00000140
    Jan 21 08:23:48.810100 LibreELEC kernel: kodi.bin[833]: segfault at 0 ip 00007fd840115a06 sp 00007fff2122b1c0 error 6 in libgallium-24.3.3.so[786a06,7fd83f98f000+111f000] likely on CPU 1 (core 1, socket 0)
    Jan 21 08:23:48.810300 LibreELEC kernel: Code: 00 00 48 8b bf f8 04 00 00 48 89 04 24 8b 82 d8 02 00 00 c7 44 24 08 02 03 00 00 83 c0 01 89 82 d8 02 00 00 89 06 48 8b 47 30 <48> c7 00 6c fd 08 00 8b 16 48 8d 48 0c 48 89 e6 48 89 4f 30 89 50

    I'm no expert in mesa debugging, but can you set the following to see if we can get more output:

    Code
    echo "NOUVEAU_LIBDRM_DEBUG=1" > /storage/.config/kodi.conf
    echo "NOUVEAU_DEBUG=1" >> /storage/.config/kodi.conf
    echo "EGL_LOG_LEVEL=debug" >> /storage/.config/kodi.conf
    reboot

    Then pastebin the Kodi crashlog URL as before.

  • Johpin can you share the system log too? .. Kodi dumps the environment debug there not to it's own log.

    What is the name of the file and what is the path?

    I found a new version of Nouveau-Legacy and had installed it already. Before reverting to the Nouveau version, which information do you need from Nouveau-Legacy?

    Downgrading to mesa-21.3.5. (taken from Slackware, because 21.0.3. from LE 10.04 was not in the archive anymore) gave the same EGL error during building. The patches Slackware is using have not been applied.

  • It's not particularly enlightening for me, but it might be more meaningful to a mesa developer :)

    I'm currently building a GBM image based on the LE12 codebase. K22 contains some reworking to GLES shaders. So I'd like to run a test with K21 as it predates those changes and we can eliminate them from suspicion.

  • I don't see any difference in the log, which is positive as we can eliminate Kodi changes from suspicion and focus on interaction between libgallium and the kernel driver. I think it's time to push discussion to the mesa mailing list.

    NB: Rolling back the mesa version back that far will require more than a simple version/sha256 change in package.mk as the build options have changed format and things have been added/removed over time (look at the git history for mesa package.mk). I did look at reverting, but in the end we need to fix the current version so better to pursue that for now.

  • mglae See the IRC chat that starts here: https://oftc.irclog.whitequark.org/dri-devel/2025-01-23#33941062

    This change causes the dri2 error under X11: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29969 - so I've added support for legacy-x11=dri2 in mesa package.mk

    Johpin I've pushed an updated pair of images to https://chewitt.libreelec.tv/testing/ and I have a hunch "Nouveau-Legacy" with DRI2 support should now work? - If it does, please test whether this /storage/.config/xorg.conf also works? (probably not)

    Code
    Section "Device"
        Identifier "Nouveau"
        Driver "nouveau"
        Option "DRI" "3"
    EndSection

    The main mission is still to get GBM working so nouveau can be added to the normal Generic image. I'll need to chat with Kodi devs about that though, I'm not really understanding the DRM format comments in the IRC chat.

  • Xorg now looks generally happy (some xorg.conf tweaking can clean some minor things up) but it now clearly shows an identical fault to the GBM image, so the IRC comments about "using linear scanout with depth" apply and we need to tweak something on the Kodi side to resolve this.