hyprwm / xdg-desktop-portal-hyprland

xdg-desktop-portal backend for Hyprland
BSD 3-Clause "New" or "Revised" License
305 stars 48 forks source link

Screen Sharing does not work now #251

Closed piyushyadav0191 closed 1 month ago

piyushyadav0191 commented 3 months ago

Regression?

Yes

System Info and Version

System/Version info ```sh ble controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Picasso/Raven 2 [Radeon Vega Series / Radeon Vega Mobile Series] [1002:15d8] (rev c4) (prog-if 00 [VGA controller]) os-release: NAME="EndeavourOS" PRETTY_NAME="EndeavourOS" ID="endeavouros" ID_LIKE="arch" BUILD_ID=rolling ANSI_COLOR="38;2;23;147;209" HOME_URL="https://endeavouros.com" DOCUMENTATION_URL="https://discovery.endeavouros.com" SUPPORT_URL="https://forum.endeavouros.com" BUG_REPORT_URL="https://forum.endeavouros.com/c/general-system/endeavouros-installation" PRIVACY_POLICY_URL="https://endeavouros.com/privacy-policy-2" LOGO="endeavouros" plugins: ======Config-Start====== Config File: /home/ranker/.config/hypr/hyprland.conf: Read Succeeded #   ░▒▒▒░░░░░▓▓          ___________ # ░░▒▒▒░░░░░▓▓        //___________/ # ░░▒▒▒░░░░░▓▓     _   _ _    _ _____ # ░░▒▒░░░░░▓▓▓▓▓▓ | | | | |  | |  __/ # ░▒▒░░░░▓▓   ▓▓ | |_| | |_/ /| |___ #  ░▒▒░░▓▓   ▓▓   \__  |____/ |____/ #    ░▒▓▓   ▓▓  //____/ $scrPath = $HOME/.local/share/bin # set scripts path # █▀▄▀█ █▀█ █▄░█ █ ▀█▀ █▀█ █▀█ # █░▀░█ █▄█ █░▀█ █ ░█░ █▄█ █▀▄ # See https://wiki.hyprland.org/Configuring/Monitors/ monitor=,preferred,auto,1,bitdepth,10 # █░░ ▄▀█ █░█ █▄░█ █▀▀ █░█ # █▄▄ █▀█ █▄█ █░▀█ █▄▄ █▀█ # See https://wiki.hyprland.org/Configuring/Keywords/ exec-once = $scrPath/resetxdgportal.sh # reset XDPH for screenshare exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP # for XDPH exec-once = dbus-update-activation-environment --systemd --all # for XDPH exec-once = systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP # for XDPH exec-once = $scrPath/polkitkdeauth.sh # authentication dialogue for GUI apps exec-once = waybar # launch the system bar exec-once = blueman-applet # systray app for Bluetooth exec-once = udiskie --no-automount --smart-tray # front-end that allows to manage removable media exec-once = nm-applet --indicator # systray app for Network/Wifi exec-once = dunst # start notification demon exec-once = wl-paste --type text --watch cliphist store # clipboard store text data exec-once = wl-paste --type image --watch cliphist store # clipboard store image data exec-once = $scrPath/swwwallpaper.sh # start wallpaper daemon exec-once = $scrPath/batterynotify.sh # battery notification # █▀▀ █▄░█ █░█ # ██▄ █░▀█ ▀▄▀ # See https://wiki.hyprland.org/Configuring/Environment-variables/ env = PATH,$PATH:$scrPath env = XDG_CURRENT_DESKTOP,Hyprland env = XDG_SESSION_TYPE,wayland env = XDG_SESSION_DESKTOP,Hyprland env = QT_QPA_PLATFORM,wayland;xcb env = QT_QPA_PLATFORMTHEME,qt6ct env = QT_WAYLAND_DISABLE_WINDOWDECORATION,1 env = QT_AUTO_SCREEN_SCALE_FACTOR,1 env = MOZ_ENABLE_WAYLAND,1 env = GDK_SCALE,1 # █ █▄░█ █▀█ █░█ ▀█▀ # █ █░▀█ █▀▀ █▄█ ░█░ # See https://wiki.hyprland.org/Configuring/Variables/ input { kb_layout = us follow_mouse = 1 touchpad { natural_scroll = no } sensitivity = 0 force_no_accel = 1 } # See https://wiki.hyprland.org/Configuring/Keywords/#executing device { name = epic mouse V1 sensitivity = -0.5 } # See https://wiki.hyprland.org/Configuring/Variables/ gestures { workspace_swipe = true workspace_swipe_fingers = 3 } # █░░ ▄▀█ █▄█ █▀█ █░█ ▀█▀ █▀ # █▄▄ █▀█ ░█░ █▄█ █▄█ ░█░ ▄█ # See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ dwindle { pseudotile = yes preserve_split = yes } # See https://wiki.hyprland.org/Configuring/Master-Layout/ master { new_status = master } # █▀▄▀█ █ █▀ █▀▀ # █░▀░█ █ ▄█ █▄▄ # See https://wiki.hyprland.org/Configuring/Variables/ misc { vrr = 0 disable_hyprland_logo = true disable_splash_rendering = true force_default_wallpaper = 0 } xwayland { force_zero_scaling = true } # █▀ █▀█ █░█ █▀█ █▀▀ █▀▀ # ▄█ █▄█ █▄█ █▀▄ █▄▄ ██▄ source = ~/.config/hypr/animations.conf source = ~/.config/hypr/keybindings.conf source = ~/.config/hypr/windowrules.conf source = ~/.config/hypr/themes/common.conf # shared theme settings source = ~/.config/hypr/themes/theme.conf # theme specific settings source = ~/.config/hypr/themes/colors.conf # wallbash color override source = ~/.config/hypr/monitors.conf # initially empty, to be configured by user and remains static source = ~/.config/hypr/userprefs.conf # initially empty, to be configured by user and remains static # Note: as userprefs.conf is sourced at the end, settings configured in this file will override the defaults Config File: /home/ranker/.config/hypr/animations.conf: Read Succeeded # ▄▀█ █▄░█ █ █▀▄▀█ ▄▀█ ▀█▀ █ █▀█ █▄░█ # █▀█ █░▀█ █ █░▀░█ █▀█ ░█░ █ █▄█ █░▀█ # See https://wiki.hyprland.org/Configuring/Animations/ animations { enabled = yes bezier = wind, 0.05, 0.9, 0.1, 1.05 bezier = winIn, 0.1, 1.1, 0.1, 1.1 bezier = winOut, 0.3, -0.3, 0, 1 bezier = liner, 1, 1, 1, 1 animation = windows, 1, 6, wind, slide animation = windowsIn, 1, 6, winIn, slide animation = windowsOut, 1, 5, winOut, slide animation = windowsMove, 1, 5, wind, slide animation = border, 1, 1, liner animation = borderangle, 1, 30, liner, loop animation = fade, 1, 10, default animation = workspaces, 1, 5, wind } Config File: /home/ranker/.config/hypr/keybindings.conf: Read Succeeded # █▄▀ █▀▀ █▄█ █▄▄ █ █▄░█ █▀▄ █ █▄░█ █▀▀ █▀ # █░█ ██▄ ░█░ █▄█ █ █░▀█ █▄▀ █ █░▀█ █▄█ ▄█ # See https://wiki.hyprland.org/Configuring/Keywords/ # & https://wiki.hyprland.org/Configuring/Binds/ # Main modifier $mainMod = Super # super / meta / windows key # Assign apps $term = kitty $editor = code $file = dolphin $browser = firefox # Window/Session actions bind = $mainMod, Q, exec, $scrPath/dontkillsteam.sh # close focused window bind = Alt, F4, exec, $scrPath/dontkillsteam.sh # close focused window bind = $mainMod, Delete, exit, # kill hyprland session bind = $mainMod, W, togglefloating, # toggle the window between focus and float bind = $mainMod, G, togglegroup, # toggle the window between focus and group bind = Alt, Return, fullscreen, # toggle the window between focus and fullscreen bind = $mainMod, L, exec, swaylock # launch lock screen bind = $mainMod+Shift, F, exec, $scrPath/windowpin.sh # toggle pin on focused window bind = $mainMod, Backspace, exec, $scrPath/logoutlaunch.sh # launch logout menu bind = Ctrl+Alt, W, exec, killall waybar || waybar # toggle waybar # Application shortcuts bind = $mainMod, T, exec, $term # launch terminal emulator bind = $mainMod, E, exec, $file # launch file manager bind = $mainMod, C, exec, $editor # launch text editor bind = $mainMod, F, exec, $browser # launch web browser bind = Ctrl+Shift, Escape, exec, $scrPath/sysmonlaunch.sh # launch system monitor (htop/btop or fallback to top) # Rofi menus bind = $mainMod, A, exec, pkill -x rofi || $scrPath/rofilaunch.sh d # launch application launcher bind = $mainMod, Tab, exec, pkill -x rofi || $scrPath/rofilaunch.sh w # launch window switcher bind = $mainMod+Shift, E, exec, pkill -x rofi || $scrPath/rofilaunch.sh f # launch file explorer # Audio control bindl = , F10, exec, $scrPath/volumecontrol.sh -o m # toggle audio mute bindel = , F11, exec, $scrPath/volumecontrol.sh -o d # decrease volume bindel = , F12, exec, $scrPath/volumecontrol.sh -o i # increase volume bindl = , XF86AudioMute, exec, $scrPath/volumecontrol.sh -o m # toggle audio mute bindl = , XF86AudioMicMute, exec, $scrPath/volumecontrol.sh -i m # toggle microphone mute bindel = , XF86AudioLowerVolume, exec, $scrPath/volumecontrol.sh -o d # decrease volume bindel = , XF86AudioRaiseVolume, exec, $scrPath/volumecontrol.sh -o i # increase volume # Media control bindl = , XF86AudioPlay, exec, playerctl play-pause # toggle between media play and pause bindl = , XF86AudioPause, exec, playerctl play-pause # toggle between media play and pause bindl = , XF86AudioNext, exec, playerctl next # media next bindl = , XF86AudioPrev, exec, playerctl previous # media previous # Brightness control bindel = , XF86MonBrightnessUp, exec, $scrPath/brightnesscontrol.sh i # increase brightness bindel = , XF86MonBrightnessDown, exec, $scrPath/brightnesscontrol.sh d # decrease brightness # Move between grouped windows bind = $mainMod CTRL , H, changegroupactive, b bind = $mainMod CTRL , L, changegroupactive, f # Screenshot/Screencapture bind = $mainMod, P, exec, $scrPath/screenshot.sh s # partial screenshot capture bind = $mainMod+Ctrl, P, exec, $scrPath/screenshot.sh sf # partial screenshot capture (frozen screen) bind = $mainMod+Alt, P, exec, $scrPath/screenshot.sh m # monitor screenshot capture bind = , Print, exec, $scrPath/screenshot.sh p # all monitors screenshot capture # Custom scripts bind = $mainMod+Alt, G, exec, $scrPath/gamemode.sh # disable hypr effects for gamemode bind = $mainMod+Alt, Right, exec, $scrPath/swwwallpaper.sh -n # next wallpaper bind = $mainMod+Alt, Left, exec, $scrPath/swwwallpaper.sh -p # previous wallpaper bind = $mainMod+Alt, Up, exec, $scrPath/wbarconfgen.sh n # next waybar mode bind = $mainMod+Alt, Down, exec, $scrPath/wbarconfgen.sh p # previous waybar mode bind = $mainMod+Shift, R, exec, pkill -x rofi || $scrPath/wallbashtoggle.sh -m # launch wallbash mode select menu bind = $mainMod+Shift, T, exec, pkill -x rofi || $scrPath/themeselect.sh # launch theme select menu bind = $mainMod+Shift, A, exec, pkill -x rofi || $scrPath/rofiselect.sh # launch select menu bind = $mainMod+Shift, W, exec, pkill -x rofi || $scrPath/swwwallselect.sh # launch wallpaper select menu bind = $mainMod, V, exec, pkill -x rofi || $scrPath/cliphist.sh c # launch clipboard bind = $mainMod, K, exec, $scrPath/keyboardswitch.sh # switch keyboard layout bind = $mainMod, slash, exec, pkill -x rofi || $scrPath/keybinds_hint.sh c # launch keybinds hint # Move/Change window focus bind = $mainMod, Left, movefocus, l bind = $mainMod, Right, movefocus, r bind = $mainMod, Up, movefocus, u bind = $mainMod, Down, movefocus, d bind = Alt, Tab, movefocus, d # Switch workspaces bind = $mainMod, 1, workspace, 1 bind = $mainMod, 2, workspace, 2 bind = $mainMod, 3, workspace, 3 bind = $mainMod, 4, workspace, 4 bind = $mainMod, 5, workspace, 5 bind = $mainMod, 6, workspace, 6 bind = $mainMod, 7, workspace, 7 bind = $mainMod, 8, workspace, 8 bind = $mainMod, 9, workspace, 9 bind = $mainMod, 0, workspace, 10 # Switch workspaces to a relative workspace bind = $mainMod+Ctrl, Right, workspace, r+1 bind = $mainMod+Ctrl, Left, workspace, r-1 # Move to the first empty workspace bind = $mainMod+Ctrl, Down, workspace, empty # Resize windows binde = $mainMod+Shift, Right, resizeactive, 30 0 binde = $mainMod+Shift, Left, resizeactive, -30 0 binde = $mainMod+Shift, Up, resizeactive, 0 -30 binde = $mainMod+Shift, Down, resizeactive, 0 30 # Move focused window to a workspace bind = $mainMod+Shift, 1, movetoworkspace, 1 bind = $mainMod+Shift, 2, movetoworkspace, 2 bind = $mainMod+Shift, 3, movetoworkspace, 3 bind = $mainMod+Shift, 4, movetoworkspace, 4 bind = $mainMod+Shift, 5, movetoworkspace, 5 bind = $mainMod+Shift, 6, movetoworkspace, 6 bind = $mainMod+Shift, 7, movetoworkspace, 7 bind = $mainMod+Shift, 8, movetoworkspace, 8 bind = $mainMod+Shift, 9, movetoworkspace, 9 bind = $mainMod+Shift, 0, movetoworkspace, 10 # Move focused window to a relative workspace bind = $mainMod+Ctrl+Alt, Right, movetoworkspace, r+1 bind = $mainMod+Ctrl+Alt, Left, movetoworkspace, r-1 # Move active window around current workspace with mainMod + SHIFT + CTRL [←→↑↓] $moveactivewindow=grep -q "true" <<< $(hyprctl activewindow -j | jq -r .floating) && hyprctl dispatch moveactive binded = $mainMod SHIFT $CONTROL, left,Move activewindow to the right,exec, $moveactivewindow -30 0 || hyprctl dispatch movewindow l binded = $mainMod SHIFT $CONTROL, right,Move activewindow to the right,exec, $moveactivewindow 30 0 || hyprctl dispatch movewindow r binded = $mainMod SHIFT $CONTROL, up,Move activewindow to the right,exec, $moveactivewindow 0 -30 || hyprctl dispatch movewindow u binded = $mainMod SHIFT $CONTROL, down,Move activewindow to the right,exec, $moveactivewindow 0 30 || hyprctl dispatch movewindow d # Scroll through existing workspaces bind = $mainMod, mouse_down, workspace, e+1 bind = $mainMod, mouse_up, workspace, e-1 # Move/Resize focused window bindm = $mainMod, mouse:272, movewindow bindm = $mainMod, mouse:273, resizewindow bindm = $mainMod, Z, movewindow bindm = $mainMod, X, resizewindow # Move/Switch to special workspace (scratchpad) bind = $mainMod+Alt, S, movetoworkspacesilent, special bind = $mainMod, S, togglespecialworkspace, # Toggle focused window split bind = $mainMod, J, togglesplit # Move focused window to a workspace silently bind = $mainMod+Alt, 1, movetoworkspacesilent, 1 bind = $mainMod+Alt, 2, movetoworkspacesilent, 2 bind = $mainMod+Alt, 3, movetoworkspacesilent, 3 bind = $mainMod+Alt, 4, movetoworkspacesilent, 4 bind = $mainMod+Alt, 5, movetoworkspacesilent, 5 bind = $mainMod+Alt, 6, movetoworkspacesilent, 6 bind = $mainMod+Alt, 7, movetoworkspacesilent, 7 bind = $mainMod+Alt, 8, movetoworkspacesilent, 8 bind = $mainMod+Alt, 9, movetoworkspacesilent, 9 bind = $mainMod+Alt, 0, movetoworkspacesilent, 10 Config File: /home/ranker/.config/hypr/windowrules.conf: Read Succeeded # █░█░█ █ █▄░█ █▀▄ █▀█ █░█░█   █▀█ █░█ █░░ █▀▀ █▀ # ▀▄▀▄▀ █ █░▀█ █▄▀ █▄█ ▀▄▀▄▀   █▀▄ █▄█ █▄▄ ██▄ ▄█ # See https://wiki.hyprland.org/Configuring/Window-Rules/ windowrulev2 = opacity 0.90 0.90,class:^(firefox)$ windowrulev2 = opacity 0.90 0.90,class:^(Brave-browser)$ windowrulev2 = opacity 0.80 0.80,class:^(code-oss)$ windowrulev2 = opacity 0.80 0.80,class:^(Code)$ windowrulev2 = opacity 0.80 0.80,class:^(code-url-handler)$ windowrulev2 = opacity 0.80 0.80,class:^(code-insiders-url-handler)$ windowrulev2 = opacity 0.80 0.80,class:^(kitty)$ windowrulev2 = opacity 0.80 0.80,class:^(org.kde.dolphin)$ windowrulev2 = opacity 0.80 0.80,class:^(org.kde.ark)$ windowrulev2 = opacity 0.80 0.80,class:^(nwg-look)$ windowrulev2 = opacity 0.80 0.80,class:^(qt5ct)$ windowrulev2 = opacity 0.80 0.80,class:^(qt6ct)$ windowrulev2 = opacity 0.80 0.80,class:^(kvantummanager)$ windowrulev2 = opacity 0.80 0.70,class:^(org.pulseaudio.pavucontrol)$ windowrulev2 = opacity 0.80 0.70,class:^(blueman-manager)$ windowrulev2 = opacity 0.80 0.70,class:^(nm-applet)$ windowrulev2 = opacity 0.80 0.70,class:^(nm-connection-editor)$ windowrulev2 = opacity 0.80 0.70,class:^(org.kde.polkit-kde-authentication-agent-1)$ windowrulev2 = opacity 0.80 0.70,class:^(polkit-gnome-authentication-agent-1)$ windowrulev2 = opacity 0.80 0.70,class:^(org.freedesktop.impl.portal.desktop.gtk)$ windowrulev2 = opacity 0.80 0.70,class:^(org.freedesktop.impl.portal.desktop.hyprland)$ windowrulev2 = opacity 0.70 0.70,class:^([Ss]team)$ windowrulev2 = opacity 0.70 0.70,class:^(steamwebhelper)$ windowrulev2 = opacity 0.70 0.70,class:^(Spotify)$ windowrulev2 = opacity 0.70 0.70,initialTitle:^(Spotify Free)$ windowrulev2 = opacity 0.90 0.90,class:^(com.github.rafostar.Clapper)$ # Clapper-Gtk windowrulev2 = opacity 0.80 0.80,class:^(com.github.tchx84.Flatseal)$ # Flatseal-Gtk windowrulev2 = opacity 0.80 0.80,class:^(hu.kramo.Cartridges)$ # Cartridges-Gtk windowrulev2 = opacity 0.80 0.80,class:^(com.obsproject.Studio)$ # Obs-Qt windowrulev2 = opacity 0.80 0.80,class:^(gnome-boxes)$ # Boxes-Gtk windowrulev2 = opacity 0.80 0.80,class:^(discord)$ # Discord-Electron windowrulev2 = opacity 0.80 0.80,class:^(WebCord)$ # WebCord-Electron windowrulev2 = opacity 0.80 0.80,class:^(ArmCord)$ # ArmCord-Electron windowrulev2 = opacity 0.80 0.80,class:^(app.drey.Warp)$ # Warp-Gtk windowrulev2 = opacity 0.80 0.80,class:^(net.davidotek.pupgui2)$ # ProtonUp-Qt windowrulev2 = opacity 0.80 0.80,class:^(yad)$ # Protontricks-Gtk windowrulev2 = opacity 0.80 0.80,class:^(Signal)$ # Signal-Gtk windowrulev2 = opacity 0.80 0.80,class:^(io.github.alainm23.planify)$ # planify-Gtk windowrulev2 = opacity 0.80 0.80,class:^(io.gitlab.theevilskeleton.Upscaler)$ # Upscaler-Gtk windowrulev2 = opacity 0.80 0.80,class:^(com.github.unrud.VideoDownloader)$ # VideoDownloader-Gtk windowrulev2 = opacity 0.80 0.80,class:^(io.gitlab.adhami3310.Impression)$ # Impression-Gtk windowrulev2 = opacity 0.80 0.80,class:^(io.missioncenter.MissionCenter)$ # MissionCenter-Gtk windowrulev2 = opacity 0.80 0.80,class:^(io.github.flattool.Warehouse)$ # Warehouse-Gtk windowrulev2 = float,class:^(org.kde.dolphin)$,title:^(Progress Dialog — Dolphin)$ windowrulev2 = float,class:^(org.kde.dolphin)$,title:^(Copying — Dolphin)$ windowrulev2 = float,title:^(About Mozilla Firefox)$ windowrulev2 = float,class:^(firefox)$,title:^(Picture-in-Picture)$ windowrulev2 = float,class:^(firefox)$,title:^(Library)$ windowrulev2 = float,class:^(kitty)$,title:^(top)$ windowrulev2 = float,class:^(kitty)$,title:^(btop)$ windowrulev2 = float,class:^(kitty)$,title:^(htop)$ windowrulev2 = float,class:^(vlc)$ windowrulev2 = float,class:^(kvantummanager)$ windowrulev2 = float,class:^(qt5ct)$ windowrulev2 = float,class:^(qt6ct)$ windowrulev2 = float,class:^(nwg-look)$ windowrulev2 = float,class:^(org.kde.ark)$ windowrulev2 = float,class:^(org.pulseaudio.pavucontrol)$ windowrulev2 = float,class:^(blueman-manager)$ windowrulev2 = float,class:^(nm-applet)$ windowrulev2 = float,class:^(nm-connection-editor)$ windowrulev2 = float,class:^(org.kde.polkit-kde-authentication-agent-1)$ windowrulev2 = float,class:^(Signal)$ # Signal-Gtk windowrulev2 = float,class:^(com.github.rafostar.Clapper)$ # Clapper-Gtk windowrulev2 = float,class:^(app.drey.Warp)$ # Warp-Gtk windowrulev2 = float,class:^(net.davidotek.pupgui2)$ # ProtonUp-Qt windowrulev2 = float,class:^(yad)$ # Protontricks-Gtk windowrulev2 = float,class:^(eog)$ # Imageviewer-Gtk windowrulev2 = float,class:^(io.github.alainm23.planify)$ # planify-Gtk windowrulev2 = float,class:^(io.gitlab.theevilskeleton.Upscaler)$ # Upscaler-Gtk windowrulev2 = float,class:^(com.github.unrud.VideoDownloader)$ # VideoDownloader-Gkk windowrulev2 = float,class:^(io.gitlab.adhami3310.Impression)$ # Impression-Gtk windowrulev2 = float,class:^(io.missioncenter.MissionCenter)$ # MissionCenter-Gtk # █░░ ▄▀█ █▄█ █▀▀ █▀█   █▀█ █░█ █░░ █▀▀ █▀ # █▄▄ █▀█ ░█░ ██▄ █▀▄   █▀▄ █▄█ █▄▄ ██▄ ▄█ layerrule = blur,rofi layerrule = ignorezero,rofi layerrule = blur,notifications layerrule = ignorezero,notifications layerrule = blur,swaync-notification-window layerrule = ignorezero,swaync-notification-window layerrule = blur,swaync-control-center layerrule = ignorezero,swaync-control-center layerrule = blur,logout_dialog Config File: /home/ranker/.config/hypr/themes/common.conf: Read Succeeded # █▀▀ █░█ █▀█ █▀ █▀█ █▀█ # █▄▄ █▄█ █▀▄ ▄█ █▄█ █▀▄ exec = hyprctl setcursor Bibata-Modern-Ice 20 exec = gsettings set org.gnome.desktop.interface cursor-theme 'Bibata-Modern-Ice' exec = gsettings set org.gnome.desktop.interface cursor-size 20 # █▀▀ █▀█ █▄░█ ▀█▀ # █▀░ █▄█ █░▀█ ░█░ exec = gsettings set org.gnome.desktop.interface font-name 'Cantarell 10' exec = gsettings set org.gnome.desktop.interface document-font-name 'Cantarell 10' exec = gsettings set org.gnome.desktop.interface monospace-font-name 'CaskaydiaCove Nerd Font Mono 9' exec = gsettings set org.gnome.desktop.interface font-antialiasing 'rgba' exec = gsettings set org.gnome.desktop.interface font-hinting 'full' # █▀ █▀█ █▀▀ █▀▀ █ ▄▀█ █░░ # ▄█ █▀▀ ██▄ █▄▄ █ █▀█ █▄▄ decoration { dim_special = 0.3 blur { special = true } } Config File: /home/ranker/.config/hypr/themes/theme.conf: Read Succeeded exec = gsettings set org.gnome.desktop.interface icon-theme 'Tela-circle-green' exec = gsettings set org.gnome.desktop.interface gtk-theme 'Decay-Green' exec = gsettings set org.gnome.desktop.interface color-scheme 'prefer-dark' general { gaps_in = 3 gaps_out = 8 border_size = 2 col.active_border = rgba(90ceaaff) rgba(ecd3a0ff) 45deg col.inactive_border = rgba(86aaeccc) rgba(93cee9cc) 45deg layout = dwindle resize_on_border = true } group { col.border_active = rgba(90ceaaff) rgba(ecd3a0ff) 45deg col.border_inactive = rgba(86aaeccc) rgba(93cee9cc) 45deg col.border_locked_active = rgba(90ceaaff) rgba(ecd3a0ff) 45deg col.border_locked_inactive = rgba(86aaeccc) rgba(93cee9cc) 45deg } decoration { rounding = 10 drop_shadow = false blur { enabled = yes size = 5 passes = 4 new_optimizations = on ignore_opacity = on xray = false } } layerrule = unset,waybar Config File: /home/ranker/.config/hypr/themes/colors.conf: Read Succeeded Config File: /home/ranker/.config/hypr/monitors.conf: Read Succeeded # █▀▄▀█ █▀█ █▄░█ █ ▀█▀ █▀█ █▀█ █▀ # █░▀░█ █▄█ █░▀█ █ ░█░ █▄█ █▀▄ ▄█ # Set your monitor configuration here # See https://wiki.hyprland.org/Configuring/Monitors/ # For a sample file, please refer to https://github.com/prasanthrangan/hyprdots/blob/main/Configs/.config/hypr/monitors.t2 Config File: /home/ranker/.config/hypr/userprefs.conf: Read Succeeded # █░█ █▀ █▀▀ █▀█   █▀█ █▀█ █▀▀ █▀▀ █▀ # █▄█ ▄█ ██▄ █▀▄   █▀▀ █▀▄ ██▄ █▀░ ▄█ # Set your personal hyprland configuration here # For a sample file, please refer to https://github.com/prasanthrangan/hyprdots/blob/main/Configs/.config/hypr/userprefs.t2 ======Config-End======== ```

Description

Screensharing used to work but it's not working now even after enabling bitdepth 10 and followed https://gist.github.com/brunoanc/2dea6ddf6974ba4e5d26c3139ffb7580 still not working

How to reproduce

Google meet screen share

Crash reports, logs, images, videos

After screensharing, screen share button gets disabled image

vaxerski commented 3 months ago

system info cut off (incomplete)

can you try on aquamarine-git, hyprland-git and xdph-git?

piyushyadav0191 commented 3 months ago

I tried xdph-git, hyprland-git but no luck.

vaxerski commented 3 months ago

can you post logs from xdph?

piyushyadav0191 commented 3 months ago

xdg-desktop-portal-hyprland.service - Portal service (Hyprland implementation) Loaded: loaded (/usr/lib/systemd/user/xdg-desktop-portal-hyprland.service; static) Active: active (running) since Wed 2024-08-21 16:02:02 IST; 15min ago Invocation: 4f5324d846c0429b9ca2404925b05155 Main PID: 1011 (xdg-desktop-por) Tasks: 9 (limit: 7014) Memory: 28.5M (peak: 46.4M) CPU: 954ms CGroup: /user.slice/user-1000.slice/user@1000.service/session.slice/xdg-desktop-portal-hyprland.service └─1011 /usr/lib/xdg-desktop-portal-hyprland

Aug 21 16:10:22 laptop xdg-desktop-portal-hyprland[1011]: [LOG] [screencopy] | /org/freedesktop/portal/desktop/session/1_49/webrtc_session1356338398 Aug 21 16:10:22 laptop xdg-desktop-portal-hyprland[1011]: [LOG] [screencopy] | appid: Aug 21 16:10:22 laptop xdg-desktop-portal-hyprland[1011]: [LOG] [screencopy] SelectSources: Aug 21 16:10:22 laptop xdg-desktop-portal-hyprland[1011]: [LOG] [screencopy] | /org/freedesktop/portal/desktop/request/1_49/webrtc791307243 Aug 21 16:10:22 laptop xdg-desktop-portal-hyprland[1011]: [LOG] [screencopy] | /org/freedesktop/portal/desktop/session/1_49/webrtc_session1356338398 Aug 21 16:10:22 laptop xdg-desktop-portal-hyprland[1011]: [LOG] [screencopy] | appid: Aug 21 16:10:22 laptop xdg-desktop-portal-hyprland[1011]: [LOG] [screencopy] option persist_mode to 1 Aug 21 16:10:22 laptop xdg-desktop-portal-hyprland[1011]: [LOG] [screencopy] unused option multiple Aug 21 16:10:22 laptop xdg-desktop-portal-hyprland[1011]: [LOG] [screencopy] unused option types Aug 21 16:10:22 laptop xdg-desktop-portal-hyprland[1011]: [LOG] [screencopy] restore data invalid / missing, prompting ~

piyushyadav0191 commented 3 months ago

Screen Capture (pipewire) works fine in OBS but screen sharing not working in Firefox/Google-chrome image

piyushyadav0191 commented 3 months ago

@vaxerski Hi, Sorry to disturb you but I have tried everything and noticed that this service doesn't seems to run and throw this status

` systemctl --user status xdg-desktop-portal.service ○ xdg-desktop-portal.service - Portal service Loaded: loaded (/usr/lib/systemd/user/xdg-desktop-portal.service; static) Active: inactive (dead)

Aug 23 21:09:50 ranker systemd[663]: Started Portal service. Aug 23 21:19:34 ranker systemd[663]: Starting Portal service... Aug 23 21:19:34 ranker xdg-desktop-por[10138]: No skeleton to export Aug 23 21:19:34 ranker systemd[663]: Started Portal service. Aug 23 21:19:49 ranker systemd[663]: Starting Portal service... Aug 23 21:19:49 ranker xdg-desktop-por[10352]: No skeleton to export `

And xdph is running fine. What could be the issue?

This is what i am getting with journalctl

journalctl --user -xeu xdg-desktop-portal.service ░░ ░░ A start job for unit UNIT has begun execution. ░░ ░░ The job identifier is 280. Aug 23 21:19:34 ranker xdg-desktop-por[10138]: No skeleton to export Aug 23 21:19:34 ranker systemd[663]: Started Portal service.

vaxerski commented 3 months ago

I dont think "no skeleton to export" is an error. Anyways, xdp being dead would be a problem, yes

piyushyadav0191 commented 2 months ago

Should I try replacing xdph with aquamarine?

vaxerski commented 2 months ago

same question as "should I replace an axe with social studies"

piyushyadav0191 commented 2 months ago

😒

deepanchal commented 2 months ago

I am experiencing the same issue with Slack. I have bitdepth,10 enabled in my configuration, but when I attempt to screenshare, I get a black screen. Notably, screensharing works fine with OBS.

I also noticed that window screensharing works, but only if the Slack window is on the same monitor as the shared window. If I move the Slack window to another monitor, screensharing breaks again. Additionally, I tested screensharing on this test page (https://mozilla.github.io/webrtc-landing/gum_test.html) using Brave Browser, and it had the same behavior.

To troubleshoot, I ran the following script to restart all portals before restarting Slack and it still didn't work :(

#!/usr/bin/env bash
systemctl --user stop xdg-desktop-portal-hyprland
systemctl --user stop xdg-desktop-portal-gtk
systemctl --user stop xdg-desktop-portal
sleep 2
systemctl --user start xdg-desktop-portal-hyprland
systemctl --user start xdg-desktop-portal-gtk
systemctl --user start xdg-desktop-portal

To make sure it wasn't an issue with slack, I tried screensharing from SwayWM with xdg-desktop-portal-wlr, it worked without any issues.

ArkadyBuryakov commented 2 months ago

Had same problem. All services work fine and no errors in logs.

Have found following behavior:

Feels like some racing condition that breaks a pipeline.

PS: could be irrelevant, window size change breaks screen sharing. PPS: I used bitdepth, 10 hack to workaround. It worked like a charm (however only on window-sharing red and blue channels were mixed). However workaround stopped working few weeks ago after one of updates.

piyushyadav0191 commented 2 months ago

I really like Hyprland but screen sharing issue is preventing me from using hyprland because my All work and others things happens on Meet with Screenshare. Previously,bitdepth, 10 used to work but after one update, It stopped

eg-ayoub commented 2 months ago

I am having similar issues as described above, although in my case screen capture will sometimes work, but in most cases it won't this happens seemingly arbitrarily, I have had most chances with gUM testing page obs, google meet (on chrome and firefox) work a lot less often. I can't find anything interesting in xdph logs but OBS spits this out

info: User added source 'Screen Capture (PipeWire)' (pipewire-screen-capture-source) to scene 'Scene'
info: [pipewire] Screencast session created
info: [pipewire] Asking for monitor and window
info: [pipewire] source selected, setting up screencast
info: [pipewire] Server version: 1.2.2
info: [pipewire] Library version: 1.2.2
info: [pipewire] Header version: 1.2.2
info: [pipewire] Created stream 0x3800410
info: [pipewire] Stream 0x3800410 state: "connecting" (error: none)
info: [pipewire] Playing stream 0x3800410
info: [pipewire] Stream 0x3800410 state: "paused" (error: none)
info: [pipewire] Negotiated format:
info: [pipewire]     Format: 8 (Spa:Enum:VideoFormat:BGRx)
info: [pipewire]     Modifier: 0x0
info: [pipewire]     Size: 1920x1080
info: [pipewire]     Framerate: 0/1
info: [pipewire] Negotiated format:
info: [pipewire]     Format: 8 (Spa:Enum:VideoFormat:BGRx)
info: [pipewire]     Modifier: 0x100000000000004
info: [pipewire]     Size: 1920x1080
info: [pipewire]     Framerate: 0/1
info: [pipewire] Stream 0x3800410 state: "streaming" (error: none)
error: Cannot create EGLImage: Arguments are inconsistent (for example, a valid context requires buffers not supplied by a valid surface).
info: [pipewire] Renegotiating stream
info: [pipewire] Negotiated format:
info: [pipewire]     Format: 8 (Spa:Enum:VideoFormat:BGRx)
info: [pipewire]     Modifier: 0x100000000000004
info: [pipewire]     Size: 1920x1080
info: [pipewire]     Framerate: 0/1
info: [pipewire] Negotiated format:
info: [pipewire]     Format: 8 (Spa:Enum:VideoFormat:BGRx)
info: [pipewire]     Modifier: 0x100000000000002
info: [pipewire]     Size: 1920x1080
info: [pipewire]     Framerate: 0/1

could this be a pipewire bug ? Edit: chrome spits out similar logs

[23496:23705:0827/175946.779942:ERROR:gpu_channel.cc(502)] Buffer Handle is null.
[23532:23:0827/175946.780326:ERROR:shared_image_interface_proxy.cc(129)] Buffer handle is null. Not creating a mailbox from it.
[23448:24086:0827/175952.187918:ERROR:egl_dmabuf.cc(608)] Failed to record frame: Error creating EGLImage - EGL_BAD_MATCH
[23448:24086:0827/175952.187952:ERROR:shared_screencast_stream.cc(951)] Dropping DMA-BUF modifier: 72057594037927940 and trying to renegotiate stream parameters
[23448:24108:0827/180001.349862:ERROR:egl_dmabuf.cc(608)] Failed to record frame: Error creating EGLImage - EGL_BAD_MATCH
[23448:24108:0827/180001.349906:ERROR:shared_screencast_stream.cc(951)] Dropping DMA-BUF modifier: 72057594037927940 and trying to renegotiate stream parameters
'loop->recurse > 0' failed at ../src/pipewire/thread-loop.c:425 pw_thread_loop_wait()
[23448:24116:0827/180004.805519:ERROR:egl_dmabuf.cc(608)] Failed to record frame: Error creating EGLImage - EGL_BAD_MATCH
[23448:24116:0827/180004.805544:ERROR:shared_screencast_stream.cc(951)] Dropping DMA-BUF modifier: 72057594037927940 and trying to renegotiate stream parameters
deepanchal commented 2 months ago

After testing various older versions of xdg-desktop-portal-hyprland, I found that screensharing functionality works correctly with version 1.3.2. I tested screensharing on slack, firefox, brave and they all work well without any black screen.

I think something might have broken screensharing in these changes https://github.com/hyprwm/xdg-desktop-portal-hyprland/compare/v1.3.2...v1.3.3

Here's how I tested it on my nixos:

  1. I grabbed nix hash for v1.3.2 from https://www.nixhub.io/packages/xdg-desktop-portal-hyprland
  2. I ran nix-shell -I nixpkgs=https://github.com/NixOS/nixpkgs/archive/453402b94f39f968a7c27df28e060f69e4a50c3b.tar.gz -p xdg-desktop-portal-hyprland to drop into nix shell with xdph v1.3.2
  3. I found the xdph binary under /nix/store/7dkh9kk63ggn4n9m8knhdy8zkqs59qxi-xdg-desktop-portal-hyprland-1.3.2/libexec/xdg-desktop-portal-hyprland (Note: your nix hash might be different)
  4. I ran ./xdg-desktop-portal-hyprland -v after cd into directory with binary
  5. Tested screensharing and it works :)

If you guys can confirm that this version works on your end as well, then we can suggest others to use v1.3.2 temporarily till it's fixed in a new release

piyushyadav0191 commented 2 months ago

@deepanchal how to compile this version in my hyprland, I am kind of noob to hyprland!

deepanchal commented 2 months ago

@deepanchal how to compile this version in my hyprland, I am kind of noob to hyprland!

Remove current xdph with maybe paru -R xdg-desktop-portal-hyprland-git or stop the xdph service temporarily systemctl --user stop xdg-desktop-portal-hyprland

Make sure xdph isn't running with ps | grep xdg-desktop-portal-hyprland

Follow the steps to install xdph in readme https://github.com/hyprwm/xdg-desktop-portal-hyprland?tab=readme-ov-file#installing After cloning and cding into repo, run git checkout v1.3.2 and then follow build instructions in readme Run xdph binary after building. That should be it. I don't know what system you are on or how you installed xdph so these steps might not work

piyushyadav0191 commented 2 months ago

Thanks, I will test tomorrow and will let you know the result

piyushyadav0191 commented 2 months ago

@deepanchal When i am building v1.3.2 then this error is coming!

 cmake --build build
[  2%] Building CXX object CMakeFiles/xdg-desktop-portal-hyprland.dir/src/core/PortalManager.cpp.o
In file included from /home/ranker/xdg-desktop-portal-hyprland/src/core/../portals/Screencopy.hpp:6,
                 from /home/ranker/xdg-desktop-portal-hyprland/src/core/PortalManager.hpp:8,
                 from /home/ranker/xdg-desktop-portal-hyprland/src/core/PortalManager.cpp:1:
/usr/include/spa-0.2/spa/pod/dynamic.h: In function ‘void spa_pod_dynamic_builder_init(spa_pod_dynamic_builder*, void*, uint32_t, uint32_t)’:
/home/ranker/xdg-desktop-portal-hyprland/src/core/../portals/../shared/ScreencopyShared.hpp:9:43: error: expected primary-expression before ‘.’ token
    9 | #define SPA_VERSION_POD_BUILDER_CALLBACKS .version = 0
      |                                           ^
At global scope:
cc1plus: note: unrecognized command-line option ‘-Wno-address-of-temporary’ may have been intended to silence earlier diagnostics
make[2]: *** [CMakeFiles/xdg-desktop-portal-hyprland.dir/build.make:116: CMakeFiles/xdg-desktop-portal-hyprland.dir/src/core/PortalManager.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:102: CMakeFiles/xdg-desktop-portal-hyprland.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
deepanchal commented 2 months ago

Try building on this commit b9b97e5ba23fe7bd5fa4df54696102e8aa863cf6

This commit is working for me. I am getting similar error when I build it from source on my nix system.

cd into repo and run:

git checkout b9b97e5ba23fe7bd5fa4df54696102e8aa863cf6

Then follow the same build instructions from readme.

piyushyadav0191 commented 2 months ago

@deepanchal build built successfully but screenshare still not working. This is my logs

 systemctl status --user xdg-desktop-portal.service xdg-desktop-portal.service
● xdg-desktop-portal.service - Portal service
     Loaded: loaded (/usr/lib/systemd/user/xdg-desktop-portal.service; static)
     Active: active (running) since Wed 2024-08-28 09:50:23 IST; 4min 39s ago
 Invocation: 4bc6612e8b0f4284b1eefcd8d1c92f80
   Main PID: 43612 (xdg-desktop-por)
      Tasks: 5 (limit: 7014)
     Memory: 3M (peak: 3.5M)
        CPU: 62ms
     CGroup: /user.slice/user-1000.slice/user@1000.service/session.slice/xdg-desktop-portal.service
             └─43612 /usr/lib/xdg-desktop-portal

Aug 28 09:50:23 laptop systemd[659]: Starting Portal service...
Aug 28 09:50:23 laptop xdg-desktop-por[43612]: No skeleton to export
Aug 28 09:50:23 laptop xdg-desktop-por[43612]: Choosing hyprland.portal for org.freedesktop.impl.portal.GlobalShortcuts via the deprecated UseIn key
Aug 28 09:50:23 laptop xdg-desktop-por[43612]: The preferred method to match portal implementations to desktop environments is to use the portals.conf(5) configuration file
Aug 28 09:50:23 laptop xdg-desktop-por[43612]: Choosing hyprland.portal for org.freedesktop.impl.portal.ScreenCast via the deprecated UseIn key
Aug 28 09:50:23 laptop systemd[659]: Started Portal service.

● xdg-desktop-portal.service - Portal service
     Loaded: loaded (/usr/lib/systemd/user/xdg-desktop-portal.service; static)
     Active: active (running) since Wed 2024-08-28 09:50:23 IST; 4min 39s ago
 Invocation: 4bc6612e8b0f4284b1eefcd8d1c92f80
   Main PID: 43612 (xdg-desktop-por)
      Tasks: 5 (limit: 7014)
     Memory: 3M (peak: 3.5M)
        CPU: 62ms
     CGroup: /user.slice/user-1000.slice/user@1000.service/session.slice/xdg-desktop-portal.service
             └─43612 /usr/lib/xdg-desktop-portal

Aug 28 09:50:23 laptop systemd[659]: Starting Portal service...
Aug 28 09:50:23 laptop xdg-desktop-por[43612]: No skeleton to export
Aug 28 09:50:23 laptop xdg-desktop-por[43612]: Choosing hyprland.portal for org.freedesktop.impl.portal.GlobalShortcuts via the deprecated UseIn key
Aug 28 09:50:23 laptop xdg-desktop-por[43612]: The preferred method to match portal implementations to desktop environments is to use the portals.conf(5) configuration file
Aug 28 09:50:23 laptop xdg-desktop-por[43612]: Choosing hyprland.portal for org.freedesktop.impl.portal.ScreenCast via the deprecated UseIn key
Aug 28 09:50:23 laptop systemd[659]: Started Portal service.
piyushyadav0191 commented 2 months ago

@deepanchal If i choose small region to screenshare then it is working but if i choose screen sized height and width's one region then its not working or if i choose entire screen then its not working

deepanchal commented 2 months ago

Make sure you are running the binary from your build.

You can skip steps 1, 2 & 3 if you are sure that you built and installed xdph correctly. Those two steps are just for sanity check to make sure you are running updated binary

  1. Create a file named a.patch inside the git repo and put the following contents in it

    diff --git a/hyprland-share-picker/mainpicker.ui b/hyprland-share-picker/mainpicker.ui
    index 21b3c3c..67a5622 100644
    --- a/hyprland-share-picker/mainpicker.ui
    +++ b/hyprland-share-picker/mainpicker.ui
    @@ -266,7 +266,7 @@ Only select if you trust the application.</string>
              <enum>Qt::LeftToRight</enum>
             </property>
             <property name="text">
    -         <string>Allow a restore token</string>
    +         <string>Edited: Allow a restore token</string>
             </property>
            </widget>
           </item>
  2. Apply this patch by running git apply a.patch. Run git diff to make sure patch got applied

  3. Build and install again following readme

  4. Then stop the current portal service

    systemctl --user stop xdg-desktop-portal-hyprland
  5. Run xdph directly

    ./usr/lib/xdg-desktop-portal-hyprland -v
  6. Restart your browser / app and try screensharing. It should work :crossed_fingers:

That patch is changing a text in hyprland-share-picker so you can make sure you are running correct binary. When you run it, the picker should look like this image

2e0byo commented 2 months ago

@deepanchal a thousand thanks for bisecting; I can confirm 1.3.2 works on this machine from the nix hash you shared. I'll try to bisect this soon if nobody else does.

deepanchal commented 2 months ago

Thanks a lot for testing it :) Please note that v1.3.2 has build errors. That's why I was using a commit (b9b97e5ba23fe7bd5fa4df54696102e8aa863cf6) in between 1.3.3 and 1.3.2.

I haven't actually ran git bisect yet. I just randomly checked out some tags and commits to see which one works and that commit had more successful screenshares than 1.3.3, but here's the steps I used on nix:

  1. Clone and cd into repo
  2. Checkout commit/tag you want to test
  3. Run nix build
  4. Run ./result/libexec/xdg-desktop-portal-hyprland (Don't forget to stop xdph services before running it manually)

I also wanted to mention that for some reason, the latest commit is also working fine for me. Testing screensharing has been very flakey and I am not sure if it was the commit or some race condition or pipewire version causing issues. I will try to bisect soon on my end once I can find a reliable source (might use that gum testing site) to test screensharing.

Also here's my nixos flake changes if needed https://github.com/deepanchal/nixos/commit/56c2e4cac733f24b19e32b4ac0fe01c0dc5c28c2

piyushyadav0191 commented 2 months ago

@deepanchal You can see that I have done your patch and running xdph from my binary. Up until now tab sharing was not working but now its working but entire screen's screen sharing still not working. Should I change something in Monitor settings! I have attached image of my monitor config

PS - I noticed that hyprland-share-picker asks for monitor selection two times. Is this issue?

eg-ayoub commented 2 months ago

@deepanchal I have tried running with xdph 1.3.2 from here without much success, it has the same behaviours as 1.3.3 I am starting to feel like what I'm describing is a different issue than @piyushyadav0191 in my case, all types of screen sharing may work but only with around ~40% chance, with the rest of the times behaving exactly as above (blank screen). Edit: I am also suspecting issues with pipewire (perhaps stream format negotiations?) should I open a new ticket ?

dr0bz commented 2 months ago

It's also not working on my side. Tried 1.3.2 as well. hl, aq, xdg-desktop-portal-hyprland - everything from git. As a workaround the fullscreen sharing is working with xdg-desktop-portal-wlr-git.

deepanchal commented 2 months ago

I am in the process of testing different commits and I am noticing a common strange behavior across these commits

I have the following monitor setup image

When my browser is on monitor B and I attempt to share the screen of monitor A, I must first move the focus to monitor A before initiating the screen share from my browser on monitor B. If I do not move my cursor to monitor A before starting the screen share from monitor B, the screen share fails. Additionally, I have noticed that the screen share is more likely to succeed if I move my cursor around monitor A for a few seconds before initiating the share from monitor B.

Also, when my browser is on monitor A and I attempt to share the screen of monitor A, it works fine. However, if my browser is on monitor B and I try to share monitor B, it only works 5-10% of the times :man_shrugging:

I am wondering if the issue is with the way xdph is packaged for nix or if it's some other dependency because I can't find a bad commit when bisecting and building it from scratch with nix build.

Here's my application versions:

Note: I don't have any hyprland plugins enabled.

$ hyprctl version
Hyprland, built from branch main at commit 9a09eac79b85c846e3a865a9078a3f8ff65a9259  (props: bump version to 0.42.0).
Date: 2024-08-07
Tag: v0.42.0, commits: 9a09eac79b85c846e3a865a9078a3f8ff65a9259

flags: (if any)

$ pipewire --version
pipewire
Compiled with libpipewire 1.2.2
Linked with libpipewire 1.2.2

$ brave --version
Brave Browser 127.1.68.141

xdph commit b9b97e5ba23fe7bd5fa4df54696102e8aa863cf6

Flake setup I am using for testing commits:

flake.nix

xdph = {
  url = "github:hyprwm/xdg-desktop-portal-hyprland?ref=b9b97e5ba23fe7bd5fa4df54696102e8aa863cf6";
  inputs.nixpkgs.follows = "nixpkgs";
};

configuration.nix

programs.hyprland = {
  enable = true;
  xwayland.enable = true;
  # portalPackage = pkgs.xdg-desktop-portal-wlr;
  # portalPackage = pkgs.xdg-desktop-portal-hyprland;
  portalPackage = inputs.xdph.packages."${pkgs.system}".xdg-desktop-portal-hyprland;
};

I will give it another shot after work with a single monitor setup to see if I can find a commit with stable screensharing. @eg-ayoub @dr0bz @piyushyadav0191 If you are on a similar dual monitor setup like mine, can you please try to replicate this behavior? Thanks!!

piyushyadav0191 commented 2 months ago

It's also not working on my side. Tried 1.3.2 as well. hl, aq, xdg-desktop-portal-hyprland - everything from git. As a workaround the fullscreen sharing is working with xdg-desktop-portal-wlr-git.

@dr0bz What steps you followed? Like did you uninstalled xdph and installed wlr ..can you give your steps which are working for full screen

piyushyadav0191 commented 2 months ago

@deepanchal I used to run on dual monitor but now I only run it in my personal Lappy. Let us know if you find any reliable solution!

dr0bz commented 2 months ago

hi @piyushyadav0191 , it depends on which distro you are. On Arch:

I tried the extra/xdg-desktop-portal-wlr 0.7.1-1 from official repo, but it didn't work. The git version above seems to be the same: 0.7.1.r20.gd9ada84-1 - but it works. I always used the -wlr, because xdph worked only few times.

If you are on other distro, then first try to use official xdg-desktop-portal-wlr build from your package manager. Maybe it'll work. If not try to compile it your self: https://github.com/emersion/xdg-desktop-portal-wlr

@deepanchal i also have a two monitor setup. But i my case there is no share selector dialog appearing at all (the dialog from xdph). Sharing on slack - i just get an empty slack dialog. Sharing on mozilla test page with brave - when i click on fullscreen tab or window tab, the tab is just automatically switched back. No errors or logs appear in xdph process.

eg-ayoub commented 2 months ago

@deepanchal your behaviour is reminiscent of this https://github.com/hyprwm/Hyprland/issues/4593#issuecomment-2315407618
I also run dual monitors A||B and placing my browser in B I can share screen from both monitors but when I place my browser in A I can only share from A.

deepanchal commented 2 months ago

@dr0bz I can also confirm that replacing xdg-desktop-portal-hyprland with xdg-desktop-portal-wlr works everytime without any issues. I will be using xdp-wlr till I can bisect and find a proper fix for xdph

wlr nix store version: c2vvjyqj4lh62ds5rx8pi4xs95v7r8fq-xdg-desktop-portal-wlr-0.7.1

programs.hyprland = {
  enable = true;
  xwayland.enable = true;
  portalPackage = pkgs.xdg-desktop-portal-wlr;
};

Restart services after building nixos config

systemctl --user stop xdg-desktop-portal-hyprland
systemctl --user stop xdg-desktop-portal-gtk
systemctl --user stop xdg-desktop-portal
sleep 2
systemctl --user start xdg-desktop-portal-wlr
systemctl --user start xdg-desktop-portal-gtk
systemctl --user start xdg-desktop-portal
piyushyadav0191 commented 2 months ago

@dr0bz I am primarily using Hyprland on EndeavourOS, which I believe is similar to Arch. Anyway, I have tried both the WLR version from Git and built it from source, but neither approach resolved the issue. Why won't the maintainer address this problem? My other friends are experiencing the same issue.

deepanchal commented 2 months ago

@piyushyadav0191 Did you restart services after replacing xdp-wlr with xdph? Maybe restarting laptop should help too. Make sure xdph isn't running and wlr is running

systemctl --user status xdg-desktop-portal-hyprland
systemctl --user status xdg-desktop-portal-wlr
piyushyadav0191 commented 2 months ago

@deepanchal Yes tried this stuff also rebooted but no luck but now screen picker is not opening after replacing wlr

dr0bz commented 2 months ago

@piyushyadav0191 Also you could try to stop it your self

systemctl --user stop xdg-desktop-portal-wlr systemctl --user stop xdg-desktop-portal

Start both manually in a terminal:

/usr/lib/xdg-desktop-portal-wlr -l DEBUG /usr/lib/xdg-desktop-portal

Then try to share the screen and see the logs.

dr0bz commented 2 months ago

What is your ps aux | grep xdg-desktop-portal output?

piyushyadav0191 commented 2 months ago

@dr0bz this is log which xdg-desktop-portal spits

Aug 29 20:45:08 laptop xdg-desktop-por[14561]: Choosing hyprland.portal for org.freedesktop.impl.portal.GlobalShortcuts via the deprecated UseIn key
Aug 29 20:45:08 laptop xdg-desktop-por[14561]: Choosing gtk.portal for org.freedesktop.impl.portal.DynamicLauncher as a last-resort fallback
Aug 29 20:45:08 laptop xdg-desktop-por[14561]: Choosing hyprland.portal for org.freedesktop.impl.portal.ScreenCast via the deprecated UseIn key
Aug 29 20:45:08 laptop systemd[667]: Started Portal service.
Aug 29 20:45:19 laptop xdg-desktop-por[14561]: A backend call failed: Could not activate remote peer 'org.freedesktop.impl.portal.desktop.hyprland': st>
Aug 29 20:45:19 laptop xdg-desktop-por[14561]: Failed to close session implementation: GDBus.Error:org.freedesktop.DBus.Error.NameHasNoOwner: Could not>
Aug 29 20:45:23 laptop xdg-desktop-por[14561]: A backend call failed: Could not activate remote peer 'org.freedesktop.impl.portal.desktop.hyprland': st>
Aug 29 20:45:23 laptop xdg-desktop-por[14561]: Failed to close session implementation: GDBus.Error:org.freedesktop.DBus.Error.NameHasNoOwner: Could not>
Aug 29 20:45:28 laptop xdg-desktop-por[14561]: A backend call failed: Could not activate remote peer 'org.freedesktop.impl.portal.desktop.hyprland': st>
Aug 29 20:45:28 laptop xdg-desktop-por[14561]: Failed to close session implementation: GDBus.Error:org.freedesktop.DBus.Error.NameHasNoOwner: Could not>
piyushyadav0191 commented 2 months ago

@dr0bz @deepanchal Previously screen picker was working but now it's not working in wlr

deepanchal commented 2 months ago

Since I am no longer on arch, I am not sure where hyprland.portal and org.freedesktop.impl.portal.desktop.hyprland.service files are located, but it looks like you need to remove those files and restart services again to make xdp-wlr work. Maybe look for those files with fd and remove them

cd /
fd hyprland.portal
fd org.freedesktop.impl.portal.desktop.hyprland.service

If you find the files, remove them from system. I think they should be under /usr/share/xdg-desktop-portal/portals/

Also try, systemctl --user disable --now xdg-desktop-portal-hyprland

piyushyadav0191 commented 2 months ago

@deepanchal found here

cat /usr/share/xdg-desktop-portal/portals/hyprland.portal
[portal]
DBusName=org.freedesktop.impl.portal.desktop.hyprland
Interfaces=org.freedesktop.impl.portal.Screenshot;org.freedesktop.impl.portal.ScreenCast;org.freedesktop.impl.portal.GlobalShortcuts;
UseIn=wlroots;Hyprland;sway;Wayfire;river;

should I empty this file or delete hyprland.portal?

dr0bz commented 2 months ago

@piyushyadav0191 i see some errors there. Maybe it's the reason.

Where are you testing the screen sharing? xdph has share dialog, where xdp-wlr does not.

piyushyadav0191 commented 2 months ago

@dr0bz testing in https://mozilla.github.io/webrtc-landing/gum_test.html site on Google-chrome

dr0bz commented 2 months ago

should I empty this file or delete hyprland.portal?

why it's still there? Your sure you deleted xdph?

What is your ps aux | grep xdg-desktop-portal output?

deepanchal commented 2 months ago

Remove hyprland.portal file and add wlr.portal if it doesn't already exist

wlr.portal

[portal]
DBusName=org.freedesktop.impl.portal.desktop.wlr
Interfaces=org.freedesktop.impl.portal.Screenshot;org.freedesktop.impl.portal.ScreenCast;
UseIn=wlroots;sway;Wayfire;river;phosh;Hyprland;
dr0bz commented 2 months ago

@dr0bz testing in https://mozilla.github.io/webrtc-landing/gum_test.html site on Google-chrome

ok - with xdp-wlr you don't get a dialog. Keep it in mind. When you select the fullscreen tab, you should just get a thumbnail of your screen.

dr0bz commented 2 months ago

Remove hyprland.portal file and add wlr.portal if it doesn't already exist

wlr.portal

[portal]
DBusName=org.freedesktop.impl.portal.desktop.wlr
Interfaces=org.freedesktop.impl.portal.Screenshot;org.freedesktop.impl.portal.ScreenCast;
UseIn=wlroots;sway;Wayfire;river;phosh;Hyprland;

it should go to ~/.config/xdg-desktop-portal/ - right?

btw. works without on my side

piyushyadav0191 commented 2 months ago

@dr0bz @deepanchal Many thanks guys. After replacing the hyprland with wlr now it;s working