emersion / xdg-desktop-portal-wlr

xdg-desktop-portal backend for wlroots
MIT License
590 stars 57 forks source link

WLR_DRM_DEVICES is not respected #247

Closed Geigerkind closed 1 year ago

Geigerkind commented 1 year ago

Hello! Today I was trying to find out why screensharing is not working with my setup. Fast forward 8h I found out that it was working all along, but not the way I was expecting it to. So I am using a swaywm setup using pipewire, pipewire-media-session and xdg-desktop-portal(-wlr). Everything is running. I also made sure that everything written in the troubleshoot checklist is checked. Upon running swaywm with my integrated (laptop graphics card), screensharing was working perfectly fine. Running it with my discrete graphics card (with which my external displays are hardwired) I am only getting a blank screen. The reason I am thinking that this environment variable is not respected is, because when I start swaywm on my integrated graphics card, I get all display as outputs, but can only use the laptop one. Hence when I try to use screen sharing with my discrete card, I get a blank screen and xdg-desktop-portal-wlr reports that everything is running fine (and it does, just using the wrong buffer I guess).

Below you can find my setup: https://github.com/Geigerkind/dotfiles

Edit: This setup uses the proprietary nvidia driver, but I read that dma-buf support was landed some time ago already, so it should work in theory.

ghost commented 1 year ago

did you find a solution?

I have a similar problem.

Laptop with external monitor, NVIDIA proprietary cards. Hyprland compoositor.

Screensharing works fine with OBS Studio, but shows a black screen on Firefox and Chromium.

Geigerkind commented 1 year ago

I am afraid not. You do screensharing with obs studio? Just for streaming or really for teams and stuff? Could you share your setup for this?

ghost commented 1 year ago

I don't know if it is the same issue.

Mine is cause by a patch introduced by the Arch team in Firefox 106.0.2.

Downgrading to 106.0.1 make screensharing work again.

Geigerkind commented 1 year ago

Interesting. Any idea why it also doesnt work in chromium/edge/discord ? (Need edge for teams for work :'D)

ghost commented 1 year ago

My hypothesis is that the patch applies to libwebrtc which is shared among the two.

But it's only a conjecture right now.

Geigerkind commented 1 year ago

Interesting. So this is not persé a problem of xdg-desktop-portal-wlr? Thanks for updating! Will try it later on an older firefox version.

ghost commented 1 year ago

I don't know if my issue is the same as your issue. Also because you don't say which software you are using to screenshare, neither which distribution your are on.

If you are able to screenshare with OBS, but not with Firefox nor Chrome, then it might be a similar issue.

ghost commented 1 year ago

Notice this is a patch applied by the Arch team, which get installed when you do pacman -S firefox

Geigerkind commented 1 year ago

Closing in favor of https://github.com/emersion/xdg-desktop-portal-wlr/issues/250