how to compile master LE with Nvidia legacy driver 304.134 ?

  • My external PCI Geforce GT610 card can't work with 340 legacy driver and with current nvidia drivers. I would like to try to use legacy 304.134 drivers


    According our discussion here is LibreELEC Testbuilds for x86_64 (Kodi 18.0) I will remove the patch
    LibreELEC.tv/xf86-video-nvidia-legacy-kernel-4.9.patch at master · LibreELEC/LibreELEC.tv · GitHub


    and will modify in LibreELEC.tv/package.mk at master · LibreELEC/LibreELEC.tv · GitHub the line
    PKG_VERSION="340.101


    should I do anything else for successful LE compilation ?

    Wetek play
    Kodi 17.0-RC2
    LibreELEC

  • I could compile, but I couldn't start X with 304.134 legacy nvidia drivers - in Xorg log there is message that it is not possible to load nvidia.ko - see kernel log. But I couldn't find nothing about kernel log. Seems, for current kernel in LE branch need to have some patch for 304 legacy driver

    Wetek play
    Kodi 17.0-RC2
    LibreELEC

  • so, here is dmesg output Ubuntu Pastebin
    I think the problem is with that lines


    Code
    1. 6.944995] 8021q: 802.1Q VLAN Support v1.8
    2. [    7.887304] nvidia: loading out-of-tree module taints kernel.
    3. [    7.887315] nvidia: module license 'NVIDIA' taints kernel.
    4. [    7.887316] Disabling lock debugging due to kernel taint
    5. [    8.003463] nvidia: Unknown symbol mtrr_del (err 0)
    6. [    8.003581] nvidia: Unknown symbol mtrr_add (err 0)
    7. [   41.873931] snd_hda_intel 0000:02:00.1: IRQ timing workaround is activated for card #0. Suggest a bigger bdl_pos_adj.


    Xorg log here is Ubuntu Pastebin


    seems, need to patch the kernel 4.9 for missing symbol mtrr_del

    Wetek play
    Kodi 17.0-RC2
    LibreELEC


  • aVLB <= this is the patch carried by most distro's


    thank you
    what should I do with it ? To put in /packages/x11/driver/xf86-video-nvidia-legacy/patches and recompile again LE ? or to patch manually with patch -p1 < disable_mttr.patch the file nv-linux.h in ~/LibreELEC.tv/build.LibreELEC-Generic.x86_64-8.0-devel/xf86-video-nvidia-legacy-304.134/kernel

    Wetek play
    Kodi 17.0-RC2
    LibreELEC

    Edited once, last by Goga777 ().

  • Put it in the patches subdirectory and re-run the build command. It will clean/patch/rebuild only that package.

  • I could compile , but new error arisen during nvidia module loading


    dmesg Ubuntu Pastebin



    xorg log - Ubuntu Pastebin



    I'm lost....

    Wetek play
    Kodi 17.0-RC2
    LibreELEC

  • in bOZU there are 3 patches, but I removed only one - /LibreELEC.tv/blob/master/packages/x11/driver/xf86-video-nvidia-legacy/patches/xf86-video-nvidia-legacy-kernel-4.9.patch


    Should I apply all 3 patches ?

    Wetek play
    Kodi 17.0-RC2
    LibreELEC

  • bOZU is a single patch that contains three *hunks*.


    You certainly need the first hunk. I don't know if you need the second and third hunks, Ubuntu seem to think so (and this patch does apply on top of 304.134 despite being originally based on 304.132).


    If it doesn't build with all three hunks then drop the second and third hunks (delete from the second "diff" onwards).

  • yes, only with the first hunk I could compile and run LE. Thank you again, the issue was solved

    Wetek play
    Kodi 17.0-RC2
    LibreELEC