LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 02-27-2021, 05:58 AM   #1
AndrewMartin
LQ Newbie
 
Registered: Jul 2012
Location: London, UK
Distribution: Debian
Posts: 12

Rep: Reputation: Disabled
Can't startx after installing non-free nvidia drivers.


I'm having trouble starting X once I've installed the non free nvidia drivers. I'm using a fairly minimal Debian 10, when installing the distro I refuse a desktop environment and then install openbox and xinit. I start X either by calling startx, or installing lightdm.

Following the advice of on Debian Wiki at https://wiki.debian.org/NvidiaGraphicsDrivers for Debian 10 "Buster" I end up with a blacklisted nouveau. When I call startx I get an error like "cannot start in framebuffer mode".

I've installed the headers for my kernel, but I suspect that the error is something to do with having the wrong kernel or wrong kernel headers for this setup.

I realize that I may not have followed the instructions in Debian Wiki correctly, there's a lot of info on that page. To clarify, I have added non-free and contrib in my apt sources, and updated apt. I've installed non-free-misc and nvidia-driver, as recommended by nvidia-detect and the wiki. I've also installed the kernel headers for my kernel (linux-headers-4.19.0-14-amd64, linux-headers-4.19.0-14-common, linux-headers-amd64).

Some of the confusion might be in the required driver, Debian Wiki says that Nvidia GeForce GT 1030 is supported by drivers 460.39 (nvidia-driver in buster-backports non-free contrib), 418.181.07 (nvidia-driver in buster non-free contrib), and 390.138 (nvidia-legacy-390xx-driver in buster non-free contrib).

I seem to get trouble performance from nouveau, worse than no GPU according to glmark2.

I've attached the outputs from the recommended system calls (lspci, uname, lshw, nvidia-detect).

When I tried to install the proprietary drivers from the Nvidia website, the install fails as it can't find kernel-drm. I'll be happy to install the non-free drivers, or the website drivers, (or even nouveau if it gives decent performance).

What might I do next?

Cheers,

Andrew
Attached Files
File Type: txt linux-questions.txt (6.0 KB, 39 views)
 
Old 02-27-2021, 06:49 AM   #2
Gad
Member
 
Registered: May 2013
Distribution: FreeBSD
Posts: 566

Rep: Reputation: 114Reputation: 114
Can you post the output of the dmesg command?
 
Old 02-27-2021, 07:13 AM   #3
AndrewMartin
LQ Newbie
 
Registered: Jul 2012
Location: London, UK
Distribution: Debian
Posts: 12

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Gad View Post
Can you post the output of the dmesg command?
Tricky, I've popped back to nouveau as I use this machine for work. I've attached a current dmesg in case it's useful. Else, I can try to reproduce the issue but I'd need to get back to a working state before monday.

Let me know if a dmesg with the error reproduced is essential and I'll do it.

Cheers,

Andrew
Attached Files
File Type: txt dmesg-nouveau.txt (82.6 KB, 32 views)
 
Old 02-27-2021, 07:34 AM   #4
Gad
Member
 
Registered: May 2013
Distribution: FreeBSD
Posts: 566

Rep: Reputation: 114Reputation: 114
Here is a standard sources.list for a system running the Stable version of Debian:

Code:
# Security updates
deb http://security.debian.org/ buster/updates main contrib non-free
deb-src http://security.debian.org/ buster/updates main contrib non-free

## Debian mirror

# Base repository
deb https://deb.debian.org/debian buster main contrib non-free
deb-src https://deb.debian.org/debian buster main contrib non-free

# Stable updates
deb https://deb.debian.org/debian buster-updates main contrib non-free
deb-src https://deb.debian.org/debian buster-updates main contrib non-free

# Stable backports
deb https://deb.debian.org/debian buster-backports main contrib non-free
deb-src https://deb.debian.org/debian buster-backports main contrib non-free
Run the following and see what happens

Code:
apt-get update
Code:
apt install --fix-missing
 
1 members found this post helpful.
Old 02-27-2021, 07:40 AM   #5
AndrewMartin
LQ Newbie
 
Registered: Jul 2012
Location: London, UK
Distribution: Debian
Posts: 12

Original Poster
Rep: Reputation: Disabled
I've taken some steps to reproduce. I've ensured I've got contrib and non-free in my sources

Code:
# /etc/apt/sources.list
deb http://deb.debian.org/debian/ buster main non-free contrib
deb-src http://deb.debian.org/debian/ buster main non-free contrib
deb http://security.debian.org/debian-security buster/updates main non-free contrib
deb-src http://security.debian.org/debian-security buster/updates main non-free contrib
deb http://deb.debian.org/debian/ buster-updates main non-free contrib
deb-src http://deb.debian.org/debian/ buster-updates main non-free contrib
I updated, upgraded and installed nvidia-driver.
Code:
$ sudo apt update
$ sudo apt upgrade
$ sudo apt install nvidia-driver
The stdout was long (243 lines, so it's attached as text)

I saw some warning lines..

Code:
Job for nvidia-persistenced.service failed because the control process exited with error code.
See "systemctl status nvidia-persistenced.service" and "journalctl -xe" for details.
Code:
W: Possible missing firmware /lib/firmware/nvidia/gv100/acr/ucode_load.bin for module nouveau
The output of "systemctl status nvidia-persistenced.service" follows:

Code:
# sudo systemctl status nvidia-persistenced.service
  nvidia-persistenced.service - NVIDIA Persistence Daemon
   Loaded: loaded (/lib/systemd/system/nvidia-persistenced.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Sat 2021-02-27 13:20:57 GMT; 1min 44s ago
  Process: 10355 ExecStart=/usr/bin/nvidia-persistenced --user nvpd (code=exited, status=1/FAILURE)
  Process: 10357 ExecStopPost=/bin/rm -rf /var/run/nvidia-persistenced (code=exited, status=0/SUCCESS)

Feb 27 13:20:57 platina systemd[1]: Starting NVIDIA Persistence Daemon...
Feb 27 13:20:57 platina nvidia-persistenced[10356]: Started (10356)
Feb 27 13:20:57 platina nvidia-persistenced[10356]: Failed to open libnvidia-cfg.so.1: libnvidia-cfg.so.1: cannot open shared object file: No such file or dire
Feb 27 13:20:57 platina systemd[1]: nvidia-persistenced.service: Control process exited, code=exited, status=1/FAILURE
Feb 27 13:20:57 platina nvidia-persistenced[10355]: nvidia-persistenced failed to initialize. Check syslog for more details.
Feb 27 13:20:57 platina nvidia-persistenced[10356]: Shutdown (10356)
Feb 27 13:20:57 platina systemd[1]: nvidia-persistenced.service: Failed with result 'exit-code'.
Feb 27 13:20:57 platina systemd[1]: Failed to start NVIDIA Persistence Daemon.
Regarding the error ["Possible missing firmware /lib/firmware/nvidia/gv100/acr/ucode_load.bin for module nouveau" I searched apt for the file ucode_load.bin

Code:
amartin@platina:~$ apt-file search ucode_load.bin
firmware-misc-nonfree: /lib/firmware/nvidia/gm200/acr/ucode_load.bin
firmware-misc-nonfree: /lib/firmware/nvidia/gm204/acr/ucode_load.bin
firmware-misc-nonfree: /lib/firmware/nvidia/gm206/acr/ucode_load.bin
firmware-misc-nonfree: /lib/firmware/nvidia/gm20b/acr/ucode_load.bin
firmware-misc-nonfree: /lib/firmware/nvidia/gp100/acr/ucode_load.bin
firmware-misc-nonfree: /lib/firmware/nvidia/gp102/acr/ucode_load.bin
firmware-misc-nonfree: /lib/firmware/nvidia/gp104/acr/ucode_load.bin
firmware-misc-nonfree: /lib/firmware/nvidia/gp106/acr/ucode_load.bin
firmware-misc-nonfree: /lib/firmware/nvidia/gp107/acr/ucode_load.bin
firmware-misc-nonfree: /lib/firmware/nvidia/gp108/acr/ucode_load.bin
firmware-misc-nonfree: /lib/firmware/nvidia/gp10b/acr/ucode_load.bin
None of which are gv100/acr/ucode_load.bin, and I have firmware-misc-nonfree installed anyway. Plus I'm not sure if I'm bothered about missing firmweare for nouveau.

I then purged nvidia-driver, ran 'apt autoremove' installed libnvidia-legacy-390xx-cfg1 and then reinstalled nvidia-driver to see if anything was different.

That didn't show any new errors, but still the nvidia-persistenced service wouldn't start

Code:
amartin@platina:~$ sudo systemctl status nvidia-persistenced.service
nvidia-persistenced.service - NVIDIA Persistence Daemon
   Loaded: loaded (/lib/systemd/system/nvidia-persistenced.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Sat 2021-02-27 13:26:42 GMT; 1min 12s ago
  Process: 31245 ExecStart=/usr/bin/nvidia-persistenced --user nvpd (code=exited, status=1/FAILURE)
  Process: 31251 ExecStopPost=/bin/rm -rf /var/run/nvidia-persistenced (code=exited, status=0/SUCCESS)

Feb 27 13:26:42 platina systemd[1]: Starting NVIDIA Persistence Daemon...
Feb 27 13:26:42 platina nvidia-persistenced[31246]: Started (31246)
Feb 27 13:26:42 platina nvidia-persistenced[31246]: Failed to query NVIDIA devices. Please ensure that the NVIDIA device files (/dev/nvidia*) exist, and that user 113 has read and write permissions for those files.
Feb 27 13:26:42 platina nvidia-persistenced[31246]: Shutdown (31246)
Feb 27 13:26:42 platina nvidia-persistenced[31245]: nvidia-persistenced failed to initialize. Check syslog for more details.
Feb 27 13:26:42 platina systemd[1]: nvidia-persistenced.service: Control process exited, code=exited, status=1/FAILURE
Feb 27 13:26:42 platina systemd[1]: nvidia-persistenced.service: Failed with result 'exit-code'.
Feb 27 13:26:42 platina systemd[1]: Failed to start NVIDIA Persistence Daemon.
I'll restart now, and post dmesg if X doesn't start. If it does start I'll say thanks!

I won't be able to post until later today though.

Cheers,

Andrew
Attached Files
File Type: txt install-nvidia-driver-stdout.txt (13.5 KB, 14 views)

Last edited by AndrewMartin; 02-27-2021 at 12:26 PM.
 
Old 02-27-2021, 12:12 PM   #6
Brains
Senior Member
 
Registered: Apr 2009
Distribution: All OS except Apple
Posts: 1,591

Rep: Reputation: 389Reputation: 389Reputation: 389Reputation: 389
Here's my angle.
I've tried in the distant past to install a minimal Debian and then build it up myself to try and keep it lean and mean. I could never get everything to work like a generic Debian install, learned my lesson and just accept the default setup and I'm not wasting time troubleshooting. Apparently you need this unit for work...
Not the route I would take based on my past experiences on a computer that needs to work.

You don't mention if this is an Optimus system or not. I don't have Optimus, but do have the ability to use either Intel or Nvidia graphics. I get "nvidia-persistenced.service" errors when I boot with Intel graphics. Because the Nvidia graphics device is not present/non-existing when I boot with Intel, but all Nvidia stuff is installed. So perhaps you have Optimus and need to install other stuff because with Optimus systems, everything goes through Intel graphics, Intel graphics are the base graphics and Nvidia is only used when needed.

You have the proper firmware installed, you'll find the file at---> /lib/firmware/nvidia/gv100/acr/ucode_load.bin. When installing nvidia-driver, proper headers and build essentials will be downloaded and installed/configured automatically.

Normally Debian installs nvidia-driver without hickups on any of my systems. The problems you describe suggest either you are missing some X libraries or other libraries due to minimal desktop install, or you have Optimus and need to install other stuff.

What kind of computer is this? Specs pls.
 
1 members found this post helpful.
Old 02-27-2021, 12:25 PM   #7
AndrewMartin
LQ Newbie
 
Registered: Jul 2012
Location: London, UK
Distribution: Debian
Posts: 12

Original Poster
Rep: Reputation: Disabled
Here's some info on the computer from the top of lshw.

Code:
description: Space-saving Computer
    product: OptiPlex 7020 (05A5)
    vendor: Dell Inc.
    version: 00
    serial: 80PGQ52
    width: 64 bits
    capabilities: smbios-2.7 dmi-2.7 smp vsyscall32
    configuration: administrator_password=disabled boot=normal chassis=space-saving frontpanel_password=disabled keyboard_password=disabled power-on_password=disabled sku=05A5 uuid=44454C4C-3000-1050-8047-B8C04F513532
It's a little tower, it requires a low profile graphics card. I thought optimus was only a concern for laptops, but I admit I'd not heard of optimus at all before starting to troubleshoot this graphics card.

It's possible I'm missing certain packages, I felt the install was fairly standard, I just didn't want to choose a desktop environment because Openbox wasn't on the list and that's my preference since I used Crunchbang about a decade ago.

Do you think there might be some xorg-* packages I'm missing?
 
Old 02-27-2021, 12:43 PM   #8
AndrewMartin
LQ Newbie
 
Registered: Jul 2012
Location: London, UK
Distribution: Debian
Posts: 12

Original Poster
Rep: Reputation: Disabled
So, after restart I got the same error.

This is what gets posted to stderr when I run startx.

Code:
X.Org X Server 1.20.4
X Protocol Version 11, Revision 0
Build Operating System: Linux 4.19.0-12-amd64 x86_64 Debian
Current Operating System: Linux platina 4.19.0-14-amd64 #1 SMP Debian 4.19.171-2 (2021-01-30) x86_64
Kernel command line: BOOT_IMAGE=/vmlinuz-4.19.0-14-amd64 root=/dev/mapper/platina--vg-root ro quiet
Build Date: 01 December 2020  05:59:57PM
xorg-server 2:1.20.4-1+deb10u2 (https://www.debian.org/support) 
Current version of pixman: 0.36.0
	Before reporting problems, check http://wiki.x.org
	to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
	(++) from command line, (!!) notice, (II) informational,
	(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Sat Feb 27 18:31:34 2021
(==) Using config file: "/etc/X11/xorg.conf"
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
xf86EnableIOPorts: failed to set IOPL for I/O (Operation not permitted)
(EE) 
Fatal server error:
(EE) Cannot run in framebuffer mode. Please specify busIDs        for all framebuffer devices
(EE) 
(EE) 
Please consult the The X.Org Foundation support 
	 at http://wiki.x.org
 for help. 
(EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
(EE) 
(EE) Server terminated with error (1). Closing log file.
xinit: giving up
xinit: unable to connect to X server: Connection refused
xinit: server error
If I try booting straight into graphical mode, I just get a flashing cursor in the top left of an otherwise black screen.

I've attached the new dmesg.

To get back to a graphical environment I had to 'apt purge *nvidia*', unblacklist nouveau and reboot.

From this thread it seems like adding backports to my apt sources, and checking I'm not missing any graphical/desktop packages might help.
Attached Files
File Type: txt dmesg-nvidia-multi-user.txt (59.0 KB, 15 views)
 
Old 02-27-2021, 12:56 PM   #9
Brains
Senior Member
 
Registered: Apr 2009
Distribution: All OS except Apple
Posts: 1,591

Rep: Reputation: 389Reputation: 389Reputation: 389Reputation: 389
EDITED:
Wrong advice.

Last edited by Brains; 02-28-2021 at 05:20 AM.
 
Old 02-27-2021, 01:05 PM   #10
Gad
Member
 
Registered: May 2013
Distribution: FreeBSD
Posts: 566

Rep: Reputation: 114Reputation: 114
When the screen goes blank are you able to switch to tty2 and run startx or xinit manually? It may give some additional errors which could help troubleshoot
 
Old 02-27-2021, 08:56 PM   #11
X-LFS-2010
Member
 
Registered: Apr 2016
Posts: 510

Rep: Reputation: 58
nv drivers or nvidia drivers? "legacy" (cough) sounds like driver nv.

YOU DIDN'T MENTION IF IT'S AN AGP. YOU MUST HAVE KERNEL CONFIGURED FOR YOUR CARD AGP OPTIONS. debian usually does that. but it's still important you check they didn't do something silly: that the agp kernel module is int he kernel (and any modules loaded when you boot in /etc/modules). If it's PCIe, then don't do that.

NVidia releases quality drivers for Xorg not for debian. You need the NVidia driver for the version of Xorg your runnning. Get the driver from NVidia.

make sure your xorg.conf has driver as "nv" loaded: but really follow instructions that the NVIDIA driver come with. completely ignore debian's instructions.

and start X using "X" not startx, just to be sure none of the scripts are hacking your startup while your testing.

That is all. It will work if it ever did. It probably did if NVidia said it did.
 
Old 02-27-2021, 09:05 PM   #12
X-LFS-2010
Member
 
Registered: Apr 2016
Posts: 510

Rep: Reputation: 58
"cannot start in framebuffer mode"

NOTE: this may be incorrect for your card:

fb must be selected as a kernel option, also AGP. you have to have certain "fb console" set up if you intend to have a desktop and text consoles (meaning, not booting straight into X, and since yo9u don't know how to boot straight into X, i'll assume that you want consoles)

fb consoles are tricky.

"old video card + AGP + needs fbconsole" == TROUBLES

it works - but you need know some ins and outs and ... it's really hacky.

let me be REALLY CLEAR: if your card is AGP and not exactly supported by the kernel IT WILL NEVER WORK. so check that first if your card is AGP. (or considered buying a used pcie card off amazon that's a little newer?)

------------------------

if you were loading a NEW Xorg server with SEMI-RECENT Nvidia card and the "nvidia" driver PCIe. "it just works". possibly one driver option to place.

I believe GeForce GT 1030 on pcie is "nvidia" driver not "nv driver". I could be wrong.

"nv" driver will NOT work with "1050 pcie" and "nvidia" driver may require "nvidiamodset" option.

your saying 1030 and talking about backporting scares me frankly

https://www.nvidia.com/Download/driv...x/170804/en-us

Remove the line:

Driver "vesa"
(or Driver "fbdev")
and replace it with the line:

Driver "nvidia"
Remove the following line

------------------------
i'm guessing you have a 1030, sorry if i read your post wrong

Last edited by X-LFS-2010; 02-27-2021 at 09:11 PM.
 
Old 02-28-2021, 04:08 AM   #13
Hammett
Senior Member
 
Registered: Aug 2003
Location: Barcelona, Catalunya
Distribution: Gentoo
Posts: 1,074

Rep: Reputation: 59
Also notice kernel framebuffer is incompatible with nvidia-drivers, so you should disable it. Please refer here for a small guide (intended for Gentoo, but still usefull if you need to re-compile kernel) https://wiki.gentoo.org/wiki/NVIDIA/nvidia-drivers
 
Old 02-28-2021, 05:11 AM   #14
AndrewMartin
LQ Newbie
 
Registered: Jul 2012
Location: London, UK
Distribution: Debian
Posts: 12

Original Poster
Rep: Reputation: Disabled
So here are some updates.

I've added debian-backports to my sources, though I understand that to install something from backports that it also present in stable, I'll have to call "apt install -t debian-backports" and I've not done that yet as I'm worried that having one package from backports and everything else from stable will have incompatilibities. I'm happy for someone to put my mind to rest, or tell me which two or three packages need to be installed from backports, if any.

As recommended by Brains, I've added the line "install_items+=/lib/firmware/nvidia/gv100/acr/ucode_load.bin" to /etc/dracut.conf.d/02-nvfirmware.conf. The directory /etc/dravit.conf.d didn't exist so I had to create it.

The card is not AGP, it's PCI-E 3.0 x 16.

My /etc/X11/xorg.conf is empty but /etc/X11/xorg.conf.nvidia-auto (X configuration file generated by nvidia-xconfig) contains content, including the line 'Driver: "nvidia"'.

I downloaded the official driver from https://www.nvidia.com/Download/index.aspx. I searched for

Code:
Product Type: GeForce
Product Series: GeForce 10 Series
Product: GeForce GT 1030
Operating System: Linux 64-bit
Download Type: Production Branch
Language: English (UK)
and found...

Code:
LINUX X64 (AMD64/EM64T) DISPLAY DRIVER
Version: 460.56
Release Date: 2021.2.25
Operating System: Linux 64-bit
Language: English (UK)
File Size: 170.23 MB
Which listed my card in its supported products.

GeForce 10 Series:
GeForce GTX 1080 Ti, GeForce GTX 1080, GeForce GTX 1070 Ti, GeForce GTX 1070, GeForce GTX 1060, GeForce GTX 1050 Ti, GeForce GTX 1050, GeForce GT 1030, GeForce GT 1010

I'll attempt to install the drivers from the nvidia site, and get back to you.
 
Old 02-28-2021, 05:31 AM   #15
Brains
Senior Member
 
Registered: Apr 2009
Distribution: All OS except Apple
Posts: 1,591

Rep: Reputation: 389Reputation: 389Reputation: 389Reputation: 389
I've edited my previous post, apparently Debian uses hook scripts in /etc/initramfs-tools/hooks to include missing firmware.
Quote:
I searched apt for the file ucode_load.bin
According to Debian package search, firmware-misc-nonfree does not have nvidia/gv100/acr/ucode_unload.bin, but does have nvidia/gv100/acr/ucode_unload.bin
I had issues with Intel HD audio not working because root filesystem was not mounted yet when the firmware was required, including the firmware in the initramfs.img fixed that. But if the firmware does not exist, no sense trying to include it.
 
1 members found this post helpful.
  


Reply

Tags
geforce, nouveau, nvidia drivers



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Help needed installing non-free nVidia drivers (the 'Debian way') wheeliee Debian 26 07-27-2009 04:21 AM
Nvidia 9746 Drivers - startx freezes machine when using nvidia module Astro Slackware 17 01-21-2007 07:36 PM
UNinstalling proprietry mandriva nVidia drivers and installing new nVidia drivers deathman Linux - Hardware 3 11-18-2006 05:10 AM
(nvidia) First startx = blank screen, second startx = works ?!? BuckRogers01 Linux - Hardware 2 04-07-2006 05:26 PM
Blank screen after "startx" after reboot after install cg from nvidia rozky Linux - Software 2 04-04-2005 08:49 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 01:29 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration