Fresh ubuntu 20.04 install NVIDIA not working

Hi to all!
I have a HP Zenbook with a 4 GB NVIDIA RTX A2000 and Intel UHD Graphics.
When I boot from a Ubuntu pen it defaults to the Intel UHD Graphics, and I can use 2 monitors.
After default install I have only access to the computer’s monitor.
In a previous installation after the install of NVIDIA divers everythinh was ok, the GPU was working and I could use an external monitor.
But it stop working. So I decided to make a new ubuntu instalation but now I cant get the NVIDIA driver working.

Someone can help?

Some outputs

uname -a
Linux hpzenbook 5.13.0-27-generic #29~20.04.1-Ubuntu SMP Fri Jan 14 00:32:30 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

dmesg
[ 1498.427992] nvidia 0000:01:00.0: vgaarb: changed VGA decodes: olddecodes=none,decodes=none:owns=none
[ 1498.428013] NVRM: The NVIDIA GPU 0000:01:00.0
NVRM: (PCI ID: 10de:25b8) installed in this system has
NVRM: fallen off the bus and is not responding to commands.
[ 1498.428052] nvidia: probe of 0000:01:00.0 failed with error -1
[ 1498.428063] NVRM: The NVIDIA probe routine failed for 1 device(s).
[ 1498.428064] NVRM: None of the NVIDIA devices were initialized.
[ 1498.428266] nvidia-nvlink: Unregistered the Nvlink Core, major device number 507

modinfo nvidia
filename: /lib/modules/5.13.0-27-generic/updates/dkms/nvidia.ko
alias: char-major-195-*
version: 460.91.03
supported: external
license: NVIDIA
srcversion: BE511DEA3662B4CF045EC5D
alias: pci:v000010DEdsvsdbc03sc02i00
alias: pci:v000010DEdsvsdbc03sc00i00
depends:
retpoline: Y
name: nvidia
vermagic: 5.13.0-27-generic SMP mod_unload modversions
sig_id: PKCS#7
signer: hpzenbook Secure Boot Module Signature key
sig_key: 45:EF:8F:AB:CF:62:B0:04:A8:34:27:D3:50:89:43:16:9C:52:B5:73
sig_hashalgo: sha512
signature: 8E:75:FE:4A:0E:8C:CC:1C:01:21:C3:A7:ED:19:C0:0E:65:D1:D1:4C:
94:AC:8D:55:57:A6:A1:9F:2B:68:E4:BC:EC:EF:04:CE:E9:0E:13:76:
A1:ED:E3:6B:E1:5C:F1:34:CD:C0:CD:5E:E1:E8:A2:CF:A2:E3:31:FC:
61:87:5A:35:1B:5B:91:88:7A:2F:A0:B9:B0:BB:40:B6:07:27:6A:8B:
64:F3:C0:4E:1A:78:99:AF:61:EB:4B:D4:A1:41:CA:68:27:20:56:94:
6D:CA:1E:D7:B3:D7:26:37:D9:7A:E0:6F:78:05:D7:B0:DF:FA:0A:11:
51:4A:FF:8D:69:3F:B4:7F:66:38:BF:40:17:B4:D0:F1:6A:74:D2:37:
A5:E2:08:C5:F8:76:9D:CE:AC:E1:CE:45:6A:65:FC:6B:DD:9B:1C:C0:
DE:0B:8D:2D:0A:5A:95:FF:17:B7:51:9D:FC:FD:27:E7:4B:F6:60:29:
B4:5B:89:E8:6A:6F:4D:8D:F3:49:9D:AD:13:38:DB:2E:36:C0:E2:A8:
8F:79:B7:4C:31:54:BF:F8:75:CB:0A:6B:8C:7D:4F:C9:43:9C:1D:08:
1E:72:DB:2C:1C:49:47:60:60:A9:91:F4:6E:DC:E6:1D:27:2D:AF:E0:
3B:60:8D:CE:F1:71:A5:36:F7:4B:F1:9B:45:38:A1:93
parm: NvSwitchRegDwords:NvSwitch regkey (charp)
parm: NvSwitchBlacklist:NvSwitchBlacklist=uuid[,uuid…] (charp)
parm: nv_cap_enable_devfs:Enable (1) or disable (0) nv-caps devfs support. Default: 1 (int)
parm: NVreg_ResmanDebugLevel:int
parm: NVreg_RmLogonRC:int
parm: NVreg_ModifyDeviceFiles:int
parm: NVreg_DeviceFileUID:int
parm: NVreg_DeviceFileGID:int
parm: NVreg_DeviceFileMode:int
parm: NVreg_InitializeSystemMemoryAllocations:int
parm: NVreg_UsePageAttributeTable:int
parm: NVreg_RegisterForACPIEvents:int
parm: NVreg_EnablePCIeGen3:int
parm: NVreg_EnableMSI:int
parm: NVreg_TCEBypassMode:int
parm: NVreg_EnableStreamMemOPs:int
parm: NVreg_EnableBacklightHandler:int
parm: NVreg_RestrictProfilingToAdminUsers:int
parm: NVreg_PreserveVideoMemoryAllocations:int
parm: NVreg_EnableS0ixPowerManagement:int
parm: NVreg_S0ixPowerManagementVideoMemoryThreshold:int
parm: NVreg_DynamicPowerManagement:int
parm: NVreg_DynamicPowerManagementVideoMemoryThreshold:int
parm: NVreg_EnableUserNUMAManagement:int
parm: NVreg_MemoryPoolSize:int
parm: NVreg_KMallocHeapMaxSize:int
parm: NVreg_VMallocHeapMaxSize:int
parm: NVreg_IgnoreMMIOCheck:int
parm: NVreg_NvLinkDisable:int
parm: NVreg_EnablePCIERelaxedOrderingMode:int
parm: NVreg_RegisterPCIDriver:int
parm: NVreg_RegistryDwords:charp
parm: NVreg_RegistryDwordsPerDevice:charp
parm: NVreg_RmMsg:charp
parm: NVreg_GpuBlacklist:charp
parm: NVreg_TemporaryFilePath:charp

Please check if you still have a 5.11 kernel selectable in grub menu, and boot into that, then reinstall the nvidia driver and check if it then works.

Thanks for the tip
With the 5.11 it works better (I have the external monitor working) but only with the Xorg Nouveau
With the NVIDIA 460, I get a black screen after grub…

Please run nvidia-bug-report.sh as root and attach the resulting nvidia-bug-report.log.gz file to your post.

Hi again. Great news, but still some problems.

I have manage to install the NVIDIA driver using the 5.11 kernel.

Now the driver is working but i still don’t have image in the 2nd monitor.
Some outputs:

uname -a
Linux hpzenbook 5.11.0-27-generic #29~20.04.1-Ubuntu SMP Wed Aug 11 15:58:17 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

nvidia-smi
Tue Jan 25 16:20:15 2022
±----------------------------------------------------------------------------+
| NVIDIA-SMI 460.91.03 Driver Version: 460.91.03 CUDA Version: 11.2 |
|-------------------------------±---------------------±---------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|===============================+======================+======================|
| 0 RTX A2000 Lapto… Off | 00000000:01:00.0 On | N/A |
| N/A 43C P8 6W / N/A | 550MiB / 3910MiB | 0% Default |
| | | N/A |
±------------------------------±---------------------±---------------------+

±----------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=============================================================================|
| 0 N/A N/A 1677 G /usr/lib/xorg/Xorg 75MiB |
| 0 N/A N/A 2326 G /usr/lib/xorg/Xorg 108MiB |
| 0 N/A N/A 2505 G /usr/bin/gnome-shell 91MiB |
| 0 N/A N/A 2863 G gnome-control-center 2MiB |
| 0 N/A N/A 2873 G …oud-3.4.1-x86_64.AppImage 61MiB |
| 0 N/A N/A 3147 G /usr/lib/firefox/firefox 200MiB |
±----------------------------------------------------------------------------+

xrandr
Screen 0: minimum 8 x 8, current 1920 x 1080, maximum 32767 x 32767
DP-0 disconnected (normal left inverted right x axis y axis)
DP-1 disconnected (normal left inverted right x axis y axis)
HDMI-0 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 476mm x 268mm
1920x1080 60.00*+ 59.94 50.00
1680x1050 59.95
1600x900 60.00
1440x900 59.89
1280x1024 60.02
1280x800 59.81
1280x720 60.00 59.94 50.00
1024x768 60.00
800x600 60.32
720x576 50.00
720x480 59.94
640x480 59.94 59.93
eDP-1-1 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 344mm x 193mm
1920x1080 60.01*+ 60.01 59.97 59.96 59.93 40.00
1680x1050 59.95 59.88
1600x1024 60.17
1400x1050 59.98
1600x900 59.99 59.94 59.95 59.82
1280x1024 60.02
1440x900 59.89
1400x900 59.96 59.88
1280x960 60.00
1440x810 60.00 59.97
1368x768 59.88 59.85
1360x768 59.80 59.96
1280x800 59.99 59.97 59.81 59.91
1152x864 60.00
1280x720 60.00 59.99 59.86 59.74
1024x768 60.04 60.00
960x720 60.00
928x696 60.05
896x672 60.01
1024x576 59.95 59.96 59.90 59.82
960x600 59.93 60.00
960x540 59.96 59.99 59.63 59.82
800x600 60.00 60.32 56.25
840x525 60.01 59.88
864x486 59.92 59.57
800x512 60.17
700x525 59.98
800x450 59.95 59.82
640x512 60.02
720x450 59.89
700x450 59.96 59.88
640x480 60.00 59.94
720x405 59.51 58.99
684x384 59.88 59.85
680x384 59.80 59.96
640x400 59.88 59.98
576x432 60.06
640x360 59.86 59.83 59.84 59.32
512x384 60.00
512x288 60.00 59.92
480x270 59.63 59.82
400x300 60.32 56.34
432x243 59.92 59.57
320x240 60.05
360x202 59.51 59.13
320x180 59.84 59.32
HDMI-1-1 disconnected (normal left inverted right x axis y axis)
DP-1-1 disconnected (normal left inverted right x axis y axis)
DP-1-2 disconnected (normal left inverted right x axis y axis)
DP-1-3 disconnected (normal left inverted right x axis y axis)
1680x1050 (0x223) 146.250MHz -HSync +VSync
h: width 1680 start 1784 end 1960 total 2240 skew 0 clock 65.29KHz
v: height 1050 start 1053 end 1059 total 1089 clock 59.95Hz
1280x1024 (0x226) 108.000MHz +HSync +VSync
h: width 1280 start 1328 end 1440 total 1688 skew 0 clock 63.98KHz
v: height 1024 start 1025 end 1028 total 1066 clock 60.02Hz
1440x900 (0x225) 106.500MHz -HSync +VSync
h: width 1440 start 1520 end 1672 total 1904 skew 0 clock 55.93KHz
v: height 900 start 903 end 909 total 934 clock 59.89Hz
1280x800 (0x227) 83.500MHz -HSync +VSync
h: width 1280 start 1352 end 1480 total 1680 skew 0 clock 49.70KHz
v: height 800 start 803 end 809 total 831 clock 59.81Hz
1024x768 (0x22b) 65.000MHz -HSync -VSync
h: width 1024 start 1048 end 1184 total 1344 skew 0 clock 48.36KHz
v: height 768 start 771 end 777 total 806 clock 60.00Hz
800x600 (0x22c) 40.000MHz +HSync +VSync
h: width 800 start 840 end 968 total 1056 skew 0 clock 37.88KHz
v: height 600 start 601 end 605 total 628 clock 60.32Hz
640x480 (0x22f) 25.175MHz -HSync -VSync
h: width 640 start 656 end 752 total 800 skew 0 clock 31.47KHz
v: height 480 start 490 end 492 total 525 clock 59.94Hz

nvidia-bug-report.log.gz (1.9 MB)

nvidia-bug-report.log.gz (346.3 KB)
dmesg.txt (89.4 KB)
lspci.txt (15.9 KB)
please I am having a somewhat relates issue. My Second Dell monitor in the office is working well but the one(HP monitor) at home is not working well. It is with back screen. thanks

The HP monitor on HDMI? Seems it’s detected fine, did you check Gnome control center for enabling it?

Yes, indeed.
It is detected without any issues. I can choose “Mirror” and “Extend” but I get no image on the second monitor.
I have already changed from NVIDIA 460 → NVIDIA 495, but still no output on the second monitor.

Success!

after the previous steps:
sudo nano /lib/modprobe.d/nvidia-kms.conf

coment “nvidia-drm modeset=1”

options nvidia-drm modeset=1

Now it works at 100%

Thank you!

I mean

#options nvidia-drm modeset=1

thanks for the reply
yes it is on HDMI
also on the Gnome center, it is enabled but it seems there is an error since it is not activating or so

Have you tried my previous suggestion with

#options nvidia-drm modeset=1 ?

(reboot)
For me it was the solution

well I am not sure for my system or setup or my kernel. The file is empty!

sudo nano /lib/modprobe.d/nvidia-kms.conf

this is empty in my setup/system

and of course, my setup is working on 2nd(Dell) and third monitor(Phillips) in the office.
but the HP monitor at home is not working

Tried with a different cable? You seem to be using a DP2HDMI converter.

Hello!
As I told before my problem is now solved. I must thank you for the hints.

Here are the steps:

  • uninstall all nvidia drivers and software
  • reboot with a previous kernel (5.11 in my case)
  • install nvidia drivers (I’ve tried 460 and 495, both ok!)
  • edit (with sudo nano /lib/modprobe.d/nvidia-kms.conf ) nvidia-kms.conf to comment line with: nvidia-drm modeset=1
  • reboot

In my case it solved the problem.

1 Like

That was an answer to @john_rotimi , should have mentioned that.

1 Like

ok and thanks @generix . I am using a “DP2HDMI converter” so I will check and get back.
thanks too for the concern @user150422

so thanks @generix
the issues was with the cable or adapter at home attached with the HP monitor. I did change the cable to a DVI-HDMI cable and the HP monitor is working now.

Hi @generix
I hope you are good there and all.

Please do help me check the error as related to my second HP monitor with the new HDMI cable is OFF again. Is the new cable faulty or another issue? It was working yesterday . thanks
nvidia-bug-report.log.gz (142.5 KB)
xrandroutput_20Feb2022_1.txt (19.8 KB)

but there error