LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Laptop and Netbook
User Name
Password
Linux - Laptop and Netbook Having a problem installing or configuring Linux on your laptop? Need help running Linux on your netbook? This forum is for you. This forum is for any topics relating to Linux and either traditional laptops or netbooks (such as the Asus EEE PC, Everex CloudBook or MSI Wind).

Notices


Reply
  Search this Thread
Old 05-31-2020, 04:02 AM   #1
linuxno0b
LQ Newbie
 
Registered: Mar 2012
Posts: 8

Rep: Reputation: Disabled
Question Broken Nvidia driver and package manager on Ubuntu 18.04


Hello, I've described my issue here https://askubuntu.com/questions/1245...story-included

I want to make this properly, but I'm lacking experience so I'm not sure from where to start and how to fix first the package manager and second to properly make my video card to be working.

Thanks
 
Old 05-31-2020, 05:46 AM   #2
linuxno0b
LQ Newbie
 
Registered: Mar 2012
Posts: 8

Original Poster
Rep: Reputation: Disabled
So it came to the point of How to fix my apt

Code:
zutobg@zutobg-Latitude-E6220:~$ sudo apt-get clean
zutobg@zutobg-Latitude-E6220:~$ sudo apt --fix-broken install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
  libnvidia-gl-390 libnvidia-gl-390:i386
The following NEW packages will be installed:
  libnvidia-gl-390 libnvidia-gl-390:i386
0 upgraded, 2 newly installed, 0 to remove and 11 not upgraded.
3 not fully installed or removed.
Need to get 29,2 MB of archives.
After this operation, 149 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://archive.ubuntu.com/ubuntu bionic-updates/restricted i386 libnvidia-gl-390 i386 390.132-0ubuntu0.18.04.1 [14,9 MB]
Get:2 http://archive.ubuntu.com/ubuntu bionic-updates/restricted amd64 libnvidia-gl-390 amd64 390.132-0ubuntu0.18.04.1 [14,3 MB]
Fetched 29,2 MB in 8s (3601 kB/s)                                                                                                                  
(Reading database ... 202189 files and directories currently installed.)
Preparing to unpack .../libnvidia-gl-390_390.132-0ubuntu0.18.04.1_i386.deb ...
diversion of /usr/lib/i386-linux-gnu/libGL.so.1 to /usr/lib/i386-linux-gnu/libGL.so.1.distrib by nvidia-340
dpkg-divert: error: mismatch on package
  when removing 'diversion of /usr/lib/i386-linux-gnu/libGL.so.1 by libnvidia-gl-390'
  found 'diversion of /usr/lib/i386-linux-gnu/libGL.so.1 to /usr/lib/i386-linux-gnu/libGL.so.1.distrib by nvidia-340'
dpkg: error processing archive /var/cache/apt/archives/libnvidia-gl-390_390.132-0ubuntu0.18.04.1_i386.deb (--unpack):
 new libnvidia-gl-390:i386 package pre-installation script subprocess returned error exit status 2
Preparing to unpack .../libnvidia-gl-390_390.132-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
dpkg-divert: error: mismatch on package
  when removing 'diversion of /usr/lib/x86_64-linux-gnu/libGL.so.1 by libnvidia-gl-390'
  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 /var/cache/apt/archives/libnvidia-gl-390_390.132-0ubuntu0.18.04.1_amd64.deb (--unpack):
 new libnvidia-gl-390:amd64 package pre-installation script subprocess returned error exit status 2
Errors were encountered while processing:
 /var/cache/apt/archives/libnvidia-gl-390_390.132-0ubuntu0.18.04.1_i386.deb
 /var/cache/apt/archives/libnvidia-gl-390_390.132-0ubuntu0.18.04.1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
 
Old 05-31-2020, 06:09 AM   #3
shruggy
Senior Member
 
Registered: Mar 2020
Posts: 3,688

Rep: Reputation: Disabled
So, have you tried what was suggested to you at askubuntu.com? Or rather, the solution linked from there?
Code:
LC_ALL=C dpkg-divert --list|awk '$NF=="nvidia-340",$0=$3'|
xargs -n1 sudo dpkg-divert --remove

Last edited by shruggy; 05-31-2020 at 08:31 AM.
 
1 members found this post helpful.
Old 05-31-2020, 06:29 AM   #4
linuxno0b
LQ Newbie
 
Registered: Mar 2012
Posts: 8

Original Poster
Rep: Reputation: Disabled
Thumbs up

Excuse my ignorance, but maybe my knowledge it too much basic. Your command is totally new to me. So I applied it.

Code:
zutobg@zutobg-Latitude-E6220:~$ dpkg-divert --list|LC_ALL=C awk '$NF=="nvidia-340",$0=$3'|xargs -L1 sudo dpkg-divert --remove
[sudo] password for zutobg: 
Removing '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/i386-linux-gnu/libGLESv2.so.2 to /usr/lib/i386-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'
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'
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'
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'
Removing '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/libEGL.so to /usr/lib/i386-linux-gnu/libEGL.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'
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'
Removing '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/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/libEGL.so.1 to /usr/lib/i386-linux-gnu/libEGL.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'
Removing '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/i386-linux-gnu/libGL.so.1 to /usr/lib/i386-linux-gnu/libGL.so.1.distrib by nvidia-340'
Then I did
Code:
zutobg@zutobg-Latitude-E6220:~$ sudo apt upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
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 installed
 libnvidia-ifr1-390:i386 : Depends: libnvidia-gl-390:i386 but it is not installed
 nvidia-driver-390 : Depends: libnvidia-gl-390 (= 390.132-0ubuntu0.18.04.1) but it is not installed
                     Recommends: libnvidia-gl-390:i386 (= 390.132-0ubuntu0.18.04.1)
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
The I run
Code:
zutobg@zutobg-Latitude-E6220:~$ sudo apt --fix-broken install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
  libnvidia-gl-390 libnvidia-gl-390:i386
The following NEW packages will be installed:
  libnvidia-gl-390 libnvidia-gl-390:i386
0 upgraded, 2 newly installed, 0 to remove and 11 not upgraded.
3 not fully installed or removed.
Need to get 0 B/29,2 MB of archives.
After this operation, 149 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 202161 files and directories currently installed.)
Preparing to unpack .../libnvidia-gl-390_390.132-0ubuntu0.18.04.1_i386.deb ...
Unpacking libnvidia-gl-390:i386 (390.132-0ubuntu0.18.04.1) ...
Preparing to unpack .../libnvidia-gl-390_390.132-0ubuntu0.18.04.1_amd64.deb ...
Unpacking libnvidia-gl-390:amd64 (390.132-0ubuntu0.18.04.1) ...
Setting up libnvidia-gl-390:i386 (390.132-0ubuntu0.18.04.1) ...
Setting up libnvidia-gl-390:amd64 (390.132-0ubuntu0.18.04.1) ...
Setting up libnvidia-ifr1-390:amd64 (390.132-0ubuntu0.18.04.1) ...
Setting up libnvidia-ifr1-390:i386 (390.132-0ubuntu0.18.04.1) ...
Setting up nvidia-driver-390 (390.132-0ubuntu0.18.04.1) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...
Seems now my problem with package manager is solved. I really don't understand how and why. Can you explain me what we just did here? Thank you
 
Old 05-31-2020, 06:36 AM   #5
shruggy
Senior Member
 
Registered: Mar 2020
Posts: 3,688

Rep: Reputation: Disabled
I just followed the link that was given to you at askubuntu.com. OK, I've rewritten the command a bit, but it still does the same. If you follow through to the LP bug #1768050, you'll see another incantation of this command linked from there that takes additional precautions against filenames containing spaces:
Code:
LC_ALL=C dpkg-divert --list nvidia-340|sed -nr 's/^diversion of (.+) to .*/\1/p'|
xargs -d'\n' -n1 sudo dpkg-divert --remove
File divertions are dpkg's way to deal with a situation when two or more packages try to install a file to the same location. See dpkg-divert.

And don't forget to mark your thread solved. Both here and at askubuntu.com

Last edited by shruggy; 05-31-2020 at 08:34 AM.
 
1 members found this post helpful.
Old 05-31-2020, 08:51 AM   #6
linuxno0b
LQ Newbie
 
Registered: Mar 2012
Posts: 8

Original Poster
Rep: Reputation: Disabled
Thank you. I'll use this thread to continue digging into the driver part of my problem. I removed everything related to nvidia with those commands

https://pastebin.com/GAHwUaG1

and now will try to make it work.
 
Old 05-31-2020, 09:09 AM   #7
shruggy
Senior Member
 
Registered: Mar 2020
Posts: 3,688

Rep: Reputation: Disabled
You still have to sudo apt autoremove to remove the rest.
 
Old 05-31-2020, 09:41 AM   #8
linuxno0b
LQ Newbie
 
Registered: Mar 2012
Posts: 8

Original Poster
Rep: Reputation: Disabled
Cool

Yes, I performed those commands:

sudo apt autoremove
sudo apt-get -f install

After that I installed the driver trough Drivers & Software GUI tool

reboot

selected my Nvidia card through the nvidia-settings

reboot

Perform some benchmark to test it, all seems to be OK

Code:
zutobg@zutobg-Latitude-E6220:~$ glmark2
=======================================================
    glmark2 2014.03+git20150611.fa71af2d
=======================================================
    OpenGL Information
    GL_VENDOR:     NVIDIA Corporation
    GL_RENDERER:   Quadro 2000M/PCIe/SSE2
    GL_VERSION:    4.6.0 NVIDIA 390.132
=======================================================
[build] use-vbo=false: FPS: 1716 FrameTime: 0.583 ms
[build] use-vbo=true: FPS: 2133 FrameTime: 0.469 ms
[texture] texture-filter=nearest: FPS: 1769 FrameTime: 0.565 ms
[texture] texture-filter=linear: FPS: 1752 FrameTime: 0.571 ms
[texture] texture-filter=mipmap: FPS: 1866 FrameTime: 0.536 ms
[shading] shading=gouraud: FPS: 1726 FrameTime: 0.579 ms
[shading] shading=blinn-phong-inf: FPS: 1738 FrameTime: 0.575 ms
[shading] shading=phong: FPS: 1622 FrameTime: 0.617 ms
[shading] shading=cel: FPS: 1655 FrameTime: 0.604 ms
[bump] bump-render=high-poly: FPS: 1022 FrameTime: 0.978 ms
[bump] bump-render=normals: FPS: 2181 FrameTime: 0.459 ms
[bump] bump-render=height: FPS: 2118 FrameTime: 0.472 ms
[effect2d] kernel=0,1,0;1,-4,1;0,1,0;: FPS: 1016 FrameTime: 0.984 ms
[effect2d] kernel=1,1,1,1,1;1,1,1,1,1;1,1,1,1,1;: FPS: 461 FrameTime: 2.169 ms
[pulsar] light=false:quads=5:texture=false: FPS: 1679 FrameTime: 0.596 ms
[desktop] blur-radius=5:effect=blur:passes=1:separable=true:windows=4: FPS: 454 FrameTime: 2.203 ms
[desktop] effect=shadow:windows=4: FPS: 918 FrameTime: 1.089 ms
[buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 506 FrameTime: 1.976 ms
[buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=subdata: FPS: 629 FrameTime: 1.590 ms
[buffer] columns=200:interleave=true:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 541 FrameTime: 1.848 ms
[ideas] speed=duration: FPS: 1353 FrameTime: 0.739 ms
[jellyfish] <default>: FPS: 930 FrameTime: 1.075 ms
[terrain] <default>: FPS: 97 FrameTime: 10.309 ms
[shadow] <default>: FPS: 1313 FrameTime: 0.762 ms
[refract] <default>: FPS: 269 FrameTime: 3.717 ms
[conditionals] fragment-steps=0:vertex-steps=0: FPS: 1730 FrameTime: 0.578 ms
[conditionals] fragment-steps=5:vertex-steps=0: FPS: 1332 FrameTime: 0.751 ms
[conditionals] fragment-steps=0:vertex-steps=5: FPS: 1780 FrameTime: 0.562 ms
[function] fragment-complexity=low:fragment-steps=5: FPS: 1783 FrameTime: 0.561 ms
[function] fragment-complexity=medium:fragment-steps=5: FPS: 1568 FrameTime: 0.638 ms
[loop] fragment-loop=false:fragment-steps=5:vertex-steps=5: FPS: 1718 FrameTime: 0.582 ms
[loop] fragment-steps=5:fragment-uniform=false:vertex-steps=5: FPS: 1792 FrameTime: 0.558 ms
[loop] fragment-steps=5:fragment-uniform=true:vertex-steps=5: FPS: 1558 FrameTime: 0.642 ms
=======================================================
                                  glmark2 Score: 1355 
=======================================================
I think with that we can conclude I successfully did connected my VGA to be used properly.

Thank you for your help, if you think I still have something more to do, let me know.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] No package 'x11' found No package 'xext' found No package 'xdamage' found No package 'xfixes' found No package 'x11-xcb' found Jigsaw Linux From Scratch 14 02-23-2021 08:35 PM
nvidia-driver SBo The symbolic link '/usr/lib/libGL.so.1' does not point to 'tmp/SBo/package-nvidia-driver/usr/lib64/libGL.so.1' Gerardo Zamudio Slackware 5 07-30-2017 10:44 PM
I broke my package manager / broken package blocks installs [Debian Wheezy] arthoc Linux - Software 4 06-20-2014 03:57 AM
Poll: Yast Package Manager vs. Smart Package Manager in 10.1 agentchange SUSE / openSUSE 6 06-02-2006 08:29 AM
synaptic package manager forcing me to delete a broken package mbman Linux - Software 6 04-25-2006 09:30 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Laptop and Netbook

All times are GMT -5. The time now is 02:40 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration