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

 

 

 

[Solved] How to install Nvidia GPU Drivers on Debian Buster

Ask for help with issues regarding the Installations of the Debian O/S.
Post Reply
Message
Author
prashantpro
Posts: 4
Joined: 2020-03-14 07:01

[Solved] How to install Nvidia GPU Drivers on Debian Buster

#1 Post by prashantpro »

I have a HP Omen laptop. dc 1093tx which has in-built Intel Graphics and the Nvidia card (GTX 1650).

I wish to stick to using Debian Buster, but since my Nvidia driver was not installing, I tried other distro like Manjaro and that worked. I don't want to stick on Manjaro (I prefer "apt get" / "debian"). So, have attempted multiple times to install Nvidia but couldn't get it working.

Primary issue is that my monitor is not getting detected. (HDMI port is used).
Under Manjaro - here's what the working version looks like.

I installed nvidia-driver-440 which supports my GTX 1650.

Sharing output from inxi -G under Manjaro (when everything works).

Code: Select all

Graphics:
  Device-1: Intel UHD Graphics 630 driver: i915 v: kernel 
  Device-2: NVIDIA TU117M [GeForce GTX 1650 Mobile / Max-Q] driver: nvidia 
  v: 440.59 
  Display: x11 server: X.Org 1.20.7 driver: modesetting,nvidia 
  unloaded: fbdev,nouveau,vesa resolution: 1920x1080~60Hz, 1920x1080~60Hz 
  OpenGL: renderer: GeForce GTX 1650/PCIe/SSE2 v: 4.6.0 NVIDIA 440.59 
Here the OpenGL renderer is using my NVIDIA GPU. But under debian the OpenGL always stays at "Mesa Intel UHD Graphics 630"

I did read Bumblebee is not a good choice, so had not tried it earlier. But after following few articles, I gave up and tried Bumblebee as well. But that led to a screen freeze on boot.

Having gone through multiple articles, I'm not even sure right now, what steps to share (that I tried out). Could anyone please guide me, on how to properly go about installing nvidia driver (440) in Debian buster.

So far on Buster this is what I can say I tried last.

Enable

Code: Select all

# Backports repository
deb http://deb.debian.org/debian buster-backports main contrib non-free
Then installed the latest linux 5.4 kernel (had tried withou kernel update as well) along with the latest driver.

Code: Select all

apt update
apt-get install -t buster-backports nvidia-driver
Rebooted but still nvidia wasn't being used though installed. I wasn't sure how to switch to it since I ran into nvidia-settings was not showing up. (Unable to load system etc kind of message).

Had also followed the wiki and below reference:
https://linuxconfig.org/how-to-install- ... ster-linux

Any suggestions? Other than staying on Manjaro :) I'm willing to make a fresh attempt.
Last edited by prashantpro on 2020-03-27 16:24, edited 1 time in total.

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

Re: How to install Proprietary GPU Drivers on Debian Buster

#2 Post by stevepusser »

Since Manjaro is using the Nvidia to drive the display at all times, isn't the laptop hotter with reduced battery life?

I help with a Buster derviative called MX Linux...maybe that's worth a try. Try the MX 19.1 AHS variant, which has a newer kernel, firmware, and Mesa than standard Buster. We have an MX Nvidia Installer that is supposed to set up Bumblebee-nvidia for you automatically on Optimus laptops, too.

Buster does not support Nvidia Prime like Arch/Manjaro, since that requires a patched xorg.
MX Linux packager and developer

prashantpro
Posts: 4
Joined: 2020-03-14 07:01

Re: How to install Proprietary GPU Drivers on Debian Buster

#3 Post by prashantpro »

Let me clarify. I actually started off with MX Linux 19.1 when it didn't install the Nvidia drivers using the provided Nvidia installer, I tried MX Linux 19.1 AHS as well.

It did have the 5.4 kernel as I recall. But when I ran the Nvidia installer, it complained of unmet dependencies and I wasn't sure how to proceed. I then chose the Test Repo (one of the step where it says do you wish to check for latest).
Because I couldn't use installers as-is in MX Linux, I had to give up and choose Debian. Now, when that proved even more uphill (like you mentioned as well), I tried Manjaro and was happy that it at least worked. Not sure if battery was draining out or not, I didn't wish to stick to it anyway.

Since, I didn't wish to go arch-way, I was hoping for a Debian solution.

With MX I don't recall exact issues faced, but if i remember it right, then it was about some nvidia 418 vs 440 dependency issue. Let me know if I should try and share those errors here?

prashantpro
Posts: 4
Joined: 2020-03-14 07:01

Re: How to install Proprietary GPU Drivers on Debian Buster

#4 Post by prashantpro »

To give more inputs on the MX Linux point. Here's what happens on a fresh install. Do note, I didn't install it this time, but just used the Live USB to demonstrate the error message that shows up post-install as well.

Just chose "Nvidia driver installer" menu option and picked all the default options presented.
Here I'm sharing the error that one (at least me) runs into.

Code: Select all

Need driver: bumblebee-nvidia 3.2.1-20 nvidia-driver 418.74-1
 packages to install are  bumblebee-nvidia nvidia-driver nvidia-kernel-dkms primus primus-libs-ia32:i386 virtualgl virtualgl-libs:i386

Continue?
  1) yes (default)
  2) no
Press <Enter> for the default entry
Use 'q' to quit

Frontend: 
Nvidia command  = apt-get install --install-recommends --reinstall -y    bumblebee-nvidia nvidia-driver nvidia-kernel-dkms primus primus-libs-ia32:i386 virtualgl virtualgl-libs:i386
Reading package lists...
Building dependency tree...
Reading state information...
0 upgraded, 0 newly installed, 3 reinstalled, 0 to remove and 84 not upgraded.
Need to get 621 kB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 http://deb.debian.org/debian buster/main amd64 build-essential amd64 12.6 [7,576 B]
Get:2 http://mxrepo.com/mx/repo buster/non-free amd64 firmware-linux-nonfree all 20190717-1~mx19+1 [18.9 kB]
Get:3 http://mxrepo.com/mx/repo buster/ahs amd64 linux-headers-5.4.0-3-amd64 amd64 5.4.13-1~mx19+1 [595 kB]
Fetched 621 kB in 7s (86.0 kB/s)
(Reading database ... 311559 files and directories currently installed.)
Preparing to unpack .../build-essential_12.6_amd64.deb ...
Unpacking build-essential (12.6) over (12.6) ...
Preparing to unpack .../firmware-linux-nonfree_20190717-1~mx19+1_all.deb ...
Unpacking firmware-linux-nonfree (20190717-1~mx19+1) over (20190717-1~mx19+1) ...
Preparing to unpack .../linux-headers-5.4.0-3-amd64_5.4.13-1~mx19+1_amd64.deb ...
Unpacking linux-headers-5.4.0-3-amd64 (5.4.13-1~mx19+1) over (5.4.13-1~mx19+1) ...
Setting up linux-headers-5.4.0-3-amd64 (5.4.13-1~mx19+1) ...
Setting up firmware-linux-nonfree (20190717-1~mx19+1) ...
Setting up build-essential (12.6) ...
Reading package lists...
Building dependency tree...
Reading state information...
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 nvidia-driver : Depends: nvidia-driver-libs (= 418.74-1) but it is not going to be installed or
                          nvidia-driver-libs-nonglvnd (= 418.74-1) but it is not going to be installed
                 Recommends: nvidia-persistenced
E: Unable to correct problems, you have held broken packages.
groupadd: group 'video' already exists
bumblebeed: unrecognized service
Reading package lists...
Building dependency tree...
Reading state information...
Package 'nvidia-xconfig' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 84 not upgraded.
Finished

I had tried choosing Text repo but similar issues were faced.

In case anyone has inputs on Debian then do share views as well? Don't want to talk MX too much here, but as a end user any help is appreciated with either OS.

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: How to install Proprietary GPU Drivers on Debian Buster

#5 Post by Head_on_a_Stick »

stevepusser wrote:Buster does not support Nvidia Prime like Arch/Manjaro, since that requires a patched xorg.
Arch doesn't patch for PRIME (although Manjaro might) and I'm pretty sure it can be made to work in Debian.

@OP: please use the MX forums to discuss issues with that distribution. The community there is very helpful and far more knowledgeable about their tools then the users here (stevepusser excepted ofc).
deadbang

prashantpro
Posts: 4
Joined: 2020-03-14 07:01

Re: How to install Proprietary GPU Drivers on Debian Buster

#6 Post by prashantpro »

Okay, so let me share that I finally got it working on Debian. I went about reinstalling debian and followed these steps. Now, I'm not 100% sure if any of the steps could be left out, but too tired to figure this now. Here's what was done to get Debian work on my Optimus laptop. (Hybrid graphics card).

1) Downloaded and burned this ISO firmware-10.3.0-amd64-netinst.iso to USB (non-free)
2) Used the Expert mode to install Debian without a DE. (As I wanted to install BSPWM without any DE).
3) I also enabled the buster-backports repository during install itself. (Could be done later too)
4) Post installation was done, I was booted into the command prompt. (Setup is done without DE)
5) Did the typical things to get WiFi working and add my user to the 'sudo' group.
6) Installed latest kernel and kernel headers, this is required as I will be later installing the latest nvidia-driver 440.x

Code: Select all

sudo apt install linux-image-5.4.0-0.bpo.4-amd64
sudo apt install linux-headers-5.4.0-0.bpo.4-amd64
7) Installed xorg (I wasn't focused on nvidia here, just going about installing my setup prep for BSPWM).

8) Installed nvidia-driver from buster-backports which gave me the 440.x version.

Code: Select all

sudo apt install -t buster-backports nvidia-driver
Followed by:

Code: Select all

sudo reboot
9) Went about installing some bspwm, suckless-tools etc along with lightdm

10) I faced some missing firmware warnings, so fixed that by running

Code: Select all

sudo apt install firmware-linux
sudo apt install firmware-misc-nonfree


Now, to the part that really made my laptop work with the external monitor. (HDMI port required Nvidia)


1) sudo mkdir /etc/X11/xorg.conf.d/
Created this file:
/etc/X11/xorg.conf.d/10-nvidia.conf

Code: Select all

Section "ServerLayout"
	    Identifier "layout"
	    Screen 0 "nvidia"
	    Inactive "intel"
	EndSection

	Section "Device"
	    Identifier "nvidia"
	    Driver "nvidia"
	    BusID "01:00:0"
	    Option "RegistryDwords" "EnableBrightnessControl=1"
	EndSection

	Section "Screen"
	    Identifier "nvidia"
	    Device "nvidia"
	    Option "AllowEmptyInitialConfiguration"
	EndSection

	Section "Device"
	    Identifier "intel"
	    Driver "modesetting"
	EndSection

	Section "Screen"
	    Identifier "intel"
	    Device "intel"
	EndSection
2) I used lightdm, so configured it to invoke a script on login, the contents of the script are:
/usr/local/bin/optimus.sh

Code: Select all

	#!/bin/sh

	xrandr --setprovideroutputsource modesetting NVIDIA-0
	xrandr --auto
3) I did blacklist nouveau, but I think it was already blacklisted when I installed nvidia-driver (version 440.x)
cat /etc/modprobe.d/blacklist.conf

Code: Select all

                                                                             
	blacklist nouveau
Rebooted and everything worked.
That's it.

Here's the output showing nvidia driver in use:

Code: Select all

Graphics:  Device-1: Intel UHD Graphics 630 driver: i915 v: kernel 
           Device-2: NVIDIA driver: nvidia v: 440.59 
           Display: x11 server: X.Org 1.20.4 driver: modesetting,nvidia resolution: 1920x1080~60Hz, 1920x1080~60Hz 
           OpenGL: renderer: GeForce GTX 1650/PCIe/SSE2 v: 4.6.0 NVIDIA 440.59 
Just shared here, in case it helps anybody else. Now, I can stay on Debian.

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: How to install Proprietary GPU Drivers on Debian Buster

#7 Post by Head_on_a_Stick »

^ Awesome effort OP, thanks for sharing 8)
prashantpro wrote:

Code: Select all

sudo apt install linux-image-5.4.0-0.bpo.4-amd64
sudo apt install linux-headers-5.4.0-0.bpo.4-amd64
You should install the metapackages so that they're kept updated:

Code: Select all

sudo apt install -t buster-backports linux-{image,headers}-amd64
deadbang

BrandonKastning
Posts: 6
Joined: 2020-03-19 15:45

Re: How to install Proprietary GPU Drivers on Debian Buster

#8 Post by BrandonKastning »

prashantpro,

Thank you very much for this piece. I unfortunately purchased a ASUS PRIME B360-A which didn't allow me to install FreeBSD or utilize latest Debian until coming across this thread. I appreciate you bringing the solve to our community.

Have a good new years!

Best Regards,

Brandon Kastning :D

iamliamc
Posts: 2
Joined: 2021-01-10 19:23

Re: [Solved] How to install Nvidia GPU Drivers on Debian Bus

#9 Post by iamliamc »

Wish I had seen this before I started! Good stuff

Post Reply