How to Prevent "Console: switching to colour dummy device 80x25"?

Just updated to Ubuntu 23.04 Lunar Lobster. I run it without desktop UI. Every time I run “virsh start”, the screen gets locked up. Everything else including the VM works absolutely fine. I can ssh to the host and remote to the guest without problem. I am just not able to see any output from the physical screen. I don’t have this issue in Ubuntu 22.04. Here is the output of dmesg.

I believe the culprit is “Console: switching to colour dummy device 80x25”. I don’t know why it happens and how to prevent it happening.
It is not related to hardware passthrough. Yes, I also tested it with a VM without any hardware passthrough, same issue.

[Sat Apr 22 23:25:43 2023] audit: type=1400 audit(1682220343.263:97): apparmor="STATUS" operation="profile_load" profile="unconfined" name="libvirt-e3b05049-8201-4447-a4b3-b310220cc5bd" pid=11028 comm="apparmor_parser"
[Sat Apr 22 23:25:43 2023] audit: type=1400 audit(1682220343.347:98): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="libvirt-e3b05049-8201-4447-a4b3-b310220cc5bd" pid=11031 comm="apparmor_parser"
[Sat Apr 22 23:25:43 2023] audit: type=1400 audit(1682220343.447:99): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="libvirt-e3b05049-8201-4447-a4b3-b310220cc5bd" pid=11035 comm="apparmor_parser"
[Sat Apr 22 23:25:43 2023] VFIO - User Level meta-driver version: 0.3
[Sat Apr 22 23:25:43 2023] Console: switching to colour dummy device 80x25
[Sat Apr 22 23:25:43 2023] vfio-pci 0000:01:00.0: vgaarb: changed VGA decodes: olddecodes=io+mem,decodes=io+mem:owns=none
[Sat Apr 22 23:25:43 2023] vfio_pci: add [10de:2782[ffffffff:ffffffff]] class 0x000000/00000000
[Sat Apr 22 23:25:43 2023] vfio_pci: add [10de:22bc[ffffffff:ffffffff]] class 0x000000/00000000
[Sat Apr 22 23:25:43 2023] xhci_hcd 0000:14:00.0: remove, state 4
[Sat Apr 22 23:25:43 2023] usb usb9: USB disconnect, device number 1
[Sat Apr 22 23:25:43 2023] xhci_hcd 0000:14:00.0: USB bus 9 deregistered
[Sat Apr 22 23:25:43 2023] xhci_hcd 0000:14:00.0: remove, state 1
[Sat Apr 22 23:25:43 2023] usb usb2: USB disconnect, device number 1
[Sat Apr 22 23:25:43 2023] usb 2-6: USB disconnect, device number 2
[Sat Apr 22 23:25:43 2023] usb 2-7: USB disconnect, device number 3
[Sat Apr 22 23:25:43 2023] usb 2-8: USB disconnect, device number 4
[Sat Apr 22 23:25:43 2023] usb 2-9: USB disconnect, device number 5
[Sat Apr 22 23:25:43 2023] xhci_hcd 0000:14:00.0: USB bus 2 deregistered
[Sat Apr 22 23:25:44 2023] audit: type=1400 audit(1682220344.403:100): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="libvirt-e3b05049-8201-4447-a4b3-b310220cc5bd" pid=11082 comm="apparmor_parser"
[Sat Apr 22 23:25:44 2023] audit: type=1400 audit(1682220344.491:101): apparmor="STATUS" operation="profile_replace" info="same as current profile, skipping" profile="unconfined" name="libvirt-e3b05049-8201-4447-a4b3-b310220cc5bd" pid=11087 comm="apparmor_parser"
[Sat Apr 22 23:25:45 2023] vfio-pci 0000:03:11.7: enabling device (0000 -> 0002)
[Sat Apr 22 23:25:45 2023] vfio-pci 0000:01:00.0: vfio_ecap_init: hiding ecap 0x1e@0x258
[Sat Apr 22 23:25:45 2023] vfio-pci 0000:01:00.0: vfio_ecap_init: hiding ecap 0x19@0x900
[Sat Apr 22 23:25:45 2023] vfio-pci 0000:01:00.0: vfio_ecap_init: hiding ecap 0x26@0xc1c
[Sat Apr 22 23:25:45 2023] vfio-pci 0000:01:00.0: vfio_ecap_init: hiding ecap 0x27@0xd00
[Sat Apr 22 23:25:45 2023] vfio-pci 0000:01:00.0: vfio_ecap_init: hiding ecap 0x25@0xe00
[Sat Apr 22 23:25:46 2023] vfio-pci 0000:01:00.1: vfio_ecap_init: hiding ecap 0x25@0x160
[Sat Apr 22 23:25:49 2023] vfio-pci 0000:14:00.0: AMD-Vi: Event logged [IO_PAGE_FAULT domain=0x002d address=0xe8700 flags=0x0000]
[Sat Apr 22 23:26:03 2023] ixgbe 0000:03:00.1 eth11: VF Reset msg received from vf 7
[Sat Apr 22 23:26:03 2023] ixgbe 0000:03:00.1 eth11: VF Reset msg received from vf 7

Maybe too late :smiley: , but I had a similar problem with my Host (Debian 12) and solution was to switch positions on /etc/initramfs-tools/modules between:

nvidia
nvidia-modeset
nvidia-drm

and

vfio
vfio_iommu_type1
vfio_pci
vfio_virqfd

If vfio’s lines are before nvidia’s, it load before and then system tries to assign console to it, even it’s just guess’s GPU with vfio dummy drivers.

Thanks for replying.

I am running the host without desktop interface. Thus, the nvidia driver is not installed on the host. My /etc/initramfs-tools/modules file is empty.

I use the igpu of the 7950x as the display for the host. A RTX 4070 Ti is used for the guest only.
I did try to add vfio and amdgpu to the file as your suggestion, with different order. The issue was not solved.

You are right, that doesn’s solve it :smiley: . I touch more things and it seems that this doesn’t affect although I believe it.

I follow more than one tutorial to make this work and I have duplicated the isolation of the GPU with:

pci-stub.ids=1002:73df,1022:1456

on grub config file, and:

options vfio-pci ids=1002:73df,1002:ab28

on etc/modprobe.d/vfio.conf

If I comment vfio.conf out, no switching to colour dummy device 80x25 occurs on startup (I tried twice this time lol)
BUT, when I start the VM, then ttys doesn’t update output because it had switched to dummy device as before. So, IMHO, this is related to how VFIO it’s taking control of the GPU. (And I have no idea now of how to change this behaviour :smiley: )

I keep searching a solution, but with no luck.

What I found is that executing just:

sudo modprobe -i vfio-pci

has the same result on terminal’s output.

1 Like

I have a system without Xorg - and hence no nvidia drivers loaded.
As soon as vfio-pci is loaded, it swaps console over to a dummy console, rendering all tty’s useless.
I prefer to keep my system in textmode - as framebuffer is way to slow on the host GPU anyway.

I noticed this problem when upgrading to 6.1kernel - before in the 5.x series, I had no issues.

Did anyone ever manage to find a solution to this?

For reference, dmesg output when the console is swapped to a dummy device:

[   58.965850] VFIO - User Level meta-driver version: 0.3
[   58.982300] Console: switching to colour dummy device 80x25
[   59.008871] vfio-pci 0000:02:00.0: vgaarb: changed VGA decodes: olddecodes=io+mem,decodes=io+mem:owns=none
[   59.008933] vfio_pci: add [10de:13c2[ffffffff:ffffffff]] class 0x000000/00000000
[   59.008944] vfio_pci: add [10de:0fbb[ffffffff:ffffffff]] class 0x000000/00000000
[   59.008951] vfio_pci: add [1106:3483[ffffffff:ffffffff]] class 0x000000/00000000