[SOLVED] NVIDIA driver failing sometimes on boot ("no hardware acceleration")

Forum rules
Before you post please read this
Post Reply
ReallyMinty
Level 1
Level 1
Posts: 8
Joined: Fri Sep 04, 2020 12:04 pm

[SOLVED] NVIDIA driver failing sometimes on boot ("no hardware acceleration")

Post by ReallyMinty »

Timeline:

Installed a fresh copy of Mint 20.04. Then tried to switch to the NVidia driver (recommended version, 450) . Failed because of some unmet dependencies, so decided to use the update manager to update the system in the hope this would fix it. It did. Driver installed, rebooted. Met with resolution of 640*480. Received "Your system is currently running without video hardware acceleration" error.

Launched the driver manager as suggested, decided to try every driver from the bottom, working upwards. Eventually, one version worked (435) and provided high resolution, so switched to the recommended version 450, rebooted, continued to work.

After about a day of working, rebooting several times, eventually received error message again. Tried re-installing 435, didn't fix. Tried 450, didn't fix. Tried all the drivers in order, 390 eventually worked.

The general pattern is that eventually the driver stops working, then persistent driver switching eventually works, but it's not a consistent driver version that works, it's just the act of switching that might fix it next time you boot (it also may be the case that changing the driver has no effect at all, and the driver just works for some boots and not others)

I suspect that the initial failure to install the driver because of missing dependencies might have subtly borked the installation.


(this output when NVidia driver is working):

Code: Select all

System:
  Host: philipPC Kernel: 5.4.0-48-generic 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: Desktop System: ASUS product: All Series v: N/A 
  serial: <superuser/root required> 
  Mobo: ASUSTeK model: Z97-A v: Rev 1.xx serial: <superuser/root required> 
  BIOS: American Megatrends v: 2012 date: 09/30/2014 
Memory:
  RAM: total: 7.72 GiB used: 1.30 GiB (16.8%) 
  RAM Report: 
  permissions: Unable to run dmidecode. Root privileges required. 
CPU:
  Topology: Quad Core model: Intel Core i7-4790 bits: 64 type: MT MCP 
  arch: Haswell rev: 3 L2 cache: 8192 KiB 
  flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx 
  bogomips: 57566 
  Speed: 1799 MHz min/max: 800/4000 MHz Core speeds (MHz): 1: 1800 2: 1797 
  3: 1800 4: 1799 5: 1799 6: 1799 7: 1802 8: 1799 
Graphics:
  Device-1: NVIDIA GP104 [GeForce GTX 1070] vendor: ASUSTeK driver: nvidia 
  v: 390.138 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 1070/PCIe/SSE2 v: 4.6.0 NVIDIA 390.138 
  direct render: Yes 
Audio:
  Device-1: Intel 9 Series Family HD Audio vendor: ASUSTeK 
  driver: snd_hda_intel v: kernel bus ID: 00:1b.0 
  Device-2: NVIDIA GP104 High Definition Audio vendor: ASUSTeK 
  driver: snd_hda_intel v: kernel bus ID: 01:00.1 
  Device-3: HTC (High Tech ) type: USB driver: snd-usb-audio,uvcvideo 
  bus ID: 3-3.1.5:10 
  Device-4: HTC (High Tech ) type: USB driver: hid-generic,usbhid 
  Sound Server: ALSA v: k5.4.0-48-generic 
Network:
  Device-1: Intel Ethernet I218-V vendor: ASUSTeK driver: e1000e v: 3.2.6-k 
  port: f040 bus ID: 00:19.0 
  IF: eno1 state: up speed: 1000 Mbps duplex: full mac: 08:62:66:31:52:54 
Drives:
  Local Storage: total: 931.52 GiB used: 25.97 GiB (2.8%) 
  ID-1: /dev/sda vendor: Crucial model: CT500MX200SSD1 size: 465.76 GiB 
  ID-2: /dev/sdb vendor: Crucial model: CT500MX500SSD1 size: 465.76 GiB 
Partition:
  ID-1: / size: 105.61 GiB used: 25.97 GiB (24.6%) fs: ext4 dev: /dev/sdb2 
Sensors:
  System Temperatures: cpu: 50.0 C mobo: 27.8 C gpu: nvidia temp: 53 C 
  Fan Speeds (RPM): N/A gpu: nvidia fan: 23% 
Info:
  Processes: 259 Uptime: 2m Init: systemd runlevel: 5 Compilers: gcc: 9.3.0 
  Shell: bash v: 5.0.17 inxi: 3.0.38 

Last edited by ReallyMinty on Tue Oct 06, 2020 12:30 pm, edited 1 time in total.
User avatar
roblm
Level 14
Level 14
Posts: 5113
Joined: Sun Feb 24, 2013 2:41 pm

Re: NVIDIA driver failing sometimes on boot ("no hardware acceleration")

Post by roblm »

Try this method to load the Nvidia kernel modules a little earlier in the boot process.

Use this command to open the modules file: xed admin:///etc/modules

Add this at the bottom:

Code: Select all

nvidia 
nvidia-drm
nvidia-modeset

EDITED: The step below is not needed:

Then update the initial ramdisk and reboot: sudo update-initramfs -u
Last edited by roblm on Tue Jan 12, 2021 12:07 pm, edited 1 time in total.
ReallyMinty
Level 1
Level 1
Posts: 8
Joined: Fri Sep 04, 2020 12:04 pm

Re: NVIDIA driver failing sometimes on boot ("no hardware acceleration")

Post by ReallyMinty »

Thanks very much, that seems to be fine now!

Out of interest, is this a recent problem with Mint or the NVidia drivers? I ask because I was using NVidia drivers for about 18 months on Ubuntu 16.04.

Also, what's the difference between using admin:// to open a file as root, and simply using sudo?
User avatar
antikythera
Level 12
Level 12
Posts: 4175
Joined: Thu Jul 02, 2020 12:52 pm

Re: [SOLVED] NVIDIA driver failing sometimes on boot ("no hardware acceleration")

Post by antikythera »

admin is for some reason touted as the better gui application method. A user can still do just as much damage if they don't know what you are doing so none really. I prefer using nano with sudo rights to xed, each to their own ;)
User avatar
roblm
Level 14
Level 14
Posts: 5113
Joined: Sun Feb 24, 2013 2:41 pm

Re: NVIDIA driver failing sometimes on boot ("no hardware acceleration")

Post by roblm »

ReallyMinty wrote: Out of interest, is this a recent problem with Mint or the NVidia drivers? I ask because I was using NVidia drivers for about 18 months on Ubuntu 16.04.
I first saw this in a Mint 19.3 topic. The user was using the 5.3 kernel and an older Nvidia-340 driver but the problem still occurred when he switched to the 4.15 kernel. No problem when using the nouveau driver.

There have been many similar reports with Mint 20, happening with different Nvidia drivers and I think most users were using the 5.4 kernel.

The source of the problem possibly may be related more to the newer versions of the X.Org X Display Server.
SallyBelgium
Level 1
Level 1
Posts: 1
Joined: Fri Jan 15, 2021 12:03 pm

Re: NVIDIA driver failing sometimes on boot ("no hardware acceleration")

Post by SallyBelgium »

roblm wrote:
Wed Sep 30, 2020 3:30 pm
Try this method to load the Nvidia kernel modules a little earlier in the boot process.

Use this command to open the modules file: xed admin:///etc/modules

Add this at the bottom:

Code: Select all

nvidia 
nvidia-drm
nvidia-modeset

EDITED: The step below is not needed:

Then update the initial ramdisk and reboot: sudo update-initramfs -u
Didn't work for me :-(
TexNomex
Level 1
Level 1
Posts: 2
Joined: Fri Jan 15, 2021 3:33 pm

Re: [SOLVED] NVIDIA driver failing sometimes on boot ("no hardware acceleration")

Post by TexNomex »

Hello, all.

This may rate its own thread. Please forgive my noobish mistake if I've posted out of order here.

I know this issue is marked [solved], but there are so many experiencing like symptoms, that I'm wondering if there is a cause beyond the usual suspects.
I have a similar issue and would like to ask anyone experiencing the low-res, ( what looks and acts like rendering mode), "no hardware acceleration" nvidia driver warning on booting a question:

:?: What happens if you just immediately logout of that session and immediately log back in as the same user?

I ask this because [boot + login] gets me a low-res laptop configuration and the nvidia driver warning box.
[Boot + login + logout + login] gets me logged in correctly with my proper ultra-wide resolution.
There are differences in the xorg logs between the two sessions.
Looks like it might be a ModulePath issue preventing LoadModule "nvidia" from being loaded on first login, but not subsequent logins.

Just wondering if I'm the only one.

TIA for any responses.
psalmers
Level 1
Level 1
Posts: 1
Joined: Sat Jan 16, 2021 7:17 pm

Re: NVIDIA driver failing sometimes on boot ("no hardware acceleration")

Post by psalmers »

roblm wrote:
Wed Sep 30, 2020 3:30 pm
Try this method to load the Nvidia kernel modules a little earlier in the boot process.

Use this command to open the modules file: xed admin:///etc/modules

Add this at the bottom:

Code: Select all

nvidia 
nvidia-drm
nvidia-modeset
This solved my issue, thank you!! :D
I had just upgraded from Mint 19 to 20 this week and I couldn't get any nvidia drivers to run (not just sometimes, always), nouveau was fine though (but ran fans at full speed after resume, for some reason). For reference I have a 1060. GLTA with nvidia issues these days
funkytown
Level 1
Level 1
Posts: 1
Joined: Tue Jan 26, 2021 2:36 pm

Re: [SOLVED] NVIDIA driver failing sometimes on boot ("no hardware acceleration")

Post by funkytown »

I spent a TON of time trying to find out why I was being forced to 1024x768 on my Nvidia 1070 (after updating to latest Linux Mint). Couldn't find anything that worked. It seemed like the Nvidia driver was being loaded, but not for X. This did it! Thank you so much!
User avatar
samuraikid
Level 1
Level 1
Posts: 5
Joined: Sun Dec 27, 2020 12:27 pm

Re: NVIDIA driver failing sometimes on boot ("no hardware acceleration")

Post by samuraikid »

roblm wrote:
Wed Sep 30, 2020 3:30 pm
Try this method to load the Nvidia kernel modules a little earlier in the boot process.

Use this command to open the modules file: xed admin:///etc/modules

Add this at the bottom:

Code: Select all

nvidia 
nvidia-drm
nvidia-modeset

EDITED: The step below is not needed:

Then update the initial ramdisk and reboot: sudo update-initramfs -u

Great ! This is happening on Cinammon 20.1 with nvidia i needed to login, logout and login again every time i boot linuxmint 20.1 to fix it
but your tip solve it ! Thanks
Privacy isn't a privilege, it's a RIGHT !
Universal Android Debloater
Philipp91
Level 1
Level 1
Posts: 17
Joined: Sat Mar 13, 2021 10:59 am

Re: [SOLVED] NVIDIA driver failing sometimes on boot ("no hardware acceleration")

Post by Philipp91 »

I also observed this sometimes, but not always (e.g. not when my swap partition was disabled, so I thought it was causing the problem, but presumably the disabling just adds a startup delay similar to logging in later).

Editing /etc/modules seems to work for me too so far. Would you characterize this as a workaround or a principled solution? Is there a way this can be deployed to all Mint users affected by this and not just those who happen to find this thread?
Post Reply