YaLTeR / niri

A scrollable-tiling Wayland compositor.
https://matrix.to/#/#niri:matrix.org
GNU General Public License v3.0
3.81k stars 114 forks source link

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

Closed jeancf closed 5 months ago

jeancf commented 6 months ago

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

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.

YaLTeR commented 6 months ago

Could you post the niri output?

jeancf commented 6 months ago

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.

YaLTeR commented 6 months ago

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

jeancf commented 6 months ago

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
YaLTeR commented 6 months ago

No supported plane buffer format found

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

jeancf commented 6 months ago

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

YaLTeR commented 6 months ago

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.

YaLTeR commented 5 months ago

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

jeancf commented 5 months ago

It's working! Nice, thanks.

FYI: I reported the issue on the Smithay tracker after you said that it may be related to them: https://github.com/Smithay/smithay/issues/1415

YaLTeR commented 5 months ago

Great!