[SOLVED] Black screen after nvidia driver installation

Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
cabrunkko

[SOLVED] Black screen after nvidia driver installation

Post by cabrunkko »

Hi there.

I know there's a bunch of topics like this, but none of them solved my problem (and I did read a lot of them).

So I'm coming from windows 10, interested in know more about other OS. I'm trying to use LM four about 3 days, but I can't. I installed LM 19.1 Cinnamon and my problem is:

when I install the nvidia-driver-390, things go well: no (apparent) errors, normal installation, etc. I'm asked about the password for the next boot MOK key enroll. OK. But, after I reboot, enroll the key and go on, I pass through the LM splash and than the screen goes black.

The laptop remains up so I do Ctrl+Alt+F1. I tyoe startx and that's it. The OS boot normally. But, after the nvidia driver I hve to these steps in every single boot. This kinda sucks.

As I said, I read a bunch of stuff about this problem. So I gathered as many info as I could.

My system is a dell inspiron 14 3443, with core i5 5200u, intel HD graphics 5500 and a geforce 820m.

The /etc/modprobe.d/blacklist-framebuffer.conf has the line "blacklist nvidiafb". I thought it was that. When I comment it the, the GUI loads but nvidia driver isn't recognized. The outputs for when the line is and isn't commented are in the following images, respectively:
blacklist-framebuffer-conf-commented.JPG
blacklist-framebuffer-conf-not-commented.JPG
In the nvidia-graphics-drivers.conf there are these lines:

Code: Select all

blacklist nouveau
blacklist lbm-nouveau
options nouveau modeset=0 (I added this line, but didn't work without it neither)
alias nouveau off
alias lbm-nouveau off
Besides that there is no xorg.conf in /etc/X11/ directory.

[after I manually do starx] My output for inxi -G is:

Code: Select all

inxi -G
Graphics:
  Device-1: Intel HD Graphics 5500 driver: i915 v: kernel 
  Device-2: NVIDIA GF117M [GeForce 610M/710M/810M/820M / GT 
  620M/625M/630M/720M] 
  driver: nvidia v: 390.87 
  Display: server: X.Org 1.19.6 driver: modesetting,nvidia 
  unloaded: fbdev,nouveau,vesa resolution: 1366x768~60Hz 
  OpenGL: renderer: GeForce 820M/PCIe/SSE2 v: 4.6.0 NVIDIA 390.87 
But, the output is different when I'm on Ctrl+Alt+F1 and do

Code: Select all

inxi -G --display
Graphics:  Device-1: Intel HD Graphics 5500 driver: i915 v: kernel 
           Device-2: NVIDIA GF117M [GeForce 610M/710M/810M/820M / GT 620M/625M/630M/720M] driver: nvidia v: 390.87 
           Display: x11 server: X.org 1.19.6 driver: modesetting,nvidia unloaded: fbdev,nouveau,vesa tty: 170x48 
           Message: No advanced graphics data found on this system. 
The --display is because the terminal claims it. Both inxi commands were typed without the nvidiafb line commented in the /etc/modprobe.d/blacklist-framebuffer.conf

Well guys. That's it. There's even more in the attachments. All the info I can provide is already with you.

Since then, I'm glad for your attention!
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 3 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
WharfRat

Re: Black screen after nvidia driver installation

Post by WharfRat »

Did you try purging the nvidia driver you installed :?:

Was graphics normal with the nouveau driver :?:

If so you should revert back as even though the driver manager recommended the nvidia driver, it might not be compatible.
cabrunkko

Re: Black screen after nvidia driver installation

Post by cabrunkko »

WharfRat wrote: Sat Feb 09, 2019 9:39 am Did you try purging the nvidia driver you installed :?:

Was graphics normal with the nouveau driver :?:

If so you should revert back as even though the driver manager recommended the nvidia driver, it might not be compatible.
1. Purging driver: yes.

2. Yes. It works with nouveau stock driver.

I went to the nvidia's website drivers section, filtered to find drivers to my model and system:

Geforce > GeForce 800M Series (Notebooks) > GeForce 820M > Linux 64-bit > English (US)

The driver it returned me was 410.93. So I thought "hm... I'll have to add the ppa", then I added ppa:graphics-drivers/ppa, updated cache and donwloaded the nvidia-driver-410. It diddn't work. After this attempt, I purged the driver, and downloaded the 410.93 driver from the nvidia's website. (the .run file).

I signed the file with a new MOK (because I'm running an UEFI-secure-boot installation), tried to install the driver (410) and one of the outputs while installing was that the installed graphic card (GC) isn't supported by the driver that was being installed and I've informed that the latest driver supported by the installed GC is the 390 one and that the actual driver (again 410) was going to ignore my GC

Again, I purged the recent installed driver (410) and installed back the 390 one (as indicated by the output of the driver downloaded by the nvidia's website).

So, all remain the same: I install, reboot, got to a black screen. Actually, the monitor kinda goes off, giving the impression the laptop is powered off, but it isn't. So, I have to type Ctrl+Alt+F1, log in and type startx. Only when I do this I can get into the GUI. After I type starx, the 390 driver is recognized by nvidia-settings, so I don't think it's incompatible. I'm not saying that I'm right (or you're wrong) but it seems to be compatible.

So, the problem seems to be that something is going wrong before startx in some way.
WharfRat

Re: Black screen after nvidia driver installation

Post by WharfRat »

Are you sure you don't have an xorg.conf as you stated in your initial post :?:

I haven't used nvidia for over 5 years, but I remember that the nvidia installer always created an xorg.conf with a driver line 'Driver "nvidia"'

Also there was a cl app to generate an xorg.conf file. Do you have any such utility :?:
cabrunkko

Re: Black screen after nvidia driver installation

Post by cabrunkko »

WharfRat wrote: Sat Feb 09, 2019 11:02 am Are you sure you don't have an xorg.conf as you stated in your initial post :?:

I haven't used nvidia for over 5 years, but I remember that the nvidia installer always created an xorg.conf with a driver line 'Driver "nvidia"'

Also there was a cl app to generate an xorg.conf file. Do you have any such utility :?:
First of all: thank you for quick replies!

Yes I'm sure I don't have the xorg.conf. At least not in /etc/X11. To verify that, I ran the command: sudo find -name xorg.conf. The only out is /usr/share/doc/xserver-xorg-video-intel/xorg.conf

About your last line:

What is cl app (client app)? Sorry if I'm silly, but English isn't my main idiom (actually it is brazilian Portuguese! :D)

Besides that, I don't really know so much about Linux yet since I started less than a week ago (even though I'm pushing myself and consider a great evolution given the commands I've been learned and the information I gathered "by myself").

If you can explain me how I can get the info you need, I'll be pleasured in gathered that!

Afterall did you peeked in the link I posted? I uploaded a bunch of log files and diff files trying to facilitate the comparison fot those who knows how to spot problems.

I'd like to thank you once again.
WharfRat

Re: Black screen after nvidia driver installation

Post by WharfRat »

cl = command line utility, not a gui application. It was nvidia-xconfig that created the xorg.conf.

Also modules had to be added to /etc/initramfs-tools/modules to get loaded early in the initrd.img, however that should have been handled by the installer.

What does lsinitramfs /boot/initrd.img-$(uname -r)|egrep 'nvidia.ko|nouveau.ko' return :?:
cabrunkko

Re: Black screen after nvidia driver installation

Post by cabrunkko »

WharfRat wrote: Sat Feb 09, 2019 11:53 am cl = command line utility, not a gui application. It was nvidia-xconfig that created the xorg.conf.

Also modules had to be added to /etc/initramfs-tools/modules to get loaded early in the initrd.img, however that should have been handled by the installer.

What does lsinitramfs /boot/initrd.img-$(uname -r)|egrep 'nvidia.ko|nouveau.ko' return :?:
Oh, fine. I'm used to read as cli, sorry for that!

And yeah, nvidia-xconfig is present in my system. Please let me know whether I should run it (and how, I mean additional arguments) or not.

lsinitramfs /boot/initrd.img-$(uname -r)|egrep 'nvidia.ko|nouveau.ko' - it returns nothing.
WharfRat

Re: Black screen after nvidia driver installation

Post by WharfRat »

Yes, I would recommend running nvidia-xconfig.

You didn't get a result for nouveau and you shouldn't have so that's good.
cabrunkko

Re: Black screen after nvidia driver installation

Post by cabrunkko »

WharfRat wrote: Sat Feb 09, 2019 12:18 pm Yes, I would recommend running nvidia-xconfig.

You didn't get a result for nouveau and you shouldn't have so that's good.
Great!


sudo nvidia-xconfig
WARNING: Unable to locate/open X configuration file.

New X configuration file written to '/etc/X11/xorg.conf'


Now, after the reboot the screen doesn't "go off" but it kinda freezes instead. It freezes with a static "_" symbol on the top left corner.
Accessing with Ctrl+Alt+F1 and typing startx freezes the session as well. But it shows some info, as shown in the following image:
startx-freeze.JPG
As shown, it generates a Xorg.2.log file. I uploaded it here as I uploaded the xorg.conf generated by nvidia-xsettings as well.

[I'm late because I was figuring out a way to send these files to my Windows. Discovered that smbclient does the magick. Linux is awesome!]
User avatar
trytip
Level 14
Level 14
Posts: 5367
Joined: Tue Jul 05, 2016 1:20 pm

Re: Black screen after nvidia driver installation

Post by trytip »

why do people insist on making nvidia harder than it is? too late now, you need to purge nvidia and start again. saying nvidia installed ok but on reboot is black means it didn't install ok.
purge nvidia again, reboot check that you have no nvidia with dpkg -l *nvidia* everything should say none. then install the driver offered to you in driver manager and reboot.
if you can safely boot and open nvidia-settings then it's installed and you can move on to upgrade if you like
Image
cabrunkko

Re: Black screen after nvidia driver installation

Post by cabrunkko »

trytip wrote: Sat Feb 09, 2019 1:39 pm why do people insist on making nvidia harder than it is? too late now, you need to purge nvidia and start again. saying nvidia installed ok but on reboot is black means it didn't install ok.
purge nvidia again, reboot check that you have no nvidia with dpkg -l *nvidia* everything should say none. then install the driver offered to you in driver manager and reboot.
if you can safely boot and open nvidia-settings then it's installed and you can move on to upgrade if you like
Thank you for the response!

I'm sorry but how does your suggestion differ from the normal approach? I mean, what you said I already did a bunch of times. Installed then uninstalled, purged, autoremoved, autocleaned and try to install again.

All of that I already tried. What is different in your suggestion? Have I missed something?

Please, let me know!
User avatar
trytip
Level 14
Level 14
Posts: 5367
Joined: Tue Jul 05, 2016 1:20 pm

Re: Black screen after nvidia driver installation

Post by trytip »

dpkg -l *nvidia*
are you saying you first installed nvidia from driver manager then rebooted to a black screen?
Last edited by trytip on Sat Feb 09, 2019 2:31 pm, edited 1 time in total.
Image
WharfRat

Re: Black screen after nvidia driver installation

Post by WharfRat »

Is there an file in ~ like nvidia-settings :?: If so delete it.

Not having been involved with these drivers for a long time, I'm going to lean toward trytip's recommendation.

I'm also moving this topic to Hardware Support Graphics Cards & Monitors - it might get better visibility as it's more of a graphics driver problem rather than a boot problem.
cabrunkko

Re: Black screen after nvidia driver installation

Post by cabrunkko »

trytip wrote: Sat Feb 09, 2019 2:21 pm dpkg -l *nvidia*
are you saying you first installed nvidia from driver manager then rebooted to a black screen?
So, I did how you said. Nothing happened, again.

Meanwhile, I was talking in the nvidia forum. I got a response that said the problem is that my system has nvidia optimus and the person who helped me said me the following:

As your system is nvidia Optimus, you have to remove the file xorg.conf from the /etc/X11/ directory.

After that, run

Code: Select all

sudo dpkg-reconfigure lightdm
and reboot.

if the dpkg doesn't work, you'll have to do it manually as described here:

https://wiki.archlinux.org/index.php/NV ... y_Managers

===============

So, the dpkg method, didn't work for me.
On the other hand, the manual method did.

FOR FUTURE READERS:

Even though the login form becomes visible, when you try to login, the system may return to the login form and keep doing that in loop. At least this happened to me.

If that's the case, Ctrl+Alt+F1, login and then rename the file .Xauthority to something different.
After that Ctrl+Alt+F7 to return to the GUI and the login should work fine again, but with nvidia driver being used this time.
If everything goes fine, you can remove the OLD .Xauthority file.

Now, my initial problem was solved but the system boot is around 15s slower. That's another problem and I'll tackle it next!

Thank you guys!
User avatar
trytip
Level 14
Level 14
Posts: 5367
Joined: Tue Jul 05, 2016 1:20 pm

Re: [SOLVED] Black screen after nvidia driver installation

Post by trytip »

you can just delete .Xauthority and while at it also .ICEauthority it's best to delete these two in a pair then logoff. never worked with dual video device, isn't there an option to turn one off in bios?
Image
cabrunkko

Re: [SOLVED] Black screen after nvidia driver installation

Post by cabrunkko »

trytip wrote: Sat Feb 09, 2019 5:03 pm you can just delete .Xauthority and while at it also .ICEauthority it's best to delete these two in a pair then logoff. never worked with dual video device, isn't there an option to turn one off in bios?
In my BIOS the option to disable gpu isn't present, unfortunately.

By the way, what do these files do? If you aren't in the mood to explain me, I don't care about some resources.

Anyway, thank you!
WharfRat

Re: [SOLVED] Black screen after nvidia driver installation

Post by WharfRat »

cabrunkko,

I'd be interested to see the results of inxi -G now that the Nvidia driver is working properly.

See .Xauthority and .ICEauthority for an explanation.
cabrunkko

Re: [SOLVED] Black screen after nvidia driver installation

Post by cabrunkko »

WharfRat wrote: Sat Feb 09, 2019 6:37 pm cabrunkko,

I'd be interested to see the results of inxi -G now that the Nvidia driver is working properly.

See .Xauthority and .ICEauthority for an explanation.
WharfRat, the output is the same.

The difference is in the lsmod | grep -i nvidia or lsmod | grep -i nouveau output. Before fix the lightdm, the ouput for both commands was nothing. This means that no driver was loaded at all, right? Which is strange because.... there was video. Who knows...
WharfRat

Re: [SOLVED] Black screen after nvidia driver installation

Post by WharfRat »

cabrunkko,

Thanks for getting back to me.

It appears that as the Nvidia drivers evolve they introduce additional complexity and confusion regarding the installation and integration :(
mend4x

Re: [SOLVED] Black screen after nvidia driver installation

Post by mend4x »

i had the same problem over and over again. after a while i decided to ask about it on nvidia forums and it helped. at first purge all nvidia stuff from your system. while you have two GPU install nvidia-prime package with apt and then just install the driver from default Driver Manger. hope it helps
Locked

Return to “Graphics Cards & Monitors”