Lakka icon indicating copy to clipboard operation
Lakka copied to clipboard

Easy way to compile with Nvidia driver and X11

Open Alexandre-Garcia opened this issue 9 years ago • 7 comments

I believe that this is the easiest way to provide a way to compile using the proprietary Nvidia drivers for X11. Thus, for example, to compile with this driver is used: "DISTRO=Lakka PROJECT=Generic ARCH=x86_64 NVIDIAX11=yes make image" When used without "NVIDIAX11=yes" will compile with DRM.

Alexandre-Garcia avatar May 31 '16 18:05 Alexandre-Garcia

Ok thanks for the information. I'm trying to build an X11 image with all the drivers, not just the nvidia ones. I have problems compiling xf86-video-intel

kivutar avatar Jun 02 '16 08:06 kivutar

I also faces problems compiling xf86-video-intel, and for this I put a way to compile only with the Nvidia drivers for now. Another problem I found is that compiling with xserver-xorg 1.18 randomly crashed in PPSSPP, then returned to compile with 1.16.

Alexandre-Garcia avatar Jun 02 '16 12:06 Alexandre-Garcia

I guess I will have to digg in the OpenELEC history for xf86-video-intel and find what version is compatible with our kernel.

kivutar avatar Jun 02 '16 12:06 kivutar

I'm having some trouble getting Lakka to compile using X11 and the binary NVIDIA driver. If anyone here has any insight or has gotten it to work, the thread's here: http://libretro.com/forums/showthread.php?t=6143

kevinfishburne avatar Jun 23 '16 02:06 kevinfishburne

This problem is due to the RT kernel patches from @larskj that we merged.

kivutar avatar Jun 23 '16 09:06 kivutar

I used the command "git reset --hard bd067b2db6a984857f841f08a70a8fc5537a8e69" to try and revert the code back to the last commit before the RT kernel patches: https://github.com/libretro/Lakka/commit/bd067b2db6a984857f841f08a70a8fc5537a8e69 I checked a source file for the RT kernel changes made after that commit and they weren't there, so it seems to have worked.

The error I'm getting now is this:

Length: 41547370 (40M) [application/octet-stream]
Saving to: 'sources/xf86-video-nvidia/NVIDIA-Linux-x86_64-304.125-no-compat32.run'

100%[====================================================================================================================================================================================================>] 41,547,370  7.11MB/s   in 6.5s   

2016-06-22 02:38:28 (6.11 MB/s) - 'sources/xf86-video-nvidia/NVIDIA-Linux-x86_64-304.125-no-compat32.run' saved [41547370/41547370]

      CLEAN    xf86-video-nvidia
          * Removing build.Lakka-Generic.x86_64-devel/xf86-video-nvidia-340.96 ...
      UNPACK   xf86-video-nvidia
Creating directory build.Lakka-Generic.x86_64-devel/xf86-video-nvidia-304.125
Verifying archive integrity... OK
Uncompressing NVIDIA Accelerated Graphics Driver for Linux-x86_64 304.125...................................................................................................................................................
          APPLY PATCH (common)   /home/kevinfishburne/Lakka/Lakka/packages/x11/driver/xf86-video-nvidia/patches/xf86-video-nvidia-kernel-3.18.patch
patching file kernel/nv-drm.c
Hunk #1 succeeded at 17 with fuzz 2.
Hunk #2 succeeded at 75 with fuzz 1 (offset -40 lines).
      BUILD    xf86-video-nvidia (target)
make[1]: Entering directory '/home/kevinfishburne/Lakka/Lakka/build.Lakka-Generic.x86_64-devel/xf86-video-nvidia-304.125/kernel'
NVIDIA: calling KBUILD...
test -e include/generated/autoconf.h -a -e include/config/auto.conf || (        \
echo >&2;                           \
echo >&2 "  ERROR: Kernel configuration is invalid.";       \
echo >&2 "         include/generated/autoconf.h or include/config/auto.conf are missing.";\
echo >&2 "         Run 'make oldconfig && make prepare' on kernel src to fix it.";  \
echo >&2 ;                          \
/bin/false)

I'd try the suggested "make oldconfig" command but don't know which directory to run it in or if it's BS.

kevinfishburne avatar Jun 24 '16 02:06 kevinfishburne

What do you see in projects/Generic/linux/ ? Are the changes to the kernel config reverted too?

Anyway to do a make oldconfig, you can go to build-Lakka.Generic_/linux-_/ and type

ARCH=x86_64 make oldconfig
ARCH=x86_64 make prepare

Then copy the .config to projects/Generic/linux/ to save it

kivutar avatar Jun 24 '16 08:06 kivutar