YaLTeR/niri

'Display output is not active' in qemu VM (Arch Linux)

jeancf opened this issue · 10 comments

When trying to run niri in a QEMU virtual machine the virtual screen goes black and displays the message Display output is not active.

System Information

  • niri version: niri 0.1.5 (v0.1.5-21-gc0d5001)

  • Virtual machine configuration:

Quickemu 4.9.1 using /usr/bin/qemu-system-x86_64 v8.2.2
 - Host:     "Manjaro Linux" running Linux 6.8 (desktop1)
 - CPU:       Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz
 - CPU VM:   1 Socket(s), 3 Core(s), 2 Thread(s), 4G RAM
 - BOOT:     EFI (Linux), OVMF (/usr/share/edk2-ovmf/x64/OVMF_CODE.fd), SecureBoot (off).
 - Disk:     archlinux-latest/disk.qcow2 (16G)
 - Display:  GTK, virtio-vga-gl, GL (on), VirGL (on)
 - Sound:    intel-hda
 - ssh:      On host:  ssh user@localhost -p 22220
 - WebDAV:   On guest: dav://localhost:9843/
 - 9P:       On guest: sudo mount -t 9p -o trans=virtio,version=9p2000.L,msize=104857600 Public-jeancf ~/jeancf
 - smbd:     On guest: smb://10.0.2.4/qemu
 - Network:  User (virtio-net)
 - Monitor:  On host:  nc -U "archlinux-latest/archlinux-latest-monitor.socket"
             or     :  socat -,echo=0,icanon=0 unix-connect:archlinux-latest/archlinux-latest-monitor.socket
 - Serial:   On host:  nc -U "archlinux-latest/archlinux-latest-serial.socket"
             or     :  socat -,echo=0,icanon=0 unix-connect:archlinux-latest/archlinux-latest-serial.socket
 - Process:  Starting archlinux-latest.conf as archlinux-latest (4728)

inxi graphics report from inside the VM:

Graphics:
  Device-1: Red Hat Virtio 1.0 GPU driver: virtio-pci v: 1 ports: active: none off: Virtual-1
    empty: none bus-ID: 00:02.0 chip-ID: 1af4:1050 class-ID: 0300
  Display: server: X.org v: 1.21.1.13 with: Xwayland v: 23.2.6 driver: gpu: virtio-pci
    tty: 150x57
  Monitor-1: Virtual-1 model: QEMU Monitor res: 1280x800 dpi: 100 size: 325x203mm (12.8x7.99")
    diag: 383mm (15.1") modes: max: 1280x800 min: 640x480
  API: OpenGL Message: GL data unavailable in console, glxinfo missing.

host graphics

Graphics:
  Device-1: AMD Navi 21 [Radeon RX 6800/6800 XT / 6900 XT] driver: amdgpu
    v: kernel
  Device-2: HTC (High Tech ) Vive driver: uvcvideo type: USB
  Display: x11 server: X.Org v: 21.1.12 driver: X: loaded: amdgpu
    unloaded: modesetting,radeon dri: radeonsi gpu: amdgpu resolution:
    1: 2560x1440 2: 1280x1024
  API: EGL v: 1.5 drivers: kms_swrast,radeonsi,swrast
    platforms: gbm,x11,surfaceless,device
  API: OpenGL v: 4.6 compat-v: 4.5 vendor: amd mesa v: 24.0.2-manjaro1.1.1
    renderer: AMD Radeon RX 6800 XT (radeonsi navi21 LLVM 16.0.6 DRM 3.57
    6.8.5-1-MANJARO)
  API: Vulkan v: 1.3.279 drivers: radv,llvmpipe surfaces: xcb,xlib

I am using the ly display manager in the VM for simplicity. Running niri --session from a shell has the same result.

Hyprland is installed alongside on the same machine and the hyprland session works fine when selected from ly.

Could you post the niri output?

Sure. How do I do that? Running niri --session in a shell switches the screen to black with Display output is not active so I do not see what the output is.

You can redirect it to file with niri --session >niri.log 2>&1

Ah, yes, of course... Here it is:

2024-04-30T09:28:18.969089Z  INFO niri: starting version 0.1.5 (v0.1.5-21-gc0d5001)
2024-04-30T09:28:18.997712Z DEBUG niri_config: loaded config from "/home/jeancf/.config/niri/config.kdl"
2024-04-30T09:28:19.168409Z  INFO niri::backend::tty: using as the render node: "/dev/dri/renderD128"
2024-04-30T09:28:19.236731Z DEBUG niri::backend::tty: device added: 57857 "/dev/dri/card1"
2024-04-30T09:28:19.344539Z DEBUG niri::backend::tty: this is the primary node
2024-04-30T09:28:19.363189Z DEBUG niri::backend::tty: device changed: 57857
2024-04-30T09:28:19.363566Z DEBUG niri::backend::tty: connecting connector: Virtual-1
2024-04-30T09:28:19.363594Z DEBUG niri::backend::tty: picking mode: Mode { name: "1280x800", clock: 234720, size: (1280, 800), hsync: (1600, 1638, 1728), vsync: (804, 808, 828), hskew: 0, vscan: 0, vrefresh: 164, mode_type: ModeTypeFlags(PREFERRED | DRIVER) }
2024-04-30T09:28:19.363621Z DEBUG niri::backend::tty: error setting max bpc: couldn't find max bpc property
2024-04-30T09:28:19.363662Z DEBUG niri::backend::tty: error getting gamma properties: missing GAMMA_LUT property
2024-04-30T09:28:19.363669Z DEBUG niri::backend::tty: error resetting gamma: setting gamma is not supported
2024-04-30T09:28:19.365022Z  WARN niri::backend::tty: error connecting connector: No supported plane buffer format found
2024-04-30T09:28:19.365100Z  INFO niri: listening on Wayland socket: wayland-1
2024-04-30T09:28:19.365107Z  INFO niri: IPC listening on: /run/user/1000/niri.wayland-1.468.sock

No supported plane buffer format found

Huh, not sure about this, maybe some QEMU setting needs to be set.

The internet does not seem to have ever seen this error message... Do you know which code / crate is emitting this message?

This is a Smithay-specific message, but it means that the QEMU framebuffer primary plane did not support any of the formats that Smithay tried.

Could you try again? There's been some potentially related fix in Smithay.

It's working! Nice, thanks.

FYI: I reported the issue on the Smithay tracker after you said that it may be related to them: Smithay/smithay#1415

Great!