Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Screen share breaks if monitor gets powered off #217

Open
YourSandwich opened this issue May 22, 2024 · 2 comments
Open

Screen share breaks if monitor gets powered off #217

YourSandwich opened this issue May 22, 2024 · 2 comments

Comments

@YourSandwich
Copy link

Hi, when i turn off both of my monitors and turn them back on, full-screen share does not work anymore, only applications work.
Restarting xdg-desktop-portal-hyprland like this fixes it:

killall xdg-desktop-portal-hyprland
hyprctl dispatch exec xdg-desktop-portal-hyprland

This is the error log when trying to screen share after restarting my monitors:

[LOG] Found output name DP-2
[LOG] Found output name DP-3
[LOG] [toplevel] Activated, bound to 5bf148448890, toplevels: 7
[LOG] [screencopy] Registered for toplevel export
[LOG] [screenshot] init successful
[LOG]  | Got interface: wl_output (ver 4)
[LOG] Found output name HEADLESS-1
[LOG]  | Got interface: wl_output (ver 4)
[LOG] Found output name DP-3
[LOG]  | Got interface: wl_output (ver 4)
[LOG] Found output name DP-2
[LOG] [toplevel] (activate) locks: 2
[LOG] [screencopy] New session:
[LOG] [screencopy]  | /org/freedesktop/portal/desktop/request/1_53/webrtc_57693349
[LOG] [screencopy]  | /org/freedesktop/portal/desktop/session/1_53/webrtc_session1912455590
[LOG] [screencopy]  | appid: 
[LOG] [screencopy] SelectSources:
[LOG] [screencopy]  | /org/freedesktop/portal/desktop/request/1_53/webrtc1134696143
[LOG] [screencopy]  | /org/freedesktop/portal/desktop/session/1_53/webrtc_session1912455590
[LOG] [screencopy]  | appid: 
[LOG] [screencopy] option persist_mode to 1
[LOG] [screencopy] unused option multiple
[LOG] [screencopy] unused option types
[LOG] [screencopy] restore data invalid / missing, prompting
[LOG] execAndGet: WAYLAND_DISPLAY=wayland-1 QT_QPA_PLATFORM="wayland" XCURSOR_SIZE=32 HYPRLAND_INSTANCE_SIGNATURE=cba1ade848feac44b2eda677503900639581c3f4_1716390875_1544677884 XDPH_WINDOW_SHARING_LIST="1212459120[HC>]kitty[HT>]tmux[HE>]1212461600[HC>]kitty[HT>]tmux[HE>]1212462960[HC>]firefox[HT>]Mozilla Firefox[HE>]1212463072[HC>]Element-Nightly[HT>]Element[HE>]1212660592[HC>]org.keepassxc.KeePassXC[HT>]Noa.kdbx [Locked] - KeePassXC[HE>]1212661952[HC>]thunderbird[HT>]Mozilla Thunderbird[HE>]1212663280[HC>]kitty[HT>]fish[HE>]" hyprland-share-picker 2>&1
[LOG] [sc] Selection: r/screen:DP-3

[LOG] [screencopy] SHAREDATA returned selection 0
[LOG] [screencopy] Start:
[LOG] [screencopy]  | /org/freedesktop/portal/desktop/request/1_53/webrtc542465749
[LOG] [screencopy]  | /org/freedesktop/portal/desktop/session/1_53/webrtc_session1912455590
[LOG] [screencopy]  | appid: 
[LOG] [screencopy]  | parent_window: 
[ERR] [screencopy] Couldn't obtain a format from dma
[LOG] [screencopy] Sent restore token to /org/freedesktop/portal/desktop/session/1_53/webrtc_session1912455590

First 5 lines are before turning off the monitros.

@iabdelkareem
Copy link

+1 I'm also experiencing this issue.

@hugoeustaquio
Copy link

Same here, but thanks for the workarround, I just wrote an script with IPC:

handle() {
  case $1 in
    monitoradded*) killall xdg-desktop-portal-hyprland; hyprctl dispatch exec xdg-desktop-portal-hyprland ;;
  esac
}

socat -U - UNIX-CONNECT:$XDG_RUNTIME_DIR/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock | while read -r line; do handle "$line"; done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants