[SOLVED] Nvidia driver not loading if I'm faster logging in than it!

Questions about hardware, drivers and peripherals
Forum rules
Before you post please read how to get help
Post Reply
eddie3000
Level 3
Level 3
Posts: 134
Joined: Mon Jun 24, 2013 2:11 pm

[SOLVED] Nvidia driver not loading if I'm faster logging in than it!

Post by eddie3000 »

I have a freshly installed linux mint cinnamon 19.2 laptop. It has a gtx1060 graphics card by nvidia. It's all updated, with the latest driver installed.

The problem is that if I login as soon as the login screen appears, linux mint starts in software rendering mode. If I log out and in again, nvidia driver is loaded and works normally.

If I turn the computer on, and after the login screen appears I wait a few seconds (about 5-10 seconds, haven't counted), and log in, the nvidia driver is loaded normally and works correctly.

I guess there is something wrong going on, but I'm not sure what. I would think that the login screen is appearing optimistically too soon.

Any ideas for solutions? Thanks.
Last edited by eddie3000 on Wed Oct 28, 2020 3:03 am, edited 1 time in total.
pmanger
Level 1
Level 1
Posts: 19
Joined: Mon Feb 04, 2013 6:30 pm

Re: Nvidia driver not loading if I'm faster logging in than it!

Post by pmanger »

I think your problem may somehow be related to mine (viewtopic.php?f=49&t=307172&p=1727541#p1727541. The first thing I would suspect is that the open-source nouveau driver on your computer was not blacklisted. However, manually blacklisting nouveau (using three different methods) on my system had no effect on my problem. I first noticed my problem recently, and not too long ago I had upgraded from the nvidia-410 driver to the nvidia-440, which is the recommended driver for my card (RTX-2070). According to the Nvidia website, your card has the same recommended driver and, since it's also the latest driver, so I assume you're using it too. As you can see from my post, I suspect a bug, either in the Nvidia driver or in Cinnamon. I have not yet tried uninstalling Nvidia-440 and reverting to an older driver.
eddie3000
Level 3
Level 3
Posts: 134
Joined: Mon Jun 24, 2013 2:11 pm

Re: Nvidia driver not loading if I'm faster logging in than it!

Post by eddie3000 »

Thanks for your reply. I've been busy lately and haven't had the chance to do anything about it.

I tried reverting to older drivers, the ones available in the driver manager, and the problem is just the same.

If I wait for about five seconds before logging in, the nvidia video drivers load fine.

Logging in immediately makes the software rendering popup appear, and my nvidia card does not work. In this case, logging out and in it gets it solved.

I do not know why this happens. I still think the login screen appears too soon and the computer is not fully ready to start. If I knew how to add a five second delay to the login screen I would just do that for the moment. Could someone tell me how to do this if possible?

Thanks.
eddie3000
Level 3
Level 3
Posts: 134
Joined: Mon Jun 24, 2013 2:11 pm

Re: Nvidia driver not loading if I'm faster logging in than it!

Post by eddie3000 »

The problem has not appeared again after upgrading to 19.3 from 19.2. I do not know if that was the solution or not, but it seems to have stopped the problem from happening again.

I hope it never happens to me again ;-)

Thanks.
eddie3000
Level 3
Level 3
Posts: 134
Joined: Mon Jun 24, 2013 2:11 pm

Re: Nvidia driver not loading if I'm faster logging in than it!

Post by eddie3000 »

Noooo! The problem is back. :cry: :cry:

It appeared that updating to 19.3 fixed the issue, but it also updated the kernel to 5.3 without me noticing.

I use the lowlatency kernels because I do a lot of audio work. After a while, I noticed I was getting xruns in with the jack audio server, so it occured to me to check the kernel version (because it had happenened to me in the past during other updates), and voilà, I didn't have the lowlatency kernel in use. So I had to revert to version 4.15.** to have a lowlatency kernel. And guess what? The nvidia driver not loading problem has returned. I have to wait about 10 seconds before logging in to avoid software rendering mode.

I have tried previous nvidia driver versions, but that didn't solve it.

I'm not sure if this is a hardware support problem or not.

Any ideas? Thanks.
eddie3000
Level 3
Level 3
Posts: 134
Joined: Mon Jun 24, 2013 2:11 pm

Re: Nvidia driver not loading if I'm faster logging in than it!

Post by eddie3000 »

Well this is interesting.

I have not done anything to fix this, but at some point or some update, this issue has been fixed.

I no longer have to wait at the login screen for the driver to load correctly.

Just thought I'd keep this thread up to date, even though it may be mostly unhelpful.

Thank you for this fantastic forum!
eddie3000
Level 3
Level 3
Posts: 134
Joined: Mon Jun 24, 2013 2:11 pm

Re: Nvidia driver not loading if I'm faster logging in than it!

Post by eddie3000 »

Hello again.

After several months, I switched over to ubuntu for a while to get rid of the video driver issues I was getting. But after some time I'm back with mint 20 again.

I thought this issue might have been fixed but no. But it's different than before. Now I get this notification:

Image

I click on the driver manager button and then this appears:

Image

It indicates the driver is being used. When I go to blender, for example, the nvidia card is available. I have tried it and does in fact work:

Image

The nvidia X server settings appears blank though:

Image

I have seen many people are having problems with their nvidia drivers, I have had problems in the past an continue to have them. I need the graphics card, I wouldn't have bought one if not. And mint is a bit of a pain in this respect (debian too). But ubuntu, on the other hand, does seem to work with no errors.

Any ideas how I could fix the issue? Why does mint20 send me this notification, but the graphics card does seem to work with blender?

Thanks for this fantastic forum.
User avatar
SMG
Level 15
Level 15
Posts: 5570
Joined: Sun Jul 26, 2020 6:15 pm
Location: USA

Re: Nvidia driver not loading if I'm faster logging in than it!

Post by SMG »

Please give us information about your computer and graphics by entering this command in a terminal:

Code: Select all

inxi -SMCGx
Select </> from the mini toolbar above the textbox where you type your reply and enclose the results of the command between the code markers [code]Results[/code]. This will let us know how Mint sees your hardware.
A woman typing on a laptop with LM20.1 Cinnamon.
eddie3000
Level 3
Level 3
Posts: 134
Joined: Mon Jun 24, 2013 2:11 pm

Re: Nvidia driver not loading if I'm faster logging in than it!

Post by eddie3000 »

Here it is jast after booting:

Code: Select all

System:
  Host: eddie Kernel: 5.4.0-52-lowlatency x86_64 bits: 64 compiler: gcc 
  v: 9.3.0 Desktop: Cinnamon 4.6.7 Distro: Linux Mint 20 Ulyana 
  base: Ubuntu 20.04 focal 
Machine:
  Type: Laptop System: Notebook product: P65xRP v: N/A 
  serial: <superuser/root required> 
  Mobo: Notebook model: P65xRP serial: <superuser/root required> 
  UEFI: American Megatrends v: 1.05.07 date: 10/21/2016 
CPU:
  Topology: Quad Core model: Intel Core i7-6700HQ bits: 64 type: MT MCP 
  arch: Skylake-S rev: 3 L2 cache: 6144 KiB 
  flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx 
  bogomips: 41599 
  Speed: 1053 MHz min/max: 800/3500 MHz Core speeds (MHz): 1: 800 2: 800 
  3: 800 4: 800 5: 800 6: 800 7: 800 8: 800 
Graphics:
  Device-1: NVIDIA GP106M [GeForce GTX 1060 Mobile] vendor: CLEVO/KAPOK 
  driver: nvidia v: 450.80.02 bus ID: 01:00.0 
  Display: x11 server: X.Org 1.20.8 driver: fbdev,modesetting,nouveau 
  unloaded: vesa resolution: 1920x1080~77Hz 
  OpenGL: renderer: llvmpipe (LLVM 10.0.0 256 bits) v: 3.3 Mesa 20.0.8 
  direct render: Yes 
Last edited by eddie3000 on Thu Oct 22, 2020 1:35 am, edited 2 times in total.
eddie3000
Level 3
Level 3
Posts: 134
Joined: Mon Jun 24, 2013 2:11 pm

Re: Nvidia driver not loading if I'm faster logging in than it!

Post by eddie3000 »

After logging out and in again, OR waiting for about half a minute before first login:

Code: Select all

System:
  Host: eddie Kernel: 5.4.0-52-lowlatency x86_64 bits: 64 compiler: gcc 
  v: 9.3.0 Desktop: Cinnamon 4.6.7 Distro: Linux Mint 20 Ulyana 
  base: Ubuntu 20.04 focal 
Machine:
  Type: Laptop System: Notebook product: P65xRP v: N/A 
  serial: <superuser/root required> 
  Mobo: Notebook model: P65xRP serial: <superuser/root required> 
  UEFI: American Megatrends v: 1.05.07 date: 10/21/2016 
CPU:
  Topology: Quad Core model: Intel Core i7-6700HQ bits: 64 type: MT MCP 
  arch: Skylake-S rev: 3 L2 cache: 6144 KiB 
  flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx 
  bogomips: 41599 
  Speed: 800 MHz min/max: 800/3500 MHz Core speeds (MHz): 1: 800 2: 800 
  3: 801 4: 801 5: 800 6: 800 7: 800 8: 800 
Graphics:
  Device-1: NVIDIA GP106M [GeForce GTX 1060 Mobile] vendor: CLEVO/KAPOK 
  driver: nvidia v: 450.80.02 bus ID: 01:00.0 
  Display: x11 server: X.Org 1.20.8 driver: nvidia 
  unloaded: fbdev,modesetting,nouveau,vesa resolution: 1920x1080~60Hz 
  OpenGL: renderer: GeForce GTX 1060/PCIe/SSE2 v: 4.6.0 NVIDIA 450.80.02 
  direct render: Yes 
User avatar
SMG
Level 15
Level 15
Posts: 5570
Joined: Sun Jul 26, 2020 6:15 pm
Location: USA

Re: Nvidia driver not loading if I'm faster logging in than it!

Post by SMG »

The Nvidia device driver is loaded in both cases.
Device-1: NVIDIA GP106M [GeForce GTX 1060 Mobile] vendor: CLEVO/KAPOK driver: nvidia v: 450.80.02 bus ID: 01:00.0

In the case where you get the message, nouveau loads faster than nvidia and blocks the nvidia display driver and renderer.
Display: x11 server: X.Org 1.20.8 driver: fbdev,modesetting,nouveau
unloaded: vesa resolution: 1920x1080~77Hz
OpenGL: renderer: llvmpipe (LLVM 10.0.0 256 bits) v: 3.3 Mesa 20.0.8
direct render: Yes

When it works as you want it nvidia gets in and unloads nouveau.
Display: x11 server: X.Org 1.20.8 driver: nvidia
unloaded: fbdev,modesetting,nouveau,vesa resolution: 1920x1080~60Hz
OpenGL: renderer: GeForce GTX 1060/PCIe/SSE2 v: 4.6.0 NVIDIA 450.80.02
direct render: Yes

Nvidia modules build with the kernel during boot up. If X Server starts before the Nvidia modules are fully built and loaded then nouveau can sneak in as a display driver before Nvidia blocks it.

A temporary fix is mentioned in the last post of this thread, Check your video drivers message on some boots, a person using LM19.3 says, "A workaround I discovered is to restart the X server (ctrl-alt-backspace)."

A possible more permanent fix is in this thread. (As always, Timeshift snapshots can help you reverse any changes you do not like.) The user in this thread has a desktop, but I think this may also work for you [SOLVED] NVIDIA driver failing sometimes on boot ("no hardware acceleration"). Let me know if the fix roblm recommends in the second post addresses the issue for you.
A woman typing on a laptop with LM20.1 Cinnamon.
eddie3000
Level 3
Level 3
Posts: 134
Joined: Mon Jun 24, 2013 2:11 pm

Re: Nvidia driver not loading if I'm faster logging in than it!

Post by eddie3000 »

Thank you very much for your help.

Yes, ctl + alt + backspace is just as good a solution as logging in and out. But just as inconvenient.

I have finally tried blacklisting the nouveau driver, a solution I did not manage to do correctly in the past. I think I have done it correctly now following some instructions for ubuntu 20.

Code: Select all

$sudo bash -c "echo blacklist nouveau > /etc/modprobe.d/blacklist-nvidia-nouveau.conf"
$sudo bash -c "echo options nouveau modeset=0 >> /etc/modprobe.d/blacklist-nvidia-nouveau.conf"
$cat /etc/modprobe.d/blacklist-nvidia-nouveau.conf
blacklist nouveau
options nouveau modeset=0
$sudo reboot

I hope it works, it seems to be working, for the moment. What could go wrong blacklisting the nouveau driver?
eddie3000
Level 3
Level 3
Posts: 134
Joined: Mon Jun 24, 2013 2:11 pm

Re: Nvidia driver not loading if I'm faster logging in than it!

Post by eddie3000 »

Nope. Blacklisting the nouveua driver didn't work, at least the way I did it. :(
User avatar
SMG
Level 15
Level 15
Posts: 5570
Joined: Sun Jul 26, 2020 6:15 pm
Location: USA

Re: Nvidia driver not loading if I'm faster logging in than it!

Post by SMG »

eddie3000 wrote:
Fri Oct 23, 2020 1:42 am
I have finally tried blacklisting the nouveau driver, a solution I did not manage to do correctly in the past. I think I have done it correctly now following some instructions for ubuntu 20.

Code: Select all

$sudo bash -c "echo blacklist nouveau > /etc/modprobe.d/blacklist-nvidia-nouveau.conf"
$sudo bash -c "echo options nouveau modeset=0 >> /etc/modprobe.d/blacklist-nvidia-nouveau.conf"
$cat /etc/modprobe.d/blacklist-nvidia-nouveau.conf
blacklist nouveau
options nouveau modeset=0
$sudo reboot

What you did is similar to what is described in this thread [SOLVED] Nvidia-settings not show settings and nvidia modules are not loaded, except you are missing the step to update initramfs after making the file and before rebooting. The missing step is:

Code: Select all

sudo update-initramfs -u
- - - - -- - - -
If that does not work, you could try modifying grub to add nouveau.modeset=0 on the quiet splash line as a way to prevent nouveau from loading. If you do that and want to make that change permanent remember to run sudo update-grub after saving the file and before rebooting.
A woman typing on a laptop with LM20.1 Cinnamon.
eddie3000
Level 3
Level 3
Posts: 134
Joined: Mon Jun 24, 2013 2:11 pm

Re: Nvidia driver not loading if I'm faster logging in than it!

Post by eddie3000 »

Editing the grub config file seems to work, at least after a couple of reboots. I will confirm it works in a week or so.

THANK YOU VERY MUCH.
eddie3000
Level 3
Level 3
Posts: 134
Joined: Mon Jun 24, 2013 2:11 pm

Re: Nvidia driver not loading if I'm faster logging in than it!

Post by eddie3000 »

:? :? :? :? :? :?

NOOOOOOOOOOO!

The notification is back!! So nothing I have done has worked!

The nvidia X server settings program doesn't work (not that I use it for anything).
I can see the screen fine (which is very important, and watch videos).
Blender can use the graphics card effectively (which is the main reason I use the graphics card for).

So why am I worrying so much about a silly notification appearing on startup? Is there a reason the be worried or should I just let it be? :lol:
User avatar
SMG
Level 15
Level 15
Posts: 5570
Joined: Sun Jul 26, 2020 6:15 pm
Location: USA

Re: Nvidia driver not loading if I'm faster logging in than it!

Post by SMG »

You tried the below? I didn't see you mention it, so I wasn't sure if you tried it.
SMG wrote:
Thu Oct 22, 2020 2:27 pm
A possible more permanent fix is in this thread. (As always, Timeshift snapshots can help you reverse any changes you do not like.) The user in this thread has a desktop, but I think this may also work for you [SOLVED] NVIDIA driver failing sometimes on boot ("no hardware acceleration"). Let me know if the fix roblm recommends in the second post addresses the issue for you.
The message means not all the nvidia modules are loaded properly. That is why Nvidia X Server Settings is blank. It and some other programs may have problems if not all modules are loaded. Other program may not need those modules and be fine.
A woman typing on a laptop with LM20.1 Cinnamon.
eddie3000
Level 3
Level 3
Posts: 134
Joined: Mon Jun 24, 2013 2:11 pm

Re: Nvidia driver not loading if I'm faster logging in than it!

Post by eddie3000 »

SMG wrote: ↑
Thu Oct 22, 2020 2:27 pm
A possible more permanent fix is in this thread. (As always, Timeshift snapshots can help you reverse any changes you do not like.) The user in this thread has a desktop, but I think this may also work for you [SOLVED] NVIDIA driver failing sometimes on boot ("no hardware acceleration"). Let me know if the fix roblm recommends in the second post addresses the issue for you.
:oops: SORRY :oops: Hadn't tried that one. It seems to work for the moment.

Thank you very very much for your patience SMG.
User avatar
SMG
Level 15
Level 15
Posts: 5570
Joined: Sun Jul 26, 2020 6:15 pm
Location: USA

Re: [SOLVED] Nvidia driver not loading if I'm faster logging in than it!

Post by SMG »

No need to apologize. You've been very good about giving feedback (not everyone does), so I just wanted to make sure you had tried all options. Hopefully this option will work.
A woman typing on a laptop with LM20.1 Cinnamon.
1000
Level 4
Level 4
Posts: 405
Joined: Wed Jul 29, 2020 2:14 am

Re: [SOLVED] Nvidia driver not loading if I'm faster logging in than it!

Post by 1000 »

I can also confirm the problem.

Code: Select all

$ inxi -SG
System:    Host: tele Kernel: 5.8.0-45-lowlatency x86_64 bits: 64 Desktop: MATE 1.24.0 
           Distro: Linux Mint 20.1 Ulyssa 
Graphics:  Device-1: NVIDIA GK106 [GeForce GTX 660] driver: nvidia v: 460.39 
           Display: x11 server: X.Org 1.20.9 driver: nvidia unloaded: fbdev,modesetting,nouveau,vesa 
           resolution: 1920x1080~60Hz 
           OpenGL: renderer: GeForce GTX 660/PCIe/SSE2 v: 4.6.0 NVIDIA 460.39 
In my case
1. "A workaround I discovered is to restart the X server (ctrl-alt-backspace)." = Working.

2. I tried add to /lib/systemd/system/nvidia-persistenced.service
after "Before=systemd-backlight@backlight:nvidia_0.service"

Code: Select all

Before=systemd-logind.service
Wants=systemd-logind.service
Not working.

3. Recommends from post
by eddie3000 » Fri Oct 23, 2020 7:42 am
by SMG » Fri Oct 23, 2020 4:13 pm
= Not working, "nouveau" still running, but nvidia driver not loaded.

4. " roblm recommends " from post by SMG » Thu Oct 22, 2020 8:27 pm
I have tried "reboot" 10 times and it works.
= Working.
Post Reply