Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Help backporting NVIDIA 510 to Bullseye

If none of the specific sub-forums seem right for your thread, ask here.
Message
Author
MiracleDinner
Posts: 81
Joined: 2022-10-20 18:18
Has thanked: 7 times

Help backporting NVIDIA 510 to Bullseye

#1 Post by MiracleDinner »

Hello,

I'm trying to backport the NVIDIA 510 driver to Debian Bullseye, for gaming purposes (specifically: I've had a lot of trouble with Steam Proton very possibly due to only having 470 drivers, and even more specifically Red Dead Redemption 2 fails to get past the launcher - on Arch and Ubuntu gaming with Proton was much more seamless including for RDR2).

Are these problems usual for Debian stable? I'm on a NVIDIA Optimus laptop with the GeForce GTX 1650 and a i7-11800H.

Having seen that the bullseye-backports doesn't offer anything newer than what is already in Bullseye, I decided to try following wiki https://wiki.debian.org/SimpleBackportCreation to backport the NVIDIA 510 driver from Unstable to Stable myself. However, I fail at the stage where I run mk-build-deps; the terminal output of this is here: https://pastebin.com/A2YtuyHK

Please could I have help in how to obtain newer NVIDIA drivers in Debian Bullseye. Could it be that I could make my build my own package - I've seen that the folders downloaded to my home folder include the .run file from NVIDIA, and the Debian developers must get the proprietary drivers from somewhere, so - could I build my own?

Thank you all very much in advance for helping, and do let me know if there's any more information I can provide that would help my case.
Last edited by MiracleDinner on 2022-11-22 17:49, edited 2 times in total.

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

Re: Help backporting NVIDIA 510 to Bullseye

#2 Post by stevepusser »

You first need to backport and use the Dkms packages from upstream, having already done this for MX Linux AHS section.
MX Linux packager and developer

MiracleDinner
Posts: 81
Joined: 2022-10-20 18:18
Has thanked: 7 times

Re: Help backporting NVIDIA 510 to Bullseye

#3 Post by MiracleDinner »

Hi! Thank you so much for helping! Could I check is it the "dh-dkms" package here: https://packages.debian.org/search?keyw ... ection=all

That package seems only available on Bookworm and Sid - was I getting an error because it's trying to pull in the package from Bullseye, but failing as Bullseye doesn't have it?

You say packages in the plural, are there any other packages I need to backport first and if so which ones specifically?

Thank you again

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

Re: Help backporting NVIDIA 510 to Bullseye

#4 Post by stevepusser »

It's the newer dh-dkms package that Debian also builds with the newer dkms, it doesn't exist in Bullseye, and it also depends on the newer dkms.

You can use my MX backport in a pinch: http://mxrepo.com/mx/repo/pool/ahs/d/dkms/

MX21 packages are built on Bullseye, MX19 on Buster. If they won't install due to some other backports requirement, they are also in our AHS repo.

Do you have a setup to do the i386 packages? Since you don't compile anything creating these Nvidia driver packages, using the "--ai386" flag (I'm going from memory, somebody correct me if I'm wrong) may work to create the i386 driver lib packages that allow 32 stuff like games to work on amd64 setups. It means "architecture i386".
MX Linux packager and developer

MiracleDinner
Posts: 81
Joined: 2022-10-20 18:18
Has thanked: 7 times

Re: Help backporting NVIDIA 510 to Bullseye

#5 Post by MiracleDinner »

Okay, so are you suggesting I run:

sudo dpkg --add-architecture i386
sudo nano /etc/apt/sources.list
(add "deb http://mxrepo.com/mx/repo/pool/ahs/d/dkms/ main contrib non-free" to the end, save and exit)
sudo apt update
sudo apt install dh-dkms

And then proceed to re-attempt the SimpleBackportCreation of nvidia-driver from Unstable?

User avatar
@ttila
Posts: 139
Joined: 2017-12-13 16:57
Has thanked: 2 times
Been thanked: 14 times

Re: Help backporting NVIDIA 510 to Bullseye

#6 Post by @ttila »

Now Nvidia 510 drivers are available in Bullseye repos.

MiracleDinner
Posts: 81
Joined: 2022-10-20 18:18
Has thanked: 7 times

Re: Help backporting NVIDIA 510 to Bullseye

#7 Post by MiracleDinner »

https://packages.debian.org/search?keyw ... ection=all

According to this search I did just now, NVIDIA 510 driver is in Testing/Bookworm and Unstable/Sid but not in Stable/Bullseye or bullseye-backports

Now that it's in testing however, might I have more luck trying to build my backport from there instead of unstable?

User avatar
@ttila
Posts: 139
Joined: 2017-12-13 16:57
Has thanked: 2 times
Been thanked: 14 times

Re: Help backporting NVIDIA 510 to Bullseye

#8 Post by @ttila »

MiracleDinner wrote: 2022-10-23 18:14 https://packages.debian.org/search?keyw ... ection=all

According to this search I did just now, NVIDIA 510 driver is in Testing/Bookworm and Unstable/Sid but not in Stable/Bullseye or bullseye-backports

Now that it's in testing however, might I have more luck trying to build my backport from there instead of unstable?
Opss, every time i confuse stable and testing. I mean Bookworm, sorry.

MiracleDinner
Posts: 81
Joined: 2022-10-20 18:18
Has thanked: 7 times

Re: Help backporting NVIDIA 510 to Bullseye

#9 Post by MiracleDinner »

Okay so it seems to be the case that to run RDR2, the solution was not to get a more recent NVIDIA driver, but to run "sudo nvidia-modprobe -u -c=0" before booting the game on Steam. It does still crash occasionally, but that's an issue I also had on Arch so I doubt it's an issue of old drivers. I'd like a way to start the game without needing to type this in a terminal and my password, but I suppose that's not for this topic.

That said, I might still want to have a go at completing the backport in case it's needed in future; would backporting dh-dkms and the driver affect the above command?

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

Re: Help backporting NVIDIA 510 to Bullseye

#10 Post by stevepusser »

MiracleDinner wrote: 2022-10-23 14:55 Okay, so are you suggesting I run:

sudo dpkg --add-architecture i386
sudo nano /etc/apt/sources.list
(add "deb http://mxrepo.com/mx/repo/pool/ahs/d/dkms/ main contrib non-free" to the end, save and exit)
sudo apt update
sudo apt install dh-dkms

And then proceed to re-attempt the SimpleBackportCreation of nvidia-driver from Unstable?
It's simpler and safer to just download the mx21 amd64 debs from the MX repo link I gave you and install them with apt on the command line. Apt will do multiple debs at once. If you use something like gdebi, install the dkms deb first. Even better, set up local-apt-repository as I added below, and just install and update the debs from it.

Come to think of it, the MX 21 debs also install and work on MX 19 when I accidentally had them in my local repo folder that pbuilder can get backports from when it builds packages, so I'm 99.9% sure they don't need any additional debs.

I would suggest you install devscripts from the Bullseye repo, which has scripts which make package building easier, and use its "debbuild" command.

For the native amd64 build, the command is just

Code: Select all

debuild -uc -us
This means build the packages, but don't require that they be signed and don't attach the source files for upload.

Once you get the native amd64 Nvidia packages built, which doesn't take that long, you can try the i386 build with

Code: Select all

debuild -B -ai386 -uc -us
The -B means to just build the binary i386 packages and not the arch-independent "all" ones that the first build did already.

The successful build will generate a whole mess of debs, and some may conflict with each other. I would suggest you install local-apt-repository from the Debian repo, create the /srv/local-apt-repository folder, put the debs in that folder, and they automagically appear as updates to apt if everything is working.
MX Linux packager and developer

MiracleDinner
Posts: 81
Joined: 2022-10-20 18:18
Has thanked: 7 times

Re: Help backporting NVIDIA 510 to Bullseye

#11 Post by MiracleDinner »

I'm really sorry to bother you again, but I'm a little confused as you seem to have advised me to download debs from your repo, but also advise me to create .deb files from a debuild command? (And I'm sure I don't just run debuild out of nowhere, so exactly what do I do first? I think I already have devscripts for some reason)

Are you sure using your packages is a better choice in my situation than backporting dh-dkms from Sid?

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

Re: Help backporting NVIDIA 510 to Bullseye

#12 Post by stevepusser »

The debuild command is for your own backports of the 510 Nvidia drivers that you mentioned, not for installing the dkms debs. Though you could practice on a backport of dkms first--it's a collection of scripts, so is an architecture-independent "all" package, thus you only need to build it once, unlike the Nvidia drivers. Plus the very latest 510 driver from Sid is patched to build on 6.0 kernels, now that those have made it into Sid. I've already backported the 6.0 kernels to MX Bullseye and Buster Advanced Hardware Support section, so also have to backport the many Nvidia drivers: 340 and 390 legacy, and the various Tesla variants. Then we have a lot of Realtek wifi drivers that we need to check and fix.
MX Linux packager and developer

MiracleDinner
Posts: 81
Joined: 2022-10-20 18:18
Has thanked: 7 times

Re: Help backporting NVIDIA 510 to Bullseye

#13 Post by MiracleDinner »

Hmmm... if backporting the driver means there's a chain reaction and I have to backport all sorts of different things including the kernel, I'm not sure it's worth it to go ahead and maybe I should just wait for Bookworm to be the next stable version (I am not keen on switching to testing branch)? Unless something comes up and I specifically need the newer driver maybe...

And are you saying I need to first backport "dkms" from sid, or "dh-dkms" from sid, or both? (I'd assume the latter based on the error in my OP)

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

Re: Help backporting NVIDIA 510 to Bullseye

#14 Post by stevepusser »

Jeesh, no. The patched drivers should build on older kernels. It's just that if you want to test a 6.0 kernel, the standard drivers won't "dkms" build a new kernel module for it, and you will end up with a black screen when you boot to 6.0.
And are you saying I need to first backport "dkms" from sid, or "dh-dkms" from sid, or both? (I'd assume the latter based on the error in my OP)
Please go back and read the thread. The MX debs will work. I wrote:
Though you could practice on a backport of dkms first
How do you get that you are required to backport dkms from that?
MX Linux packager and developer

MiracleDinner
Posts: 81
Joined: 2022-10-20 18:18
Has thanked: 7 times

Re: Help backporting NVIDIA 510 to Bullseye

#15 Post by MiracleDinner »

Okay so I ran "sudo apt install local-apt-repository" and added the MX21 debs to the folder, so I now have:
miracledinner@miracledinner-standard:~$ ls /srv/local-apt-repository
dh-dkms_3.0.3-4~mx21+1_all.deb dkms_3.0.3-4~mx21+1_all.deb
miracledinner@miracledinner-standard:~$

However running "sudo apt update && sudo apt upgrade" after that doesn't seem to install anything; am I doing something wrong?

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

Re: Help backporting NVIDIA 510 to Bullseye

#16 Post by stevepusser »

What do you get for

Code: Select all

apt policy dmks dh-dkms
If it's working right, you'll see the newer local-apt-repo versions followed by the standard Debian ones. If that seems OK, maybe neither was installed at all, so upgrade does nothing.
MX Linux packager and developer

MiracleDinner
Posts: 81
Joined: 2022-10-20 18:18
Has thanked: 7 times

Re: Help backporting NVIDIA 510 to Bullseye

#17 Post by MiracleDinner »

miracledinner@miracledinner-standard:~$ sudo apt policy dmks dh-dkms
[sudo] password for miracledinner:
N: Unable to locate package dmks
N: Unable to locate package dh-dkms
miracledinner@miracledinner-standard:~$

MiracleDinner
Posts: 81
Joined: 2022-10-20 18:18
Has thanked: 7 times

Re: Help backporting NVIDIA 510 to Bullseye

#18 Post by MiracleDinner »

As I see that the 515 drivers have come into Experimental recently, I'd like to try those if possible rather than the 510 drivers in testing. Would this be a good idea? Would the method I'm currently trying work?

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

Re: Help backporting NVIDIA 510 to Bullseye

#19 Post by stevepusser »

MiracleDinner wrote: 2022-11-02 12:20 miracledinner@miracledinner-standard:~$ sudo apt policy dmks dh-dkms
[sudo] password for miracledinner:
N: Unable to locate package dmks
N: Unable to locate package dh-dkms
miracledinner@miracledinner-standard:~$

Sorry, I made a typo, it's dkms instead of dmks.

But you don't have the dh-dkms package, anyway.

Did you install local-apt-repository and follow its instructions?
Description: Ready to use local apt repository
With this package installed, every Debian package (i.e. a *.deb file) dropped
into /srv/local-apt-repository (which you need to create first) will be
available to apt.
You can see what in that folder:

Code: Select all

$ ls /srv/local-apt-repository/
I have to clean mine out after I built and used to to test upgrade the Nvidia packages and some others...

Code: Select all

bpftool_7.0.0+6.0.2-1~mx21+1_amd64.deb
bpftool_7.0.0+6.0.2-1~mx21+1_i386.deb
hyperv-daemons_6.0.2-1~mx21+1_amd64.deb
hyperv-daemons_6.0.2-1~mx21+1_i386.deb
libcpupower1_6.0.2-1~mx21+1_amd64.deb
libcpupower1_6.0.2-1~mx21+1_i386.deb
libcuda1_510.85.02-5~mx21+1_amd64.deb
libcuda1_510.85.02-5~mx21+1_i386.deb
libegl-nvidia0_510.85.02-5~mx21+1_amd64.deb
libegl-nvidia0_510.85.02-5~mx21+1_i386.deb
libgl1-nvidia-glvnd-glx_510.85.02-5~mx21+1_amd64.deb
libgl1-nvidia-glvnd-glx_510.85.02-5~mx21+1_i386.deb
libgles-nvidia1_510.85.02-5~mx21+1_amd64.deb
libgles-nvidia1_510.85.02-5~mx21+1_i386.deb
libgles-nvidia2_510.85.02-5~mx21+1_amd64.deb
libgles-nvidia2_510.85.02-5~mx21+1_i386.deb
libglx-nvidia0_510.85.02-5~mx21+1_amd64.deb
libglx-nvidia0_510.85.02-5~mx21+1_i386.deb
libnvcuvid1_510.85.02-5~mx21+1_amd64.deb
libnvcuvid1_510.85.02-5~mx21+1_i386.deb
libnvidia-allocator1_510.85.02-5~mx21+1_amd64.deb
libnvidia-allocator1_510.85.02-5~mx21+1_i386.deb
libnvidia-cfg1_510.85.02-5~mx21+1_amd64.deb
libnvidia-compiler_510.85.02-5~mx21+1_amd64.deb
libnvidia-compiler_510.85.02-5~mx21+1_i386.deb
libnvidia-eglcore_510.85.02-5~mx21+1_amd64.deb
libnvidia-eglcore_510.85.02-5~mx21+1_i386.deb
libnvidia-encode1_510.85.02-5~mx21+1_amd64.deb
libnvidia-encode1_510.85.02-5~mx21+1_i386.deb
libnvidia-fbc1_510.85.02-5~mx21+1_amd64.deb
libnvidia-fbc1_510.85.02-5~mx21+1_i386.deb
libnvidia-glcore_510.85.02-5~mx21+1_amd64.deb
libnvidia-glcore_510.85.02-5~mx21+1_i386.deb
libnvidia-glvkspirv_510.85.02-5~mx21+1_amd64.deb
libnvidia-glvkspirv_510.85.02-5~mx21+1_i386.deb
libnvidia-ml1_510.85.02-5~mx21+1_amd64.deb
libnvidia-ml1_510.85.02-5~mx21+1_i386.deb
libnvidia-ngx1_510.85.02-5~mx21+1_amd64.deb
libnvidia-nvvm4_510.85.02-5~mx21+1_amd64.deb
libnvidia-opticalflow1_510.85.02-5~mx21+1_amd64.deb
libnvidia-opticalflow1_510.85.02-5~mx21+1_i386.deb
libnvidia-ptxjitcompiler1_510.85.02-5~mx21+1_amd64.deb
libnvidia-ptxjitcompiler1_510.85.02-5~mx21+1_i386.deb
libnvidia-rtcore_510.85.02-5~mx21+1_amd64.deb
libnvoptix1_510.85.02-5~mx21+1_amd64.deb
linux-compiler-gcc-10-x86_6.0.2-1~mx21+1_amd64.deb
linux-compiler-gcc-10-x86_6.0.2-1~mx21+1_i386.deb
linux-config-6.0_6.0.2-1~mx21+1_amd64.deb
linux-config-6.0_6.0.2-1~mx21+1_i386.deb
linux-cpupower_6.0.2-1~mx21+1_amd64.deb
linux-cpupower_6.0.2-1~mx21+1_i386.deb
linux-doc_6.0.2-1~mx21+1_all.deb
linux-doc-6.0_6.0.2-1~mx21+1_all.deb
linux-headers-6.0.0-1mx-686_6.0.2-1~mx21+1_i386.deb
linux-headers-6.0.0-1mx-686-pae_6.0.2-1~mx21+1_i386.deb
linux-headers-6.0.0-1mx-amd64_6.0.2-1~mx21+1_amd64.deb
linux-headers-6.0.0-1mx-cloud-amd64_6.0.2-1~mx21+1_amd64.deb
linux-headers-6.0.0-1mx-common_6.0.2-1~mx21+1_all.deb
linux-headers-6.0.0-1mx-common-rt_6.0.2-1~mx21+1_all.deb
linux-headers-6.0.0-1mx-rt-686-pae_6.0.2-1~mx21+1_i386.deb
linux-headers-6.0.0-1mx-rt-amd64_6.0.2-1~mx21+1_amd64.deb
linux-image-6.0.0-1mx-686-pae-unsigned_6.0.2-1~mx21+1_i386.deb
linux-image-6.0.0-1mx-686-unsigned_6.0.2-1~mx21+1_i386.deb
linux-image-6.0.0-1mx-amd64-unsigned_6.0.2-1~mx21+1_amd64.deb
linux-image-6.0.0-1mx-cloud-amd64-unsigned_6.0.2-1~mx21+1_amd64.deb
linux-image-6.0.0-1mx-rt-686-pae-unsigned_6.0.2-1~mx21+1_i386.deb
linux-image-6.0.0-1mx-rt-amd64-unsigned_6.0.2-1~mx21+1_amd64.deb
linux-image-amd64-signed-template_6.0.2-1~mx21+1_amd64.deb
linux-image-i386-signed-template_6.0.2-1~mx21+1_i386.deb
linux-kbuild-6.0_6.0.2-1~mx21+1_amd64.deb
linux-kbuild-6.0_6.0.2-1~mx21+1_i386.deb
linux-perf_6.0.2-1~mx21+1_amd64.deb
linux-perf_6.0.2-1~mx21+1_i386.deb
linux-source_6.0.2-1~mx21+1_all.deb
linux-source-6.0_6.0.2-1~mx21+1_all.deb
linux-support-6.0.0-1mx_6.0.2-1~mx21+1_all.deb
nvidia-alternative_510.85.02-5~mx21+1_amd64.deb
nvidia-alternative_510.85.02-5~mx21+1_i386.deb
nvidia-detect_510.85.02-5~mx21+1_amd64.deb
nvidia-driver_510.85.02-5~mx21+1_amd64.deb
nvidia-driver-bin_510.85.02-5~mx21+1_amd64.deb
nvidia-driver-libs_510.85.02-5~mx21+1_amd64.deb
nvidia-driver-libs_510.85.02-5~mx21+1_i386.deb
nvidia-egl-common_510.85.02-5~mx21+1_amd64.deb
nvidia-egl-common_510.85.02-5~mx21+1_i386.deb
nvidia-egl-icd_510.85.02-5~mx21+1_amd64.deb
nvidia-egl-icd_510.85.02-5~mx21+1_i386.deb
nvidia-kernel-dkms_510.85.02-5~mx21+1_amd64.deb
nvidia-kernel-source_510.85.02-5~mx21+1_amd64.deb
nvidia-kernel-support_510.85.02-5~mx21+1_amd64.deb
nvidia-legacy-check_510.85.02-5~mx21+1_amd64.deb
nvidia-libopencl1_510.85.02-5~mx21+1_amd64.deb
nvidia-libopencl1_510.85.02-5~mx21+1_i386.deb
nvidia-nonglvnd-vulkan-common_510.85.02-5~mx21+1_amd64.deb
nvidia-nonglvnd-vulkan-common_510.85.02-5~mx21+1_i386.deb
nvidia-opencl-common_510.85.02-5~mx21+1_amd64.deb
nvidia-opencl-common_510.85.02-5~mx21+1_i386.deb
nvidia-opencl-icd_510.85.02-5~mx21+1_amd64.deb
nvidia-opencl-icd_510.85.02-5~mx21+1_i386.deb
nvidia-smi_510.85.02-5~mx21+1_amd64.deb
nvidia-vdpau-driver_510.85.02-5~mx21+1_amd64.deb
nvidia-vdpau-driver_510.85.02-5~mx21+1_i386.deb
nvidia-vulkan-common_510.85.02-5~mx21+1_amd64.deb
nvidia-vulkan-common_510.85.02-5~mx21+1_i386.deb
nvidia-vulkan-icd_510.85.02-5~mx21+1_amd64.deb
nvidia-vulkan-icd_510.85.02-5~mx21+1_i386.deb
usbip_2.0+6.0.2-1~mx21+1_amd64.deb
usbip_2.0+6.0.2-1~mx21+1_i386.deb
xserver-xorg-video-nvidia_510.85.02-5~mx21+1_amd64.deb


Anyway, this Nvidia driver works and is known to support the 6.0 kernel. Get that one done first before we try a possibly buggy Experimental release.
MX Linux packager and developer

MiracleDinner
Posts: 81
Joined: 2022-10-20 18:18
Has thanked: 7 times

Re: Help backporting NVIDIA 510 to Bullseye

#20 Post by MiracleDinner »

Okay, so I've run some commands which I hope will help you to assist me. First, I verify I do have the local-apt-repository installed, and that I do have the debs in that folder. Then I run apt update, which shows it checking the local apt repository, and then run the policy command without the typo

https://pastebin.com/L1XKVNUk

Post Reply