Cannot boot into GUI with nvidia-340 installed.

Asked by Vanamali

I have a Lenovo Z50-70 laptop (i5/8GB) with Nvidia GeForce graphics card (2GB). When I install the propreitary driver (nvidia-340), the system doesn't boot into the GUI. The only way I can use the system is by changing the boot parameters to "nomodeset" from "quiet splash" and choosing a CLI (Ctrl+Alt+F1). Some relevant info I could think of are listed below along with the commands:

lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.4 LTS
Release: 18.04
Codename: bionic

uname -a
Linux Enigma 4.15.0-109-generic #110-Ubuntu SMP Tue Jun 23 02:39:32 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

grep -i nvidia /var/log/syslog
Jul 3 11:33:51 Enigma gnome-software[4695]: failed to rescan: Failed to parse /usr/share/applications/nvidia-settings.desktop file: cannot process file of type application/x-desktop
Jul 3 11:39:35 Enigma systemd-udevd[324]: Process '/bin/systemctl start --no-block nvidia-persistenced.service' failed with exit code 5.
Jul 3 11:39:35 Enigma systemd-udevd[324]: Process '/bin/systemctl start --no-block nvidia-persistenced.service' failed with exit code 5.
Jul 3 11:39:35 Enigma systemd-udevd[324]: Process '/bin/systemctl stop --no-block nvidia-persistenced' failed with exit code 5.
Jul 3 11:39:35 Enigma kernel: [ 26.479947] nvidia: loading out-of-tree module taints kernel.
Jul 3 11:39:35 Enigma kernel: [ 26.479957] nvidia: module license 'NVIDIA' taints kernel.
Jul 3 11:39:35 Enigma kernel: [ 26.483010] nvidia: module verification failed: signature and/or required key missing - tainting kernel
Jul 3 11:39:35 Enigma kernel: [ 26.487322] nvidia 0000:03:00.0: enabling device (0006 -> 0007)
Jul 3 11:39:35 Enigma kernel: [ 26.487681] [drm] Initialized nvidia-drm 0.0.0 20150116 for 0000:03:00.0 on minor 0
Jul 3 11:39:35 Enigma kernel: [ 26.487685] NVRM: loading NVIDIA UNIX x86_64 Kernel Module 340.108 Wed Dec 11 11:06:58 PST 2019
Jul 3 11:39:35 Enigma kernel: [ 27.065515] nvidia_uvm: Loaded the UVM driver, major device number 242
Jul 3 11:40:03 Enigma systemd-udevd[1653]: Process '/bin/systemctl start --no-block nvidia-persistenced.service' failed with exit code 5.
Jul 3 11:55:56 Enigma nvidia-persistenced: Started (4712)
Jul 3 12:04:30 Enigma nvidia-persistenced: Shutdown (4712)
Jul 3 12:10:25 Enigma psensor.desktop[2860]: [2020-07-03T06:40:25] [ERR] nvctrl: Failed to retrieve NVIDIA information.
Jul 3 12:25:57 Enigma psensor.desktop[2467]: [2020-07-03T06:55:57] [ERR] nvctrl: Failed to retrieve NVIDIA information.
Jul 3 12:57:42 Enigma systemd-udevd[323]: Process '/bin/systemctl start --no-block nvidia-persistenced.service' failed with exit code 5.
Jul 3 12:57:42 Enigma systemd-udevd[328]: Process '/bin/systemctl start --no-block nvidia-persistenced.service' failed with exit code 5.
Jul 3 12:57:42 Enigma systemd-udevd[325]: Process '/bin/systemctl stop --no-block nvidia-persistenced' failed with exit code 5.
Jul 3 12:57:42 Enigma kernel: [ 25.311989] nvidia: loading out-of-tree module taints kernel.
Jul 3 12:57:42 Enigma kernel: [ 25.311998] nvidia: module license 'NVIDIA' taints kernel.
Jul 3 12:57:42 Enigma kernel: [ 25.314860] nvidia: module verification failed: signature and/or required key missing - tainting kernel
Jul 3 12:57:42 Enigma kernel: [ 25.319201] nvidia 0000:03:00.0: enabling device (0006 -> 0007)
Jul 3 12:57:42 Enigma kernel: [ 25.319562] [drm] Initialized nvidia-drm 0.0.0 20150116 for 0000:03:00.0 on minor 0
Jul 3 12:57:42 Enigma kernel: [ 25.319566] NVRM: loading NVIDIA UNIX x86_64 Kernel Module 340.108 Wed Dec 11 11:06:58 PST 2019
Jul 3 12:57:42 Enigma kernel: [ 25.797368] nvidia_uvm: Loaded the UVM driver, major device number 242
Jul 3 12:58:06 Enigma systemd-udevd[1550]: Process '/bin/systemctl start --no-block nvidia-persistenced.service' failed with exit code 5.
Jul 3 13:00:53 Enigma systemd-udevd[2040]: Process '/bin/systemctl stop --no-block nvidia-persistenced' failed with exit code 5.
Jul 3 13:11:11 Enigma systemd-udevd[325]: Process '/bin/systemctl start --no-block nvidia-persistenced.service' failed with exit code 5.
Jul 3 13:11:11 Enigma systemd-udevd[320]: Process '/bin/systemctl start --no-block nvidia-persistenced.service' failed with exit code 5.
Jul 3 13:11:11 Enigma systemd-udevd[322]: Process '/bin/systemctl stop --no-block nvidia-persistenced' failed with exit code 5.
Jul 3 13:11:11 Enigma kernel: [ 25.243745] nvidia: loading out-of-tree module taints kernel.
Jul 3 13:11:11 Enigma kernel: [ 25.243755] nvidia: module license 'NVIDIA' taints kernel.
Jul 3 13:11:11 Enigma kernel: [ 25.246930] nvidia: module verification failed: signature and/or required key missing - tainting kernel
Jul 3 13:11:11 Enigma kernel: [ 25.251447] nvidia 0000:03:00.0: enabling device (0006 -> 0007)
Jul 3 13:11:11 Enigma kernel: [ 25.251854] [drm] Initialized nvidia-drm 0.0.0 20150116 for 0000:03:00.0 on minor 0
Jul 3 13:11:11 Enigma kernel: [ 25.251860] NVRM: loading NVIDIA UNIX x86_64 Kernel Module 340.108 Wed Dec 11 11:06:58 PST 2019
Jul 3 13:11:11 Enigma kernel: [ 26.955058] nvidia_uvm: Loaded the UVM driver, major device number 241
Jul 3 13:11:41 Enigma systemd-udevd[1477]: Process '/bin/systemctl start --no-block nvidia-persistenced.service' failed with exit code 5.
Jul 3 13:12:52 Enigma systemd-udevd[2730]: Process '/bin/systemctl stop --no-block nvidia-persistenced' failed with exit code 5.
Jul 3 13:12:57 Enigma systemd-udevd[2766]: Process '/bin/systemctl start --no-block nvidia-persistenced.service' failed with exit code 5.
Jul 3 13:16:45 Enigma nvidia-persistenced: Started (8922)
Jul 3 13:17:05 Enigma nvidia-persistenced: The daemon no longer has permission to remove its runtime data directory /var/run/nvidia-persistenced
Jul 3 13:17:05 Enigma nvidia-persistenced: Shutdown (8922)
Jul 3 13:22:10 Enigma psensor.desktop[2586]: [2020-07-03T07:52:10] [ERR] nvctrl: Failed to retrieve NVIDIA information.

 grep -i nvidia /etc/modprobe.d/*
/etc/modprobe.d/blacklist-framebuffer.conf:blacklist nvidiafb

systemctl status nvidia-persistenced
Unit nvidia-persistenced.service could not be found.

Please note that these outputs were generated after the nvidia-340 driver was purged. Also, I have tried two methods of installing the driver: command line using "sudo apt install nvidia-340" and from the "Additional drivers" tab in "Softwares and Updates". Both result in the same problem. In the output above, the entry "nvidia-persistenced: Started" exists because I manually ran "start-nvidia-persistenced" found in /usr/bin. The last output is the same with or without nvidia-340 installed.

Please help.

Question information

Language:
English Edit question
Status:
Expired
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
veli (velisia) said :
#4

https://sportsclub8.online/ adalah agen judi online terbaik dan terpercaya hingga saat ini

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#5

How did you install the driver please? What steps did you take? Are you planning to game on the system? Does the open source nouveau driver not fulfil your needs?

Revision history for this message
Vanamali (vanamalishastry) said :
#6

I installed the driver using two methods:
1) sudo apt install nvidia-340
2) From the Additional Drivers tab in Software & Updates.

Each time modified the grub to change boot parameter to "nomodeset", ran "sudo update-grub", rebooted the system, and when it failed, logged into the console (Ctrl+Alt+F1) and purged the nvidia-340 driver using the command "sudo apt purge nvidia-340". Before rebooting, modified the grub to revert to "quiet splash" and ran "sudo update-grub".

No, I don't plan to game. But, I do create short animations from time-to-time using blender.

I have not tried nouveau as I came across many articles that suggested blacklisting it (I'm a bit skeptical about those articles, but I thought I'd better be safe than sorry).

Revision history for this message
Manfred Hampl (m-hampl) said :
#7

"Process '/bin/systemctl start --no-block nvidia-persistenced.service' failed with exit code 5"

Exit code 5 usually indicates I/O error and may indicate a file system inconsistency.

I suggest that you perfom a full file system check on your root file system (by booting an installer in the "Try Ubuntu without installing" mode).

Revision history for this message
Vanamali (vanamalishastry) said :
#8

@m-hampl,

I ran the file system check using fsck. The following is the output:

sudo fsck -f /dev/sda1
fsck from util-linux 2.31.1
e2fsck 1.44.1 (24-Mar-2018)
Pass 1: Checking inodes, blocks, and sizes
^[[1;5AInode 16387986 extent tree (at level 1) could be narrower. Fix<y>? yes
Inode 16780216 extent tree (at level 1) could be narrower. Fix<y>? yes to all
Pass 1E: Optimizing extent trees
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information

/dev/sda1: ***** FILE SYSTEM WAS MODIFIED *****
/dev/sda1: 1453977/60530688 files (1.0% non-contiguous), 170785887/242119680 blocks

sudo fsck -f /dev/sda1
fsck from util-linux 2.31.1
e2fsck 1.44.1 (24-Mar-2018)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/sda1: 1453977/60530688 files (1.0% non-contiguous), 170785887/242119680 blocks

sudo fsck -f -r /dev/sda1
fsck from util-linux 2.31.1
e2fsck 1.44.1 (24-Mar-2018)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/sda1: 1453977/60530688 files (1.0% non-contiguous), 170785887/242119680 blocks
/dev/sda1: status 0, rss 62344, real 51.474105, user 10.586759, sys 1.213872

I hope this is what you meant. (The ^[[1;5A etc characters are the result of accidental key press.)

Revision history for this message
Manfred Hampl (m-hampl) said :
#9

Ok, the fsck output does not show any severe error.

What is the output of the command

sudo lshw -C display

Revision history for this message
Vanamali (vanamalishastry) said :
#10

 sudo lshw -C display
  *-display
       description: VGA compatible controller
       product: Haswell-ULT Integrated Graphics Controller
       vendor: Intel Corporation
       physical id: 2
       bus info: pci@0000:00:02.0
       version: 0b
       width: 64 bits
       clock: 33MHz
       capabilities: msi pm vga_controller bus_master cap_list rom
       configuration: driver=i915 latency=0
       resources: irq:47 memory:c3000000-c33fffff memory:d0000000-dfffffff ioport:6000(size=64) memory:c0000-dffff
  *-display UNCLAIMED
       description: 3D controller
       product: GF117M [GeForce 610M/710M/810M/820M / GT 620M/625M/630M/720M]
       vendor: NVIDIA Corporation
       physical id: 0
       bus info: pci@0000:03:00.0
       version: a1
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress bus_master cap_list
       configuration: latency=0
       resources: irq:50 memory:c2000000-c2ffffff memory:b0000000-bfffffff memory:c0000000-c1ffffff ioport:3000(size=128)

Revision history for this message
Manfred Hampl (m-hampl) said :
#11

This is one of the systems with two graphic cards. Perhaps https://wiki.ubuntu.com/Bumblebee helps (don't use the instructions for Ubuntu 12.04, but those for 14.04 and newer)

Revision history for this message
Vanamali (vanamalishastry) said :
#12

@m-hampl,

Tried installing bumblebee using the link you gave. Installation went fine. GUI is so far normal. But I found the following:

optirun firefox
[ 587.381006] [ERROR]Cannot access secondary GPU - error: Could not load GPU driver

[ 587.381072] [ERROR]Aborting because fallback start is disabled.

 sudo lshw -C display
[sudo] password for vanamali:
  *-display
       description: VGA compatible controller
       product: Haswell-ULT Integrated Graphics Controller
       vendor: Intel Corporation
       physical id: 2
       bus info: pci@0000:00:02.0
       version: 0b
       width: 64 bits
       clock: 33MHz
       capabilities: msi pm vga_controller bus_master cap_list rom
       configuration: driver=i915 latency=0
       resources: irq:47 memory:c3000000-c33fffff memory:d0000000-dfffffff ioport:6000(size=64) memory:c0000-dffff

 lspci | egrep 'VGA|3D'
00:02.0 VGA compatible controller: Intel Corporation Haswell-ULT Integrated Graphics Controller (rev 0b)
03:00.0 3D controller: NVIDIA Corporation GF117M [GeForce 610M/710M/810M/820M / GT 620M/625M/630M/720M] (rev a1)

The 3D controller is not listed by lshw.

Revision history for this message
Manfred Hampl (m-hampl) said :
#13

Sorry, this is unexpected. I do not own such system with two graphics adapters myself, and so my knowledge about that is limited.

Maybe you should look at
https://askubuntu.com/questions/1054932/error-running-bumblebee-ubuntu-18-04
and/or
https://www.youtube.com/watch?v=CezzY3DGi4U

Revision history for this message
Vanamali (vanamalishastry) said :
#14

I tried that. No luck! The display works fine, but the nvidia card is not recognised. After installation, the output of lshw is:

sudo lshw -c display
  *-display
       description: VGA compatible controller
       product: Haswell-ULT Integrated Graphics Controller
       vendor: Intel Corporation
       physical id: 2
       bus info: pci@0000:00:02.0
       version: 0b
       width: 64 bits
       clock: 33MHz
       capabilities: msi pm vga_controller bus_master cap_list rom
       configuration: driver=i915 latency=0
       resources: irq:47 memory:c3000000-c33fffff memory:d0000000-dfffffff ioport:6000(size=64) memory:c0000-dffff

Notice that nvidia card is not at all mentioned. I also tried the nouveau-firmware (sudo apt install nouveau-firmware). This recognises the nvidia and uses it. But leads to problems in many other parts of the system. For example, after installation, I lost the use of usb mouse. The system wouldn't recognise the usb mouse. Later on, the system started hanging. And finally, I had to uninstall the nouveau-firmware. The system is now in a slightly worse shape. The nvidia card is not recognised. The output of lshw is the same as listed above.

Revision history for this message
Vanamali (vanamalishastry) said :
#15

Also, with the nouveau-firmware installed, suspend/hibernate feature did not work.

Revision history for this message
Launchpad Janitor (janitor) said :
#16

This question was expired because it remained in the 'Open' state without activity for the last 15 days.