[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: 2252
Joined: 11 Jan 2011, 02:46
Distribution: Porteus 4.0 x86-64 XFCe
Location: Forests of Germany

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

Post#61 by Rava » 25 Jul 2019, 01:44

Back I am, but good news I have not.

Unfortunately, it is the same with the file NVIDIA-Linux-x86_64-340.107-no-compat32.run https://aur.archlinux.org/cgit/aur.git/ ... idia-340xx they are using
The sha512 sum of NVIDIA-Linux-x86_64-340.107-no-compat32.run checks okay:

Code: Select all

sha512sum NVIDIA-Linux-x86_64-340.107-no-compat32.run
0de6f182d67bd322df7ae04e74c0cde6973c55bfea47a8f2503a29f8a899cd1b801ae4b52d066628df4a4f9c84e5e7547465bdc37d1b87df47af43fdab23466f  NVIDIA-Linux-x86_64-340.107-no-compat32.run
(I take all the sha512sums from the https://aur.archlinux.org link above)

This is what I tried:

Code: Select all

./NVIDIA-Linux-x86_64-340.107-no-compat32.run  --extract-only
Creating directory NVIDIA-Linux-x86_64-340.107-no-compat32
Verifying archive integrity... OK
Uncompressing NVIDIA Accelerated Graphics Driver for Linux-x86_64 340.107.....[…]
cd NVIDIA-Linux-x86_64-340.107-no-compat32
patch -Np0 < ../nvidia-340xx_kernel-4.11.patch
patching file kernel/uvm/nvidia_uvm_lite.c
patch unexpectedly ends in middle of line
Hunk #3 succeeded at 874 with fuzz 1.
The sha512sum for my patchfile matches:

Code: Select all

# sha512sum nvidia-340xx_kernel-4.11.patch
c25d90499e1deb26129a67dd7e953be8c1e31c5770e2b8b64d03af54cf1afec1a52636e74900f8ac468692207ab8a3765a12edd581142c4d2cfd2d6e66ac7ac2  nvidia-340xx_kernel-4.11.patch
(I called my file nvidia-340xx_kernel-4.11.patch while the linked original document called it "kernel-4.11.patch", and I renamed the 5.0 and 5.1 accordingly.

sha512sum of nvidia-340xx_kernel-5.0.patch also matches.

However, sha512sum of nvidia-340xx_kernel-5.1.patch differs.

I had to add a newline at the end of the 4.11 and 5.0 patch to have a matching sha512sum; but this trick did not work for the 5.1 patch file.

______________________________

Since that all failed I now try donald's combined patch as posted above.
Cheers!
Yours Rava

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

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

Post#62 by Rava » 25 Jul 2019, 01:52

Wow… donald, are you are wizard?

I saved your code as "nvidia-340xx_kernel-4.11+5.0+5.1.patch" and removed the NVIDIA-Linux-x86_64-340.107-no-compat32 folder and re-created the original driver source folder, the very one I used to compile drivers for Porteus for many months now:

Code: Select all

./NVIDIA-Linux-x86_64-340.107.run  --extract-only
Creating directory NVIDIA-Linux-x86_64-340.107
Verifying archive integrity... OK
Uncompressing NVIDIA Accelerated Graphics Driver for Linux-x86_64 340.107.....[…]
cd NVIDIA-Linux-x86_64-340.107
And now *fanfare* the patching:

Code: Select all

# patch -Np0 < ../nvidia-340xx_kernel-4.11+5.0+5.1.patch 
patching file kernel/uvm/nvidia_uvm_lite.c
patching file kernel/nv-drm.c
patching file kernel/os-interface.c
patching file kernel/uvm/nvidia_uvm_lite.c
patching file kernel/uvm/nvidia_uvm_lite.c
patching file kernel/nv-drm.c
Since I run another 5.0rc1 with older kernel, I need to reboot to be able to start the compiling.
Hopefully it works.

And once again… Terminator voice I'll be back.
Cheers!
Yours Rava

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

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

Post#63 by Rava » 25 Jul 2019, 03:01

The script was again not able to read the driver version and so the resulting seemingly only a tiny bit buggy driver module was named
08-nvidia--k.5.1.17-porteus-v5.0-x86_64.xzm
instead of
08-nvidia-340.107-k.5.1.17-porteus-v5.0-x86_64.xzm

Files found in the driver module that should not be there:

Code: Select all

etc/localtime (symlink)
etc/localtime-copied-from (symlink)
Aside from that seems compiling all worked okay.
I removed the two above files (and manually re-created the /tmp/nvidia.tar.gz, and copied that tar.gz onto the hard drive, just to be on the safe side of things.) amd put 010-nvidia-340.107-k.5.1.17-porteus-v5.0-x86_64_rava.xzm in $PORTDIR/base/

Interestingly enough the size of the driver is much smaller than the one for kernel 4.20.5:

Code: Select all

-rwxrwxrwx 1 root 47222784 Jan 28 13:25 010-nvidia-340.107-kernel-4.20.5-porteus-v5.0-x86_64_rava.xzm
-rwxrwxrwx 1 root 42098688 Jul 25 04:22 010-nvidia-340.107-k.5.1.17-porteus-v5.0-x86_64_rava.xzm
45.04 MB vs 40.15 MB, for a xz compressed module that is quite the difference.

But sadly, X won't start:
/home/guest/.local/share/xorg/Xorg.0.log reports:

Code: Select all

[    68.009] _XSERVTransmkdir: Owner of /tmp/.X11-unix should be set to root
[    68.011] 
X.Org X Server 1.20.5
X Protocol Version 11, Revision 0
[    68.012] Build Operating System: Slackware 15.0 Slackware Linux Project
[    68.013] Current Operating System: Linux porteus.example.net 5.1.17-porteus #1 SMP PREEMPT Wed Jul 10 18:15:38 UTC 2019 x86_64
[    68.013] Kernel command line: quiet from=/mnt/sda1/Porteus_5.0/rc1F/ ramsize=15% zram=28% timezone=Europe/Berlin volume=75% kmap=de load=030-leafpad 3 fsck
[    68.014] Build Date: 30 May 2019  02:03:36PM
[    68.015]  
[    68.015] Current version of pixman: 0.38.4
[    68.016] 	Before reporting problems, check http://wiki.x.org
	to make sure that you have the latest version.
[    68.016] Markers: (--) probed, (**) from config file, (==) default setting,
	(++) from command line, (!!) notice, (II) informational,
	(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[    68.019] (==) Log file: "/home/guest/.local/share/xorg/Xorg.0.log", Time: Thu Jul 25 04:36:41 2019
[    68.020] (==) Using config file: "/etc/X11/xorg.conf"
[    68.020] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[    68.021] (==) ServerLayout "Layout0"
[    68.021] (**) |-->Screen "Screen0" (0)
[    68.021] (**) |   |-->Monitor "Monitor0"
[    68.021] (**) |   |-->Device "Device0"
[    68.021] (**) |-->Input Device "Keyboard0"
[    68.021] (**) |-->Input Device "Mouse0"
[    68.021] (==) Automatically adding devices
[    68.021] (==) Automatically enabling devices
[    68.021] (==) Automatically adding GPU devices
[    68.021] (==) Automatically binding GPU devices
[    68.021] (==) Max clients allowed: 256, resource mask: 0x1fffff
[    68.021] (WW) The directory "/usr/share/fonts/local" does not exist.
[    68.021] 	Entry deleted from font path.
[    68.021] (WW) The directory "/usr/share/fonts/OTF" does not exist.
[    68.021] 	Entry deleted from font path.
[    68.021] (WW) The directory "/usr/share/fonts/Type1" does not exist.
[    68.021] 	Entry deleted from font path.
[    68.021] (WW) The directory "/usr/share/fonts/misc" does not exist.
[    68.021] 	Entry deleted from font path.
[    68.021] (WW) The directory "/usr/share/fonts/CID" does not exist.
[    68.021] 	Entry deleted from font path.
[    68.021] (WW) The directory "/usr/share/fonts/75dpi/" does not exist.
[    68.021] 	Entry deleted from font path.
[    68.021] (WW) The directory "/usr/share/fonts/100dpi/" does not exist.
[    68.021] 	Entry deleted from font path.
[    68.021] (WW) The directory "/usr/share/fonts/75dpi" does not exist.
[    68.021] 	Entry deleted from font path.
[    68.021] (WW) The directory "/usr/share/fonts/100dpi" does not exist.
[    68.021] 	Entry deleted from font path.
[    68.021] (WW) The directory "/usr/share/fonts/cyrillic" does not exist.
[    68.021] 	Entry deleted from font path.
[    68.021] (**) FontPath set to:
	/usr/lib64/X11/fonts/TTF/,
	/usr/share/fonts/TTF
[    68.021] (==) ModulePath set to "/usr/lib64/xorg/modules"
[    68.021] (WW) Hotplugging is on, devices using drivers 'kbd', 'mouse' or 'vmmouse' will be disabled.
[    68.021] (WW) Disabling Keyboard0
[    68.021] (WW) Disabling Mouse0
[    68.021] (II) Loader magic: 0x615c60
[    68.021] (II) Module ABI versions:
[    68.021] 	X.Org ANSI C Emulation: 0.4
[    68.021] 	X.Org Video Driver: 24.0
[    68.021] 	X.Org XInput driver : 24.1
[    68.021] 	X.Org Server Extension : 10.0
[    68.022] (II) xfree86: Adding drm device (/dev/dri/card0)
[    68.028] (--) PCI:*(1@0:0:0) 10de:0a29:1179:fd30 rev 162, Mem @ 0xd2000000/16777216, 0xc0000000/268435456, 0xd0000000/33554432, I/O @ 0x00008000/128, BIOS @ 0x????????/131072
[    68.028] (II) Open ACPI successful (/var/run/acpid.socket)
[    68.028] (II) LoadModule: "glx"
[    68.029] (II) Loading /usr/lib64/xorg/modules/extensions/libglx.so
[    68.039] (II) Module glx: vendor="NVIDIA Corporation"
[    68.039] 	compiled for 4.0.2, module version = 1.0.0
[    68.039] 	Module class: X.Org Server Extension
[    68.039] (II) NVIDIA GLX Module  340.107  Thu May 24 21:40:32 PDT 2018
[    68.039] (II) LoadModule: "nvidia"
[    68.040] (II) Loading /usr/lib64/xorg/modules/drivers/nvidia_drv.so
[    68.040] (II) Module nvidia: vendor="NVIDIA Corporation"
[    68.040] 	compiled for 4.0.2, module version = 1.0.0
[    68.040] 	Module class: X.Org Video Driver
[    68.040] (II) NVIDIA dlloader X Driver  340.107  Thu May 24 21:18:05 PDT 2018
[    68.040] (II) NVIDIA Unified Driver for all Supported NVIDIA GPUs
[    68.040] (EE) 
Fatal server error:
[    68.041] (EE) parse_vt_settings: Cannot open /dev/tty0 (Permission denied)
[    68.042] (EE) 
[    68.042] (EE) 
Please consult the The X.Org Foundation support 
	 at http://wiki.x.org
 for help. 
[    68.044] (EE) Please also check the log file at "/home/guest/.local/share/xorg/Xorg.0.log" for additional information.
[    68.045] (EE) 
[    68.046] (WW) xf86CloseConsole: KDSETMODE failed: Bad file descriptor
[    68.046] (WW) xf86CloseConsole: VT_GETMODE failed: Bad file descriptor
[    68.046] (EE) Server terminated with error (1). Closing log file.
Why does it try to open tty0?
The terminal usually used for X is tty7, not tty0…

(I tried both startx and startxfce4, both result in the same error)

Any ideas what might have gone wrong?

I wanted to compare the above quoted Xorg.0.log with the 5.0rc1 running still 4.20.5 - and also Nvidia 010-nvidia-340.107-kernel-4.20.5-porteus-v5.0-x86_64_rava.xzm module, but I do not find any such file.

Code: Select all

guest@porteus:~$ find .|grep Xorg
guest@porteus:~$ 
Is Xorg.0.log only created when errors occurred?
Cheers!
Yours Rava

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

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

Post#64 by beny » 25 Jul 2019, 11:50

hi rava try to start X as root at init3

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

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

Post#65 by Rava » 25 Jul 2019, 19:19

beny wrote:
25 Jul 2019, 11:50
hi rava try to start X as root at init3
As you can see by the kernel parameters that xinit or startx or startxfce4 or whatever script logged it, I already started Porteus 5.0rc1F (F as in "Finale version", since we had a ton load of versions all called 5.0rc1) in init 3 (as I usually start all my Porteus sessions but the i586 3.1 one running a non x86-64 capable machine in init 3 - the only change I made to a new Porteus that I am testing)

But, even when it would start, I do not want my X session being started as user root.

But I try it anyway (after a reboot) since otherwise we could never narrow down the error.
_____________________________________

I forgot to mention, somewhere in the nvidia.sh creation of the module, it complained about some vdpau script missing and so no hardware decoding would be possible.
Where do I need to have this vdpau script located for nvidia.sh to find it?

_____________________________________

So, once again (the 3rd time, when I recall right) Terminator voice I'll be back.
Cheers!
Yours Rava

User avatar
Blaze
DEV Team
DEV Team
Posts: 2483
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#66 by Blaze » 26 Jul 2019, 08:15

Rava, put vdpau.sh and nvidia.sh to the same folder.
Image
Linux 5.3.0-rc3-porteus #1 SMP Mon Aug 5 11:28: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: 2252
Joined: 11 Jan 2011, 02:46
Distribution: Porteus 4.0 x86-64 XFCe
Location: Forests of Germany

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

Post#67 by Rava » 26 Jul 2019, 14:57

Blaze wrote:
26 Jul 2019, 08:15
Rava, put vdpau.sh and nvidia.sh to the same folder.
First post says
vdpau.sh - script for activate vdpau backend of the nvidia binary driver
/etc/profile.d/vdpau.sh
So, if my compiled driver would for some miraculous reason work okay, I can tweak the module by just adding the vdpau.sh into /etc/profile.d/ ?

What do you think of making this change to vdpau.sh:

Code: Select all

$ diff vdpau.sh vdpau.sh.orginal 
2d1
< # put this script into /etc/profile.d/ when you have a working Nvidia driver for your system.
Cheers!
Yours Rava

User avatar
Blaze
DEV Team
DEV Team
Posts: 2483
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#68 by Blaze » 27 Jul 2019, 07:51

Rava wrote:
26 Jul 2019, 14:57
So, if my compiled driver would for some miraculous reason work okay, I can tweak the module by just adding the vdpau.sh into /etc/profile.d/ ?
Sure. Or you can run this

Code: Select all

su
toor
sed -i 's|#export VDPAU_DRIVER="nvidia"|export VDPAU_DRIVER="nvidia"|' /etc/profile.d/vdpau.sh
Linux 5.3.0-rc3-porteus #1 SMP Mon Aug 5 11:28: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

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

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

Post#69 by fulalas » 29 Jul 2019, 03:01

Blaze wrote:
27 Jul 2019, 07:51
Sure. Or you can run this

Code: Select all

su
toor
sed -i 's|#export VDPAU_DRIVER="nvidia"|export VDPAU_DRIVER="nvidia"|' /etc/profile.d/vdpau.sh
Hmmm... This gave me a good idea to improve our script. I will update it and try to get rid of the vdpau.sh file :)

User avatar
Blaze
DEV Team
DEV Team
Posts: 2483
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#70 by Blaze » 29 Jul 2019, 17:37

fulalas, I think we have the same idea

Code: Select all

# 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
else
	echo -e "\n\e[1m\e[31mvdpau.sh couldn't be found. Hardware video decode won't work properly.\e[0m"
fi
:)
Linux 5.3.0-rc3-porteus #1 SMP Mon Aug 5 11:28: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: 2252
Joined: 11 Jan 2011, 02:46
Distribution: Porteus 4.0 x86-64 XFCe
Location: Forests of Germany

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

Post#71 by Rava » 29 Jul 2019, 22:23

Blaze wrote:
29 Jul 2019, 17:37
fulalas, I think we have the same idea

Code: Select all

# 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
else
	echo -e "\n\e[1m\e[31mvdpau.sh couldn't be found. Hardware video decode won't work properly.\e[0m"
fi
:)
The sed code would uncomment the commented-out nvidia entry.

But… what would happen if there is an valid entry after the nvidia entry?

Code: Select all

root@porteus:/etc/profile.d# mkdir -p /tmp/VDPAU-TEST/etc/profile.d
root@porteus:/etc/profile.d# cp -a /etc/profile.d/vdpau.sh /tmp/VDPAU-TEST/etc/profile.d/
root@porteus:/etc/profile.d# l /etc/profile.d/vdpau.sh /tmp/VDPAU-TEST/etc/profile.d/vdpau.sh 
-rwxr--r-- 1 root 618 2019-07-26 17:01 /etc/profile.d/vdpau.sh
-rwxr--r-- 1 root 618 2019-07-26 17:01 /tmp/VDPAU-TEST/etc/profile.d/vdpau.sh
root@porteus:/etc/profile.d# mcedit /tmp/VDPAU-TEST/etc/profile.d/vdpau.sh
now editing /tmp/VDPAU-TEST/etc/profile.d/vdpau.sh, the result is shown via a cat:

Code: Select all

root@porteus:/etc/profile.d# cat /tmp/VDPAU-TEST/etc/profile.d/vdpau.sh
#!/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"
So far, so plausible.
Now for Blaze sed code:

Code: Select all

root@porteus:/etc/profile.d# sed -i 's|#export VDPAU_DRIVER="nvidia"|export VDPAU_DRIVER="nvidia"|' /tmp/VDPAU-TEST/etc/profile.d/vdpau.sh
root@porteus:/etc/profile.d# cat /tmp/VDPAU-TEST/etc/profile.d/vdpau.sh
#!/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"
root@porteus:/etc/profile.d# 
As you can see, while sed uncommented the nvidia entry, a later entry I uncommented is still there, and would override the previous entry. Lets open a new guest shell and find out:

Code: Select all

guest@porteus:~$ . /tmp/VDPAU-TEST/etc/profile.d/vdpau.sh 
guest@porteus:~$ echo $VDPAU_DRIVER
va_gl
guest@porteus:~$ 
Is having a different value for $VDPAU_DRIVER
but "nvidia" really the desired result of the sed command?


Lets compare it to my original version of /etc/profile.d/vdpau.sh ;

Code: Select all

guest@porteus:~$ cat /etc/profile.d/vdpau.sh
#!/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"
guest@porteus:~$ . /etc/profile.d/vdpau.sh 
guest@porteus:~$ echo $VDPAU_DRIVER
nvidia
guest@porteus:~$ 
HTH in debugging the code.

Not to be picky but I would use a code that writes the whole /tmp/VDPAU-TEST/etc/profile.d/vdpau.sh completely new like so:

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
Cheers!
Yours Rava

User avatar
ncmprhnsbl
DEV Team
DEV Team
Posts: 2103
Joined: 20 Mar 2012, 03:42
Distribution: 5.0rc1-64bit all-DE+more
Location: australia
Contact:

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

Post#72 by ncmprhnsbl » 30 Jul 2019, 02:32

there is also /etc/profile.d/vdpau-va-gl.sh
which has: (uncommented)

Code: Select all

 export VDPAU_DRIVER="va_gl"

you would also need to comment or delete this, otherwise there'd be conflicting variables.. which one is loaded last?
Forum Rules : https://forum.porteus.org/viewtopic.php?f=35&t=44

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

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

Post#73 by fulalas » 30 Jul 2019, 02:48

@ncmprhnsbl, it's weird because what you say makes sense but from my tests it's not necessary. :unknown:

User avatar
Blaze
DEV Team
DEV Team
Posts: 2483
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#74 by Blaze » 30 Jul 2019, 09:16

Rava, seems I playd with vdpau.sh and commented this line

Code: Select all

#export VDPAU_DRIVER="va_gl"
Thanks Rava - I fixed it.
Linux 5.3.0-rc3-porteus #1 SMP Mon Aug 5 11:28: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

Post Reply