NVIDIA driver Setup

Technical issues/questions of an intermediate or advanced nature.
donald
Full of knowledge
Full of knowledge
Posts: 1175
Joined: 17 Jun 2013, 13:17
Distribution: Porteus 3.2.2 XFCE 32bit
Location: Germany

Re: NVIDIA driver Setup

Post#16 by donald » 07 Jun 2016, 23:13

Well, i use older Hardware and NO,
i'm not happy if i can't have a nvidia driver..
I managed to build one (304.131) for Porteus 3.2 rc2..all good

Now rc3 has kernel 4.6.1 aaaand Bäng..hmmpf..the patch doesn't work
anymore with 4.6 kernels, the module won't build ..wtf.
(sometimes i feel like "men at (kernel) war"..lol)

what now?...despair?..No.
what we need is a 2nd (additional) patch:

Code: Select all

--- a/nv-mlock.c
+++ b/nv-mlock.c
@@ -49,8 +49,13 @@
     }
 
     down_read(&mm->mmap_sem);
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 6, 0)
     ret = get_user_pages(current, mm, (unsigned long)address,
             page_count, write, force, user_pages, NULL);
+#else
+    ret = get_user_pages_remote(current, mm, (unsigned long)address,
+            page_count, write, force, user_pages, NULL);
+#endif
     up_read(&mm->mmap_sem);
     pinned = ret;
 
@@ -62,7 +67,11 @@
     else if (pinned < page_count)
     {
         for (i = 0; i < pinned; i++)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 6, 0)
             page_cache_release(user_pages[i]);
+#else
+            put_page(user_pages[i]);
+#endif
         os_free_mem(user_pages);
         return RM_ERR_INVALID_ADDRESS;
     }
@@ -80,7 +89,11 @@
             {
                 pci_unmap_page(dev, pte_array[j],
                         PAGE_SIZE, PCI_DMA_BIDIRECTIONAL);
-                page_cache_release(user_pages[j]);
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 6, 0)
+            page_cache_release(user_pages[j]);
+#else
+            put_page(user_pages[j]);
+#endif
             }
             os_free_mem(user_pages);
             return RM_ERR_OPERATING_SYSTEM;
@@ -114,7 +127,11 @@
                 PAGE_SIZE, PCI_DMA_BIDIRECTIONAL);
         if (write)
             set_page_dirty_lock(user_pages[i]);
-        page_cache_release(user_pages[i]);
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 6, 0)
+            page_cache_release(user_pages[i]);
+#else
+            put_page(user_pages[i]);
+#endif
     }
 
     os_free_mem(user_pages);
aaand..BINGO...happy again.

Code: Select all

guest@porteus:~$ uname -r
4.6.1-porteus
guest@porteus:~$ lsmod | grep -i nvidia
nvidia               9787120  30
guest@porteus:~$ grep -i nvidia /var/log/Xorg.0.log
[    44.155] (II) Module glx: vendor="NVIDIA Corporation"
[    44.155] (II) NVIDIA GLX Module  304.131  Sun Nov  8 22:05:17 PST 2015
[    44.155] (II) LoadModule: "nvidia"
[    44.155] (II) Loading /usr/lib/xorg/modules/drivers/nvidia_drv.so
[    44.333] (II) Module nvidia: vendor="NVIDIA Corporation"
[    44.367] (II) NVIDIA dlloader X Driver  304.131  Sun Nov  8 21:45:40 PST 2015
[    44.367] (II) NVIDIA Unified Driver for all Supported NVIDIA GPUs
[    44.485] (**) NVIDIA(0): Depth 24, (--) framebuffer bpp 32
[    44.486] (==) NVIDIA(0): RGB weight 888
[    44.486] (==) NVIDIA(0): Default visual is TrueColor
[    44.486] (==) NVIDIA(0): Using gamma correction (1.0, 1.0, 1.0)
[    44.486] (**) NVIDIA(0): Enabling 2D acceleration
[    45.321] (II) NVIDIA(GPU-0): Display (Samsung SyncMaster (CRT-0)) does not support NVIDIA
[    45.321] (II) NVIDIA(GPU-0):     3D Vision stereo.
[    45.322] (II) NVIDIA(0): NVIDIA GPU GeForce 7050 PV / nForce 630a (C68) at PCI:0:18:0
[    45.322] (II) NVIDIA(0):     (GPU-0)
[    45.322] (--) NVIDIA(0): Memory: 262144 kBytes
[    45.322] (--) NVIDIA(0): VideoBIOS: 05.67.32.10.25
[    45.322] (--) NVIDIA(0): Interlaced video modes are supported on this GPU
[    45.322] (--) NVIDIA(0): Valid display device(s) on GeForce 7050 PV / nForce 630a at PCI:0:18:0
[    45.322] (--) NVIDIA(0):     Samsung SyncMaster (CRT-0) (connected)
[    45.322] (--) NVIDIA(0):     TV-0
[    45.322] (--) NVIDIA(0):     DFP-0
[    45.322] (--) NVIDIA(0): Samsung SyncMaster (CRT-0): 350.0 MHz maximum pixel clock
[    45.322] (--) NVIDIA(0): TV-0: 400.0 MHz maximum pixel clock
[    45.322] (--) NVIDIA(0): TV encoder: Unknown
[    45.322] (--) NVIDIA(0): DFP-0: 155.0 MHz maximum pixel clock
[    45.322] (--) NVIDIA(0): DFP-0: Internal Single Link TMDS
[    45.322] (**) NVIDIA(0): Using HorizSync/VertRefresh ranges from the EDID for display
[    45.322] (**) NVIDIA(0):     device Samsung SyncMaster (CRT-0) (Using EDID frequencies
[    45.322] (**) NVIDIA(0):     has been enabled on all display devices.)
[    45.322] (==) NVIDIA(0): 
[    45.322] (==) NVIDIA(0): No modes were requested; the default mode "nvidia-auto-select"
[    45.322] (==) NVIDIA(0):     will be used as the requested mode.
[    45.322] (==) NVIDIA(0): 
[    45.322] (II) NVIDIA(0): Validated MetaModes:
[    45.323] (II) NVIDIA(0):     "CRT-0:nvidia-auto-select"
[    45.323] (II) NVIDIA(0): Virtual screen size determined to be 1360 x 768
[    45.323] (WW) NVIDIA(0): Unable to support custom viewPortOut 1360 x 765 +0 +1
[    45.324] (WW) NVIDIA(0): Unable to support custom viewPortOut 1360 x 765 +0 +1
[    45.324] (--) NVIDIA(0): DPI set to (84, 84); computed from "UseEdidDpi" X config
[    45.325] (--) NVIDIA(0):     option
[    45.330] (II) NVIDIA(0): Setting mode "CRT-0:nvidia-auto-select"
[    45.467] (==) NVIDIA(0): Disabling shared memory pixmaps
[    45.467] (==) NVIDIA(0): Backing store enabled
[    45.467] (==) NVIDIA(0): Silken mouse enabled
[    45.468] (**) NVIDIA(0): DPMS enabled
[    45.468] (II) NVIDIA(0): [DRI2] Setup complete
[    45.468] (II) NVIDIA(0): [DRI2]   VDPAU driver: nvidia
[    45.733] (II) config/udev: Adding input device HDA NVidia Line Out Surround (/dev/input/event9)
[    45.733] (II) config/udev: Adding input device HDA NVidia Line Out CLFE (/dev/input/event10)
[    45.733] (II) config/udev: Adding input device HDA NVidia Line Out Side (/dev/input/event11)
[    45.734] (II) config/udev: Adding input device HDA NVidia Front Headphone (/dev/input/event12)
[    45.734] (II) config/udev: Adding input device HDA NVidia Front Mic (/dev/input/event5)
[    45.735] (II) config/udev: Adding input device HDA NVidia Rear Mic (/dev/input/event6)
[    45.735] (II) config/udev: Adding input device HDA NVidia Line (/dev/input/event7)
[    45.735] (II) config/udev: Adding input device HDA NVidia Line Out Front (/dev/input/event8)
[    59.127] (II) NVIDIA(GPU-0): Display (Samsung SyncMaster (CRT-0)) does not support NVIDIA
[    59.127] (II) NVIDIA(GPU-0):     3D Vision stereo.
[    59.127] (**) NVIDIA(0): Using HorizSync/VertRefresh ranges from the EDID for display
[    59.127] (**) NVIDIA(0):     device Samsung SyncMaster (CRT-0) (Using EDID frequencies
[    59.127] (**) NVIDIA(0):     has been enabled on all display devices.)
[    60.091] (II) NVIDIA(GPU-0): Display (Samsung SyncMaster (CRT-0)) does not support NVIDIA
[    60.091] (II) NVIDIA(GPU-0):     3D Vision stereo.
[    60.091] (**) NVIDIA(0): Using HorizSync/VertRefresh ranges from the EDID for display
[    60.091] (**) NVIDIA(0):     device Samsung SyncMaster (CRT-0) (Using EDID frequencies
[    60.091] (**) NVIDIA(0):     has been enabled on all display devices.)
[    60.211] (II) NVIDIA(GPU-0): Display (Samsung SyncMaster (CRT-0)) does not support NVIDIA
[    60.211] (II) NVIDIA(GPU-0):     3D Vision stereo.
[    60.212] (**) NVIDIA(0): Using HorizSync/VertRefresh ranges from the EDID for display
[    60.212] (**) NVIDIA(0):     device Samsung SyncMaster (CRT-0) (Using EDID frequencies
[    60.212] (**) NVIDIA(0):     has been enabled on all display devices.)
[    60.378] (II) NVIDIA(GPU-0): Display (Samsung SyncMaster (CRT-0)) does not support NVIDIA
[    60.378] (II) NVIDIA(GPU-0):     3D Vision stereo.
[    60.378] (**) NVIDIA(0): Using HorizSync/VertRefresh ranges from the EDID for display
[    60.378] (**) NVIDIA(0):     device Samsung SyncMaster (CRT-0) (Using EDID frequencies
[    60.378] (**) NVIDIA(0):     has been enabled on all display devices.)
guest@porteus:~$ 
8)

Evan
Warlord
Warlord
Posts: 519
Joined: 11 Apr 2016, 09:00
Distribution: Anything Cinnamon
Location: London

Re: NVIDIA driver Setup

Post#17 by Evan » 08 Jun 2016, 08:10

<removed>
Last edited by Evan on 24 Jun 2016, 11:38, edited 1 time in total.

donald
Full of knowledge
Full of knowledge
Posts: 1175
Joined: 17 Jun 2013, 13:17
Distribution: Porteus 3.2.2 XFCE 32bit
Location: Germany

Re: NVIDIA driver Setup

Post#18 by donald » 08 Jun 2016, 10:02

Hello Evan
Can't the latest 367.18 drivers be used with old hardware?
From my personal experience -- with my hardware -- probably not.
I do not remember the exact version numbers, but more than one Time i got
the "chipset not supported" message.

It also depends on a few things like:
Did nvidia drop the support and / or the Xorg and kernel version.
If it will not fit each other, the (nvidia) driver module cannot be built.

Example:
With porteus 2.0 i can use the nvidia driver 173.xx which is only 10 MB.
this driver cannot be built with newer porteus versions ( Xorg, kernel)
now i have to use 304.x which is 30 MB.
To be honest, i haven't tried all of the newer drivers because of their
growing size and dropped support.

Go here to check out which driver will (hopefully) support your hardware.
Click the version number > supported products
http://www.nvidia.com/object/unix.html

I doubt that nvidia will add support for old Hardware into newer drivers.

Post Reply