Score:1

Ubuntu 22.04 Second monitor Not detected

gu flag

I am using Ubuntu 22.04 and I haven't had any issues until now. It was a problem I had before, and when I activated the 510 driver in the "Additional Drivers" section, my second monitor became visible, and I continued using it that way. However, a few days ago, when I installed all the new updates that came to Ubuntu, the monitor became invisible again, and I noticed that the 525 driver was selected in the "Additional Drivers" section. The 510 driver was gone. I have been trying to solve this for the past two days, but I haven't been successful, so I wanted to ask for your advice. I'm waiting for your response.(I tried every single driver option of the photo.)

enter image description here

Jon Angliss avatar
md
Same issue here on 23.04. Was working fine, then updates last week and it broke. Also noticed it changed defaults from Xorg to Wayland. Switched it back, but still nothing. Went through all the nvidia drivers, no luck. I was originally using a dock that I had no issues with. Even plugging in monitor to laptop HDMI port, it no longer detects second screen.
Score:0
US flag

Okay, I should have realized this when I added a comment. I'd not seen it impact NVIDIA drivers before, but I have seen it impact other drivers (VMware Workstation).

For me at least, the issue is caused by secure boot. SecureBoot ensures that the drivers are from a trusted source. Usually, the vendor of said drivers would sign the driver to ensure folks know it is from theatvendor, and that the trust key is in the local store. Browsers use the same thing for HTTPS connections. However, my bios doesn't seem to have the key for the signed binaries for the NVIDIA drivers.

So 2 options:

  1. Disable secure boot. It's different in every BIOS, but the basic steps are:
  • Boot device
  • Hit the appropriate key to enter the BIOS settings. This is usually F2, Del, F12, or similar.
  • There may be a security section in the BIOS
  • Find the Secure Boot options and turn it off
  • Save & Exit the BIOS settings
  1. Sign the binaries
  • Generate a private key and certificate
sudo openssl req new -x509 -newkey rsa:2048 -keyout /etc/ssl/private/MOK.priv -outform DER -out /etc/ssl/certs/MOK.der -nodes -days 36500 -subj "/CN=SecureBIOS/"
  • Import the certificate into the BIOS using mokutil
sudo mokutil --import /etc/ssl/certs/MOK.der
  • Sign the drivers
sudo /usr/src/linux-headers-`uname -r`/scripts/sign-file sha256 /etc/ssl/private/MOK.priv /etc/ssl/certs/MOK.der $(modinfo -n nvidia-drm)
sudo /usr/src/linux-headers-`uname -r`/scripts/sign-file sha256 /etc/ssl/private/MOK.priv /etc/ssl/certs/MOK.der $(modinfo -n nvidia)
sudo /usr/src/linux-headers-`uname -r`/scripts/sign-file sha256 /etc/ssl/private/MOK.priv /etc/ssl/certs/MOK.der $(modinfo -n nvidia-modeset)
sudo /usr/src/linux-headers-`uname -r`/scripts/sign-file sha256 /etc/ssl/private/MOK.priv /etc/ssl/certs/MOK.der $(modinfo -n nvidia-peermem)
sudo /usr/src/linux-headers-`uname -r`/scripts/sign-file sha256 /etc/ssl/private/MOK.priv /etc/ssl/certs/MOK.der $(modinfo -n nvidia-uvm)
  • Reboot

What is interesting is that it does look like mine are already signed by a key on my laptop because doing modinfo nvidia shows a signature, and it's subject is that of my laptop. So there is something in the kernel upgrade process that signs the drivers automatically, however something seems to have gone missing and not installed the key in key storage so it is no longer trusted. I'm sure somebody much more familiar with kernel installations would know the post-install scripts that should handle that, and where the key is stored.

Edit: This might be related: https://bugs.launchpad.net/ubuntu/+source/linux-restricted-modules/+bug/2027914

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.