7

I recently updated from Ubuntu 14.04 to 16.04 to 18.04 (i.e. I am now on 18.04 bionic, and started on 14). In 16.04 everything worked ok, but now I have some severe graphics problems:

Problem(s) description:

First I got the log in screen in correct resolution, but it froze with a black screen showing the mouse cursor (frozen) directly after logging in. I fixed this by installing new Nvidia drivers, following answers here.

After rebooting I got the log in screen with low resolution (640x480). Logging in works fine, but the resolution is still low, and as a result I cannot see the whole screen. Changing resolution does not work: When entering display settings, it says 'Unknown Display', and the Resolution field is just empty and grey (literally no text or figures at all apart from the word 'Resolution'), and clicking it results in a small grey empty speech bubble appearing, but nothing happens.

I tried looking for solutions in several places, such as:

Ubuntu 18.04.1 LTS unable to change resolution

Ubuntu 18 scale problem

and here, but it is for older versions, and perhaps does not seem to apply that well to my situation anyway.

What I have tried:

  • I have checked the zoom feature: It is off.
  • I looked for 'nomodeset' in /etc/default/grub ,but nothing.
  • I have run apt-get purge xserver-xorg-video-intel , and installed the recommended nvidia drivers via ubuntu-drivers autoinstall , these happens to be nvidia-driver-440
  • EDIT1: I have checked the current drivers in use via Software&Updated/Additional Drivers. The drivers I have tried are: nvidia-driver-440 (recommended), nvidia-driver-435, nvidia-driver-390, and xserver-xorg-video-nouveau. I have applied the changes, I have rebooted after each change, and I have checked that the drivers I've changed to are in use (via 'Software & Updates').
  • EDIT2: I have sucessfully run sudo apt-get purge nvidia-*;add-apt-repository ppa:graphics-drivers/ppa; sudo apt-get update; sudo apt-get install nvidia-driver-440.
  • EDIT2.1: Also, After purging nvidia-*, (not reinstalling anything) and rebooting (with xorg drivers) Ubuntu actually gives me a higher res login screen (at least 1920x1080), but it is now back to freezing on a black screen with frozen mouse pointer after login. Choosing 'recovery mode' in GRUB, and the option 'resume' then weirdly gives me a 1024x768 login screen with working login. Still no higher resolution though, but I can at least pick one (1024x768), xrandr still says the same except added highest resolution 1024x768.
  • EDIT3: About Secure Boot: My Bios says: Secure Boot State: Disabled; Platform Key State: Unloaded; OS Type: Other OS. This was described as the best setting for non Secure Boot compatible operating systems, so I understand it as being disabled.
  • EDIT4: lsmod | grep -i i915 returns the empty string (while running either nvidia-440 or xorg). nvidia-smi returns (running nvidia-440):

    NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running.

I still have the same problem, and get the same outputs below.

Outputs:

Here's the output of 'lspci | grep -i vga':

01:00.0 VGA compatible controller: NVIDIA Corporation GK106 [GeForce GTX 660] (rev a1)

And of 'xrandr':

xrandr: Failed to get size of gamma for output default
Screen 0: minimum 640 x 480, current 640 x 480, maximum    640 x 480
default connected primary 640x480+0+0 0mm x 0mm
640x480       73.00*

Hardinfo shows me: Graphics: 640x480 (Unknown) The X.Org Foundation

And lshw -c -video gives me:

*-display UNCLAIMED
   description: VGA compatible controller
   product: GK106 [GeForce GTX 660]
   vendor: NVIDIA Corporation
   physical id: 0
   bus info: pci@0000:01:00.0
   version: a1
   width: 64 bits
   clock: 33MHz
   capabilities: pm msi pciexpress vga_controller bus_master cap_list
   configuration: latency=0
   resources: memory:f6000000-f6ffffff memory:e8000000-efffffff memory:f0000000-f1ffffff ioport:e000(size=128) memory:f7000000-f707ffff

The xrandr output stays the same, no matter which of the above listed drivers I try.

Specs, Conclusion and Question:

Obviously there seems to be some problem reported by xrandr, but my knowledge here is very slim, and I don't really know what the problem means, or how to fix it. I'm guessing this is driver related, but I just don't know how to proceed.

Otherwise I'm on a Intel i7-3770 PC with a Samsung monitor connected via a Display Port connection to a Nvidia GTX 660. And, again, everything worked in both 14.04 and 16.04, and works fine in Windows 7.

Question: Do anyone have any further suggestions on how to resolve this problem? It would be highly appreciated. I've had other graphics related problems with Nvidia and Ubuntu 18.04 on other computers, but not like this.

Christopher.L
  • 213
  • 1
  • 3
  • 12
  • Definitely reboot so that different driver can kick in. – K7AAY Nov 25 '19 at 21:43
  • I got the feeling it did kick in anyways, but perhaps not. Also didnt figure this was a solution since Id tried both the recommended 440 with reboot, and I think 390 was the first one I tried so I guess I actually had a reboot there. But not for the others I switched between in 'additional drivers'. I will try this again tomorrow though, and update. – Christopher.L Nov 25 '19 at 21:50
  • @K7AAY I have now updated the question. I have tried many different drivers, and have rebooted after each change. I still can't change resolution, and xrandr still says: "Failed to get size of gamma for output default". I'm still stuck in 640x480 and cannot change. – Christopher.L Dec 25 '19 at 18:15
  • Is Secure Boot disabled? – Pilot6 Dec 25 '19 at 19:06
  • You need to make sure that You have purged/removed all nvidia drivers before installing a selected one! – Michal Przybylowicz Dec 25 '19 at 19:12
  • @MichalPrzybylowicz : I have edited my post, still the same problems after trying that. – Christopher.L Dec 25 '19 at 19:31
  • @Pilot6 Not sure, (how) could it cause this problem? Will check soon though. – Christopher.L Dec 25 '19 at 19:32
  • This is the first to check. Nvidia drivers don't work with Secure Boot. – Pilot6 Dec 25 '19 at 19:37
  • What is the output of this command lsmod | grep -i i915 ? And output of nvidia-smi ? – Michal Przybylowicz Dec 25 '19 at 21:05
  • I suggest doing a fresh install. The Nvidia drivers are not installed properly and it is very hard to debug all the problems caused by this type of an upgrade. – Pilot6 Dec 27 '19 at 11:50
  • @MichalPrzybylowicz I have updated the relevant info under EDIT4, and added a little to EDIT2. I am getting closer and closer to just considering a full reinstall of Ubuntu however. – Christopher.L Dec 27 '19 at 11:51
  • @Pilot6 :Yup, my thoughts exactly at this point. Unless anyone has some last ideas, I will wipe and reinstall everything soon; not too painful on this drive actually. Just thought I'll try to fix it first, also a little bit for the experience. (Sincerely thank you all for your patience though!) – Christopher.L Dec 27 '19 at 11:57
  • Anther workaround is to make a separate /boot partition outside of LVM. I was struggling with that on btrfs like you. ;-) – Pilot6 Dec 27 '19 at 11:58
  • @Pilot6 : Heh, well I don't feel confident enough for that. As I said, unless some miraculous input in the next 24h, I'll just reinstall everything from scratch for that minty fresh feeling ;). I just hope this is not some generic problem with my GeForce-card and these new drivers, but I find that hard to believe. – Christopher.L Dec 27 '19 at 12:05

9 Answers9

10

system: ubuntu 18.04
My solution was

$ sudo apt purge nvidia*
## if you reboot here , the computer will use Nouveau driver.
##check the recommended drivers
$ ubuntu-drivers device
## that show me 390 as recommended but didn't work , 340 works in my case
$ sudo apt install nvidia-340

Reboot the computer.

christianbueno.1
  • 1,824
  • 2
  • 13
  • 20
5

Please note that the NVidia 435 and 440 drivers are not compatible with Linux kernel versions 4.xx.x.

The above answers are all partially correct. On Ubuntu 18.04, you should update to NVidia 435 or 440 drivers in order for the computer to boot properly. However, for some users (like OP) with outdated kernel versions, this will result in issues with the resolution settings & monitor inputs.

Please check your kernel version by running uname -r.

I had all of the issues on this thread. Tried every suggestion & they were not enough. I kept hunting down the errors, which brought me to this forum post.

Finally, the solution was to update the kernel to 5.3.0 with (source):

sudo apt-get install --install-recommends linux-generic-hwe-18.04 xserver-xorg-hwe-18.04

2

Since I was unable to solve these issues, and as it was suggested in the comments above, I just did a fresh install.

I noted that even the gui installation was buggy though. It hung on me several times, and I saw weird checker patterns appearing. Around about the third time or so, the installation managed to get all the way through, I guess going without gui would have been better. Afterwards, ubuntu-drivers recommended nvidia-435 instead of 440 as earlier. I installed them using ubuntu-drivers autoinstall, and now everything works fine.

I never had such issues with any other linux dist on this computer, and I had similar issues with 18.04 + nvidia on a different computer. So, I really wonder what's up with 18.04 + nvidia (?).

Hopefully this question/answer can still serve as somewhat of an additional trouble shooting guide for people with similar problems; I know it would've for me.

Christopher.L
  • 213
  • 1
  • 3
  • 12
1

right solution just small correction on:

$ ubuntu-drivers devices # to check possible devices for nvidia card.

Driver 390 also showed by me did worked since install off 18.04 till this week sudden it does not work anymore. nvidia-340 works perfect by me. Nouveau drivers also but they give not full use of device possibility .

However since 18.04 did worked ok before with nvidia 390 drivers now anymore it looks to be a problem from one of the last updates. 390 self.

I always have a crash repport nvidia-dkms-390.0.crash into /var/crash. Suspect an error during config and or build of module due to ... I do have card GeForce GT 440 and it should be ok with driver version.

For the time working with 340 version thanks to christianbueno.1 That is a very good temporary solution.

Ok Finally it's ok. EUREKA SOLVED. PC is now running with nvidia-driver-390 like it should be. How to do :

(In the mean time I was with 340 as used driver version). When I analysed the build report of 390.116 driver version included in base ubuntu 18.04. Could be seen that build of nv modules failed. The real reason I could not find but suspected some error in source who I guess do not build anymore since last gcc version update and or some missing stuff.So I decided to use the last avbl source version on ubuntu using ppa:graphics-drivers.

$ sudo add-apt-repository ppa:graphics-drivers

$ sudo apt-get update

$ sudo apt-get upgrade

It updated 340 and installed a lot of extra graphic stuff. Reboot pc. It runned fine.

Then removed 340 (purged)

$ sudo apt remove --purge nvidia*

checked recomended drive with $ ubuntu-drivers. 390.129 version was preferred.

$ sudo ubuntu-drivers autoinstall.

Build of dkms modules went fine now installation ok. Reboot ok now running with last version avbl by ubuntu of nvidia-390 driver.

  • Just confirming that this solution worked for me. I just had the same problem after a minor update on Ubuntu 20.04 LTS using a GTX 970. It just refused to detect the monitor and was stuck at 1024x768. Using the Settings > Screen Display I was able to switch to X.org and it worked. Then I followed the above instructions to add ppa:graphics-drivers, apt-get update, apt-get upgrade then run ubuntu-drivers autoinstall, which installed the 440 drivers (current). Reboot and it worked. – Leonard Teo Jul 05 '20 at 00:06
0

I solved this trouble in Ubuntu 18.04 LTS relatively easily in this way: I updated the driver from 'Software & Updates', in the 'Additional drivers' tab. I selected nvidia-driver-440. It appears a progress bar, when it is over, I rebooted. After reboot, my resolution was higher than before, but not yet FHD resolution. So, I went to Settings-> Devices->Displays and now I can change the resolution to 1920*1080.

0

In my case I had nvidia drivers issues after changing system default gcc.

I had only one resolution option (800x600) and I've found a hint on the nvidia thread (https://forums.developer.nvidia.com/t/nvidia-driver-is-not-loaded-ubuntu-18-10/70495/2).

You have your system compiler set to clang/llvm but gcc 7.5 is needed. Please set your cc back to gcc-7.5 using update-alternatives

0

How I solved this problem in my Sony E series VPCEH3AEN

  1. ubuntu-drivers devices == /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0 == modalias : pci:v000010DEd00001055sv0000104Dsd0000908Bbc03sc00i00 vendor : NVIDIA Corporation model : GF119M [GeForce 410M] driver : nvidia-340 - distro non-free recommended driver : nvidia-driver-390 - distro non-free driver : xserver-xorg-video-nouveau - distro free builtin

  2. apt install nvidia-driver-390 ( Because in Kernel version 15.04 and above nvidia 340 is not supported )

0

I'm running Ubuntu 20.04, and it turned out that my NVIDIA drivers were not installed correctly. I fixed my problem by running sudo apt --fix-broken install followed by sudo reboot.

mhdadk
  • 176
-1

I discovered that when installing the drivers, it asks for a password for secure boot. After rebooting Ubuntu, you need to enrol the MOK. If you don't do the enrolment, then Ubuntu will still boot but not with the Nvidia drivers. So it will use the default driver.