5.2 kernels and Nvidia drivers in Debian
stevenpusser
Status: Contributor
Joined: 14 Jan 2017
Posts: 89
Reply Quote
Apparently, none of the drivers in Debian will build on the new kernel except the 430.34 in Experimental, but when I tried that, it broke my MSI laptop's Bumblebee GPU switching that I had working in MX 18 with the 418.74 backported driver.

I adapted a small patch from the Arch AUR Nvidia driver for the 418.74 driver, that built, and Bumblebee now works on the MSI and the 5.2 kernel.

:: Code ::
--- a/NVIDIA-Linux/kernel/nvidia-uvm/uvm8_tools.c
+++ b/NVIDIA-Linux/kernel/nvidia-uvm/uvm8_tools.c
@@ -206,12 +206,14 @@
     return event_tracker != NULL && !event_tracker->is_queue;
 }
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 2, 0)
 static void put_user_pages(struct page **pages, NvU64 page_count)
 {
     NvU64 i;
     for (i = 0; i < page_count; i++)
         put_page(pages[i]);
 }
+#endif
 
 static void unmap_user_pages(struct page **pages, void *addr, NvU64 size)
 {



I'll try patching some of the older drivers when I get some time.
Back to top
stevenpusser
Status: Contributor
Joined: 14 Jan 2017
Posts: 89
Reply Quote
I've found out that the nvidia-legacy-390xx drivers in Sid have patches that let the amd64 version build on a 5.2 kernel, but the i386 version currently still fails. This means you can't install the i386 libs on amd64 to support 32-programs, such as Steam or other 32-bit programs.
Back to top
damentz
Status: Assistant
Joined: 09 Sep 2008
Posts: 1122
Reply Quote
Have you tried backporting Canonical's work on GPU driver packages? Their primary repo[1] and graphics drivers PPA[2] might have everything you need to create a port for versions of Debian you want to support.

In my experience, Debian is typically late to the game with driver updates and support, but Canonical has an interest in keeping high compatibility with Steam, so Canonical's packages are more likely to be set up properly. Not to mention, they correction suffix the major version of the nvidia driver to each major package, making it easy to pick one.

The only major problem I'm thinking of is other first party packages that depend on nvidia in Debian's repos will refuse to install properly because they'll want their first party nvidia packages installed, not something outside of their control.

[1] launchpad.net/ubuntu/+source/nvidia-graphics-drivers-430/
[2] launchpad.net/~graphics-drivers/+archive/ubuntu/ppa?field.series_filter=
Back to top
stevenpusser
Status: Contributor
Joined: 14 Jan 2017
Posts: 89
Reply Quote
Ubuntu uses different package names for the driver packages, but maybe I can cherry-pick any patches they are using.
Back to top
Display posts from previous:   

All times are GMT - 8 Hours