YaLTeR/niri

Screencast doesn't work on split display/render devices

Closed this issue · 1 comments

Sample log from an M1 MAX:

Apr 03 16:31:25 niri[21289]: 2024-04-03T13:31:25.346365Z  INFO niri: starting version unstable 2024-04-02 (commit 2b3a80b477865177dbdf030d9d5360191b03f312)
Apr 03 16:31:25 niri[21289]: 2024-04-03T13:31:25.357757Z DEBUG niri_config: loaded config from "/home/olshamb/.config/niri/config.kdl"
Apr 03 16:31:25 niri[21289]: 2024-04-03T13:31:25.379364Z  INFO niri::backend::tty: using as the render node: "/dev/dri/renderD128"
Apr 03 16:31:25 niri[21289]: 2024-04-03T13:31:25.395232Z DEBUG niri::backend::tty: device added: 57856 "/dev/dri/card0"
Apr 03 16:31:25 niri[21289]: 2024-04-03T13:31:25.683518Z DEBUG niri::backend::tty: device changed: 57856
Apr 03 16:31:25 niri[21289]: 2024-04-03T13:31:25.683607Z DEBUG niri::backend::tty: connecting connector: eDP-1
Apr 03 16:31:25 niri[21289]: 2024-04-03T13:31:25.683631Z  WARN niri::backend::tty: configured mode 3456x2160@120.03 could not be found, falling back to preferred
Apr 03 16:31:25 niri[21289]: 2024-04-03T13:31:25.683635Z DEBUG niri::backend::tty: picking mode: Mode { name: "3456x2160", clock: 521065, size: (3456, 2160), hsync: (3464, 3496, 3536), vsync: (2278, 2360, 2456), hskew: 0, vscan: 0, vrefresh: 60, mode_type: ModeTypeFlags(PREFERRED | DRIVER) }
Apr 03 16:31:25 niri[21289]: 2024-04-03T13:31:25.683652Z DEBUG niri::backend::tty: error setting max bpc: couldn't find max bpc property
Apr 03 16:31:25 niri[21289]: 2024-04-03T13:31:25.683662Z DEBUG niri::backend::tty: error getting gamma properties: missing GAMMA_LUT property
Apr 03 16:31:25 niri[21289]: 2024-04-03T13:31:25.683668Z DEBUG niri::backend::tty: error resetting gamma: setting gamma is not supported
Apr 03 16:31:25 niri[21289]: 2024-04-03T13:31:25.697008Z DEBUG niri::niri: putting output eDP-1 at x=0 y=0
Apr 03 16:31:25 niri[21289]: 2024-04-03T13:31:25.697065Z DEBUG niri::backend::tty: device added: 57857 "/dev/dri/card1"
Apr 03 16:31:25 niri[21289]: 2024-04-03T13:31:25.698015Z  WARN niri::backend::tty: error adding device: DRM access error: Error loading resource handles on device `Some("/dev/dri/card1")` (Operation not supported (os error 95))
Apr 03 16:31:25 niri[21289]: Caused by:
Apr 03 16:31:25 niri[21289]:     Operation not supported (os error 95)
Apr 03 16:31:25 niri[21289]: 2024-04-03T13:31:25.698051Z  INFO niri: listening on Wayland socket: wayland-1
Apr 03 16:31:25 niri[21289]: 2024-04-03T13:31:25.698060Z  INFO niri: IPC listening on: /run/user/1000/niri.wayland-1.21289.sock
Apr 03 16:32:01 niri[21289]: 2024-04-03T13:32:01.447840Z DEBUG niri::dbus::mutter_screen_cast: record_monitor connector="eDP-1" properties=RecordMonitorProperties { cursor_mode: Some(Metadata), _is_recording: None }
Apr 03 16:32:01 niri[21289]: 2024-04-03T13:32:01.449723Z DEBUG niri::dbus::mutter_screen_cast: start
Apr 03 16:32:01 niri[21289]: 2024-04-03T13:32:01.449805Z DEBUG niri::niri: StartCast session_id=0
Apr 03 16:32:01 niri[21289]: 2024-04-03T13:32:01.449812Z DEBUG niri::niri: no GBM device available

Seems that our primary_node is something different from what it should be so we fail to retrieve GBM.

I added a workaround and it seems to work now, at least in more cases.