Problem
I want to install nvidia driver in my laptop. My laptop is always stuck on blackscreen after installing nvidia driver and executing reboot
. I have tried tried different approaches and many nvidia driver versions. However, the problem is always here.
My ubuntu18.04 has two kernel 5.4.0-122 and 5.4.0-117. I installed nvidia driver by software update. Then the output is normal after executing nvidia-smi. But when I reboot my laptop, a probelm appearred. If I choose 5.4.0-122 kernel, the laptop will be stuck in black screen. If I choose 5.4.0-117 kernel, NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running
will appear in shell after executing nvidia-smi.
I will describe below some key information about my laptop. Hope someone could help me with this perplexing problem. Thanks!
My laptop information
sudo lshw -class video
*-display UNCLAIMED
description: 3D controller
product: GP107M [GeForce GTX 1050 Mobile]
vendor: NVIDIA Corporation
physical id: 0
bus info: pci@0000:01:00.0
version: a1
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress bus_master cap_list
configuration: latency=0
resources: memory:de000000-deffffff memory:c0000000-cfffffff memory:d0000000-d1ffffff ioport:e000(size=128) memory:df000000-df07ffff
*-display
description: VGA compatible controller
product: Intel Corporation
vendor: Intel Corporation
physical id: 2
bus info: pci@0000:00:02.0
version: 04
width: 64 bits
clock: 33MHz
capabilities: pciexpress msi pm vga_controller bus_master cap_list rom
configuration: driver=i915 latency=0
resources: irq:131 memory:dd000000-ddffffff memory:b0000000-bfffffff ioport:f000(size=64) memory:c0000-dffff
Installation approaches
Preparation before installation
Disable secure boot and disable the system's own Nouveau graphics card driver
Installation
Add ppa source
Open Software Update --> Additional Programs --> Click on one of the drivers to install it --> Finish the installation --> reboot
In addition, I tried nvidia-driver-515
, nvidia-driver-510
, nvidia-driver-470
, nvidia-driver-418
and nvidia-driver-390
.
Problem solution
I have tried Fixing Ubuntu Freezing at Boot Time, but it does not work.
nvidia-smi
is: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 found a similar question Ubuntu 18.04.3 LTS kernel 5.0.0-25-generic nvidia driver 440 not working with graphics card model GP107M GeForce GTX 1050 Mobile – ZhiHeng Feng Jul 05 '22 at 03:02nvidia-smi
. But when I reboot my laptop, there is still the problem. If I choose 5.4.0-122 kernel, the laptop will be stuck in black screen. If I choose 5.4.0-117 kernel,NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running
will appear again after after executingnvidia-smi
. – ZhiHeng Feng Jul 05 '22 at 16:21sudo ubuntu-drivers autoinstall
automatically choose the correct graphics drivers for you so that everything will work right. – karel Jul 06 '22 at 07:52