Good afternoon!
I’ve been trying to get the nvidia drivers to work on my Ubuntu 18.04 for quite some time. I have an Intel i5 8th gen with integrated graphics (intel 620 graphics), and a Nvidia GeForce 940MX, so I know that the right driver version for me is the nvidia-440. I’ve tried every solution posted on this site, and so far this is the one that worked best for me:
Trying to install nvidia driver for ubuntu Desktop 18.04 LTS
but now the PC freezes at the purple screen right after I type my login credentials.
I’ll illustrate what I did to explain why I think the problem now is a malfunction with the intel integrated graphics.
Following the advice, I run these lines
sudo apt purge nvidia-*
sudo apt install nvidia-kernel-source-440
sudo apt install nvidia-driver-440
Adding the nvidia-kernel-source install is an improvement with respect to other solutions, because now, if I run
lspci -k | grep -EA2 'VGA|3D
I get this output
00:02.0 VGA compatible controller: Intel Corporation UHD Graphics 620 (rev 07)
Subsystem: ASUSTek Computer Inc. UHD Graphics 620
Kernel modules: i915
01:00.0 VGA compatible controller: NVIDIA Corporation GM108M [GeForce GTX 940MX] (rev a2)
Subsystem: ASUSTek Computer Inc. GM108M [GeForce GTX 940MX]
Kernel driver in use: nvidia
This solution is nice because it doesn’t require me to blacklist nouveau manually, but takes care of it on it’s own. In fact, if I now look at my gpu-manager.log file, I get this output:
var/log/cat/gpu-manager.log
last boot file: var/lib/ubuntu-drivers-common/last-gfx-boot
new boot file: var/lib/ubuntu-drivers-common/last-gfx-boot
can't access /opt/amdgpu-pro/bin/amdgpu-pro-px
Looking for nvidia modules in /lib/modules/4.15.0-76-generic/updates/dkms
Found nvidia module: nvidia-drm.ko
Looking for amdgpu modules in /lib/modules/4.15.0-76-generic/updates/dkms
Is nvidia loaded? yes
Was nvidia unloaded? no
Is nvidia blacklisted? no
Is intel loaded? yes
Is radeon loaded? no
Is radeon blacklisted? no
Is amdgpu loaded? no
Is amdgpu blacklisted? no
Is amdgpu versioned? no
Is amdgpu pro-stack? no
Is nouveau loaded? no
Is nouveau blacklisted? yes
Is nvidia kernel module available? yes
Is amdgpu kernel module available? no
Vendor/Device Id: 8086:5917
BusID "PCI:0@0:2:0"
Is boot vga? Yes
Error: can’t access/sys/bus/pci/devices/0000:00:02.0/driver
The device is not bound to any driver
Vendor/device Id: 10de:134d
BusID "PCI:1@0:0:0"
Is boot vga? no
Skipping “/dev/dri/card0”, driven by “nvidia-drm”
Skipping “/dev/dri/card0”, driven by “nvidia-drm”
Skipping “/dev/dri/card0”, driven by “nvidia-drm”
Does it require offloading? no
last cards number = 2
Has amd? no
Has intel? yes
Has nvidia? yes
How many cards?
Has the system changed? no
Intel IGP detected
Desktop system detection
or laptop with open drivers
Nothing to do
As you can see, nouveau is already blacklisted, but there is a problem related to the BusID "PCI:0@0:2:0", which is indeed my Intel IGP.
Could help me figuring out how to solve it?
This thread illustrates a problem similar to mine, but no solution works in my case:
https://ubuntuforums.org/showthread.php?t=2396607
This other has a similar error code
lspci returns "Cannot open /sys/bus/pci/devices/xxxxx/resource: No such file or directory" but I don’t get the error when running lspci , so I’m kinda skeptic in trying, and risk compromising my system running the line
apt-get remove linux-image-4.4.0-75-generic
which in my case I guess should be modified to remove the version linux-image-4.15.0-76-generic, judging by the first lines in the output of gpu-manager.log
I’m basically searching for a solution that doesn’t require re me to edit the grub file with the “nomodeset” line, which compromises the display resolution, and in this case is not even useful to access to the full GUI interface. Even with this edit, I’m stuck at the black screen low-res terminal that is accessible via ctrl-alt-F2.
I could easily purge the nvidia drivers again, but I don’t want to renounce using the full potential of my hardware...
Thanks in advance for your time! :)
I found a solution to my own problem, even though I wasn't able to track down the cause of the issue with the Intel integrated graphics, which appeared to have been cleared on its own.
On my next boot (still without access to the desktop environment) I verified the contents of the gpu-manager.log file:
I hadn't run any other command on the terminal, so I'm not sure what did the trick with the regards to the Intel drivers.
Still, I was left without access to the desktop environment, and couldn't launch the nvidia-settings tool.
Following the advice on this thread
How do I install the Nvidia drivers?
from the paragraph "What common bugs are solved by using the latest drivers?", I verified that nvidia was creating its own Xorg file, but still reinstalling Xorg seems to solve the issue that was blocking me from the desktop environment. (If you attempt this make sure you have internet connection to re-download the Xorg package once you purge it...)
I run the lines:
and then reinstalled the nvidia drivers with
On my next boot, I could succesfully log in to the desktop environment, and now my nvidia GeForce card is actually recognised by the system. I am also now able to launch nvidia-settings (without reinstalling it or anything), and switch between nvidia GPU and the Intel IGC.
With previous solutions, I also run into the issue of black screen after sleep. I can confirm that now this issue doesn't appear anymore.
Reinstalling xserver-xorg finally helped me solve the issue of freezing during the boot process. Thank you for that! Now I at least have access to the GUI again. Also: Nvidia and Ubuntu seem to not really work well at all. It feels like my GPU (GeForce GTX 950M) is not working properly and is outperformed by the integrated device. That is definitly not what I had in mind when I chose this graphics card.