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

Post tutorials, HOWTO's and other useful resources here.
User avatar
Rava
Contributor
Contributor
Posts: 2232
Joined: 11 Jan 2011, 02:46
Distribution: Porteus 4.0 x86-64 XFCe
Location: Forests of Germany

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

Post#16 by Rava » 12 Jan 2019, 10:41

Blaze wrote:
12 Jan 2019, 09:31
Ok. Script was updated.
Yay! :good:
Cheers!
Yours Rava

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

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

Post#17 by francois » 14 Jan 2019, 04:33

In your howto you propose nvidia.tar.bz2 which include
/etc/modprobe.d/nvidia-installer-disable-nouveau.conf
but you do nothing with it (does it go with nvidia.sh?):

Notice that /etc/modprobe.d/nvidia-installer-disable-nouveau.conf porteus stock is already set to:

Code: Select all

# generated by nvidia-installer
blacklist nouveau
options nouveau modeset=0
Prendre son temps, profiter de celui qui passe.

User avatar
Rava
Contributor
Contributor
Posts: 2232
Joined: 11 Jan 2011, 02:46
Distribution: Porteus 4.0 x86-64 XFCe
Location: Forests of Germany

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

Post#18 by Rava » 14 Jan 2019, 04:38

francois wrote:
14 Jan 2019, 04:33
In your howto you propose nvidia.tar.bz2 which include
/etc/modprobe.d/nvidia-installer-disable-nouveau.conf
but you do nothing with it (does it go with nvidia.sh?):
I was wondering about that myself, and I have not have the time to research about all that nvidia.sh and all other components of Blaze method is really doing. I presume he can enlighten us on that enigma. :)
francois wrote:
14 Jan 2019, 04:33
Notice that /etc/modprobe.d/nvidia-installer-disable-nouveau.conf porteus stock is already set to:

Code: Select all

# generated by nvidia-installer
blacklist nouveau
options nouveau modeset=0
You mean in the .run file? When I recall right about what had to be done to create a nvidia module (which doing all by hand and without Blaze scripted help is years ago, so probably I am not recalling it 100% correct) you also have to set nvidia-installer-disable-nouveau.conf when booting the system to just compile the nvidia driver.
Cheers!
Yours Rava

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

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

Post#19 by francois » 14 Jan 2019, 15:38

blacklist.xzm and nvidia.tar.bz2 are the same. Maybe merging the final driver nvidia.xzm and blacklist.xzm would be the best thing to do, thus blacklisting included in the driver. What do you think?
Prendre son temps, profiter de celui qui passe.

User avatar
Rava
Contributor
Contributor
Posts: 2232
Joined: 11 Jan 2011, 02:46
Distribution: Porteus 4.0 x86-64 XFCe
Location: Forests of Germany

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

Post#20 by Rava » 14 Jan 2019, 16:37

francois wrote:
14 Jan 2019, 15:38
blacklist.xzm and nvidia.tar.bz2 are the same. Maybe merging the final driver nvidia.xzm and blacklist.xzm would be the best thing to do, thus blacklisting included in the driver. What do you think?
I agree, it should be merged. It is only needed once. And can be inserted into the driver by xzm2dir it out of e.g. nvidia.xzm .
Cheers!
Yours Rava

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

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

Post#21 by francois » 15 Jan 2019, 22:48

Prendre son temps, profiter de celui qui passe.

User avatar
Blaze
DEV Team
DEV Team
Posts: 2433
Joined: 28 Dec 2010, 11:31
Distribution: ⟰ Porteus current ☯ all DEs ☯
Location: ☭ Russian Federation, Lipetsk region, Dankov
Contact:

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

Post#22 by Blaze » 16 Jan 2019, 15:45

When I wrote a Russian article, it was 2016, and a lot has changed.
blacklist.xzm and nvidia.tar.bz2 are the same
I know about :) Now at my job there are a lot of tasks that I need to solve. I will look at this on this hollidays.

Отправлено спустя 1 день 36 минут 37 секунд:
Script and manual was updated.

Thanks.
Linux 5.2.0-rc1-porteus #1 SMP PREEMPT Tue May 21 08:26:55 UTC 2019 x86_64 Intel(R) Core(TM) i5-6600K CPU @ 3.50GHz GenuineIntel GNU/Linux
MS-7A12 » [AMD/ATI] Tobago PRO [Radeon R7 360 / R9 360 OEM] (rev 81) » Vengeance LPX 16GB DDR4 K2 3200MHz C16

User avatar
Rava
Contributor
Contributor
Posts: 2232
Joined: 11 Jan 2011, 02:46
Distribution: Porteus 4.0 x86-64 XFCe
Location: Forests of Germany

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

Post#23 by Rava » 19 Jan 2019, 07:01

Do you have a downloaded Version?
I always get a Internal Server Error and the download fails.
Cheers!
Yours Rava

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

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

Post#24 by francois » 19 Jan 2019, 15:35

The script is in the first post just under the link. You can copy/paste.
Prendre son temps, profiter de celui qui passe.

User avatar
Ed_P
Contributor
Contributor
Posts: 4922
Joined: 06 Feb 2013, 22:12
Distribution: 4.0 Cinnamon 64-bit ISO
Location: Western NY, USA

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

Post#25 by Ed_P » 19 Jan 2019, 17:23

The EDIT in this posting by donald shows how to merge xzm files, without the script. Kodi Krypton
Ed

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

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

Post#26 by francois » 21 Jan 2019, 23:34

The procedure works well for me:
Linux-x86_64 NVIDIA Driver Version:410.93 was built under porteus most recent version. ;) Moderators will understand.

Thanks

Edited as 20190122
Prendre son temps, profiter de celui qui passe.

User avatar
Rava
Contributor
Contributor
Posts: 2232
Joined: 11 Jan 2011, 02:46
Distribution: Porteus 4.0 x86-64 XFCe
Location: Forests of Germany

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

Post#27 by Rava » 24 Jan 2019, 23:18

Blaze wrote:
12 Jan 2019, 09:31
Ok. Script was updated.
About nvidia.sh .

What do you think of the idea of putting blacklist.xzm elsewhere, and not into $PORTDIR/base/blacklist.xzm

In my setup, I put the xzm's needed for compiling into /optional/ and named them all XXX*, e.g. like so:

Code: Select all

root@porteus:/1/Porteus_4.0rc1b/porteus/optional# ls -1 XXX*
XXX05-devel_V20190113.xzm
XXXblacklist.xzm
XXXcrippled_sources_V20190113.xzm
By doing so, I can have one standard startup for XFCE, one for Openbox, and one for NVidia compile for Porteus x.x Kernel y.y without one interfering with the other. All I have to do is separate these via the Porteus start menu entry, done by GRUB's menu.lst like so:

Code: Select all

title Porteus 4.0rc1b x86-64 NVIDIA COMPILE
rootnoverify (hd0,0)
kernel (hd0,0)/Boot/vmlinuz_Porteus_4.0rc1b_x86_64 from=/mnt/sda1/Porteus_4.0rc1b/ ramsize=40% zram=25% timezone=Europe/Berlin volume=75% kmap=de noload=xfce load=openbox;023-mtpaint_dependencies;XXX 3
initrd (hd0,0)/Boot/initrd.xz_Porteus_4.0rc1b_x86_64
boot

title Porteus 4.0rc1b x86-64 Openbox
rootnoverify (hd0,0)
kernel (hd0,0)/Boot/vmlinuz_Porteus_4.0rc1b_x86_64 from=/mnt/sda1/Porteus_4.0rc1b/ ramsize=40% zram=25% timezone=Europe/Berlin volume=75% kmap=de noload=xfce load=openbox;023-mtpaint_dependencies 3
initrd (hd0,0)/Boot/initrd.xz_Porteus_4.0rc1b_x86_64
boot

title Porteus 4.0rc1b x86-64 XFCE
rootnoverify (hd0,0)
kernel (hd0,0)/Boot/vmlinuz_Porteus_4.0rc1b_x86_64 from=/mnt/sda1/Porteus_4.0rc1b/ ramsize=40% zram=25% timezone=Europe/Berlin volume=75% kmap=de 3
initrd (hd0,0)/Boot/initrd.xz_Porteus_4.0rc1b_x86_64
boot
This of course only works if there are no other modules names XXX*.xzm, but who would name a module like so, unless it is done to mark special occasion modules, e.g. ones for GPU driver compiling :) .

And having the path of the Porteus main folder and the kernel and initrd names all follow the same naming convention is done for two reasons:
● to minimise errors by naming the folders and files in a logical, descriptive way.
● to minimise errors when editing the menu.lst by having the same folders and files naming conventions throughout different Porteus versions.

By following the same logic, it is obvious that e.g. initrd for 3.1 x86_64 would be named and to be found like so:

Code: Select all

(hd0,0)/Boot/initrd.xz_Porteus_3.1_x86_64
Cheers!
Yours Rava

fulalas
DEV Team
DEV Team
Posts: 1396
Joined: 26 Oct 2016, 15:34
Distribution: Porteus
Location: Brazil

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

Post#28 by fulalas » 07 Feb 2019, 01:30

Link to nvidia.sh is pointing to blacklist module :P

fulalas
DEV Team
DEV Team
Posts: 1396
Joined: 26 Oct 2016, 15:34
Distribution: Porteus
Location: Brazil

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

Post#29 by fulalas » 07 Feb 2019, 01:55

BTW, the script doesn't work for me with NVIDIA-Linux-x86_64-390.87:

Code: Select all

write_file: failed to create file nvidia/.wh..wh.aufs, because Operation not permitted

dir_scan: failed to make directory nvidia/.wh..wh.orph, because Operation not permitted

dir_scan: failed to make directory nvidia/.wh..wh.plnk, because Operation not permitted

create_inode: socket nvidia/tmp/.ICE-unix/5997 ignored

create_inode: socket nvidia/tmp/.ICE-unix/6445 ignored

create_inode: socket nvidia/tmp/.X11-unix/X0 ignored

create_inode: socket nvidia/tmp/.esd-1000/socket ignored
[=========================\                                    ] 2568/6027  42%
create_inode: socket nvidia/tmp/xdg-runtime-guest/keyring/control ignored

create_inode: socket nvidia/tmp/xdg-runtime-guest/keyring/pkcs11 ignored

create_inode: socket nvidia/tmp/xdg-runtime-guest/keyring/ssh ignored

create_inode: socket nvidia/tmp/xdg-runtime-guest/pulse/native ignored

create_inode: failed to create hardlink, because Operation not permitted

create_inode: failed to create hardlink, because Operation not permitted

create_inode: failed to create hardlink, because Operation not permitted

create_inode: failed to create hardlink, because Operation not permitted

create_inode: failed to create hardlink, because Operation not permitted

create_inode: failed to create hardlink, because Operation not permitted

create_inode: failed to create hardlink, because Operation not permitted

create_inode: failed to create hardlink, because Operation not permitted

create_inode: failed to create hardlink, because Operation not permitted

create_inode: failed to create hardlink, because Operation not permitted

create_inode: failed to create hardlink, because Operation not permitted

create_inode: failed to create hardlink, because Operation not permitted

create_inode: socket nvidia/var/run/NetworkManager/private-dhcp ignored

create_inode: socket nvidia/var/run/acpid.socket ignored

create_inode: socket nvidia/var/run/dbus/system_bus_socket ignored
[============================================================\ ] 6016/6027  99%

created 4082 files
created 567 directories
created 91 symlinks
created 1 devices
created 2 fifos
find: cannot delete `/tmp/nvidia/etc/udev': Directory not empty
find: cannot delete `/tmp/nvidia/etc/rc.d': Directory not empty
find: cannot delete `/tmp/nvidia/etc/profile.d': Directory not empty
find: cannot delete `/tmp/nvidia/etc/porteus': Directory not empty
find: cannot delete `/tmp/nvidia/etc/gconf': Directory not empty
find: cannot delete `/tmp/nvidia/etc/X11_': Directory not empty
find: cannot delete `/tmp/nvidia/etc/': Directory not empty
/base/blacklist.xzm does not exist

User avatar
Rava
Contributor
Contributor
Posts: 2232
Joined: 11 Jan 2011, 02:46
Distribution: Porteus 4.0 x86-64 XFCe
Location: Forests of Germany

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

Post#30 by Rava » 07 Feb 2019, 07:39

^
Since I did not write the script, I can only offer you one solution to fix these errors.

Edit the script to abort just prior creating the actual finale module. Not the first initial module that Blaze's script uses to get the altered files from the system. But prior the line creating the 2nd finale one.

Then go as root into that folder that would be converted into the final module and remove everything that is not necessary manually, like all tmp/.ICE-unix or tmp/xdg-runtime-guest and also all hardlinks.

Then do a manual dir2xzm on the just altered source folder.

When the above errors are not the actual final module, but the first one the script creates for just copying all altered files, then the fix is not that easily.

You then would have to stop the script after it does the copy operation for the first, initial module, and also after its deletion of some files.
Just then, like above, remove everything that is not necessary manually, like all tmp/.ICE-unix or tmp/xdg-runtime-guest and also all hardlinks. And again do a manual dir2xzm.

HTH!
Cheers!
Yours Rava

Post Reply