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

Post tutorials, HOWTO's and other useful resources here.
S4m4n
Black ninja
Black ninja
Posts: 34
Joined: 25 Mar 2020, 18:18
Distribution: Porteus4 X64 Mate,Trying 5 rc1

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

Post#91 by S4m4n » 31 Mar 2020, 20:26

Dear Rava,
I knew that you have that driver prepared. But since I have accomplished nvidia driver installation on other distros I thought that I can handle it on porteus too.
It is a mystery to me that despite I took the same kernel, devel, initrd, vmlinuz from you on same distro and followed the same steps explained on your guide, The final result was disappointing. you are probably a wizard :magic: Now your provided driver is working smoothly:
https://imgur.com/a/QKKE60E

Thanks for your help.

User avatar
Rava
Contributor
Contributor
Posts: 5401
Joined: 11 Jan 2011, 02:46
Distribution: XFCE 5.01 x86_64 + 4.0 i586
Location: Forests of Germany

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

Post#92 by Rava » 01 Apr 2020, 02:41

S4m4n wrote:
31 Mar 2020, 20:26
It is a mystery to me that despite I took the same kernel, devel, initrd, vmlinuz from you on same distro and followed the same steps explained on your guide, The final result was disappointing. you are probably a wizard :magic: Now your provided driver is working smoothly:
I am sure no wizard. If I were I would able to successfully compile NVIDIA-Linux-x86_64-304.137.run using the same kernel.
But I cannot, and the reason being that they stopped supporting 304.x a while ago; donald explained above why:
donald wrote:
29 Mar 2020, 18:44
The 304 driver is out of support.
AFAIK it is not possible getting it to run on a system since xorg-server 1.20
Porteus 4 with xorg 1.19 will be the last one.

nvidia-304.137-kernel 4.16.3-x86_64 (porteus 4)
(built without the 32-bit libraries.)
http://filehorst.de/d/cjsidhnG
_______________________________________________

@donald
Would it make sense to tweak Porteus 5.0rc1 into using kernel 4.16.3 and xorg-server 1.19?
How could that be done? I presume I would have at least alter 002-xorg.xzm.
Maybe I would also have to alter 000-kernel.xzm and 001-core.xzm.
Has anyone ever done this before?

BTW, I already am using the above for Porteus 4.0 as seen by the filename and the md5sum:

Code: Select all

424afaeeacbe727398306ccfca66cae6  /mnt/sda1/Porteus_4.0/porteus/base/010-nvidia-304.137-k.4.16.3-x86_64-don.xzm
CAVE! The discussion about downgrading Xorg to 1.19 was split and moved here:
[HOWTO] downgrade Xorg to 1.19 (Post by donald #76696)
Please reply about that topic in the thread linked above.
Cheers!
Yours Rava

User avatar
Rava
Contributor
Contributor
Posts: 5401
Joined: 11 Jan 2011, 02:46
Distribution: XFCE 5.01 x86_64 + 4.0 i586
Location: Forests of Germany

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

Post#93 by Rava » 06 Apr 2020, 16:43

Blaze, I tried compiling the NV driver V340.108 for 5.0rc1-pre-rc2 and your kernel 5.4.30. I also used your 05-devel:

Code: Select all

bda976e458a5762b461a22b239ae804a  05-devel_blaze_2020-04-04_gcc-9.3.0.xzm
These are the reasons it failed:

Code: Select all

-> Cleaning kernel module build directory.
   executing: 'cd ./kernel; /usr/bin/make clean'...
   /usr/bin/make: error while loading shared libraries: libguile-3.0.so.1: cannot open shared object file: No such file or directory
-> Building NVIDIA kernel module:
   executing: 'cd ./kernel; /usr/bin/make module SYSSRC=/lib/modules/5.4.30-porteus/source SYSOUT=/lib/modules/5.4.30-porteus/build NV_BUILD_MODULE_INSTANCES='...
   /usr/bin/make: error while loading shared libraries: libguile-3.0.so.1: cannot open shared object file: No such file or directory
-> 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.
Do you have any idea why that failed?

Your 05-devel and the 000-kernel.xzm should work together, or not?

000-kernel.xzm md5sum is d33c33ba339f0a94844dd73e6749daee. But it should be okay since the kernel tar archive md5sum was okay.

And Porteus usually refuses to activate a corrupted module.
Cheers!
Yours Rava

beny
Full of knowledge
Full of knowledge
Posts: 2086
Joined: 02 Jan 2011, 11:33
Location: italy

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

Post#94 by beny » 06 Apr 2020, 18:23

see your devel package if the guile version match what make want to build driver.

User avatar
Rava
Contributor
Contributor
Posts: 5401
Joined: 11 Jan 2011, 02:46
Distribution: XFCE 5.01 x86_64 + 4.0 i586
Location: Forests of Germany

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

Post#95 by Rava » 06 Apr 2020, 18:28

beny wrote:
06 Apr 2020, 18:23
see your devel package if the guile version match what make want to build driver.
I asked Blaze, who made the kernel tar ( containing crippled_sources-5.4.30-64bit.xzm - vmlinuz - 000-kernel.xzm ), which 05-devel package to use and he told me the one I used is the correct one.

Therefore I addressed the question to him…
Cheers!
Yours Rava

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

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

Post#96 by Blaze » 07 Apr 2020, 17:27

Rava, in my Slackware-current base I have this package

Code: Select all

# ls /var/lib/pkgtools/packages/*guile*
/var/lib/pkgtools/packages/guile-3.0.2-x86_64-1
guile is not a part of devel package

Code: Select all

# ls /mnt/sdb1/porteus/base/001-core/var/lib/pkgtools/packages/*guile*
/mnt/sdb1/porteus/base/001-core/var/lib/pkgtools/packages/guile-3.0.2-x86_64-1
001-core :happy62:

You can download it manually http://slackware.cs.utah.edu/pub/slackw ... 6_64-1.txz
Linux 6.6.11-porteus #1 SMP PREEMPT_DYNAMIC Sun Jan 14 12:07:37 MSK 2024 x86_64 Intel(R) Xeon(R) CPU E3-1270 v6 @ 3.80GHz GenuineIntel GNU/Linux
MS-7A12 » [AMD/ATI] Navi 23 [Radeon RX 6600] [1002:73ff] (rev c7) » Vengeance LPX 16GB DDR4 K2 3200MHz C16

beny
Full of knowledge
Full of knowledge
Posts: 2086
Joined: 02 Jan 2011, 11:33
Location: italy

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

Post#97 by beny » 07 Apr 2020, 18:26

hi blaze /root/slackware/slackware64-current/slackware64/d/guile-3.0.2-x86_64-1.txt better to adds to devel package.....

User avatar
Rava
Contributor
Contributor
Posts: 5401
Joined: 11 Jan 2011, 02:46
Distribution: XFCE 5.01 x86_64 + 4.0 i586
Location: Forests of Germany

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

Post#98 by Rava » 09 Apr 2020, 17:51

Cheers!
Yours Rava

rych
Warlord
Warlord
Posts: 622
Joined: 04 Jan 2014, 04:27
Distribution: Porteus 5.0 x64 OpenBox
Location: NZ
Contact:

Porteus Kernel Builder

Post#99 by rych » 12 Dec 2022, 07:23

Blaze wrote:
05 Nov 2022, 11:50
6.0.7
Thanks, I'm using this kernel now, and some early-boot-screen minor errors went away. Not a big deal perhaps, still feels like an update that works.

However. I'm now going to boot on a machine with a 1050Ti Nvidia GPU and got myself a few 08-nvidia modules and the latest from this forum wants to have the 5.18.8 kernel, at least it has the following folder inside:

Code: Select all

ls 08-nvidia-515.76-k.5.18.8-porteus-v5.0-x86_64/lib/modules
5.18.8-porteus/
whereas my system now has this folder instead:

Code: Select all

ls /lib/modules
6.0.7-porteus/
It won't work then I guess? What should I do? Revert back to the old kernel? Rename folders inside the nvidia xzm?
Last edited by rych on 15 Dec 2022, 13:43, edited 1 time in total.

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

Porteus Kernel Builder

Post#100 by ncmprhnsbl » 12 Dec 2022, 07:34

rych wrote:
12 Dec 2022, 07:23
It won't work then I guess? What should I do? Revert back to the old kernel? Rename folders inside the nvidia xzm?
either revert to the kernel it's built for or rebuild the nvidia driver for the new kernel are the options.
see here [HOWTO] make a xzm module driver for NVIDIA video card for the method and script to build the driver module..
Forum Rules : https://forum.porteus.org/viewtopic.php?f=35&t=44

rych
Warlord
Warlord
Posts: 622
Joined: 04 Jan 2014, 04:27
Distribution: Porteus 5.0 x64 OpenBox
Location: NZ
Contact:

Porteus Kernel Builder

Post#101 by rych » 12 Dec 2022, 07:42

ncmprhnsbl wrote:
12 Dec 2022, 07:34
or rebuild the nvidia driver for the new kernel
That looks like a rather involved procedure, not sure I can handle it within a reasonable timeframe. Hm, a difficult choice. Why must GPU driver be kernel-version specific -- doesn't seem to be the case for other Linux distros or Windows -- but I'm a novice. Thanks for a quick answer anyway.

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

Porteus Kernel Builder

Post#102 by ncmprhnsbl » 12 Dec 2022, 08:30

rych wrote:
12 Dec 2022, 07:42
Why must GPU driver be kernel-version specific -- doesn't seem to be the case for other Linux distros
:) i'm sure it's very much the case with other linux distros..
at some point, now that nvidia have open sourced their driver, it may even happen that it becomes added to the kernel itself, like other opensource drivers, but that might be a pipedream and i'd need a new card for that anyway.
nvidia has a terrible record of not supporting legacy hardware.
more likely i'd go for an amd card in future. just couldn't pass up an old quadro k4000[ for a hundred bucks :p
rych wrote:
12 Dec 2022, 07:42
That looks like a rather involved procedure
Rava probly makes it look harder than it is :D
Forum Rules : https://forum.porteus.org/viewtopic.php?f=35&t=44

User avatar
Rava
Contributor
Contributor
Posts: 5401
Joined: 11 Jan 2011, 02:46
Distribution: XFCE 5.01 x86_64 + 4.0 i586
Location: Forests of Germany

Porteus Kernel Builder

Post#103 by Rava » 12 Dec 2022, 18:11

beny wrote:
09 Dec 2022, 10:31
hi Rava why do not share the patch link?
I have to look it up first which could take some time since I did not work on that issue for many months.

me thinks donald would be quicker in getting you the patch link, though.
Cheers!
Yours Rava

rych
Warlord
Warlord
Posts: 622
Joined: 04 Jan 2014, 04:27
Distribution: Porteus 5.0 x64 OpenBox
Location: NZ
Contact:

Porteus Kernel Builder

Post#104 by rych » 13 Dec 2022, 02:19

ncmprhnsbl wrote:
12 Dec 2022, 08:30
it may even happen that it becomes added to the kernel itself, like other opensource drivers
Yes, this feels like a part of the kernel then. At least, it's my first time finding kernel updates posted in this thread "breaking" things due to incompatibility (with nvidia driver that is). I have a question: must the nvidia driver be built on the machine that actually has the target nvidia GPU?! I understand the compiling system has to have the same kernel version it's meant for, but if it doesn't actually have to have the GPU, then in principle it could be a part of the "Porteus Kernel Builder" :)

rych
Warlord
Warlord
Posts: 622
Joined: 04 Jan 2014, 04:27
Distribution: Porteus 5.0 x64 OpenBox
Location: NZ
Contact:

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

Post#105 by rych » 13 Dec 2022, 02:20

Must the nvidia driver be built on the machine that actually has the target nvidia GPU?!

Post Reply