[SOLVED] Mint 19 (cinnamon) Stuck at Desktop during Shutdown

Quick to answer questions about finding your way around Linux Mint as a new user.
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
N3wb

[SOLVED] Mint 19 (cinnamon) Stuck at Desktop during Shutdown

Post by N3wb »

As the title suggests, the last time I tried to shutdown it got to the point only the desktop wallpaper was shown on the screen and then there was no progress. I had to hold power button to force turn off on my laptop. I tried finding any error events related to this in system logs. but could not find it using the logs application.
Any idea what went wrong? Or where to start for troubleshooting?
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Laurent85
Level 17
Level 17
Posts: 7081
Joined: Tue May 26, 2015 10:11 am

Re: Mint 19 (cinnamon) Stuck at Desktop during Shutdown

Post by Laurent85 »

Press the Esc key and see messages displayed on screen while hanging.
Image
N3wb

Re: Mint 19 (cinnamon) Stuck at Desktop during Shutdown

Post by N3wb »

Laurent85 wrote: Tue Sep 25, 2018 1:15 pm Press the Esc key and look for any message displayed on screen while hanging.
For future hang-ups I'll try that, but any log to salvage for my previous instance?
Laurent85
Level 17
Level 17
Posts: 7081
Joined: Tue May 26, 2015 10:11 am

Re: Mint 19 (cinnamon) Stuck at Desktop during Shutdown

Post by Laurent85 »

N3wb wrote: Tue Sep 25, 2018 1:17 pmbut any log to salvage for my previous instance?
Previous logs are not reset. You may have a look at the Logs utility.
Image
N3wb

Re: Mint 19 (cinnamon) Stuck at Desktop during Shutdown

Post by N3wb »

Yesterday night, I encountered the same issue. Here's what the log said (pretty long log since laptop was on overnight so I'm showing the repetitive portion):
watchdog: BUG: soft lockup - CPU#2 stuck for 23s! [Xorg:1197]
(t=8565760 jiffies g=401788 c=401787 q=181775)
2-....: (8565760 ticks this GP) idle=4b2/140000000000001/0 softirq=581588/581588 fqs=4281831
INFO: rcu_sched self-detected stall on CPU
Any idea how do I fix it? Seems like a major issue...
Laurent85
Level 17
Level 17
Posts: 7081
Joined: Tue May 26, 2015 10:11 am

Re: Mint 19 (cinnamon) Stuck at Desktop during Shutdown

Post by Laurent85 »

Please post your specs:

Code: Select all

lspci -knn | grep -EiA3 'vga|3d'
inxi -Fxz
Image
N3wb

Re: Mint 19 (cinnamon) Stuck at Desktop during Shutdown

Post by N3wb »

lspci -knn | grep -EiA3 'vga|3d'

Code: Select all

00:02.0 VGA compatible controller [0300]: Intel Corporation Haswell-ULT Integrated Graphics Controller [8086:0a16] (rev 09)
	Subsystem: Hewlett-Packard Company Haswell-ULT Integrated Graphics Controller [103c:2166]
	Kernel driver in use: i915
	Kernel modules: i915
--
0a:00.0 3D controller [0302]: NVIDIA Corporation GK208M [GeForce GT 740M] [10de:1292] (rev a1)
	Subsystem: Hewlett-Packard Company GK208M [GeForce GT 740M] [103c:21da]
	Kernel modules: nvidiafb, nouveau, nvidia_drm, nvidia
inxi -Fxz

Code: Select all

System:    Host: HP-Pav15-PC Kernel: 4.15.0-34-generic x86_64
           bits: 64 gcc: 7.3.0
           Desktop: Cinnamon 3.8.9 (Gtk 3.22.30-1ubuntu1)
           Distro: Linux Mint 19 Tara
Machine:   Device: laptop System: Hewlett-Packard product: HP Pavilion 15 Notebook PC v: 098C110000404100000610180 serial: N/A
           Mobo: Hewlett-Packard model: 2166 v: 29.42 serial: N/A
           UEFI: Insyde v: F.67 date: 11/26/2014
Battery    BAT0: charge: 16.6 Wh 94.6% condition: 17.5/17.5 Wh (100%)
           model: Hewlett-Packard Primary status: Charging
CPU:       Dual core Intel Core i5-4200U (-MT-MCP-) 
           arch: Haswell rev.1 cache: 3072 KB
           flags: (lm nx sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx) bmips: 9178
           clock speeds: max: 2600 MHz 1: 1320 MHz 2: 1456 MHz 3: 1447 MHz
           4: 1510 MHz
Graphics:  Card-1: Intel Haswell-ULT Integrated Graphics Controller
           bus-ID: 00:02.0
           Card-2: NVIDIA GK208M [GeForce GT 740M] bus-ID: 0a:00.0
           Display Server: x11 (X.Org 1.19.6 )
           drivers: modesetting (unloaded: fbdev,vesa)
           Resolution: 1366x768@59.99hz
           OpenGL: renderer: Mesa DRI Intel Haswell Mobile
           version: 4.5 Mesa 18.0.5 Direct Render: Yes
Audio:     Card-1 Intel 8 Series HD Audio Controller
           driver: snd_hda_intel bus-ID: 00:1b.0
           Card-2 Intel Haswell-ULT HD Audio Controller
           driver: snd_hda_intel bus-ID: 00:03.0
           Sound: Advanced Linux Sound Architecture v: k4.15.0-34-generic
Network:   Card-1: Ralink RT3290 Wireless 802.11n 1T/1R PCIe
           driver: rt2800pci v: 2.3.0 bus-ID: 08:00.0
           IF: wlo1 state: up mac: <filter>
           Card-2: Realtek RTL8101/2/6E PCIE Fast/Gigabit Ethernet controller
           driver: r8169 v: 2.3LK-NAPI port: 4000 bus-ID: 09:00.0
           IF: eno1 state: down mac: <filter>
Drives:    HDD Total Size: 2000.4GB (43.3% used)
           ID-1: /dev/sda model: HGST_HTS541010A9 size: 1000.2GB
           ID-2: USB /dev/sdb model: My_Passport_259F size: 1000.2GB
Partition: ID-1: / size: 19G used: 11G (62%) fs: ext4 dev: /dev/sda7
           ID-2: /home size: 278G used: 3.5G (2%) fs: ext4 dev: /dev/sda9
           ID-3: swap-1 size: 8.19GB used: 0.00GB (0%)
           fs: swap dev: /dev/dm-0
RAID:      No RAID devices: /proc/mdstat, md_mod kernel module present
Sensors:   System Temperatures: cpu: 51.0C mobo: N/A
           Fan Speeds (in rpm): cpu: N/A
Info:      Processes: 234 Uptime: 4 min Memory: 1445.4/7906.8MB
           Init: systemd runlevel: 5 Gcc sys: 7.3.0
           Client: Shell (bash 4.4.191) inxi: 2.3.56 
Also after I posted my previous reply, I found in some ubuntu forum post that adding nouveau.modeset=0 or nomodeset could help so I added it. (Sorry don't have the link to that post but I remember searching for softlock bug CPU issue)
Last edited by Moem on Wed Oct 03, 2018 7:59 am, edited 1 time in total.
Reason: Swapped the quote tags out for code tags; the code tags retain some formatting that make your output easier to read.
Laurent85
Level 17
Level 17
Posts: 7081
Joined: Tue May 26, 2015 10:11 am

Re: Mint 19 (cinnamon) Stuck at Desktop during Shutdown

Post by Laurent85 »

The Nvidia driver is installed and currently not loaded. Current setup is not functioning properly.
Remove nouveau.modeset=0 and nomedeset from the grub settings, then update grub's configuration file:

Code: Select all

sudo grub-update
Also update the initrd image:

Code: Select all

sudo update-initramfs -u
Then reboot and enter the bios settings and check Secure Boot is disabled. The nvidia driver can't load with SB active.
Image
N3wb

Re: Mint 19 (cinnamon) Stuck at Desktop during Shutdown

Post by N3wb »

Laurent85 wrote: Mon Oct 01, 2018 11:41 am The Nvidia driver is installed and currently not loaded. Current setup is not functioning properly.
Remove nouveau.modeset=0 and nomedeset from the grub settings, then update grub's configuration file:

Code: Select all

sudo grub-update
Also update the initrd image:

Code: Select all

sudo update-initramfs -u
Then reboot and enter the bios settings and check Secure Boot is disabled. The nvidia driver can't load with SB active.
When I reported this issue, those 2 parameters were not there in the GRUB file. Yesterday I last checked my BIOS settings and secure boot was disabled. Also I'm currently using Intel integrated graphics with nvidia-driver-390. Also the initial parameters in file were: quiet splash nouveau.runpm=0
Should I still change the settings?
Laurent85
Level 17
Level 17
Posts: 7081
Joined: Tue May 26, 2015 10:11 am

Re: Mint 19 (cinnamon) Stuck at Desktop during Shutdown

Post by Laurent85 »

The nvidia driver is installed and not loaded, something is wrong with your current setup.
N3wb wrote: Mon Oct 01, 2018 12:31 pm When I reported this issue, those 2 parameters were not there in the GRUB file. Yesterday I last checked my BIOS settings and secure boot was disabled. Also I'm currently using Intel integrated graphics with nvidia-driver-390. Also the initial parameters in file were: quiet splash nouveau.runpm=0
Should I still change the settings?
Yes. And as we don't what you have done so far trying to solve the issue, first do some clean up. Remove nouveau.runpm=0, update grub:

Code: Select all

sudo update-grub
Purge Nvidia:

Code: Select all

apt purge nvidia-*
apt install nvidia-prime-applet
sudo rm /lib/modules/$(uname -r)/kernel/drivers/char/drm/nvidia*.ko
Reboot and see the instructions in the release notes to install the nvidia driver:
https://www.linuxmint.com/rel_tara_cinnamon.php > Solving freezes during the boot sequence
Reboot after nvidia installation then check the output of:

Code: Select all

lspci -knn | grep -EiA3 'vga|3d'
inxi -Gx
Image
N3wb

Re: Mint 19 (cinnamon) Stuck at Desktop during Shutdown

Post by N3wb »

Ugh another issue now...
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
libnvidia-ifr1-390 : Depends: libnvidia-gl-390 but it is not going to be installed
libnvidia-ifr1-390:i386 : Depends: libnvidia-gl-390:i386 but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
Laurent85
Level 17
Level 17
Posts: 7081
Joined: Tue May 26, 2015 10:11 am

Re: Mint 19 (cinnamon) Stuck at Desktop during Shutdown

Post by Laurent85 »

N3wb wrote: Mon Oct 01, 2018 1:48 pm Ugh another issue now...
Same issue I guess, the cause of your problems, you have package inconsistencies.
Sync repositories:

Code: Select all

apt update
Post the output of:

Code: Select all

ubuntu-devices drivers
inxi -r
apt search ~invidia
apt install -fs
Image
N3wb

Re: Mint 19 (cinnamon) Stuck at Desktop during Shutdown

Post by N3wb »

Code: Select all

$ ubuntu-drivers devices
== /sys/devices/pci0000:00/0000:00:1c.4/0000:0a:00.0 ==
modalias : pci:v000010DEd00001292sv0000103Csd000021DAbc03sc02i00
vendor   : NVIDIA Corporation
model    : GK208M [GeForce GT 740M]
driver   : nvidia-driver-390 - third-party free
driver   : nvidia-340 - distro non-free
driver   : nvidia-driver-396 - third-party free recommended
driver   : xserver-xorg-video-nouveau - distro free builtin

Code: Select all

$ inxi -r
Repos:     Active apt sources in file: /etc/apt/sources.list.d/graphics-drivers-ppa-bionic.list
           deb http://ppa.launchpad.net/graphics-drivers/ppa/ubuntu bionic main
           deb-src http://ppa.launchpad.net/graphics-drivers/ppa/ubuntu bionic main
           Active apt sources in file: /etc/apt/sources.list.d/noobslab-icons-bionic.list
           deb http://ppa.launchpad.net/noobslab/icons/ubuntu bionic main
           deb-src http://ppa.launchpad.net/noobslab/icons/ubuntu bionic main
           Active apt sources in file: /etc/apt/sources.list.d/noobslab-themes-bionic.list
           deb http://ppa.launchpad.net/noobslab/themes/ubuntu bionic main
           deb-src http://ppa.launchpad.net/noobslab/themes/ubuntu bionic main
           Active apt sources in file: /etc/apt/sources.list.d/official-package-repositories.list
           deb http://packages.linuxmint.com tara main upstream import backport
           deb http://archive.ubuntu.com/ubuntu bionic main restricted universe multiverse
           deb http://archive.ubuntu.com/ubuntu bionic-updates main restricted universe multiverse
           deb http://archive.ubuntu.com/ubuntu bionic-backports main restricted universe multiverse
           deb http://security.ubuntu.com/ubuntu/ bionic-security main restricted universe multiverse
           deb http://archive.canonical.com/ubuntu/ bionic partner
           Active apt sources in file: /etc/apt/sources.list.d/teejee2008-ppa-bionic.list
           deb http://ppa.launchpad.net/teejee2008/ppa/ubuntu bionic main
           deb-src http://ppa.launchpad.net/teejee2008/ppa/ubuntu bionic main

Code: Select all

$ sudo apt search ~invidia
i A libnvidia-compute-396           - NVIDIA libcompute package                 
i   libnvidia-compute-396:i386      - NVIDIA libcompute package                 
iB  libnvidia-decode-396:i386       - NVIDIA Video Decoding runtime libraries   
iB  libnvidia-encode-396:i386       - NVENC Video Encoding runtime library      
iB  libnvidia-fbc1-396:i386         - NVIDIA OpenGL-based Framebuffer Capture ru
i   nvidia-prime                    - Tools to enable NVIDIA's Prime            
i   nvidia-prime-applet             - An applet for NVIDIA Prime                
i   nvidia-settings                 - Tool for configuring the NVIDIA graphics d

Code: Select all

$ apt install -fs
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Laurent85
Level 17
Level 17
Posts: 7081
Joined: Tue May 26, 2015 10:11 am

Re: Mint 19 (cinnamon) Stuck at Desktop during Shutdown

Post by Laurent85 »

I wonder why those i386 packages got installed. Purge the following nvidia packages:

Code: Select all

apt purge libnvidia-compute-396 libnvidia-compute-396:i386 libnvidia-decode-396:i386 libnvidia-encode-396:i386 libnvidia-fbc1-396:i386 
Post command results:

Code: Select all

dpkg --print-architecture
Simulate the installation of nvidia-driver-396 and post back the results:

Code: Select all

apt install nvidia-driver-396 --simulate
Image
N3wb

Re: Mint 19 (cinnamon) Stuck at Desktop during Shutdown

Post by N3wb »

Purged the packages as per command.

Code: Select all

$ dpkg --print-architecture
amd64

Code: Select all

$ apt install nvidia-driver-396 --simulate
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libbsd0:i386 libdrm-amdgpu1:i386 libdrm-intel1:i386 libdrm-nouveau2:i386
  libdrm-radeon1:i386 libdrm2:i386 libedit2:i386 libelf1:i386 libexpat1:i386
  libffi6:i386 libgl1:i386 libgl1-mesa-dri:i386 libglapi-mesa:i386
  libglvnd0:i386 libglx-mesa0:i386 libglx0:i386 libllvm6.0:i386
  libpciaccess0:i386 libsensors4:i386 libstdc++6:i386 libx11-6:i386
  libx11-xcb1:i386 libxau6:i386 libxcb-dri2-0:i386 libxcb-dri3-0:i386
  libxcb-glx0:i386 libxcb-present0:i386 libxcb-sync1:i386 libxcb1:i386
  libxdamage1:i386 libxdmcp6:i386 libxext6:i386 libxfixes3:i386
  libxshmfence1:i386 libxxf86vm1:i386
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  libnvidia-cfg1-396 libnvidia-common-396 libnvidia-compute-396
  libnvidia-decode-396 libnvidia-encode-396 libnvidia-fbc1-396
  libnvidia-gl-396 libnvidia-ifr1-396 nvidia-compute-utils-396 nvidia-dkms-396
  nvidia-kernel-common-396 nvidia-kernel-source-396 nvidia-utils-396
  xserver-xorg-video-nvidia-396
Recommended packages:
  libnvidia-compute-396:i386 libnvidia-decode-396:i386
  libnvidia-encode-396:i386 libnvidia-ifr1-396:i386 libnvidia-fbc1-396:i386
  libnvidia-gl-396:i386
The following NEW packages will be installed:
  libnvidia-cfg1-396 libnvidia-common-396 libnvidia-compute-396
  libnvidia-decode-396 libnvidia-encode-396 libnvidia-fbc1-396
  libnvidia-gl-396 libnvidia-ifr1-396 nvidia-compute-utils-396 nvidia-dkms-396
  nvidia-driver-396 nvidia-kernel-common-396 nvidia-kernel-source-396
  nvidia-utils-396 xserver-xorg-video-nvidia-396
0 upgraded, 15 newly installed, 0 to remove and 0 not upgraded.
Inst libnvidia-cfg1-396 (396.54-0ubuntu0~gpu18.04.1 Proprietary GPU Drivers:18.04/bionic [amd64])
Inst libnvidia-common-396 (396.54-0ubuntu0~gpu18.04.1 Proprietary GPU Drivers:18.04/bionic [all])
Inst libnvidia-compute-396 (396.54-0ubuntu0~gpu18.04.1 Proprietary GPU Drivers:18.04/bionic [amd64])
Inst libnvidia-decode-396 (396.54-0ubuntu0~gpu18.04.1 Proprietary GPU Drivers:18.04/bionic [amd64])
Inst libnvidia-encode-396 (396.54-0ubuntu0~gpu18.04.1 Proprietary GPU Drivers:18.04/bionic [amd64])
Inst libnvidia-fbc1-396 (396.54-0ubuntu0~gpu18.04.1 Proprietary GPU Drivers:18.04/bionic [amd64])
Inst libnvidia-gl-396 (396.54-0ubuntu0~gpu18.04.1 Proprietary GPU Drivers:18.04/bionic [amd64])
Inst libnvidia-ifr1-396 (396.54-0ubuntu0~gpu18.04.1 Proprietary GPU Drivers:18.04/bionic [amd64])
Inst nvidia-compute-utils-396 (396.54-0ubuntu0~gpu18.04.1 Proprietary GPU Drivers:18.04/bionic [amd64])
Inst nvidia-kernel-source-396 (396.54-0ubuntu0~gpu18.04.1 Proprietary GPU Drivers:18.04/bionic [amd64])
Inst nvidia-kernel-common-396 (396.54-0ubuntu0~gpu18.04.1 Proprietary GPU Drivers:18.04/bionic [amd64])
Inst nvidia-dkms-396 (396.54-0ubuntu0~gpu18.04.1 Proprietary GPU Drivers:18.04/bionic [amd64])
Inst nvidia-utils-396 (396.54-0ubuntu0~gpu18.04.1 Proprietary GPU Drivers:18.04/bionic [amd64])
Inst xserver-xorg-video-nvidia-396 (396.54-0ubuntu0~gpu18.04.1 Proprietary GPU Drivers:18.04/bionic [amd64])
Inst nvidia-driver-396 (396.54-0ubuntu0~gpu18.04.1 Proprietary GPU Drivers:18.04/bionic [amd64])
Conf libnvidia-cfg1-396 (396.54-0ubuntu0~gpu18.04.1 Proprietary GPU Drivers:18.04/bionic [amd64])
Conf libnvidia-common-396 (396.54-0ubuntu0~gpu18.04.1 Proprietary GPU Drivers:18.04/bionic [all])
Conf libnvidia-compute-396 (396.54-0ubuntu0~gpu18.04.1 Proprietary GPU Drivers:18.04/bionic [amd64])
Conf libnvidia-decode-396 (396.54-0ubuntu0~gpu18.04.1 Proprietary GPU Drivers:18.04/bionic [amd64])
Conf libnvidia-encode-396 (396.54-0ubuntu0~gpu18.04.1 Proprietary GPU Drivers:18.04/bionic [amd64])
Conf libnvidia-fbc1-396 (396.54-0ubuntu0~gpu18.04.1 Proprietary GPU Drivers:18.04/bionic [amd64])
Conf libnvidia-gl-396 (396.54-0ubuntu0~gpu18.04.1 Proprietary GPU Drivers:18.04/bionic [amd64])
Conf libnvidia-ifr1-396 (396.54-0ubuntu0~gpu18.04.1 Proprietary GPU Drivers:18.04/bionic [amd64])
Conf nvidia-compute-utils-396 (396.54-0ubuntu0~gpu18.04.1 Proprietary GPU Drivers:18.04/bionic [amd64])
Conf nvidia-kernel-source-396 (396.54-0ubuntu0~gpu18.04.1 Proprietary GPU Drivers:18.04/bionic [amd64])
Conf nvidia-kernel-common-396 (396.54-0ubuntu0~gpu18.04.1 Proprietary GPU Drivers:18.04/bionic [amd64])
Conf nvidia-dkms-396 (396.54-0ubuntu0~gpu18.04.1 Proprietary GPU Drivers:18.04/bionic [amd64])
Conf nvidia-utils-396 (396.54-0ubuntu0~gpu18.04.1 Proprietary GPU Drivers:18.04/bionic [amd64])
Conf xserver-xorg-video-nvidia-396 (396.54-0ubuntu0~gpu18.04.1 Proprietary GPU Drivers:18.04/bionic [amd64])
Conf nvidia-driver-396 (396.54-0ubuntu0~gpu18.04.1 Proprietary GPU Drivers:18.04/bionic [amd64])
Laurent85
Level 17
Level 17
Posts: 7081
Joined: Tue May 26, 2015 10:11 am

Re: Mint 19 (cinnamon) Stuck at Desktop during Shutdown

Post by Laurent85 »

Remove i386 packages, run:

Code: Select all

apt autoremove --purge
Install nvidia driver:

Code: Select all

apt install nvidia-driver-396
Reboot and check command output of:

Code: Select all

lspci -knn | grep -EiA3 'vga|3d'
inxi -Gx
Image
N3wb

Re: Mint 19 (cinnamon) Stuck at Desktop during Shutdown

Post by N3wb »

Code: Select all

$ apt autoremove --purge
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED:
  libbsd0:i386* libdrm-amdgpu1:i386* libdrm-intel1:i386* libdrm-nouveau2:i386*
  libdrm-radeon1:i386* libdrm2:i386* libedit2:i386* libelf1:i386*
  libexpat1:i386* libffi6:i386* libgl1:i386* libgl1-mesa-dri:i386*
  libglapi-mesa:i386* libglvnd0:i386* libglx-mesa0:i386* libglx0:i386*
  libllvm6.0:i386* libpciaccess0:i386* libsensors4:i386* libstdc++6:i386*
  libx11-6:i386* libx11-xcb1:i386* libxau6:i386* libxcb-dri2-0:i386*
  libxcb-dri3-0:i386* libxcb-glx0:i386* libxcb-present0:i386*
  libxcb-sync1:i386* libxcb1:i386* libxdamage1:i386* libxdmcp6:i386*
  libxext6:i386* libxfixes3:i386* libxshmfence1:i386* libxxf86vm1:i386*
0 upgraded, 0 newly installed, 35 to remove and 0 not upgraded.
After this operation, 226 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 360092 files and directories currently installed.)
Removing libgl1:i386 (1.0.0-2ubuntu2.2) ...
Removing libglx0:i386 (1.0.0-2ubuntu2.2) ...
Removing libglx-mesa0:i386 (18.0.5-0ubuntu0~18.04.1) ...
Removing libxcb-sync1:i386 (1.13-1) ...
Removing libgl1-mesa-dri:i386 (18.0.5-0ubuntu0~18.04.1) ...
Removing libdrm-amdgpu1:i386 (2.4.91-2) ...
Removing libdrm-intel1:i386 (2.4.91-2) ...
Removing libdrm-nouveau2:i386 (2.4.91-2) ...
Removing libdrm-radeon1:i386 (2.4.91-2) ...
Removing libdrm2:i386 (2.4.91-2) ...
Removing libllvm6.0:i386 (1:6.0-1ubuntu2) ...
Removing libedit2:i386 (3.1-20170329-1) ...
Removing libelf1:i386 (0.170-0.4) ...
Removing libexpat1:i386 (2.2.5-3) ...
Removing libffi6:i386 (3.2.1-8) ...
Removing libglapi-mesa:i386 (18.0.5-0ubuntu0~18.04.1) ...
Removing libglvnd0:i386 (1.0.0-2ubuntu2.2) ...
Removing libpciaccess0:i386 (0.14-1) ...
Removing libsensors4:i386 (1:3.4.0-4) ...
Removing libstdc++6:i386 (8.2.0-1ubuntu2~18.04) ...
Removing libx11-xcb1:i386 (2:1.6.4-3ubuntu0.1) ...
Removing libxcb-dri2-0:i386 (1.13-1) ...
Removing libxcb-dri3-0:i386 (1.13-1) ...
Removing libxcb-glx0:i386 (1.13-1) ...
Removing libxcb-present0:i386 (1.13-1) ...
Removing libxdamage1:i386 (1:1.1.4-3) ...
Removing libxxf86vm1:i386 (1:1.1.4-1) ...
Removing libxext6:i386 (2:1.3.3-1) ...
Removing libxfixes3:i386 (1:5.0.3-1) ...
Removing libxshmfence1:i386 (1.3-1) ...
Removing libx11-6:i386 (2:1.6.4-3ubuntu0.1) ...
Removing libxcb1:i386 (1.13-1) ...
Removing libxdmcp6:i386 (1:1.1.2-3) ...
Removing libbsd0:i386 (0.8.7-1) ...
Removing libxau6:i386 (1:1.0.8-1) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...
(Reading database ... 360006 files and directories currently installed.)
Purging configuration files for libxext6:i386 (2:1.3.3-1) ...
Purging configuration files for libgl1-mesa-dri:i386 (18.0.5-0ubuntu0~18.04.1) ...
Purging configuration files for libsensors4:i386 (1:3.4.0-4) ...
Purging configuration files for libxxf86vm1:i386 (1:1.1.4-1) ...
Purging configuration files for libxau6:i386 (1:1.0.8-1) ...

Code: Select all

$ apt install nvidia-driver-396
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  libnvidia-cfg1-396 libnvidia-common-396 libnvidia-compute-396
  libnvidia-decode-396 libnvidia-encode-396 libnvidia-fbc1-396
  libnvidia-gl-396 libnvidia-ifr1-396 nvidia-compute-utils-396 nvidia-dkms-396
  nvidia-kernel-common-396 nvidia-kernel-source-396 nvidia-utils-396
  xserver-xorg-video-nvidia-396
Recommended packages:
  libnvidia-compute-396:i386 libnvidia-decode-396:i386
  libnvidia-encode-396:i386 libnvidia-ifr1-396:i386 libnvidia-fbc1-396:i386
  libnvidia-gl-396:i386
The following NEW packages will be installed:
  libnvidia-cfg1-396 libnvidia-common-396 libnvidia-compute-396
  libnvidia-decode-396 libnvidia-encode-396 libnvidia-fbc1-396
  libnvidia-gl-396 libnvidia-ifr1-396 nvidia-compute-utils-396 nvidia-dkms-396
  nvidia-driver-396 nvidia-kernel-common-396 nvidia-kernel-source-396
  nvidia-utils-396 xserver-xorg-video-nvidia-396
0 upgraded, 15 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/48.6 MB of archives.
After this operation, 224 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Selecting previously unselected package libnvidia-cfg1-396:amd64.
(Reading database ... 360007 files and directories currently installed.)
Preparing to unpack .../00-libnvidia-cfg1-396_396.54-0ubuntu0~gpu18.04.1_amd64.deb ...
Unpacking libnvidia-cfg1-396:amd64 (396.54-0ubuntu0~gpu18.04.1) ...
Selecting previously unselected package libnvidia-common-396.
Preparing to unpack .../01-libnvidia-common-396_396.54-0ubuntu0~gpu18.04.1_all.deb ...
Unpacking libnvidia-common-396 (396.54-0ubuntu0~gpu18.04.1) ...
Selecting previously unselected package libnvidia-compute-396:amd64.
Preparing to unpack .../02-libnvidia-compute-396_396.54-0ubuntu0~gpu18.04.1_amd64.deb ...
Unpacking libnvidia-compute-396:amd64 (396.54-0ubuntu0~gpu18.04.1) ...
Selecting previously unselected package libnvidia-decode-396:amd64.
Preparing to unpack .../03-libnvidia-decode-396_396.54-0ubuntu0~gpu18.04.1_amd64.deb ...
Unpacking libnvidia-decode-396:amd64 (396.54-0ubuntu0~gpu18.04.1) ...
Selecting previously unselected package libnvidia-encode-396:amd64.
Preparing to unpack .../04-libnvidia-encode-396_396.54-0ubuntu0~gpu18.04.1_amd64.deb ...
Unpacking libnvidia-encode-396:amd64 (396.54-0ubuntu0~gpu18.04.1) ...
Selecting previously unselected package libnvidia-fbc1-396:amd64.
Preparing to unpack .../05-libnvidia-fbc1-396_396.54-0ubuntu0~gpu18.04.1_amd64.deb ...
Unpacking libnvidia-fbc1-396:amd64 (396.54-0ubuntu0~gpu18.04.1) ...
Preparing to unpack .../06-libnvidia-gl-396_396.54-0ubuntu0~gpu18.04.1_amd64.deb ...
diversion of /usr/lib/x86_64-linux-gnu/libGL.so.1 to /usr/lib/x86_64-linux-gnu/libGL.so.1.distrib by nvidia-340
dpkg-divert: error: mismatch on package
  when removing 'diversion of /usr/lib/x86_64-linux-gnu/libGL.so.1 by libnvidia-gl-396'
  found 'diversion of /usr/lib/x86_64-linux-gnu/libGL.so.1 to /usr/lib/x86_64-linux-gnu/libGL.so.1.distrib by nvidia-340'
dpkg: error processing archive /tmp/apt-dpkg-install-CtAn8A/06-libnvidia-gl-396_396.54-0ubuntu0~gpu18.04.1_amd64.deb (--unpack):
 new libnvidia-gl-396:amd64 package pre-installation script subprocess returned error exit status 2
Selecting previously unselected package libnvidia-ifr1-396:amd64.
Preparing to unpack .../07-libnvidia-ifr1-396_396.54-0ubuntu0~gpu18.04.1_amd64.deb ...
Unpacking libnvidia-ifr1-396:amd64 (396.54-0ubuntu0~gpu18.04.1) ...
Selecting previously unselected package nvidia-compute-utils-396.
Preparing to unpack .../08-nvidia-compute-utils-396_396.54-0ubuntu0~gpu18.04.1_amd64.deb ...
Unpacking nvidia-compute-utils-396 (396.54-0ubuntu0~gpu18.04.1) ...
Selecting previously unselected package nvidia-kernel-source-396.
Preparing to unpack .../09-nvidia-kernel-source-396_396.54-0ubuntu0~gpu18.04.1_amd64.deb ...
Unpacking nvidia-kernel-source-396 (396.54-0ubuntu0~gpu18.04.1) ...
Selecting previously unselected package nvidia-kernel-common-396.
Preparing to unpack .../10-nvidia-kernel-common-396_396.54-0ubuntu0~gpu18.04.1_amd64.deb ...
Unpacking nvidia-kernel-common-396 (396.54-0ubuntu0~gpu18.04.1) ...
Selecting previously unselected package nvidia-dkms-396.
Preparing to unpack .../11-nvidia-dkms-396_396.54-0ubuntu0~gpu18.04.1_amd64.deb ...
Unpacking nvidia-dkms-396 (396.54-0ubuntu0~gpu18.04.1) ...
Selecting previously unselected package nvidia-utils-396.
Preparing to unpack .../12-nvidia-utils-396_396.54-0ubuntu0~gpu18.04.1_amd64.deb ...
Unpacking nvidia-utils-396 (396.54-0ubuntu0~gpu18.04.1) ...
Selecting previously unselected package xserver-xorg-video-nvidia-396.
Preparing to unpack .../13-xserver-xorg-video-nvidia-396_396.54-0ubuntu0~gpu18.04.1_amd64.deb ...
Unpacking xserver-xorg-video-nvidia-396 (396.54-0ubuntu0~gpu18.04.1) ...
Selecting previously unselected package nvidia-driver-396.
Preparing to unpack .../14-nvidia-driver-396_396.54-0ubuntu0~gpu18.04.1_amd64.deb ...
Unpacking nvidia-driver-396 (396.54-0ubuntu0~gpu18.04.1) ...
Errors were encountered while processing:
 /tmp/apt-dpkg-install-CtAn8A/06-libnvidia-gl-396_396.54-0ubuntu0~gpu18.04.1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Code: Select all

$ lspci -knn | grep -EiA3 'vga|3d'
00:02.0 VGA compatible controller [0300]: Intel Corporation Haswell-ULT Integrated Graphics Controller [8086:0a16] (rev 09)
	Subsystem: Hewlett-Packard Company Haswell-ULT Integrated Graphics Controller [103c:2166]
	Kernel driver in use: i915
	Kernel modules: i915
--
0a:00.0 3D controller [0302]: NVIDIA Corporation GK208M [GeForce GT 740M] [10de:1292] (rev a1)
	Subsystem: Hewlett-Packard Company GK208M [GeForce GT 740M] [103c:21da]
	Kernel modules: nvidiafb, nouveau

Code: Select all

$ inxi -Gx
Graphics:  Card-1: Intel Haswell-ULT Integrated Graphics Controller
           bus-ID: 00:02.0
           Card-2: NVIDIA GK208M [GeForce GT 740M] bus-ID: 0a:00.0
           Display Server: x11 (X.Org 1.19.6 )
           drivers: modesetting (unloaded: fbdev,vesa)
           Resolution: 1366x768@59.99hz
           OpenGL: renderer: Mesa DRI Intel Haswell Mobile
           version: 4.5 Mesa 18.0.5 Direct Render: Yes
I've seen the dpkg-divert error several times before when I was trying on my own. It showed up again as I expected.
Laurent85
Level 17
Level 17
Posts: 7081
Joined: Tue May 26, 2015 10:11 am

Re: Mint 19 (cinnamon) Stuck at Desktop during Shutdown

Post by Laurent85 »

The package base is broken. Try this:

Code: Select all

apt purge $(apt search ~invidia -F %p)
apt autoremove --purge
apt install nvidia-prime-applet
Reinstalling and purging nvidia-340 orphans:

Code: Select all

apt install nvidia-340
apt purge nvidia-340
apt autoremove --purge 
sudo rm /lib/modules/$(uname -r)/kernel/drivers/char/drm/nvidia*.ko
Reboot.
Check below command returns blank:

Code: Select all

dpkg --audit
Remove graphics-drivers ppa:

Code: Select all

sudo rm /etc/apt/sources.list.d/graphics-drivers*
apt update
Launch Driver Manager utility and install the Nvidia recommended driver. Reboot when done.
Then check the output of:

Code: Select all

lspci -knn | grep -EiA3 'vga|3d'
inxi -Gx
Image
N3wb

Re: Mint 19 (cinnamon) Stuck at Desktop during Shutdown

Post by N3wb »

Code: Select all

$ sudo apt purge $(apt search ~invidia -F %p)
E: Error saving configuration file - apt_dumpcfg (13: Permission denied)
E: Error saving configuration file - apt_dumpcfg (13: Permission denied)
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following package was automatically installed and is no longer required:
  screen-resolution-extra
Use 'sudo apt autoremove' to remove it.
The following packages will be REMOVED:
  libnvidia-cfg1-396* libnvidia-common-396* libnvidia-compute-396*
  libnvidia-decode-396* libnvidia-encode-396* libnvidia-fbc1-396*
  libnvidia-ifr1-396* nvidia-compute-utils-396* nvidia-dkms-396*
  nvidia-driver-396* nvidia-kernel-common-396* nvidia-kernel-source-396*
  nvidia-prime* nvidia-prime-applet* nvidia-settings* nvidia-utils-396*
  xserver-xorg-video-nvidia-396*
0 upgraded, 0 newly installed, 17 to remove and 0 not upgraded.
14 not fully installed or removed.
After this operation, 143 MB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 360513 files and directories currently installed.)
Removing nvidia-driver-396 (396.54-0ubuntu0~gpu18.04.1) ...
Removing xserver-xorg-video-nvidia-396 (396.54-0ubuntu0~gpu18.04.1) ...
Removing libnvidia-cfg1-396:amd64 (396.54-0ubuntu0~gpu18.04.1) ...
Removing libnvidia-common-396 (396.54-0ubuntu0~gpu18.04.1) ...
Removing nvidia-utils-396 (396.54-0ubuntu0~gpu18.04.1) ...
Removing nvidia-compute-utils-396 (396.54-0ubuntu0~gpu18.04.1) ...
Removing libnvidia-encode-396:amd64 (396.54-0ubuntu0~gpu18.04.1) ...
Removing libnvidia-decode-396:amd64 (396.54-0ubuntu0~gpu18.04.1) ...
Removing libnvidia-fbc1-396:amd64 (396.54-0ubuntu0~gpu18.04.1) ...
Removing libnvidia-ifr1-396:amd64 (396.54-0ubuntu0~gpu18.04.1) ...
Removing nvidia-dkms-396 (396.54-0ubuntu0~gpu18.04.1) ...
update-initramfs: deferring update (trigger activated)
Removing nvidia-kernel-common-396 (396.54-0ubuntu0~gpu18.04.1) ...
update-initramfs: deferring update (trigger activated)
Removing nvidia-kernel-source-396 (396.54-0ubuntu0~gpu18.04.1) ...
Removing nvidia-prime (0.8.8) ...
Removing nvidia-prime-applet (1.0.7) ...
Removing nvidia-settings (396.54-0ubuntu0~gpu18.04.1) ...
Removing libnvidia-compute-396:amd64 (396.54-0ubuntu0~gpu18.04.1) ...
Processing triggers for mime-support (3.60ubuntu1) ...
Processing triggers for desktop-file-utils (0.23+linuxmint3) ...
Processing triggers for initramfs-tools (0.130ubuntu3.3) ...
update-initramfs: Generating /boot/initrd.img-4.15.0-36-generic
W: initramfs-tools configuration sets RESUME=UUID=cbb9bc75-78c1-4ba4-9d97-732d45299b8f
W: but no matching swap device is available.
Processing triggers for libc-bin (2.27-3ubuntu1) ...
Processing triggers for man-db (2.8.3-2) ...
Processing triggers for gnome-menus (3.13.3-11ubuntu1.1) ...
(Reading database ... 359970 files and directories currently installed.)
Purging configuration files for nvidia-prime (0.8.8) ...
Purging configuration files for nvidia-kernel-common-396 (396.54-0ubuntu0~gpu18.04.1) ...
update-initramfs: deferring update (trigger activated)
Purging configuration files for nvidia-settings (396.54-0ubuntu0~gpu18.04.1) ...
Purging configuration files for nvidia-compute-utils-396 (396.54-0ubuntu0~gpu18.04.1) ...
Purging configuration files for libnvidia-compute-396:amd64 (396.54-0ubuntu0~gpu18.04.1) ...
Purging configuration files for nvidia-dkms-396 (396.54-0ubuntu0~gpu18.04.1) ...
update-initramfs: deferring update (trigger activated)
Purging configuration files for nvidia-prime-applet (1.0.7) ...
Processing triggers for initramfs-tools (0.130ubuntu3.3) ...
update-initramfs: Generating /boot/initrd.img-4.15.0-36-generic
W: initramfs-tools configuration sets RESUME=UUID=cbb9bc75-78c1-4ba4-9d97-732d45299b8f
W: but no matching swap device is available.

Code: Select all

$ apt autoremove --purge
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED:
  screen-resolution-extra*
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
After this operation, 68.6 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 359967 files and directories currently installed.)
Removing screen-resolution-extra (0.17.3) ...
Processing triggers for dbus (1.12.2-1ubuntu1) ...
(Reading database ... 359950 files and directories currently installed.)
Purging configuration files for screen-resolution-extra (0.17.3) ...
Processing triggers for dbus (1.12.2-1ubuntu1) ...

Code: Select all

$ apt install nvidia-prime-applet
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  nvidia-prime-applet
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 31.3 kB of archives.
After this operation, 65.5 kB of additional disk space will be used.
Get:1 http://packages.linuxmint.com tara/main amd64 nvidia-prime-applet all 1.0.7 [31.3 kB]
Fetched 31.3 kB in 13s (2,343 B/s)                      
Selecting previously unselected package nvidia-prime-applet.
(Reading database ... 359950 files and directories currently installed.)
Preparing to unpack .../nvidia-prime-applet_1.0.7_all.deb ...
Unpacking nvidia-prime-applet (1.0.7) ...
Setting up nvidia-prime-applet (1.0.7) ...
Some errors came up here regarding dpkg bad syntax while installing nvidia-340

Code: Select all

$ apt install nvidia-340
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  lib32gcc1 libc6-i386
Recommended packages:
  nvidia-settings libcuda1-340 nvidia-opencl-icd-340
The following NEW packages will be installed:
  lib32gcc1 libc6-i386 nvidia-340
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Need to get 54.6 MB of archives.
After this operation, 286 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://archive.ubuntu.com/ubuntu bionic/main amd64 libc6-i386 amd64 2.27-3ubuntu1 [2,651 kB]
Get:2 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 lib32gcc1 amd64 1:8.2.0-1ubuntu2~18.04 [47.9 kB]                                                       
Get:3 http://archive.ubuntu.com/ubuntu bionic-updates/restricted amd64 nvidia-340 amd64 340.107-0ubuntu0.18.04.1 [51.9 MB]                                              
Fetched 54.6 MB in 1min 13s (743 kB/s)                                                                                                                                  
Selecting previously unselected package libc6-i386.
(Reading database ... 359965 files and directories currently installed.)
Preparing to unpack .../libc6-i386_2.27-3ubuntu1_amd64.deb ...
Unpacking libc6-i386 (2.27-3ubuntu1) ...
Replaced by files in installed package libc6:i386 (2.27-3ubuntu1) ...
Selecting previously unselected package lib32gcc1.
Preparing to unpack .../lib32gcc1_1%3a8.2.0-1ubuntu2~18.04_amd64.deb ...
Unpacking lib32gcc1 (1:8.2.0-1ubuntu2~18.04) ...
Preparing to unpack .../nvidia-340_340.107-0ubuntu0.18.04.1_amd64.deb ...
diversion of /usr/lib/x86_64-linux-gnu/libGL.so.1 to /usr/lib/x86_64-linux-gnu/libGL.so.1.distrib by nvidia-340
Removing 'diversion of /usr/lib/x86_64-linux-gnu/libGL.so.1 to /usr/lib/x86_64-linux-gnu/libGL.so.1.distrib by nvidia-340'
diversion of /usr/lib/i386-linux-gnu/libGL.so.1 to /usr/lib/i386-linux-gnu/libGL.so.1.distrib by nvidia-340
Removing 'diversion of /usr/lib/i386-linux-gnu/libGL.so.1 to /usr/lib/i386-linux-gnu/libGL.so.1.distrib by nvidia-340'
diversion of /usr/lib/x86_64-linux-gnu/libGL.so to /usr/lib/x86_64-linux-gnu/libGL.so.distrib by nvidia-340
Removing 'diversion of /usr/lib/x86_64-linux-gnu/libGL.so to /usr/lib/x86_64-linux-gnu/libGL.so.distrib by nvidia-340'
diversion of /usr/lib/i386-linux-gnu/libGL.so to /usr/lib/i386-linux-gnu/libGL.so.distrib by nvidia-340
Removing 'diversion of /usr/lib/i386-linux-gnu/libGL.so to /usr/lib/i386-linux-gnu/libGL.so.distrib by nvidia-340'
diversion of /usr/lib/x86_64-linux-gnu/libEGL.so.1 to /usr/lib/x86_64-linux-gnu/libEGL.so.1.distrib by nvidia-340
Removing 'diversion of /usr/lib/x86_64-linux-gnu/libEGL.so.1 to /usr/lib/x86_64-linux-gnu/libEGL.so.1.distrib by nvidia-340'
diversion of /usr/lib/i386-linux-gnu/libEGL.so.1 to /usr/lib/i386-linux-gnu/libEGL.so.1.distrib by nvidia-340
Removing 'diversion of /usr/lib/i386-linux-gnu/libEGL.so.1 to /usr/lib/i386-linux-gnu/libEGL.so.1.distrib by nvidia-340'
diversion of /usr/lib/x86_64-linux-gnu/libEGL.so to /usr/lib/x86_64-linux-gnu/libEGL.so.distrib by nvidia-340
Removing 'diversion of /usr/lib/x86_64-linux-gnu/libEGL.so to /usr/lib/x86_64-linux-gnu/libEGL.so.distrib by nvidia-340'
diversion of /usr/lib/i386-linux-gnu/libEGL.so to /usr/lib/i386-linux-gnu/libEGL.so.distrib by nvidia-340
Removing 'diversion of /usr/lib/i386-linux-gnu/libEGL.so to /usr/lib/i386-linux-gnu/libEGL.so.distrib by nvidia-340'
diversion of /usr/lib/x86_64-linux-gnu/libGLESv2.so to /usr/lib/x86_64-linux-gnu/libGLESv2.so.distrib by nvidia-340
Removing 'diversion of /usr/lib/x86_64-linux-gnu/libGLESv2.so to /usr/lib/x86_64-linux-gnu/libGLESv2.so.distrib by nvidia-340'
diversion of /usr/lib/i386-linux-gnu/libGLESv2.so to /usr/lib/i386-linux-gnu/libGLESv2.so.distrib by nvidia-340
Removing 'diversion of /usr/lib/i386-linux-gnu/libGLESv2.so to /usr/lib/i386-linux-gnu/libGLESv2.so.distrib by nvidia-340'
diversion of /usr/lib/x86_64-linux-gnu/libGLESv2.so.2 to /usr/lib/x86_64-linux-gnu/libGLESv2.so.2.distrib by nvidia-340
Removing 'diversion of /usr/lib/x86_64-linux-gnu/libGLESv2.so.2 to /usr/lib/x86_64-linux-gnu/libGLESv2.so.2.distrib by nvidia-340'
diversion of /usr/lib/i386-linux-gnu/libGLESv2.so.2 to /usr/lib/i386-linux-gnu/libGLESv2.so.2.distrib by nvidia-340
Removing 'diversion of /usr/lib/i386-linux-gnu/libGLESv2.so.2 to /usr/lib/i386-linux-gnu/libGLESv2.so.2.distrib by nvidia-340'
diversion of /usr/lib/x86_64-linux-gnu/libGLESv1_CM.so to /usr/lib/x86_64-linux-gnu/libGLESv1_CM.so.distrib by nvidia-340
Removing 'diversion of /usr/lib/x86_64-linux-gnu/libGLESv1_CM.so to /usr/lib/x86_64-linux-gnu/libGLESv1_CM.so.distrib by nvidia-340'
diversion of /usr/lib/i386-linux-gnu/libGLESv1_CM.so to /usr/lib/i386-linux-gnu/libGLESv1_CM.so.distrib by nvidia-340
Removing 'diversion of /usr/lib/i386-linux-gnu/libGLESv1_CM.so to /usr/lib/i386-linux-gnu/libGLESv1_CM.so.distrib by nvidia-340'
diversion of /usr/lib/x86_64-linux-gnu/libGLESv1_CM.so.1 to /usr/lib/x86_64-linux-gnu/libGLESv1_CM.so.1.distrib by nvidia-340
Removing 'diversion of /usr/lib/x86_64-linux-gnu/libGLESv1_CM.so.1 to /usr/lib/x86_64-linux-gnu/libGLESv1_CM.so.1.distrib by nvidia-340'
diversion of /usr/lib/i386-linux-gnu/libGLESv1_CM.so.1 to /usr/lib/i386-linux-gnu/libGLESv1_CM.so.1.distrib by nvidia-340
Removing 'diversion of /usr/lib/i386-linux-gnu/libGLESv1_CM.so.1 to /usr/lib/i386-linux-gnu/libGLESv1_CM.so.1.distrib by nvidia-340'
Adding 'diversion of /usr/lib/x86_64-linux-gnu/libGL.so.1 to /usr/lib/x86_64-linux-gnu/libGL.so.1.distrib by nvidia-340'
Adding 'diversion of /usr/lib/i386-linux-gnu/libGL.so.1 to /usr/lib/i386-linux-gnu/libGL.so.1.distrib by nvidia-340'
Adding 'diversion of /usr/lib/x86_64-linux-gnu/libGL.so to /usr/lib/x86_64-linux-gnu/libGL.so.distrib by nvidia-340'
Adding 'diversion of /usr/lib/i386-linux-gnu/libGL.so to /usr/lib/i386-linux-gnu/libGL.so.distrib by nvidia-340'
Adding 'diversion of /usr/lib/x86_64-linux-gnu/libEGL.so.1 to /usr/lib/x86_64-linux-gnu/libEGL.so.1.distrib by nvidia-340'
Adding 'diversion of /usr/lib/i386-linux-gnu/libEGL.so.1 to /usr/lib/i386-linux-gnu/libEGL.so.1.distrib by nvidia-340'
Adding 'diversion of /usr/lib/x86_64-linux-gnu/libEGL.so to /usr/lib/x86_64-linux-gnu/libEGL.so.distrib by nvidia-340'
Adding 'diversion of /usr/lib/i386-linux-gnu/libEGL.so to /usr/lib/i386-linux-gnu/libEGL.so.distrib by nvidia-340'
Adding 'diversion of /usr/lib/x86_64-linux-gnu/libGLESv2.so to /usr/lib/x86_64-linux-gnu/libGLESv2.so.distrib by nvidia-340'
Adding 'diversion of /usr/lib/i386-linux-gnu/libGLESv2.so to /usr/lib/i386-linux-gnu/libGLESv2.so.distrib by nvidia-340'
Adding 'diversion of /usr/lib/x86_64-linux-gnu/libGLESv2.so.2 to /usr/lib/x86_64-linux-gnu/libGLESv2.so.2.distrib by nvidia-340'
Adding 'diversion of /usr/lib/i386-linux-gnu/libGLESv2.so.2 to /usr/lib/i386-linux-gnu/libGLESv2.so.2.distrib by nvidia-340'
Adding 'diversion of /usr/lib/x86_64-linux-gnu/libGLESv1_CM.so to /usr/lib/x86_64-linux-gnu/libGLESv1_CM.so.distrib by nvidia-340'
Adding 'diversion of /usr/lib/i386-linux-gnu/libGLESv1_CM.so to /usr/lib/i386-linux-gnu/libGLESv1_CM.so.distrib by nvidia-340'
Adding 'diversion of /usr/lib/x86_64-linux-gnu/libGLESv1_CM.so.1 to /usr/lib/x86_64-linux-gnu/libGLESv1_CM.so.1.distrib by nvidia-340'
Adding 'diversion of /usr/lib/i386-linux-gnu/libGLESv1_CM.so.1 to /usr/lib/i386-linux-gnu/libGLESv1_CM.so.1.distrib by nvidia-340'
Unpacking nvidia-340 (340.107-0ubuntu0.18.04.1) ...
Processing triggers for ureadahead (0.100.0-20) ...
ureadahead will be reprofiled on next reboot
Setting up libc6-i386 (2.27-3ubuntu1) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...
Processing triggers for man-db (2.8.3-2) ...
Setting up lib32gcc1 (1:8.2.0-1ubuntu2~18.04) ...
Setting up nvidia-340 (340.107-0ubuntu0.18.04.1) ...
dpkg: error: version '-' has bad syntax: revision number is empty
dpkg: error: version '-' has bad syntax: revision number is empty
dpkg: error: version '-' has bad syntax: revision number is empty
update-initramfs: deferring update (trigger activated)
INFO:Enable nvidia-340
DEBUG:Parsing /usr/share/ubuntu-drivers-common/quirks/dell_latitude
DEBUG:Parsing /usr/share/ubuntu-drivers-common/quirks/lenovo_thinkpad
DEBUG:Parsing /usr/share/ubuntu-drivers-common/quirks/put_your_quirks_here
Adding system user `nvidia-persistenced' (UID 120) ...
Adding new group `nvidia-persistenced' (GID 128) ...
Adding new user `nvidia-persistenced' (UID 120) with group `nvidia-persistenced' ...
Not creating home directory `/'.
Loading new nvidia-340-340.107 DKMS files...
Building for 4.15.0-36-generic
Building for architecture x86_64
Building initial module for 4.15.0-36-generic
Secure Boot not enabled on this system.
Done.

nvidia:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/4.15.0-36-generic/kernel/drivers/char/drm/

nvidia_uvm.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/4.15.0-36-generic/kernel/drivers/video/

depmod......

DKMS: install completed.
Processing triggers for libc-bin (2.27-3ubuntu1) ...
Processing triggers for initramfs-tools (0.130ubuntu3.3) ...
update-initramfs: Generating /boot/initrd.img-4.15.0-36-generic
W: initramfs-tools configuration sets RESUME=UUID=cbb9bc75-78c1-4ba4-9d97-732d45299b8f
W: but no matching swap device is available.

Code: Select all

$ apt purge nvidia-340
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  lib32gcc1 libc6-i386
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
  nvidia-340*
0 upgraded, 0 newly installed, 1 to remove and 10 not upgraded.
After this operation, 274 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 360534 files and directories currently installed.)
Removing nvidia-340 (340.107-0ubuntu0.18.04.1) ...
Stopping nvidia-persistenced
nvidia-persistenced: no process found
Done.
Removing all DKMS Modules
Done.
diversion of /usr/lib/x86_64-linux-gnu/libGL.so.1 to /usr/lib/x86_64-linux-gnu/libGL.so.1.distrib by nvidia-340
Removing 'diversion of /usr/lib/x86_64-linux-gnu/libGL.so.1 to /usr/lib/x86_64-linux-gnu/libGL.so.1.distrib by nvidia-340'
diversion of /usr/lib/i386-linux-gnu/libGL.so.1 to /usr/lib/i386-linux-gnu/libGL.so.1.distrib by nvidia-340
Removing 'diversion of /usr/lib/i386-linux-gnu/libGL.so.1 to /usr/lib/i386-linux-gnu/libGL.so.1.distrib by nvidia-340'
diversion of /usr/lib/x86_64-linux-gnu/libGL.so to /usr/lib/x86_64-linux-gnu/libGL.so.distrib by nvidia-340
Removing 'diversion of /usr/lib/x86_64-linux-gnu/libGL.so to /usr/lib/x86_64-linux-gnu/libGL.so.distrib by nvidia-340'
diversion of /usr/lib/i386-linux-gnu/libGL.so to /usr/lib/i386-linux-gnu/libGL.so.distrib by nvidia-340
Removing 'diversion of /usr/lib/i386-linux-gnu/libGL.so to /usr/lib/i386-linux-gnu/libGL.so.distrib by nvidia-340'
diversion of /usr/lib/x86_64-linux-gnu/libEGL.so.1 to /usr/lib/x86_64-linux-gnu/libEGL.so.1.distrib by nvidia-340
Removing 'diversion of /usr/lib/x86_64-linux-gnu/libEGL.so.1 to /usr/lib/x86_64-linux-gnu/libEGL.so.1.distrib by nvidia-340'
diversion of /usr/lib/i386-linux-gnu/libEGL.so.1 to /usr/lib/i386-linux-gnu/libEGL.so.1.distrib by nvidia-340
Removing 'diversion of /usr/lib/i386-linux-gnu/libEGL.so.1 to /usr/lib/i386-linux-gnu/libEGL.so.1.distrib by nvidia-340'
diversion of /usr/lib/x86_64-linux-gnu/libEGL.so to /usr/lib/x86_64-linux-gnu/libEGL.so.distrib by nvidia-340
Removing 'diversion of /usr/lib/x86_64-linux-gnu/libEGL.so to /usr/lib/x86_64-linux-gnu/libEGL.so.distrib by nvidia-340'
diversion of /usr/lib/i386-linux-gnu/libEGL.so to /usr/lib/i386-linux-gnu/libEGL.so.distrib by nvidia-340
Removing 'diversion of /usr/lib/i386-linux-gnu/libEGL.so to /usr/lib/i386-linux-gnu/libEGL.so.distrib by nvidia-340'
diversion of /usr/lib/x86_64-linux-gnu/libGLESv2.so to /usr/lib/x86_64-linux-gnu/libGLESv2.so.distrib by nvidia-340
Removing 'diversion of /usr/lib/x86_64-linux-gnu/libGLESv2.so to /usr/lib/x86_64-linux-gnu/libGLESv2.so.distrib by nvidia-340'
diversion of /usr/lib/i386-linux-gnu/libGLESv2.so to /usr/lib/i386-linux-gnu/libGLESv2.so.distrib by nvidia-340
Removing 'diversion of /usr/lib/i386-linux-gnu/libGLESv2.so to /usr/lib/i386-linux-gnu/libGLESv2.so.distrib by nvidia-340'
diversion of /usr/lib/x86_64-linux-gnu/libGLESv2.so.2 to /usr/lib/x86_64-linux-gnu/libGLESv2.so.2.distrib by nvidia-340
Removing 'diversion of /usr/lib/x86_64-linux-gnu/libGLESv2.so.2 to /usr/lib/x86_64-linux-gnu/libGLESv2.so.2.distrib by nvidia-340'
diversion of /usr/lib/i386-linux-gnu/libGLESv2.so.2 to /usr/lib/i386-linux-gnu/libGLESv2.so.2.distrib by nvidia-340
Removing 'diversion of /usr/lib/i386-linux-gnu/libGLESv2.so.2 to /usr/lib/i386-linux-gnu/libGLESv2.so.2.distrib by nvidia-340'
diversion of /usr/lib/x86_64-linux-gnu/libGLESv1_CM.so to /usr/lib/x86_64-linux-gnu/libGLESv1_CM.so.distrib by nvidia-340
Removing 'diversion of /usr/lib/x86_64-linux-gnu/libGLESv1_CM.so to /usr/lib/x86_64-linux-gnu/libGLESv1_CM.so.distrib by nvidia-340'
diversion of /usr/lib/i386-linux-gnu/libGLESv1_CM.so to /usr/lib/i386-linux-gnu/libGLESv1_CM.so.distrib by nvidia-340
Removing 'diversion of /usr/lib/i386-linux-gnu/libGLESv1_CM.so to /usr/lib/i386-linux-gnu/libGLESv1_CM.so.distrib by nvidia-340'
diversion of /usr/lib/x86_64-linux-gnu/libGLESv1_CM.so.1 to /usr/lib/x86_64-linux-gnu/libGLESv1_CM.so.1.distrib by nvidia-340
Removing 'diversion of /usr/lib/x86_64-linux-gnu/libGLESv1_CM.so.1 to /usr/lib/x86_64-linux-gnu/libGLESv1_CM.so.1.distrib by nvidia-340'
diversion of /usr/lib/i386-linux-gnu/libGLESv1_CM.so.1 to /usr/lib/i386-linux-gnu/libGLESv1_CM.so.1.distrib by nvidia-340
Removing 'diversion of /usr/lib/i386-linux-gnu/libGLESv1_CM.so.1 to /usr/lib/i386-linux-gnu/libGLESv1_CM.so.1.distrib by nvidia-340'
INFO:Disable nvidia-340
DEBUG:Parsing /usr/share/ubuntu-drivers-common/quirks/dell_latitude
DEBUG:Parsing /usr/share/ubuntu-drivers-common/quirks/lenovo_thinkpad
DEBUG:Parsing /usr/share/ubuntu-drivers-common/quirks/put_your_quirks_here
update-initramfs: deferring update (trigger activated)
Processing triggers for initramfs-tools (0.130ubuntu3.3) ...
update-initramfs: Generating /boot/initrd.img-4.15.0-36-generic
W: initramfs-tools configuration sets RESUME=UUID=cbb9bc75-78c1-4ba4-9d97-732d45299b8f
W: but no matching swap device is available.
Processing triggers for libc-bin (2.27-3ubuntu1) ...
Processing triggers for man-db (2.8.3-2) ...
(Reading database ... 360242 files and directories currently installed.)
Purging configuration files for nvidia-340 (340.107-0ubuntu0.18.04.1) ...
update-initramfs: deferring update (trigger activated)
Processing triggers for initramfs-tools (0.130ubuntu3.3) ...
update-initramfs: Generating /boot/initrd.img-4.15.0-36-generic
W: initramfs-tools configuration sets RESUME=UUID=cbb9bc75-78c1-4ba4-9d97-732d45299b8f
W: but no matching swap device is available.

Code: Select all

$ apt autoremove --purge
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED:
  lib32gcc1* libc6-i386*
0 upgraded, 0 newly installed, 2 to remove and 10 not upgraded.
After this operation, 12.6 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 360242 files and directories currently installed.)
Removing lib32gcc1 (1:8.2.0-1ubuntu2~18.04) ...
Removing libc6-i386 (2.27-3ubuntu1) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...
(Reading database ... 359935 files and directories currently installed.)
Purging configuration files for libc6-i386 (2.27-3ubuntu1) ...
DRM folder doesn't exist

Code: Select all

$ sudo rm /lib/modules/$(uname -r)/kernel/drivers/char/drm/nvidia*.ko
rm: cannot remove '/lib/modules/4.15.0-36-generic/kernel/drivers/char/drm/nvidia*.ko': No such file or directory
dpkg audit command returns blank.
Removed graphics-drivers ppa.

Code: Select all

$ apt update
Hit:1 http://ppa.launchpad.net/noobslab/icons/ubuntu bionic InRelease          
Hit:2 http://archive.ubuntu.com/ubuntu bionic InRelease                        
Hit:3 http://archive.canonical.com/ubuntu bionic InRelease                     
Hit:4 http://security.ubuntu.com/ubuntu bionic-security InRelease              
Hit:5 http://archive.ubuntu.com/ubuntu bionic-updates InRelease                
Hit:6 http://archive.ubuntu.com/ubuntu bionic-backports InRelease              
Ign:7 http://packages.linuxmint.com tara InRelease                             
Hit:8 http://ppa.launchpad.net/noobslab/themes/ubuntu bionic InRelease         
Hit:9 http://packages.linuxmint.com tara Release   
Hit:11 http://ppa.launchpad.net/teejee2008/ppa/ubuntu bionic InRelease        
Reading package lists... Done                      
Building dependency tree       
Reading state information... Done
10 packages can be upgraded. Run 'apt list --upgradable' to see them.
Opened Driver Manager GUI application, it recommended nvidia-driver-390 (390.48-0ubuntu3). Installation succesful! (Always used to get an error at this point previously). Rebooted.

Looks like its still using nouveau.

Code: Select all

$ lspci -knn | grep -EiA3 'vga|3d'
00:02.0 VGA compatible controller [0300]: Intel Corporation Haswell-ULT Integrated Graphics Controller [8086:0a16] (rev 09)
	Subsystem: Hewlett-Packard Company Haswell-ULT Integrated Graphics Controller [103c:2166]
	Kernel driver in use: i915
	Kernel modules: i915
--
0a:00.0 3D controller [0302]: NVIDIA Corporation GK208M [GeForce GT 740M] [10de:1292] (rev a1)
	Subsystem: Hewlett-Packard Company GK208M [GeForce GT 740M] [103c:21da]
	Kernel driver in use: nouveau
	Kernel modules: nvidiafb, nouveau, nvidia_drm, nvidia

Code: Select all

$ inxi -Gx
Graphics:  Card-1: Intel Haswell-ULT Integrated Graphics Controller
           bus-ID: 00:02.0
           Card-2: NVIDIA GK208M [GeForce GT 740M] bus-ID: 0a:00.0
           Display Server: x11 (X.Org 1.19.6 )
           drivers: modesetting,nouveau (unloaded: fbdev,vesa)
           Resolution: 1366x768@59.99hz
           OpenGL: renderer: Mesa DRI Intel Haswell Mobile
           version: 4.5 Mesa 18.0.5 Direct Render: Yes
Also, I'm kinda worried about initramfs-tools always giving me the warning about using the UUID of swap partition instead of encrypted swap (home encrypted).
Update manager found an update to it and I went ahead with it after this whole process.

EDIT: Also noticed that nvidia-prime isn't installed, should I? (Helps with switching cards)
EDIT2: Even weirder, apt says it's installed while it's not in bin (which command returns empty)
Laurent85
Level 17
Level 17
Posts: 7081
Joined: Tue May 26, 2015 10:11 am

Re: Mint 19 (cinnamon) Stuck at Desktop during Shutdown

Post by Laurent85 »

N3wb wrote: Thu Oct 04, 2018 11:16 am Some errors came up here regarding dpkg bad syntax while installing nvidia-340
That's a package maintainer's issue not related to your problems.
Looks like its still using nouveau.
The system is still in a broken state, nouveau should not load after installing the Nvidia driver. A basic clean up to restore LM defaults didn't work. The system consistency got broken at some point. For example installing a driver directly downloaded from Nvidia can damage LM. I would backup my data and go for a clean reinstall.

On Mint preferably use the graphical user interface utilities for driver and software installation and ask for help if it did not work as expected. Regarding Nvidia on Mint Driver Manager do it the right way, if the prime applet doesn't appear after reboot then it's a different issue, trying to install a different driver won't help.
Also, I'm kinda worried about initramfs-tools always giving me the warning about using the UUID of swap partition instead of encrypted swap (home encrypted).
Open a different thread for that issue. Anyway hibernation needs a swap partition.
Image
Locked

Return to “Beginner Questions”