[HOWTO] make a xzm module driver for NVIDIA video card

Post tutorials, HOWTO's and other useful resources here.
i3slkiller
Contributor
Contributor
Posts: 129
Joined: 03 Feb 2020, 18:51
Distribution: Debian 12, Porteus 5.01
Location: Poland

[HOWTO] make a xzm module driver for NVIDIA video card

Post#166 by i3slkiller » 24 Sep 2024, 19:58

:hi:
Maybe try add this

Code: Select all

Section "ServerFlags"
    Option         "IgnoreABI" "1" 
EndSection
to xorg.conf next to porteusbuild and build it again. If this won't work, I have no other ideas (at least for 6.8.10 kernel).

Eventually get kernel for Porteus 5.0 (000-kernel, 06-crippled_sources-5.18.8-64bit.xzm, vmlinuz) https://linux.rz.rub.de/porteus/x86_64/ ... .0/kernel/
put (replace if exist) 000-kernel to porteus/base
06-crippled_sources* to porteus/modules
vmlinuz to boot/syslinux
reboot and build it again

* - if it will be activated before starting porteusbuild, then it can be wherever

DarthNihilus
White ninja
White ninja
Posts: 5
Joined: 24 Sep 2024, 13:35
Distribution: Porteus 5.01

[HOWTO] make a xzm module driver for NVIDIA video card

Post#167 by DarthNihilus » 03 Oct 2024, 14:20

The add to the xorg.conf file didn't help.
Following your suggestion, I tried bulding it with a fresh Porteus 5.0, and while the compilation did go threw, no GUI works with the module after reboot. The only thing that catched my eyes during the build was those lines :

Code: Select all

make[1]: Entering directory '/usr/src/linux-5.18.8'
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)
Not sure if it's normal or not. The rest of the output was similar to the one shared previously as far as I could tell.

i3slkiller
Contributor
Contributor
Posts: 129
Joined: 03 Feb 2020, 18:51
Distribution: Debian 12, Porteus 5.01
Location: Poland

[HOWTO] make a xzm module driver for NVIDIA video card

Post#168 by i3slkiller » 03 Oct 2024, 16:12

Logs would be useful, such as /var/log/Xorg.* files and dmesg command output.
For now I can only suggest try build without nvidia-uvm kmod (modified script is in 08-nvidia-340xx-fix branch)

Code: Select all

$ git diff 08-nvidia..08-nvidia-340xx-fix
diff --git a/porteus/5.01/08-nvidia/08-nvidia.PorteusBuild b/porteus/5.01/08-nvidia/08-nvidia.PorteusBuild
index b077991..fa8c302 100755
--- a/porteus/5.01/08-nvidia/08-nvidia.PorteusBuild
+++ b/porteus/5.01/08-nvidia/08-nvidia.PorteusBuild
@@ -191,13 +191,14 @@ else
   if [ $MAJORVER -le 340 ]; then
     cd kernel
     make -j$(nproc) module
-    cd uvm
-    make -j$(nproc) module
+#     cd uvm
+#     make -j$(nproc) module
 
-    cd ../..
+#     cd ..
+    cd ..
 
     install -D -m0644 kernel/nvidia.ko -t "$PKG/lib/modules/$KERNELVER/kernel/drivers/video"
-    install -D -m0644 kernel/uvm/nvidia-uvm.ko -t "$PKG/lib/modules/$KERNELVER/kernel/drivers/video"
+#     install -D -m0644 kernel/uvm/nvidia-uvm.ko -t "$PKG/lib/modules/$KERNELVER/kernel/drivers/video"
   else
     cd kernel
     make -j$(nproc) module
If this won't work, then we will check pre-patched installer https://sourceforge.net/projects/nvidia ... s/340.108/ although it will require further modifying this script (delete patching code, handle downloading/extracting valid installer based on running kernel version, etc...)

By the way I remembered that Rava had made nvidia 340.108 module without nvidia-uvm kmod inside, apparently it worked for him, but it was for 5.4.30 kernel, and Porteus 5.0rc1/2 (and have no 32-bit libs which may cause problems if eg. you want to play 32-bit 3D windows game on wine). I have both this module and suitable kernel for it, so I can share them, but only when anything else fails.
DarthNihilus wrote:
03 Oct 2024, 14:20
The only thing that catched my eyes during the build was those lines :
For me it looks like it prints exact command that will be executed, in this case

Code: Select all

test -e include/generated/autoconf.h -a -e include/config/auto.conf
checks if include/generated/autoconf.h and include/config/auto.conf files exists in /usr/src/linux-5.18.8 (and that's the case here), otherwise ( || - two pipes ) it prints "ERROR: Kernel configuration is invalid" message to stderr and triggers failure (/bin/false)

DarthNihilus
White ninja
White ninja
Posts: 5
Joined: 24 Sep 2024, 13:35
Distribution: Porteus 5.01

[HOWTO] make a xzm module driver for NVIDIA video card

Post#169 by DarthNihilus » 07 Oct 2024, 16:16

i3slkiller wrote:
03 Oct 2024, 16:12
For me it looks like it prints exact command that will be executed, in this case
Yes my bad, I tunneled vision on the "ERROR" without reading the previous line :fool:

No more luck without nvidia-uvm.

For the logs, here the last two Xorg :
https://pastebin.com/gzuQKs3v
https://pastebin.com/A2fkRc6L

And for the dmesg, I made it while on Always Fresh mode, tell me if I need to make them in a different mode (on text mode while trying to use the nv driver ? or after compilation ?)
https://pastebin.com/5rdHkpUa

Because I'm questionning myself more and more, here is what I'm doing when trying to compile and run. I'm beginning to think that I'm missing steps.
- dowload the driver, either directly from nv website, or with download.sh in a Porteus instance with a network connection (I tried both) ;
- boot Porteus in Text mode (safe), with root user ;
- run 08-nvidia.PorteusBuild ;
- cp the created xzm file inside porteus/modules/ ;
- reboot in Graphics mode.

I'll add that Porteus is running on a USB stick in NTFS, and I'm directing TMP and OUTPUT on a ext4 partition inside the internal drive.

User avatar
ncmprhnsbl
DEV Team
DEV Team
Posts: 4293
Joined: 20 Mar 2012, 03:42
Distribution: v5.0-64bit
Location: australia
Contact:

[HOWTO] make a xzm module driver for NVIDIA video card

Post#170 by ncmprhnsbl » 07 Oct 2024, 23:03

DarthNihilus wrote:
07 Oct 2024, 16:16
- boot Porteus in Text mode (safe), with root user ;
just to point out: with i3slkiller's script this isn't necessary, it will work in X with nouveau running.
looking at the xorg logs, looks like nouveau isn't being blacklisted .. check if the module includes /etc/modprobe.d/nvidia-installer-disable-nouveau.conf ..
Forum Rules : https://forum.porteus.org/viewtopic.php?f=35&t=44

User avatar
Ed_P
Contributor
Contributor
Posts: 8967
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

[HOWTO] make a xzm module driver for NVIDIA video card

Post#171 by Ed_P » 08 Oct 2024, 06:38

DarthNihilus wrote:
07 Oct 2024, 16:16
I'll add that Porteus is running on a USB stick in NTFS
FWIW I recommend exFAT for the USB stick. Less overhead, less wear. faster to dismount.

DarthNihilus
White ninja
White ninja
Posts: 5
Joined: 24 Sep 2024, 13:35
Distribution: Porteus 5.01

[HOWTO] make a xzm module driver for NVIDIA video card

Post#172 by DarthNihilus » 08 Oct 2024, 12:06

ncmprhnsbl wrote:
07 Oct 2024, 23:03
looking at the xorg logs, looks like nouveau isn't being blacklisted .. check if the module includes /etc/modprobe.d/nvidia-installer-disable-nouveau.conf ..
It does, but I could only get xorg logs while on Always fresh mode (so without NV driver running, and with nouveau active). When I try to boot with the NV module : in Graphic mode, it crashes (so I can't cp any logs), and in Text mode, I didn't find any xorg logs.
Ed_P wrote:
08 Oct 2024, 06:38
DarthNihilus wrote:
07 Oct 2024, 16:16
I'll add that Porteus is running on a USB stick in NTFS
FWIW I recommend exFAT for the USB stick. Less overhead, less wear. faster to dismount.
Will do, thanks :)

i3slkiller
Contributor
Contributor
Posts: 129
Joined: 03 Feb 2020, 18:51
Distribution: Debian 12, Porteus 5.01
Location: Poland

[HOWTO] make a xzm module driver for NVIDIA video card

Post#173 by i3slkiller » 10 Oct 2024, 11:01

i3slkiller wrote:
03 Oct 2024, 16:12
If this won't work, then we will check pre-patched installer https://sourceforge.net/projects/nvidia ... s/340.108/ although it will require further modifying this script (delete patching code, handle downloading/extracting valid installer based on running kernel version, etc...)
I checked the patched drivers (or at least that's what they are called), and it turned out that they are not fully patched (checked on 5.18.8 and 6.8.10 kernels on which driver failed to build), a waste of time.

User avatar
dreadbird
Samurai
Samurai
Posts: 182
Joined: 08 Dec 2024, 04:30
Distribution: porteus5

[HOWTO] make a xzm module driver for NVIDIA video card

Post#174 by dreadbird » 11 Dec 2024, 00:44

just an update for those compiling nvidia drivers on porteus v5.01 posting some links for the files here.

6.8.10 porteus

crippled_sources
https://www.mediafire.com/file/kli5jlty ... 6.8.10.tar
devel5
https://ftp.nluug.nl/os/Linux/distr/por ... -devel.xzm

type uname -r to find what kernel version your using should match up with above

if your using a different kernel you have to download crippled_sources from Porteus Kernel Builder
and devel5 from the release. im not sure about devel5 (so you should get it from the release just incase) but crippled_sources definately has to be from the kernel builder.

dont ask me about why hopefully save someone from grief and wasted time.

nvidia drivers working for me :hi:

DarthNihilus
White ninja
White ninja
Posts: 5
Joined: 24 Sep 2024, 13:35
Distribution: Porteus 5.01

[HOWTO] make a xzm module driver for NVIDIA video card

Post#175 by DarthNihilus » 11 Dec 2024, 17:33

dreadbird wrote:
11 Dec 2024, 00:44
nvidia drivers working for me :hi:
Which driver version is working on your end ?

From what I understood, this won't help for every NV driver. As i3slkiller stated, the "patched" driver files seems to be the root of the problem for older driver versions.

User avatar
dreadbird
Samurai
Samurai
Posts: 182
Joined: 08 Dec 2024, 04:30
Distribution: porteus5

[HOWTO] make a xzm module driver for NVIDIA video card

Post#176 by dreadbird » 12 Dec 2024, 04:53

I did the 550. so older drivers arent working so far?

User avatar
dreadbird
Samurai
Samurai
Posts: 182
Joined: 08 Dec 2024, 04:30
Distribution: porteus5

[HOWTO] make a xzm module driver for NVIDIA video card

Post#177 by dreadbird » 17 Feb 2025, 05:21

Rava wrote:
23 Dec 2018, 23:51
(Article originally posted in Russian by Blaze here Porteus и NVIDIA. Собираем актуальный драйвер для видеокарты )
This article is a joint translation effort by Blaze and Rava.
_____________________________

1. Go to the site http://nvidia.com in section ' Drivers > ALL NVIDIA DRIVERS '
Annotation: when you set the default language to be used for a website to something different than English (US), you might get a different menu. In my case I got redirected to https://www.nvidia.com/de-de/ and the menu entry is called Treiber > Alle Nvidia Treiber. Same might happen to you, you might get the menu and language in French, Spanish, Italian, whatever default language you set in your browser.

2. Manually select your NVIDIA video card, as well as the architecture of the Linux - 32-bit (i586) or 64-bit (x86_64) operating system and click on the ' Search ' button

Image

Click the ' Download ' button

Image

4. Press the ' Download ' button

Image

5. Also download 05-devel.xzm and crippled_sources.xzm (Cave! The below URLs to the 2 files are for Porteus 4.0, when you run any other version of Porteus you need to download different versions of 05-devel.xzm and crippled_sources.xzm) Updated kernel version, including crippled_sources.xzm can be obtained according to the topic - How to update kernel in Porteus:

for the Porteus operating system and 32 Bit architecture :

- 05-devel.xzm (i586)
- crippled_sources.xzm (i586)

or 64 Bit architecture :

- 05-devel.xzm (x86_64)
- crippled_sources.xzm (x86_64)


5.1 Download nvidia.sh

Code: Select all

#!/bin/bash
# Build of Nvidia video driver, cleaning and compressing to xzm module for Porteus
# You can use this script for both architectures i586 or x86_64

# Version 2019-07-30

# Written by Blaze <admin at ublaze.ru>
# Modified by fulalas
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
# permitted provided that the following conditions are met:
#
# 1. Redistributions of this script must retain the above copyright
#    notice, this list of conditions and the following disclaimer.
#
#  THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
#  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
#  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO
#  EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
#  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
#  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
#  OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
#  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
#  OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
#  ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

# Root check
if [ `whoami` != "root" ]; then
	echo -e "\e[1m\e[31mOnly root can run this.\e[0m"
	exit 1
fi

# Creating installer variable and folder
MODULES_FOLDER=$(readlink -f /mnt/live/porteus/modules)
INSTALL_TEMP_FOLDER=/tmp/nvidia-$$
mkdir $INSTALL_TEMP_FOLDER

# Checking and extracting blacklist.xzm
if [ -f blacklist.xzm ]; then
	xzm2dir blacklist.xzm $INSTALL_TEMP_FOLDER &>/dev/null
elif [ -f "$PORTDIR/optional/blacklist.xzm" ]; then
	xzm2dir "$PORTDIR/optional/blacklist.xzm" $INSTALL_TEMP_FOLDER &>/dev/null
elif [ -f "$PORTDIR/base/blacklist.xzm" ]; then
	xzm2dir "$PORTDIR/base/blacklist.xzm" $INSTALL_TEMP_FOLDER &>/dev/null
else
    echo -e "\e[1m\e[31mblacklist.xzm couldn't be found.\e[0m"
	rm -rf $INSTALL_TEMP_FOLDER
    exit 1
fi

# Selective compression and extraction of memory changes
sync; echo 3 > /proc/sys/vm/drop_caches
echo -e '\n\033[1m\e[32m[*]\e[0m\033[1m Compression of memory changes to /tmp/nvidia.tar.gz...\033[0m'
tar czf /tmp/nvidia.tar.gz --exclude={"*/.*","*/.wh.*",".cache","dev","home","mnt","opt","root","run","tmp","var","etc/bootcmd.cfg","etc/ld.so.cache","etc/fstab","etc/random-seed","etc/cups","etc/udev","etc/profile.d","etc/porteus","etc/X11/xorg.conf.nvidia-xconfig-original","lib/firmware","lib/modules/*porteus/modules.*","usr/man","usr/src","usr/bin/gnome-keyring-daemon","usr/lib/gio","usr/lib/gtk-2.0","usr/lib/gtk-3.0","usr/lib/libXvMCgallium.so.1","usr/lib/libbrscandec2.so.1","usr/lib/libgsm.so.1","usr/lib/libudev.so.1","usr/lib/libunrar.so.5","usr/lib64/gio","usr/lib64/gtk-2.0","usr/lib64/gtk-3.0","usr/lib64/libXvMCgallium.so.1","usr/lib64/libbrscandec2.so.1","usr/lib64/libgsm.so.1","usr/lib64/libudev.so.1","usr/lib64/libunrar.so.5","usr/local","usr/share/glib-2.0","usr/share/mime","usr/share/pixmaps","usr/share/applications/mimeinfo.cache","usr/local/share/applications/mimeinfo.cache","usr/share/doc/NVIDIA_GLX-1.0/html","usr/share/doc/NVIDIA_GLX-1.0/sample","usr/share/doc/NVIDIA_GLX-1.0/LICENSE","usr/share/doc/NVIDIA_GLX-1.0/NVIDIA_Changelog","usr/share/doc/NVIDIA_GLX-1.0/README.txt"} -C /mnt/live/memory changes
echo -e "\n\033[1m\e[32m[*]\e[0m\033[1m Extraction of memory changes from /tmp/nvidia.tar.gz to $INSTALL_TEMP_FOLDER...\033[0m"
tar xf /tmp/nvidia.tar.gz --strip 1 -C $INSTALL_TEMP_FOLDER

# Сleaning driver
echo -e "\n\033[1m\e[32m[*]\e[0m\033[1m Cleaning of driver directory...\033[0m"
rm -rf $INSTALL_TEMP_FOLDER/{.cache,dev,home,mnt,opt,root,run,tmp,var}
find $INSTALL_TEMP_FOLDER -type f -maxdepth 1 -delete
find $INSTALL_TEMP_FOLDER -type l -maxdepth 1 -delete
find $INSTALL_TEMP_FOLDER/etc/ -type f -maxdepth 1 -delete
find $INSTALL_TEMP_FOLDER/etc/ -type d ! -iname 'modprobe.d' ! -iname 'OpenCL' ! -iname 'vulkan' ! -iname 'X11' ! -iname 'etc' -maxdepth 1 -exec rm -rf '{}' '+'
rm -f $INSTALL_TEMP_FOLDER/etc/X11/xorg.conf.nvidia-xconfig-original
rm -rf $INSTALL_TEMP_FOLDER/lib/firmware
rm -f $INSTALL_TEMP_FOLDER/lib/modules/*porteus/modules.*
rm -rf $INSTALL_TEMP_FOLDER/usr/{man,src}
rm -f $INSTALL_TEMP_FOLDER/usr/bin/gnome-keyring-daemon
rm -rf $INSTALL_TEMP_FOLDER/usr/lib/{gio,gtk-2.0,gtk-3.0}
rm -f $INSTALL_TEMP_FOLDER/usr/lib/{libXvMCgallium.so.1,libbrscandec2.so.1,libgsm.so.1,libudev.so.1,libunrar.so.5}
rm -rf $INSTALL_TEMP_FOLDER/usr/lib64/{gio,gtk-2.0,gtk-3.0}
rm -f $INSTALL_TEMP_FOLDER/usr/lib64/{libXvMCgallium.so.1,libbrscandec2.so.1,libgsm.so.1,libudev.so.1,libunrar.so.5}
rm -rf $INSTALL_TEMP_FOLDER/usr/local
rm -rf $INSTALL_TEMP_FOLDER/usr/share/{glib-2.0,mime,pixmaps}
rm -f $INSTALL_TEMP_FOLDER/usr/{,local/}share/applications/mimeinfo.cache
rm -rf $INSTALL_TEMP_FOLDER/usr/share/doc/NVIDIA_GLX-1.0/{html,sample,LICENSE,NVIDIA_Changelog,README.txt}

# Adding vdpau hardware video decode rule
if [ -f /etc/profile.d/vdpau.sh ]; then
	mkdir -p $INSTALL_TEMP_FOLDER/etc/profile.d
	cp -a /etc/profile.d/vdpau.sh $INSTALL_TEMP_FOLDER/etc/profile.d
	sed -i 's|#export VDPAU_DRIVER="nvidia"|export VDPAU_DRIVER="nvidia"|' $INSTALL_TEMP_FOLDER/etc/profile.d/vdpau.sh
	sed -i 's|export VDPAU_DRIVER="va_gl"|#export VDPAU_DRIVER="va_gl"|' $INSTALL_TEMP_FOLDER/etc/profile.d/vdpau.sh
else
	echo -e "\n\e[1m\e[31mvdpau.sh couldn't be found. Hardware video decode won't work properly.\e[0m"
fi

# Getting driver version
case $(arch) in
	i486)	LIBDIR="/usr/lib"
			;;
	x86_64)	LIBDIR="/usr/lib64"
			;;
	*)		LIBDIRSUFFIX="/usr/lib"
			;;
esac
DRIVER_FILE=$(find $LIBDIR/libEGL_nvidia.so* \! -type l)
DRIVER_VERSION=${DRIVER_FILE: -6}

# Creating final module
MODULE_FILENAME=08-nvidia-$DRIVER_VERSION-k.$(uname -r)-$(cat /etc/porteus-version | cut -d '-' -f2)-$(arch).xzm
dir2xzm $INSTALL_TEMP_FOLDER/ /tmp/$MODULE_FILENAME 2>/dev/null
mv /tmp/$MODULE_FILENAME $MODULES_FOLDER

# Removing temporary files
rm -f /tmp/nvidia.tar.gz
rm -f /tmp/nvidia.xzm
rm -rf $INSTALL_TEMP_FOLDER

# Reboot
echo -e "\n\e[1m\e[32m[DONE]\e[0m \e[1mYou can find your Nvidia driver module in \e[96m$MODULES_FOLDER\e[0m"
echo -e "\e[1m>>> Now you can reboot Porteus via \e[92mreboot\e[0m \e[1mcommand <<<\e[0m\n"
5.2 Download blacklist.xzm to block loading nouveau
/etc/modprobe.d/nvidia-installer-disable-nouveau.conf

Code: Select all

# generated by nvidia-installer
blacklist nouveau
options nouveau modeset=0
6. Copy 05-devel.xzm, crippled_sources.xzm, blacklist.xzm to /porteus/base/

7. Restart Porteus in ' Text mode '
Image

8. Login as root - type in terminal these data from root account by default:

Code: Select all

root
toor
Image

9. Copy NVIDIA-Linux-x86-340.96.run (current version at the time of this writing, or a differnt version needed for your card), nvidia.sh to the /tmp directory.
Note. Nvidia driver and nvidia.sh can to be located not only at /tmp.
If your PC has a small amount of memory (RAM) - recommendation to put these stuff on the Linux partition (e.g. ext2, ext3, ext4, etc...), for example /mnt/partition-of-your-hard-drive
Warning! This file system are must to support Unix / Linux File Permissions.
For convenience, you can use the Midnight Commander. Enter the command

Code: Select all

mc
  • in the right column of Midnight Commander, open the directory /tmp
  • in the left column of the Midnight Commander, find the files NVIDIA-Linux-x86-340.96.run and vdpau.sh
  • copy these files from the left column to the right column with an open /tmp directory and press F10
Or start mc with the known paths e.g. like so (put your actual source folder name in here instead of my example)

Code: Select all

mc /mnt/path/to/nvidia-files /tmp
Image

10. Then enter the commands:

Code: Select all

cd /tmp
chmod +x NVIDIA-Linux-x86-340.96.run 
chmod +x nvidia.sh 
./NVIDIA-NVIDIA-Linux-x86-340.96.run
11. A message will appear.

Code: Select all

Please read the following LICENSE and then select either "Accept" to accept the license and continue with the installation, or select "Do Not Accept" to abort the installation.
Image

After reading, select and confirm the message by clicking ' Accept '. Now the driver will compile.

Image

12. If you compile the driver for the x86_64 architecture, then you will get the message:

Code: Select all

Install NVIDIA's 32-bit compatibility libraries?
  • if you want to play Windows games via Wine or Steam, you will need to answer 'Yes'.
    Note. If you answered 'Yes', then you need to install Wine and 0050-compat32-multilib-lite-x86_64 (if you have a 64-bit operating system)
    link for x86 | link for x86_64
  • if you don't want to play Windows games via Wine or Steam, you will need to disagree and choose 'No'.
13. Confirm the following message

Code: Select all

Please read the following LICENSE and then select either "Accept" to accept the license and continue with the installation, or select "Do Not Accept" to abort the installation.
Image

We answer positively by choosing ' Yes '

14. A message will appear.

Code: Select all

Your X configuration file has been successfully updated. Installation of the NVIDIA Accelerated Graphics Driver for Linux-x86 (version: 340.96) is now comleted.
Image

depending on the architecture it may be

Code: Select all

Your X configuration file has been successfully updated. Installation of the NVIDIA Accelerated Graphics Driver for Linux-x86_64 (version: 340.96) is now comleted.
Click ' OK '

15. In the terminal, enter the command to build the xzm module, the subsequent cleaning of unnecessary trash and its reassembly.

Code: Select all

./nvidia.sh
The nvidia-390.87-k.4.18.5-porteus-v4.0-x86_64.xzm module (you will have a different module name) will be copied to /mnt/sdXx/porteus/modules (where Xx, the letter and partition number of your Porteus folder)

Other examples of module names:
  • nVidia-340.96-porteus-v3.2rc2-i586.xzm
  • nVidia-340.96-porteus-v3.2rc2-x86_64.xzm
16. After which Porteus will be rebooted. For it run this command:
Note. If need you can remove blacklist.xzm from /porteus/base/ or move it to another place.

Code: Select all

reboot
That's all - download Porteus in the usual ' Graphics mode ' mode and use all the charms of the NVIDIA driver.

Screenshots :
Image

Image
I have run this a few times and it works great. As mentioned above newer than 550 it probably wont work. But I have one question that I couldnt seem to figure out. What is vdpau.sh? mentioned in the above?

User avatar
francois
Contributor
Contributor
Posts: 6514
Joined: 28 Dec 2010, 14:25
Distribution: xfce plank porteus nemesis
Location: Le printemps, le printemps, le printemps... ... l'hiver s'essoufle.

[HOWTO] make a xzm module driver for NVIDIA video card

Post#178 by francois » 18 Feb 2025, 17:31

Nvidia modules are available in the kernel folder
https://ftp.nluug.nl/os/Linux/distr/por ... 01/kernel/
Prendre son temps, profiter de celui qui passe.

User avatar
dreadbird
Samurai
Samurai
Posts: 182
Joined: 08 Dec 2024, 04:30
Distribution: porteus5

[HOWTO] make a xzm module driver for NVIDIA video card

Post#179 by dreadbird » 19 Feb 2025, 01:34

You can make a file called vdpau.sh and put it next to nvidia.sh

vdpau.sh:

Code: Select all

echo '#!/bin/sh
# put this script into /etc/profile.d/ when you have a working Nvidia driver for your system.

# Disable debugging output of the vdpau backend
export VDPAU_LOG=0

# Use the vdpau backend of the nvidia binary driver
export VDPAU_DRIVER="nvidia"

# Use the vdpau backend of the nouveau driver
#export VDPAU_DRIVER="nouveau"

# Use the vdpau backend of the r300 driver
#export VDPAU_DRIVER="r300"

# Use the vdpau backend of the r600 driver
#export VDPAU_DRIVER="r600"

# Use the vdpau backend of the radeonsi driver
#export VDPAU_DRIVER="radeonsi"

# Use the va-api/opengl backend
#export VDPAU_DRIVER="va_gl"'>/tmp/VDPAU-TEST/etc/profile.d/vdpau.sh 
You could do this with the installer as well. But as its older it may not even be necessary.

just using the installer with nvidia.sh and the .run driver works fine for me

benjibasson
Samurai
Samurai
Posts: 191
Joined: 06 Mar 2019, 15:14
Distribution: Arch linux

[HOWTO] make a xzm module driver for NVIDIA video card

Post#180 by benjibasson » 11 Mar 2025, 22:35

Hi,
i'm unable to make xzm module or install NVIDIA driver: Althought I started porteus 5.01 with text mode with 05,06 and blacklist on base folder,the NVIDIA****.run is always printing it cannot install because missing files

Code: Select all

  In file included from /tmp/selfgz1295/NVIDIA-Linux-x86_64-340.108/kernel/nv.c:12:
   /tmp/selfgz1295/NVIDIA-Linux-x86_64-340.108/kernel/os-interface.h:27:10: fatal error: stdarg.h: No such file or directory
      27 | #include <stdarg.h>
         |          ^~~~~~~~~~
   compilation terminated.
   make[3]: *** [scripts/Makefile.build:243: /tmp/selfgz1295/NVIDIA-Linux-x86_64-340.108/kernel/nv.o] Error 1
   make[2]: *** [/usr/src/linux-6.8.10/Makefile:1921: /tmp/selfgz1295/NVIDIA-Linux-x86_64-340.108/kernel] Error 2
   make[1]: *** [Makefile:240: __sub-make] Error 2
   make[1]: Leaving directory '/usr/src/linux-6.8.10'
   NVIDIA: left KBUILD.
   nvidia.ko failed to build!
   make: *** [Makefile:197: nvidia.ko] Error 1
-> Error.
ERROR: Unable to build the NVIDIA kernel module.
ERROR: Installation has failed.  Please see the file '/var/log/nvidia-installer.log' for details.  You may find suggestions on fixing installation problems in the README available on the Linux driver download page at www.nvidia.com.
full log https://pastebin.com/yUxyTc1C
I have choose Nvidia GeForce 300M serie laptop on the website

here is the computer:
HP pavillon dv7-3145ef
Porteus 5.01 x86_64
Intel Core i5-430M
Mémoire vive 4 Go
Type de mémoire vive DDR3-SDRAM
Capacité de stockage principal 640 Go
Type de stockage principal 5400tr/mn
Interface de stockage principal Serial ATA
Puce graphique Nvidia GeForce GT 320M
Quantité de mémoire graphique 1024 Mo
Norme Wi-Fi Wi-Fi 802.11b, Wi-Fi 802.11g, Wi-Fi 802.11n
Ethernet 10/100 Non
Ethernet 100/1000 Oui
Sortie son 2.0
Sortie S/PDIF Oui
Sortie DisplayPort Non
Sortie HDMI Oui

Post Reply