Score:1

2nd monitor not detected

ph flag

I like to use 2 monitors while I work. I did this with my first laptop that I dual booted with Ubuntu and never had any problems, but it did not have a Nvidia graphics card.

I recently bought a new laptop and this is my first one with an Nvidia graphics card. This has just been a mess.

When first tried my monitor on the new laptop, it wouldn't connect. Initially, I thought nothing of it. When I switched to Windows, it connected just fine, indicating there was nothing wrong with my monitor or my laptop physically. I checked this with a few monitors and found the problem was exclusively when I'm on Ubuntu.

I then tried following this question:

External monitor not detected on Ubuntu 18.04

The only solution that worked was

sudo apt-get purge 'nvidia*'
sudo ubuntu-drivers autoinstall

Now, here's the weird thing. Every month or every couple months, I would wake up and boot up my laptop, and I would find that suddenly my monitor didn't work again. I then would run that set of commands and I would find the monitor worked again.

Well, not this morning. This morning when I ran that set of commands, after running

sudo ubuntu-drivers autoinstall

I got the following error as seen on this thread

sudo ubuntu-drivers autoinstall: UnboundLocalError: local variable 'version' referenced before assignment

I tried following the answerer's advice

Had the same issue, fixed it by installing the driver from "Software & Updates" -> "Additional Drivers" & then the newest Nvidia Driver. After that running sudo ubuntu-driver autoinstall gave me "All the available drivers are already installed."

and it didn't work. My second monitor still doesn't work now.

I have two questions

  1. Does anyone have any idea what's going on?
  2. Is there a permanent way to fix this?

I know I haven't provided any background information on my laptop, so I'm happy to provide any information needed to answer the question. Just comment below and I'll add edits with screen shots of any info you might need.

Info on my system

  • Version of Ubuntu: Ubuntu 22.04.1 LTS
David avatar
cn flag
What version of Ubuntu are you using?
Stan Shunpike avatar
ph flag
@David updated with it, Ubuntu 22.04.1 LTS
Score:2
si flag

I have booted today to this same issue, and apparently it is a freshly introduced bug, with multiple instances popping around here:

The solution posted at #3 here on the bug report worked for me:

I edited /usr/lib/python3/dist-packages/UbuntuDrivers/detect.py at line 835 from [-1] to [2], which will break ubuntu-drivers after the underlying issue gets fixed. I also had to poke Software & Updates > Additional Drivers options a few times before the driver started loading.

Score:0
tr flag

Had the same issues this morning after installing the following updates, and have had to revert to using Xorg to get both my desktop monitors working.

-linux-objects-nvidia-470-6.2.0-1005-oracle -linux-objects-nvidia-470-6.2.0-1007-lowlatency -linux-signatures-nvidia-6.2.0-1005-oracle -linux-signatures-nvidia-6.2.0-1007-lowlatency

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.