1

I am running Ubuntu 22.04 on an iMac 2012 fusion drive - to my great satisfaction. (Dual boot with OSX / MacOs Catalina)

The only problem I have is that I can not get an external 27" monitor to be detected. The external monitor does work OK on MacOs Catalina.

(For readability I have cleaned up this post drastically.)

System Profiler command on MacOs (same machine) : with a new cable, a good one. On MacOs, I have a perfect view.

External MacOs - good cable

Yet Ubuntu does not recognize the external display.

I tried another driver, the "nouveau". But that killed my graphical environment. Searched for 1 hour. Needed to repair it via

sudo ubuntu-drivers autoinstall

ignore the errors, reboot, and OK. Thanks to linuxbabe.

When I update the driver to the nouveau driver via command line, Ubuntu starts up OK after a reboot.

apt-get install xserver-xorg-video-nouveau

But.... when I update the driver to the nouveau driver via the Ubuntu settings screen, (see below), then Ubuntu graphical env. does not start up. And then I also see something strange, I think it is related to the external monitor :

lshw -c display

nouveau driver via ubuntu

======

Testing with Linux on an even older iMac:

I also tested an iMac 2010 with ATI Radeon card, that is working OK with the 2nd monitor.

ATI Radeon

======

Testing with Fedore Live USB and Mint Live USB :

I also tested the imac 2012 with a Fedora live USB, that is working with the 2nd monitor too. But it is running Wayland.

After testing Fedora Live USB, I tested also with a live USB from Mint, and installed them both.

In all cases, Linux seems to “think” the external display is working fine, since my windows and mouse disappear into the black external screen every once in a while. That screen is also visible in display setup. But it remains black.

In a last try, I downloaded a brand new Ubuntu 22.04 (11 feb 2024), just to have a nice clean system. And guess what ….

IT WORKED straight out of the box!

But only 10 minutes, before the reboot. This was exactly what I feared, considering the “after installation processes”.

I made some screenshots and notes BEFORE THE REBOOT.

NVIDIA before reboot Display settings before reboot 2 displays working

Check the different outcome from the nvidia tool AFTER THE REBOOT:

NVIDIA 1 after reboot

NVIDIA 2 after reboot

==============

After much help and a lot of research, I decided to fully re-install Ubuntu 22.04 and note down the differences before and after an apt update and apt upgrade for anaysis.

This are nvidia-related messages before the apt upgrade, with NVIDIA OK and the 2nd monitor also OK:

settings OK

Check the DMESG entries related to NVIDIA and external monitor working OK:

dmesg OK

==========

This are nvidia-related messages after apt upgrade, with NVIDIA NOT OK and the external monitor NOT OK:

An NVIDIA 418 entry suddenly appeared, and the NVIDIA 390 is still there, still I have the idea they are not used.

external drivers NOK

Check the DMESG entries related to NVIDIA, when it is NOT working:

NVIDIA DMESG NOK

The output from modprobe nvidia after apt upgrade gives:

modprobe: FATAL: Module nvidia not found in directory /lib/modules /6.5.0-18-generic

===========

Cheers

Pla

  • Look at your system startup log (watch your kernel discover the hardware) with the terminal command sudo journalctl -b 0. Read man journalctl. If the kernel doesn't detect the monitor, suspect cable/connector difficulties. Ask your system about sudo lshw -class display. Please [edit] your question to add whatever information you get. Do not use Add Comment. – waltinator Feb 04 '24 at 17:05
  • Did you try the open source nouvou driver? Does it work? – Archisman Panigrahi Feb 07 '24 at 22:40
  • Hi Arch. Yes I tried it and no it did not work either. See my edits in the story above – TheGlasses Feb 07 '24 at 23:42
  • When it's working, it looks like the proprietary Nvidia driver not the nouveau driver is used. In general, most people don't want the nouveau driver. You could try blacklisting it: https://askubuntu.com/a/951892/1004020 so that the official Nvidia driver is used – Daniel T Feb 12 '24 at 22:10

1 Answers1

1

I found the solution.... very simple :

I think the nvidia-driver-390 package is broken in kernel 6.5.0-21 (and not in 6.2.0-26, the one on my live USB). This is my solution:

See what drivers are available

ubuntu-drivers devices

Then remove the bogus 390 and install 418

apt remove nvidia-driver-390
apt-get clean && apt-get autoremove
apt install nvidia-driver-418

Now, also the dkms-390 errors are gone.

reboot

Et voilà.

The only issues to solve are

  1. I have to leave the external monitor powered-off or disconnect the cable at boot, and turn it on / plug it in later. Really power-off/unplug, not just 'standby'. If I don't that, the login-screen shows up on external monitor, but after logging in, the screen remains on but grey.
  2. Sometimes, max resolution is 4K, other times just 2K (I do not care). I was surprised it supports 4 k at all!

DO NOT USE THE UBUNTU SOFTWARE APP TO INSTALL nvidia-driver-418 ! I really had to use the command line.

Don't ask all the steps I took, I don't know anymore. The true hint was that I did not saw any nvidia modules in the latest kernel, and started looking for that, and then I also noted that lsmod | grep nvidia did not return any values, even though nvidia 390 seemed to be installed. I am not an expert but seems a bug in Ubuntu or Linux.

====

As I expected, at certain moment I would update my Ubuntu and kill my '2 screens setup'.

I ran

nvidia-xconfig

And now it works again.

====

Blacklisting nouveau did NOT work

====

Here some pics:

NVIDIA OK

additional drivers

  • Oh you're using the useless blacklist nouveau line. Please see my answer at https://askubuntu.com/a/1503879/1004020 – Daniel T Feb 17 '24 at 21:51
  • Nope, this also does not work. After apt update and apt-dist-upgrade, all nvidia stuff seems gone again. The only content in my blacklist-nouveau was 'install nouveau /bin/false' - is that correct? – TheGlasses Feb 18 '24 at 22:41
  • At least now it's UNCLAIMED instead of nouveau. So we narrowed down the problem and need to figure out why the nvidia driver isn't loading. Please edit the original question with the differences in dmesg after a boot that doesn't work – Daniel T Feb 18 '24 at 22:59
  • I have the 2 dmesg files. Quite big. Anything specific I should look for next to the above updated information? – TheGlasses Feb 23 '24 at 09:32