2

I noticed how my Computer starts to freeze more often, which concerns me. I have a Ubuntu 18.04 and it freezes completely so that I have to reboot it.

I ran "ubuntu-drivers devices" since I read online it could be a graphics issue.

ubuntu-drivers devices
== /sys/devices/pci0000:00/0000:00:03.0/0000:05:00.0 ==
modalias : pci:v000010DEd00000FFDsv0000103Csd00000967bc03sc00i00
vendor   : NVIDIA Corporation
model    : GK107 [NVS 510]
driver   : nvidia-340 - distro non-free
driver   : nvidia-driver-390 - distro non-free recommended
driver   : xserver-xorg-video-nouveau - distro free builtin

Because of the recommendation I tried to install nvidia-driver-390 and it did not work:

sudo ubuntu-drivers autoinstall
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 nvidia-driver-390 : Depends: xserver-xorg-video-nvidia-390 (= 390.48-0ubuntu3) but it is not going to be installed
                     Recommends: libnvidia-compute-390:i386 (= 390.48-0ubuntu3)
                     Recommends: libnvidia-decode-390:i386 (= 390.48-0ubuntu3)
                     Recommends: libnvidia-encode-390:i386 (= 390.48-0ubuntu3)
                     Recommends: libnvidia-ifr1-390:i386 (= 390.48-0ubuntu3)
                     Recommends: libnvidia-fbc1-390:i386 (= 390.48-0ubuntu3)
                     Recommends: libnvidia-gl-390:i386 (= 390.48-0ubuntu3)
E: Unable to correct problems, you have held broken packages.

To fix this I ran:

sudo dpkg --configure -a && sudo apt update --fix-missing && sudo apt install -f && sudo apt full-upgrade

but I still get the same error message when I try to install nivida-driver-390

What could I try next?

edit: things that were asked for in the comments:

apt-cache policy nvidia-driver-390
nvidia-driver-390:
  Installed: (none)
  Candidate: 390.48-0ubuntu3
  Version table:
     390.48-0ubuntu3 500
        500 http://archive.ubuntu.com/ubuntu bionic/restricted amd64 Packages
grep "bionic-updates\|bionic-security" /etc/apt/sources.list
(returns nothing)

after running the lines suggested by mchid in the answer:

ubuntu-drivers devices
== /sys/devices/pci0000:00/0000:00:03.0/0000:05:00.0 ==
modalias : pci:v000010DEd00000FFDsv0000103Csd00000967bc03sc00i00
vendor   : NVIDIA Corporation
model    : GK107 [NVS 510]
driver   : nvidia-driver-418-server - distro non-free
driver   : nvidia-340 - distro non-free
driver   : nvidia-driver-440-server - distro non-free
driver   : nvidia-driver-450 - distro non-free
driver   : nvidia-driver-390 - distro non-free
driver   : nvidia-driver-450-server - distro non-free recommended
driver   : nvidia-driver-435 - distro non-free
driver   : xserver-xorg-video-nouveau - distro free builtin
5
  • What does apt-cache policy nvidia-driver-390 return?
    – mchid
    Oct 26, 2020 at 16:06
  • I pasted the output at the end of the question.
    – CST
    Oct 26, 2020 at 17:09
  • Thanks. I see the problem I just need to know what all is missing to give an answer. Do you get an output when you run the following command? grep "bionic-updates\|bionic-security" /etc/apt/sources.list
    – mchid
    Oct 26, 2020 at 17:26
  • no, it returns nothing..
    – CST
    Oct 26, 2020 at 17:34
  • okay I will write an answer for you.
    – mchid
    Oct 26, 2020 at 17:40

2 Answers 2

2

It seems you are missing the following lines from your /etc/apt/sources.list file:

deb http://security.ubuntu.com/ubuntu bionic-security main restricted
deb http://archive.ubuntu.com/ubuntu bionic-updates main restricted

You will need to edit your /etc/apt/sources.list file but first, run the following command to make a backup of the file:

sudo cp /etc/apt/sources.list /etc/apt/sourceslist

Now, run the following command which will edit your file and add the missing lines:

printf '\ndeb http://security.ubuntu.com/ubuntu bionic-security main restricted\ndeb http://archive.ubuntu.com/ubuntu bionic-updates main restricted\n' | sudo tee -a /etc/apt/sources.list

Finally, run the following commands to update your package list and install the nvidia driver:

sudo apt update
sudo ubuntu-drivers autoinstall

Also, you should probably run a full upgrade as you are most likely missing other updates:

sudo apt full-upgrade

Please post any errors.

3
  • 1
    On a side note, if you are using the multiverse and or the universe repositories, you should also include those too in order to get updates for those packages. For example: deb http://security.ubuntu.com/ubuntu bionic-security main restricted universe multiverse but don't worry about it if you don't use these repositories.
    – mchid
    Oct 26, 2020 at 18:34
  • 1
    Thanks, everything worked. I add the output of "ubuntu-drivers devices" in the question.
    – CST
    Oct 26, 2020 at 18:41
  • 1
    @CST I see some packages from the multiverse and universe repositories listed so if you do want access these extra packages (some have copyrights) you should open your System Settings and then go to Software and Updates, and under the Ubuntu Software tab, make sure there is a check in the box for both the universe and the multiverse software sources. This should prevent any dependency issues in the future.
    – mchid
    Oct 26, 2020 at 19:00
0

Try Install xserver-xorg-video-nvidia-390(With Apt). If a different version is installed, uninstall it and then try sudo ubuntu-drivers autoinstall again.

3
  • sudo apt install xserver-xorg-video-390 Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package xserver-xorg-video-390
    – CST
    Oct 26, 2020 at 17:30
  • how can I safely uninstall the old version?
    – CST
    Oct 26, 2020 at 17:31
  • @CST there is no old verson. xserver-sorg-video-390 (for some reason) is NOT in your repositories. Check your sources.list to make sure everything is there Dec 18, 2020 at 2:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.