This article assumes you're running Fatdog64, but it would also work (with some changes) for 64-bit Puppy Linux too. The variations are also given.
You can do this by opening terminal and running lspci
,
or you can launch "System Information" from Control Panel
(or just launch hardinfo
) and then viewing Devices / PCI Devices
section.
For the rest of this example I'm going to use Nvidia driver 340.104
as an example. It's actual filename is
NVIDIA-Linux-x86_64-340.104.run
, and I will refer to this
as the Nvidia tarball for the rest of the steps.
Please understand to replace references to this with your own tarball name.
For example, at the time of writing, kernel 4.14 is the "bleeding edge". Nvidia driver 340.104 don't support anything newer than 4.12 yet.
If you want to run it on 4.13 or 4.14 kernels, you need patches, for example, from here: https://devtalk.nvidia.com/default/topic/1025051/fully-working-patches-2-of-them-for-nvidia-driver-340-104-compiler-installer-file-and-linux-kernels-4-13-amp-4-14/?offset=1
Note 1: The following steps will work for either creating the SFS or direct installation. If you are doing direct installation, just skip the parts that mention "sandbox".
Note 2: The steps below is for Fatdog64 700 onwards.
If you're on Puppy Linux, please note the additional steps meant for Puppy. For Fatdog, you can do this while running in RAM (first boot) but for Puppy, you need to create a savefile first because sandbox does not work when Puppy doesn't have a savefile.
For older Fatdogs, use the Puppy Linux instructions (except the part about deleting /tmp).
sandbox.sh
rm -f /tmp; mkdir /tmp
echo "blacklist nouveau" > /etc/modprobe.d/nouveau.conf
So, if you plan to install 32-bit library (most probably yes if you plan to use Wine to run 3D games), you need to install it to /usr/lib32 and also include /usr/lib32 to the system library search path.
echo /usr/lib32 >> /etc/ld.so.conf
cp /path/to/NVIDIA-Linux-x86_64-340.104.run /mnt/sb/fakeroot/tmp
cd /tmp sh NVIDIA-Linux-x86_64-340.104.run -x
cd NVIDIA* ./nvidia-installer -a -ui=none --no-nouveau-check --no-x-check --no-kernel-module
For Puppy Linux, run the following instead of the above:
cd NVIDIA* ./nvidia-installer -a -ui=none --no-nouveau-check --no-x-check --no-kernel-module --compat32-libdir=lib32
Note the addition of compat32-libdir
parameter to tell the installer
to install 32-bit libraries to /usr/lib32
instead of the default /usr/lib
.
Do you want to install 32-bit compatibility library?
Answer: As needed (either yes or no). Most probably yes if you want to use the driver with Wine to play games.
Do you want to run nvidia-xconfig?
Answer: NO. If you answer yes, it will create configuration not compatible with modern Xorg.
patch -Np1 -i /tmp/patch-filename.patch
Note: If your model have the support for video acceleration,
you will have the uvm
module. If not, then skip that part.
cd kernel make module make module-install cd uvm make module make module-install
For Puppy Linux, you will need to set this one up manually later after you boot (actual step not included because I'm not sure where the Xorg config file is stored for Puppy Linux).
cat > /etc/X11/xorg.conf.d/20-gpudriver.conf << EOF Section "Device" Identifier "Device0" Driver "nvidia" #Choose the driver used for this monitor EndSection EOF
nvidia-settings
manually later on.
cat > /etc/control-panel-applets.dir/nvidia << "EOF" # insert nvidia control to desktop front=${TAB2_DESKTOP%%|*} back=${TAB2_DESKTOP#*|} TAB2_DESKTOP="${front}|nvidia-settings ${back}" EOF
depmod -a
If you use sandbox, don't do this, and read on.
cd /tmp sb2dir.sh nvidia rox nvidia
This will copy the contents of your sandbox to /tmp/nvidia, and ROX-Filer will open it. From here, you can delete some unnecessary files.
Here are the files you can delete:
etc/ld.so.cache
var
root
tmp
(Puppy Linux only)
When done, close ROX-Filer window. Note: If you're running this from Linux console, obviously you can't use Rox. Do the equivalent thing to clean up the files.
dir2sfs nvidia
Older Fatdogs may not have dir2sfs, use mksquashfs directly:
mksquashfs nvidia nvidia.sfs
For Puppy Linux with dir2sfs support, use dir2sfs
as above.
Otherwise use dir2pet
, and follow the usual prompts when
creating a PET package.
dir2pet nvidia
Then exit and close terminal #2.
Then exit and close terminal #1.
After the SFS is loaded, run
depmod -a
Then reboot.