Nvidia drivers

For drivers and kernel modules.
Message
Author
User avatar
Hesse James
Posts: 106
Joined: Mon 08 Feb 2010, 18:41

Nvidia drivers

#121 Post by Hesse James »

Hello
Xenial64 is the distribution of choice for me. It brings along all drivers I need for my Z270 mainboard (due to kernel 4.9). One disadvantage: so far no Nvidia driver in sight.
Unfortunately getnvidia64-1.0 did not work for me. Only a few files were copied into the PET or SFS file during installation. :roll:

Xenial64 specifications: Xorg 1.18.4, kernel 4.9.15.
Target computer equipped with Nvidia 9300 chipset (means Nvidia drivers 304 or 340 are suitable)

Following steps:
1.) find a driver and a suitable patch (e.g. in this thread by Peebee or in Nvidia devtalk) and apply it
2.) install the patched driver
3.) manual copy of all necessary installed driver files into the driver SFS
4.) add some headers for vdpau and GL

I would like to share my results with you.

Driver 340.98, 64 bit
http://www.mediafire.com/file/93n007dib ... nial64.sfs

Driver 304.135, 64 bit
http://www.mediafire.com/file/sgtsj26do ... nial64.sfs

Installation recommendations: for first trials of you use a fresh, frugal installation, generate a backup of your xorg.conf-file. Add nvidia-sfs with the SFS-load.
Do not run NVIDIA-SETTINGS !!! It might ruin your installation.
Reboot, ready. In case a necessary file is not available please give me a feedback.
Good luck.
Christian
Attachments
nv_DRM_patch_304.135_k4.9.tar.gz
(408 Bytes) Downloaded 336 times
nv_patch_340.98_k4.9_final.tar.gz
(809 Bytes) Downloaded 382 times

foxpup
Posts: 1132
Joined: Fri 29 Jul 2016, 21:08

optimus cards

#122 Post by foxpup »

Does anyone have experience with an nvidia Optimus card?
I have an nvidia 940MX.
It comes with an intel gc on the motherboard. That is the one that is found and used by puppylinux.
940MX needs driver 375.xx (or 381.xx). I did not succeed in compiling it yet.
But it probably needs also something like prime or bumblebee.
Any expertise with this kind of setup out there?
Help would be highly appreciated.

User avatar
bigpup
Posts: 13886
Joined: Sun 11 Oct 2009, 18:15
Location: S.C. USA

#123 Post by bigpup »

It comes with an intel gc on the motherboard. That is the one that is found and used by puppylinux.
If it has a Nvidia graphics hardware, that should be what Puppy is seeing.

Got a setting in the computers bios for what graphics hardware to use?

You will have to get Puppy to use the Nvidia hardware.
Most Puppies come with the nouveau driver, which is a generic driver for Nvidia.
Puppy should automatically use it.

This explains how to compile a driver.
http://www.murga-linux.com/puppy/viewtopic.php?t=110611

I am using the Nvidia 375.39 driver, so I know it can be compiled.
The things they do not tell you, are usually the clue to solving the problem.
When I was a kid I wanted to be older.... This is not what I expected :shock:
YaPI(any iso installer)

User avatar
Hesse James
Posts: 106
Joined: Mon 08 Feb 2010, 18:41

Nvidia drivers

#124 Post by Hesse James »

Good morning foxpup
If you are not familiar with driver compiling I would recommend you to use an available Nvidia driver package.
Shinobar made available one (375.39)... for Xenial32 only (k4.9.13) ->looks like 7.0.8.1.
http://shinobar.server-on.net/puppy/opt/pup5/xenialpup/

375.26 for Tahr32 is available too
http://shinobar.server-on.net/puppy/opt/pup5/tahrpup/

Prior to the installation, make sure that the nouveau-driver is blacklisted, despite you seem to use the Intel driver right now (your laptop seems to be equipped with Intel and Nvidia GPU ?). I cannot tell you how to switch to the Nvidia-driver. Good luck to find a solution.
Christian

foxpup
Posts: 1132
Joined: Fri 29 Jul 2016, 21:08

#125 Post by foxpup »

Hello bigpup and Hesse James.
Thanks for your quick reactions!
If it has a Nvidia graphics hardware, that should be what Puppy is seeing.

Got a setting in the computers bios for what graphics hardware to use?
Puppy sees the intel driver and not the nvidia 940MX.
from the hardinfo report:
Display
Resolution 1920x1080 pixels
Vendor The X.Org Foundation
Version 1.18.4
Monitors
Monitor 0 1920x1080 pixels
Extensions
BIG-REQUESTS
Composite
DAMAGE
DOUBLE-BUFFER
DPMS
DRI2
GLX
Generic Event Extension
MIT-SCREEN-SAVER
MIT-SHM
Present
RANDR
RECORD
RENDER
SECURITY
SGI-GLX
SHAPE
SYNC
X-Resource
XC-MISC
XFIXES
XFree86-DGA
XFree86-VidModeExtension
XINERAMA
XInputExtension
XKEYBOARD
XTEST
XVideo
OpenGL
Vendor Intel Open Source Technology Center
Renderer Mesa DRI Intel(R) HD Graphics 520 (Skylake GT2)
Version 3.0 Mesa 12.0.6
Direct Rendering Y_es
Nothing about an nvidia gc.
In the bios I can chose between both or just the intel driver. I choose 'both'.

I know how to compile, but nothing special, not on a new machine.
It is good to know it can be done, and that shinobar made pets for 375. (Did he need any patches to do it? I wonder. I don't think so: on the forums I only find about patches for 4.10 an 4.11 kernels.)
So I will try it on xenialpup64 too. I hope I can use shinobar's getnvidia64.

Trickiest thing is probably installation of the driver and have xorg use it.

@bigpup: Are you using the 375 driver on a machine with 2 graphic cards, or just one (1)?

User avatar
bigpup
Posts: 13886
Joined: Sun 11 Oct 2009, 18:15
Location: S.C. USA

#126 Post by bigpup »

@bigpup: Are you using the 375 driver on a machine with 2 graphic cards, or just one (1)?
Not exactly.
The computer does have the Intel i5 processor that has internal graphics.

My motherboard auto detects a separate graphics card plugged in and deactivates the i5 processor internal graphics.

In Pup-SysInfo->Devices->PCI Devices
Does it list the Nvidia graphics hardware?

If no. Something is keeping it from being detected.

I think this could be the problem:
The computer is setup to have Windows Nvidia driver control what graphics device gets used.
The NVIDIA Driver installed on your system will determine which video card to use for each application. Applications that do not require high performance video settings will use integrated graphics by default. If you launch an application that requires heavy video processing, your system will automatically switch to use the NVIDIA graphics processor.
I am not sure if a Linux Nvidia driver will do this.

This may give you some ideas:
http://www.pcworld.com/article/2944964/ ... ptops.html
The things they do not tell you, are usually the clue to solving the problem.
When I was a kid I wanted to be older.... This is not what I expected :shock:
YaPI(any iso installer)

User avatar
Hesse James
Posts: 106
Joined: Mon 08 Feb 2010, 18:41

Nvidia drivers

#127 Post by Hesse James »

Hi foxpup
I tried getnvidia64 with Xenial64 recently but this failed reproducibly (the pet and sfs files contained finally not all necessary driver files). So I had to install the driver manually and copy the missing files into the sfs or pet (see previous page of this thread). Maybe with the higher driver release number getnvidia64 might work again.
So try it out. Best wishes.
Christian

riedzig
Posts: 40
Joined: Thu 01 Oct 2015, 06:14

#128 Post by riedzig »

Hi Hesse James,
used your new xenial64 304.135 nvidia driver and shortly tested.
As expected, screen freezing (especially with mpv and vivaldi) has stopped, which is very good.
So far I detected negative differences using some appimages:

Qupzilla appimage (from their official site) with nouveau starts OK, with your driver a blank window starts.
Stellarium appimage with nouveau starts OK, with nvidia aborts with a message - unsufficient Open GL.

Anyway many thanks for your efforts, it would be very nice if you make the same driver for xenial 7.0.7 (kernel 4.6.3).

User avatar
Hesse James
Posts: 106
Joined: Mon 08 Feb 2010, 18:41

Nvidia drivers

#129 Post by Hesse James »

Hi Riedzig
I had a short look into Stellarium Appimage of a fresh frugal installation:
With driver 304.135 I can confirm a strange feedback about an OpenGL issue (could be clicked away and seems to have no unwanted further effect). I am not yet able to look into this Appimage whether a shared lib is missing.

Qupzilla Appimage starts without a blank screen. No problems with this.
------------------------------------------------------------------------------------
I used in a comparable test the other 340.98 driver in a fresh frugal installation. In this test no negative effects could be obtained. Therefore I recommend to use the 340 driver instead if it supports your graphics card chipset.

Concerning your final question: it seems to me that it is critical to find an optimal combination of kernel version, driver version and patch.
A combination, that works for k4.9 might be competely unuseable for 4.6 and vice versa.
In this thread a kernel (k4.6)-driver-patch combination for 32 bit was presented some pages back. I could try to apply this to the 64 bit version as you asked for (no guarantee that this will work well).
In your case I would try to use a kernel change of the 7.0.7 to the K4.9 of the latest Xenail64 instead and use the 340 Nvidia driver if possible. I had a lot of problems with the k4.6.

It's up to you.
Christian

RickGT351
Posts: 289
Joined: Tue 27 Sep 2011, 22:02
Location: Auckland, New Zealand

#130 Post by RickGT351 »

SHINOBAR, With the 64 bit version, is the procedure the same as you laid out? I am using slacko64 6.3.2

User avatar
peebee
Posts: 4370
Joined: Sun 21 Sep 2008, 12:31
Location: Worcestershire, UK
Contact:

#131 Post by peebee »

32-bit 304.135 driver patched for kernel-4.12....

NVIDIA-Linux-x86-304.135-patched-k4.12.run

Code: Select all

--- a/nv-vtophys.c	2016-12-09 20:30:08.000000000 +0100
+++ b/nv-vtophys.c	2017-05-10 10:05:28.452722808 +0200
@@ -25,6 +25,7 @@ NvU64 nv_get_phys_address(
 #else
     struct mm_struct *mm;
     pgd_t *pgd = NULL;
+    p4d_t *p4d = NULL;
     pmd_t *pmd = NULL;
     pte_t *pte = NULL;
     NvU64 retval;
@@ -41,7 +42,7 @@ NvU64 nv_get_phys_address(
     if (!NV_PGD_PRESENT(pgd))
         goto failed;
 
-    pmd = NV_PMD_OFFSET(address, pgd);
+    pmd = NV_PMD_OFFSET(address, p4d);
     if (!NV_PMD_PRESENT(pmd))
         goto failed;
 
--- a/nv-linux.h	2017-05-10 09:19:05.820789291 +0200
+++ b/nv-linux.h	2017-05-10 10:05:57.656844602 +0200
@@ -1389,11 +1389,11 @@ typedef void irqreturn_t;
 #define NV_PMD_UNMAP(pmd) pmd_unmap(pmd);
 #else
 #if defined(PUD_SHIFT) /* 4-level pgtable */
-#define NV_PMD_OFFSET(address, pgd)                     \
+#define NV_PMD_OFFSET(address, p4d)                     \
    ({                                                   \
         pmd_t *__pmd = NULL;                            \
         pud_t *__pud;                                   \
-        __pud = pud_offset(pgd, address);               \
+        __pud = pud_offset(p4d, address);               \
         if ((__pud != NULL) &&                          \
             !(pud_bad(*__pud) || pud_none(*__pud)))     \
             __pmd = pmd_offset(__pud, address);         \
ImageLxPup = Puppy + LXDE
Main version used daily: LxPupSc; Assembler of UPups, ScPup & ScPup64, LxPup, LxPupSc & LxPupSc64

Lassar
Posts: 235
Joined: Tue 08 Jul 2014, 20:01

#132 Post by Lassar »

I am trying to minimize the disk size & memory used in xenial64.

Could someone compile NVIDIA-Linux-x86_64-173.14.39-pkg2.run
for xenial64 4.9.15 kernel?

User avatar
bigpup
Posts: 13886
Joined: Sun 11 Oct 2009, 18:15
Location: S.C. USA

#133 Post by bigpup »

Lassar wrote:I am trying to minimize the disk size & memory used in xenial64.

Could someone compile NVIDIA-Linux-x86_64-173.14.39-pkg2.run
for xenial64 4.9.15 kernel?
I also needed that driver for one of my computers.
It will not work on Xenialpup's.

Basic reason:
They use X.Org server version: 1.18 or newer.
Latest X.Org server version that will work with Nvidia 173.14.39 driver, is 1.15

Also has a lot of other problems with compiling.

Linux has moved on and Nvidia has stopped updating that driver to work with newer Linux software.

The last Puppy version I got the Nvidia 173.14.39 driver to work on was Tahrpup.

Sure your hardware will not work with a newer Nvidia driver.
What does it say here:
http://www.nvidia.com/Download/index.aspx
The things they do not tell you, are usually the clue to solving the problem.
When I was a kid I wanted to be older.... This is not what I expected :shock:
YaPI(any iso installer)

Lassar
Posts: 235
Joined: Tue 08 Jul 2014, 20:01

#134 Post by Lassar »

bigpup:

I also needed that driver for one of my computers.
It will not work on Xenialpup's.

Basic reason:
They use X.Org server version: 1.18 or newer.
Latest X.Org server version that will work with Nvidia 173.14.39 driver, is 1.15
You could use woof-ce to create a xenialpup with kernel 3.14

Would not the Nvidia 173.14.39 driver work on Kernel 3.14?

User avatar
bigpup
Posts: 13886
Joined: Sun 11 Oct 2009, 18:15
Location: S.C. USA

#135 Post by bigpup »

You could use woof-ce to create a xenialpup with kernel 3.14

Would not the Nvidia 173.14.39 driver work on Kernel 3.14?
Changing the Linux kernel is not going to change the version of xorg server being used.

In fact, going back to a kernel 3 series would stop Xenialpup supporting a lot of new hardware.
The things they do not tell you, are usually the clue to solving the problem.
When I was a kid I wanted to be older.... This is not what I expected :shock:
YaPI(any iso installer)

Lassar
Posts: 235
Joined: Tue 08 Jul 2014, 20:01

#136 Post by Lassar »

Is it possible to use a older version of xorg server in xenialpup?

Or maybe to use older version of xorg server in woof-ce to create xenialpup?

User avatar
peebee
Posts: 4370
Joined: Sun 21 Sep 2008, 12:31
Location: Worcestershire, UK
Contact:

#137 Post by peebee »

Lassar wrote:Is it possible to use a older version of xorg server in xenialpup?

Or maybe to use older version of xorg server in woof-ce to create xenialpup?
FYI....
The LxPupSc iso (32-bit!!) comes with an older xorg server (10.5 from memory) in a ydrv - it might work with xenialpup but not with xenialpup64....and xenialpup may need remaking with the current woof-ce to be able to use it (but this may not be necessary depending on the woof-ce used for xenialpup).
ImageLxPup = Puppy + LXDE
Main version used daily: LxPupSc; Assembler of UPups, ScPup & ScPup64, LxPup, LxPupSc & LxPupSc64

foxpup
Posts: 1132
Joined: Fri 29 Jul 2016, 21:08

changing xorg version

#138 Post by foxpup »

So it IS possible to change version of xorg?
What is needed for that?
I am more interested in moving to xorg 1.19 (from 1.18 ) because of better optimus support (possibly). But I always thought it is very hard to change xorg.

@peebee: I know your wonderful LxPupSc HAS xorg 1.19; I am planning to use it to try out optimus support.

User avatar
peebee
Posts: 4370
Joined: Sun 21 Sep 2008, 12:31
Location: Worcestershire, UK
Contact:

Re: changing xorg version

#139 Post by peebee »

foxpup wrote:So it IS possible to change version of xorg?
What is needed for that?.
xorgwizard has logic to recognise that an alternative xorg is available and to swap from the current to the alternative. The ydrv in the LxPupSc iso is configured correctly for this mechanism. (I've not looked recently but I think the alternative is put into /opt). The process is one way and permanent -i.e. you cannot go back if you decide it was a mistake so needs to be used with care!! So all you have to do is include the ydrv in your frugal install and then run xorgwizard from the console.
ImageLxPup = Puppy + LXDE
Main version used daily: LxPupSc; Assembler of UPups, ScPup & ScPup64, LxPup, LxPupSc & LxPupSc64

step
Posts: 1349
Joined: Fri 04 May 2012, 11:20

#140 Post by step »

I just compiled the 64-bit Nvidia 340.102 driver for k.4.12.10. This set of patch files is very handy: https://github.com/minimyth2/script/nvi ... 102/files/.
[url=http://murga-linux.com/puppy/viewtopic.php?t=117546]Fatdog64-810[/url]|[url=http://goo.gl/hqZtiB]+Packages[/url]|[url=http://goo.gl/6dbEzT]Kodi[/url]|[url=http://goo.gl/JQC4Vz]gtkmenuplus[/url]

Post Reply