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

Flameshot not working in sway (typing "flameshot gui" hangs in the terminal) #2959

Open
centuryhopper opened this issue Oct 22, 2022 · 10 comments
Labels
question Waiting For Info Addressing the issue or merging the PR is halted and we are waiting for more info to be provided. Wayland Wayland specific issues

Comments

@centuryhopper
Copy link

Feature Description

Hi.

I tried links like this one: flameshot/Sway and wlroots support.md at master · flameshot-org/flameshot · GitHub 2

But it didn't work. When I type flameshot gui in the terminal, it just hangs. Any solution?
I also looked at this How To Use Flameshot Screenshots On Wlroots & Sway - YouTube 1 but we're using fish in garuda

@centuryhopper centuryhopper added the Enhancement Feature requests and code enhancements label Oct 22, 2022
@mmahmoudian
Copy link
Member

mmahmoudian commented Oct 22, 2022

please use proper form for asking questions or reporting bugs. you used a feature request form. also, please consider reading this help file:

https://github.com/flameshot-org/flameshot/blob/master/docs/Sway%20and%20wlroots%20support.md

https://flameshot.org/docs/guide/troubleshooting/#linux

@mmahmoudian mmahmoudian added question Waiting For Info Addressing the issue or merging the PR is halted and we are waiting for more info to be provided. Wayland Wayland specific issues and removed Enhancement Feature requests and code enhancements labels Oct 22, 2022
@mmahmoudian
Copy link
Member

Nope. After thinking this over and over, I cannot accept this as proper question. It lacks many thing including "what is the problem". Just "doesn't work" is not enough diagnostics info. Therefore, I will be more than thankful if you edit the original post and add all the information requested in the bug report form. Thank you.

@proudmuslim-dev
Copy link

proudmuslim-dev commented Oct 23, 2022

Same issue here.
Version:

[I] twilight@andromeda ~/ambient [SIGINT]> flameshot --version
Flameshot v12.1.0 (ff7028d8)
Compiled with Qt 5.15.6

Dbus output when I run flameshot itself:

method call time=1666494977.258591 sender=:1.624 -> destination=org.freedesktop.portal.Desktop serial=2 path=/org/freedesktop/portal/desktop; interface=org.freedesktop.DBus.Properties; member=Get
   string "org.freedesktop.portal.Screenshot"
   string "version"
error time=1666494977.258683 sender=:1.16 -> destination=:1.624 error_name=org.freedesktop.DBus.Error.InvalidArgs reply_serial=2
   string "No such interface “org.freedesktop.portal.Screenshot”

@proudmuslim-dev
Copy link

Here's what dbus shows when I run flameshot gui:

method call time=1666495066.444018 sender=:1.628 -> destination=org.freedesktop.portal.Desktop serial=2 path=/org/freedesktop/portal/desktop; interface=org.freedesktop.DBus.Properties; member=Get
   string "org.freedesktop.portal.Screenshot"
   string "version"
error time=1666495066.444158 sender=:1.16 -> destination=:1.628 error_name=org.freedesktop.DBus.Error.InvalidArgs reply_serial=2
   string "No such interface “org.freedesktop.portal.Screenshot”"
method call time=1666495066.594092 sender=:1.628 -> destination=org.freedesktop.portal.Desktop serial=9 path=/org/freedesktop/portal/desktop; interface=org.freedesktop.DBus.Introspectable; member=Introspect
method return time=1666495066.594318 sender=:1.16 -> destination=:1.628 serial=112 reply_serial=9
   string "<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
                      "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<!-- GDBus 2.74.0 -->
<node>
  <interface name="org.freedesktop.DBus.Properties">
    <method name="Get">
      <arg type="s" name="interface_name" direction="in"/>
      <arg type="s" name="property_name" direction="in"/>
      <arg type="v" name="value" direction="out"/>
    </method>
    <method name="GetAll">
      <arg type="s" name="interface_name" direction="in"/>
      <arg type="a{sv}" name="properties" direction="out"/>
    </method>
    <method name="Set">
      <arg type="s" name="interface_name" direction="in"/>
      <arg type="s" name="property_name" direction="in"/>
      <arg type="v" name="value" direction="in"/>
    </method>
    <signal name="PropertiesChanged">
      <arg type="s" name="interface_name"/>
      <arg type="a{sv}" name="changed_properties"/>
      <arg type="as" name="invalidated_properties"/>
    </signal>
  </interface>
  <interface name="org.freedesktop.DBus.Introspectable">
    <method name="Introspect">
      <arg type="s" name="xml_data" direction="out"/>
    </method>
  </interface>
  <interface name="org.freedesktop.DBus.Peer">
    <method name="Ping"/>
    <method name="GetMachineId">
      <arg type="s" name="machine_uuid" direction="out"/>
    </method>
  </interface>
  <interface name="org.freedesktop.portal.Trash">
    <method name="TrashFile">
      <arg type="h" name="fd" direction="in"/>
      <arg type="u" name="result" direction="out"/>
    </method>
    <property type="u" name="version" access="read"/>
  </interface>
  <interface name="org.freedesktop.portal.MemoryMonitor">
    <signal name="LowMemoryWarning">
      <arg type="y" name="level"/>
    </signal>
    <property type="u" name="version" access="read"/>
  </interface>
  <interface name="org.freedesktop.portal.GameMode">
    <method name="QueryStatus">
      <arg type="i" name="pid" direction="in"/>
      <arg type="i" name="result" direction="out"/>
    </method>
    <method name="RegisterGame">
      <arg type="i" name="pid" direction="in"/>
      <arg type="i" name="result" direction="out"/>
    </method>
    <method name="UnregisterGame">
      <arg type="i" name="pid" direction="in"/>
      <arg type="i" name="result" direction="out"/>
    </method>
    <method name="QueryStatusByPid">
      <arg type="i" name="target" direction="in"/>
      <arg type="i" name="requester" direction="in"/>
      <arg type="i" name="result" direction="out"/>
    </method>
    <method name="RegisterGameByPid">
      <arg type="i" name="target" direction="in"/>
      <arg type="i" name="requester" direction="in"/>
      <arg type="i" name="result" direction="out"/>
    </method>
    <method name="UnregisterGameByPid">
      <arg type="i" name="target" direction="in"/>
      <arg type="i" name="requester" direction="in"/>
      <arg type="i" name="result" direction="out"/>
    </method>
    <method name="QueryStatusByPIDFd">
      <arg type="h" name="target" direction="in"/>
      <arg type="h" name="requester" direction="in"/>
      <arg type="i" name="result" direction="out"/>
    </method>
    <method name="RegisterGameByPIDFd">
      <arg type="h" name="target" direction="in"/>
      <arg type="h" name="requester" direction="in"/>
      <arg type="i" name="result" direction="out"/>
    </method>
    <method name="UnregisterGameByPIDFd">
      <arg type="h" name="target" direction="in"/>
      <arg type="h" name="requester" direction="in"/>
      <arg type="i" name="result" direction="out"/>
    </method>
    <property type="u" name="version" access="read"/>
  </interface>
  <interface name="org.freedesktop.portal.ProxyResolver">
    <method name="Lookup">
      <arg type="s" name="uri" direction="in"/>
      <arg type="as" name="proxies" direction="out"/>
    </method>
    <property type="u" name="version" access="read"/>
  </interface>
  <interface name="org.freedesktop.portal.NetworkMonitor">
    <method name="GetAvailable">
      <arg type="b" name="available" direction="out"/>
    </method>
    <method name="GetMetered">
      <arg type="b" name="metered" direction="out"/>
    </method>
    <method name="GetConnectivity">
      <arg type="u" name="connectivity" direction="out"/>
    </method>
    <method name="GetStatus">
      <arg type="a{sv}" name="status" direction="out"/>
    </method>
    <method name="CanReach">
      <arg type="s" name="hostname" direction="in"/>
      <arg type="u" name="port" direction="in"/>
      <arg type="b" name="reachable" direction="out"/>
    </method>
    <signal name="changed"/>
    <property type="u" name="version" access="read"/>
  </interface>
  <interface name="org.freedesktop.portal.Secret">
    <method name="RetrieveSecret">
      <arg type="h" name="fd" direction="in"/>
      <arg type="a{sv}" name="options" direction="in"/>
      <arg type="o" name="handle" direction="out"/>
    </method>
    <property type="u" name="version" access="read"/>
  </interface>
  <interface name="org.freedesktop.portal.ScreenCast">
    <method name="CreateSession">
      <arg type="a{sv}" name="options" direction="in"/>
      <arg type="o" name="handle" direction="out"/>
    </method>
    <method name="SelectSources">
      <arg type="o" name="session_handle" direction="in"/>
      <arg type="a{sv}" name="options" direction="in"/>
      <arg type="o" name="handle" direction="out"/>
    </method>
    <method name="Start">
      <arg type="o" name="session_handle" direction="in"/>
      <arg type="s" name="parent_window" direction="in"/>
      <arg type="a{sv}" name="options" direction="in"/>
      <arg type="o" name="handle" direction="out"/>
    </method>
    <method name="OpenPipeWireRemote">
      <arg type="o" name="session_handle" direction="in"/>
      <arg type="a{sv}" name="options" direction="in"/>
      <arg type="h" name="fd" direction="out"/>
    </method>
    <property type="u" name="AvailableSourceTypes" access="read"/>
    <property type="u" name="AvailableCursorModes" access="read"/>
    <property type="u" name="version" access="read"/>
  </interface>
  <interface name="org.freedesktop.portal.PowerProfileMonitor">
    <property type="b" name="power-saver-enabled" access="read"/>
    <property type="u" name="version" access="read"/>
  </interface>
  <interface name="org.freedesktop.portal.Realtime">
    <method name="MakeThreadRealtimeWithPID">
      <arg type="t" name="process" direction="in"/>
      <arg type="t" name="thread" direction="in"/>
      <arg type="u" name="priority" direction="in"/>
    </method>
    <method name="MakeThreadHighPriorityWithPID">
      <arg type="t" name="process" direction="in"/>
      <arg type="t" name="thread" direction="in"/>
      <arg type="i" name="priority" direction="in"/>
    </method>
    <property type="i" name="MaxRealtimePriority" access="read"/>
    <property type="i" name="MinNiceLevel" access="read"/>
    <property type="x" name="RTTimeUSecMax" access="read"/>
    <property type="u" name="version" access="read"/>
  </interface>
</node>
"
method call time=1666495066.595016 sender=:1.628 -> destination=org.freedesktop.portal.Desktop serial=16 path=/org/freedesktop/portal/desktop; interface=org.freedesktop.portal.Screenshot; member=Screenshot
   string ""
   array [
      dict entry(
         string "handle_token"
         variant             string "073a32658c6d4eb683fba78d79e5dc02"
      )
      dict entry(
         string "interactive"
         variant             boolean false
      )
   ]
error time=1666495066.595124 sender=:1.16 -> destination=:1.628 error_name=org.freedesktop.DBus.Error.UnknownMethod reply_serial=16
   string "No such interface “org.freedesktop.portal.Screenshot” on object at path /org/freedesktop/portal/desktop"

@mmahmoudian
Copy link
Member

@proudmuslim-dev have you already installed xdg-desktop-portal, xdg-desktop-portal-wlr, and grim?

@proudmuslim-dev
Copy link

@proudmuslim-dev have you already installed xdg-desktop-portal, xdg-desktop-portal-wlr, and grim?

Yes, I have. Flameshot was working perfectly until a few weeks ago, but I'm not sure which version broke it

@jacksgt
Copy link

jacksgt commented Nov 15, 2022

I'm also seeing this issue with Sway 1.7, grim 1.4.0, xdg-desktop-portal 1.15.0 and xdg-desktop-portal-wlr 0.6.0

Seems to be the same issue as described in #2978 ?

@Electrostasy
Copy link

I also ran into this issue. I tested with both Wayfire (commit 9458f5) and Sway 1.7, grim 1.4.0, xdg-desktop-portal 1.15.0 and xdg-desktop-portal-wlr 0.6.0.

I applied this commit to xdg-desktop-portal-wlr, according to #2872 it should fix the issue from xdg-desktop-portal-wlr's side but Flameshot would still hang and show "No such interface “org.freedesktop.portal.Screenshot” in dbus with or without it.

On a somewhat related note, I have found that by installing xdg-desktop-portal-kde together with xdg-desktop-portal-wlr (with or without said commit), Flameshot works again, even though the error persists (i.e. still shows up in dbus-monitor). For completeness, I attached the output I observed when running flameshot gui and then pressing esc to exit:

electro@venus ~ [127]> set -l p org.freedesktop.portal.Desktop
electro@venus ~ [127]> dbus-monitor --session sender=$p destination=$p
signal time=1668589594.484072 sender=org.freedesktop.DBus -> destination=:1.20 serial=2 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameAcquired
   string ":1.20"
signal time=1668589594.484115 sender=org.freedesktop.DBus -> destination=:1.20 serial=4 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameLost
   string ":1.20"
method call time=1668589599.215230 sender=:1.21 -> destination=org.freedesktop.portal.Desktop serial=2 path=/org/freedesktop/portal/desktop; interface=org.freedesktop.DBus.Properties; member=Get
   string "org.freedesktop.portal.Screenshot"
   string "version"
method return time=1668589599.215575 sender=:1.3 -> destination=:1.21 serial=146 reply_serial=2
   variant       uint32 2
method call time=1668589599.242670 sender=:1.21 -> destination=org.freedesktop.portal.Desktop serial=5 path=/org/freedesktop/portal/desktop; interface=org.freedesktop.DBus.Introspectable; member=Introspect
method return time=1668589599.243531 sender=:1.3 -> destination=:1.21 serial=147 reply_serial=5
   string "<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
                      "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<!-- GDBus 2.74.0 -->
<node>
  <interface name="org.freedesktop.DBus.Properties">
    <method name="Get">
      <arg type="s" name="interface_name" direction="in"/>
      <arg type="s" name="property_name" direction="in"/>
      <arg type="v" name="value" direction="out"/>
    </method>
    <method name="GetAll">
      <arg type="s" name="interface_name" direction="in"/>
      <arg type="a{sv}" name="properties" direction="out"/>
    </method>
    <method name="Set">
      <arg type="s" name="interface_name" direction="in"/>
      <arg type="s" name="property_name" direction="in"/>
      <arg type="v" name="value" direction="in"/>
    </method>
    <signal name="PropertiesChanged">
      <arg type="s" name="interface_name"/>
      <arg type="a{sv}" name="changed_properties"/>
      <arg type="as" name="invalidated_properties"/>
    </signal>
  </interface>
  <interface name="org.freedesktop.DBus.Introspectable">
    <method name="Introspect">
      <arg type="s" name="xml_data" direction="out"/>
    </method>
  </interface>
  <interface name="org.freedesktop.DBus.Peer">
    <method name="Ping"/>
    <method name="GetMachineId">
      <arg type="s" name="machine_uuid" direction="out"/>
    </method>
  </interface>
  <interface name="org.freedesktop.portal.Inhibit">
    <method name="Inhibit">
      <arg type="s" name="window" direction="in"/>
      <arg type="u" name="flags" direction="in"/>
      <arg type="a{sv}" name="options" direction="in"/>
      <arg type="o" name="handle" direction="out"/>
    </method>
    <method name="CreateMonitor">
      <arg type="s" name="window" direction="in"/>
      <arg type="a{sv}" name="options" direction="in"/>
      <arg type="o" name="handle" direction="out"/>
    </method>
    <method name="QueryEndResponse">
      <arg type="o" name="session_handle" direction="in"/>
    </method>
    <signal name="StateChanged">
      <arg type="o" name="session_handle"/>
      <arg type="a{sv}" name="state"/>
    </signal>
    <property type="u" name="version" access="read"/>
  </interface>
  <interface name="org.freedesktop.portal.Background">
    <method name="RequestBackground">
      <arg type="s" name="parent_window" direction="in"/>
      <arg type="a{sv}" name="options" direction="in"/>
      <arg type="o" name="handle" direction="out"/>
    </method>
    <property type="u" name="version" access="read"/>
  </interface>
  <interface name="org.freedesktop.portal.Location">
    <method name="CreateSession">
      <arg type="a{sv}" name="options" direction="in"/>
      <arg type="o" name="handle" direction="out"/>
    </method>
    <method name="Start">
      <arg type="o" name="session_handle" direction="in"/>
      <arg type="s" name="parent_window" direction="in"/>
      <arg type="a{sv}" name="options" direction="in"/>
      <arg type="o" name="handle" direction="out"/>
    </method>
    <signal name="LocationUpdated">
      <arg type="o" name="session_handle"/>
      <arg type="a{sv}" name="location"/>
    </signal>
    <property type="u" name="version" access="read"/>
  </interface>
  <interface name="org.freedesktop.portal.Notification">
    <method name="AddNotification">
      <arg type="s" name="id" direction="in"/>
      <arg type="a{sv}" name="notification" direction="in"/>
    </method>
    <method name="RemoveNotification">
      <arg type="s" name="id" direction="in"/>
    </method>
    <signal name="ActionInvoked">
      <arg type="s" name="id"/>
      <arg type="s" name="action"/>
      <arg type="av" name="parameter"/>
    </signal>
    <property type="u" name="version" access="read"/>
  </interface>
  <interface name="org.freedesktop.portal.Screenshot">
    <method name="Screenshot">
      <arg type="s" name="parent_window" direction="in"/>
      <arg type="a{sv}" name="options" direction="in"/>
      <arg type="o" name="handle" direction="out"/>
    </method>
    <method name="PickColor">
      <arg type="s" name="parent_window" direction="in"/>
      <arg type="a{sv}" name="options" direction="in"/>
      <arg type="o" name="handle" direction="out"/>
    </method>
    <property type="u" name="version" access="read"/>
  </interface>
  <interface name="org.freedesktop.portal.Account">
    <method name="GetUserInformation">
      <arg type="s" name="window" direction="in"/>
      <arg type="a{sv}" name="options" direction="in"/>
      <arg type="o" name="handle" direction="out"/>
    </method>
    <property type="u" name="version" access="read"/>
  </interface>
  <interface name="org.freedesktop.portal.NetworkMonitor">
    <method name="GetAvailable">
      <arg type="b" name="available" direction="out"/>
    </method>
    <method name="GetMetered">
      <arg type="b" name="metered" direction="out"/>
    </method>
    <method name="GetConnectivity">
      <arg type="u" name="connectivity" direction="out"/>
    </method>
    <method name="GetStatus">
      <arg type="a{sv}" name="status" direction="out"/>
    </method>
    <method name="CanReach">
      <arg type="s" name="hostname" direction="in"/>
      <arg type="u" name="port" direction="in"/>
      <arg type="b" name="reachable" direction="out"/>
    </method>
    <signal name="changed"/>
    <property type="u" name="version" access="read"/>
  </interface>
  <interface name="org.freedesktop.portal.Print">
    <method name="Print">
      <arg type="s" name="parent_window" direction="in"/>
      <arg type="s" name="title" direction="in"/>
      <arg type="h" name="fd" direction="in"/>
      <arg type="a{sv}" name="options" direction="in"/>
      <arg type="o" name="handle" direction="out"/>
    </method>
    <method name="PreparePrint">
      <arg type="s" name="parent_window" direction="in"/>
      <arg type="s" name="title" direction="in"/>
      <arg type="a{sv}" name="settings" direction="in"/>
      <arg type="a{sv}" name="page_setup" direction="in"/>
      <arg type="a{sv}" name="options" direction="in"/>
      <arg type="o" name="handle" direction="out"/>
    </method>
    <property type="u" name="version" access="read"/>
  </interface>
  <interface name="org.freedesktop.portal.Settings">
    <method name="ReadAll">
      <arg type="as" name="namespaces" direction="in"/>
      <arg type="a{sa{sv}}" name="value" direction="out"/>
    </method>
    <method name="Read">
      <arg type="s" name="namespace" direction="in"/>
      <arg type="s" name="key" direction="in"/>
      <arg type="v" name="value" direction="out"/>
    </method>
    <signal name="SettingChanged">
      <arg type="s" name="namespace"/>
      <arg type="s" name="key"/>
      <arg type="v" name="value"/>
    </signal>
    <property type="u" name="version" access="read"/>
  </interface>
  <interface name="org.freedesktop.portal.GameMode">
    <method name="QueryStatus">
      <arg type="i" name="pid" direction="in"/>
      <arg type="i" name="result" direction="out"/>
    </method>
    <method name="RegisterGame">
      <arg type="i" name="pid" direction="in"/>
      <arg type="i" name="result" direction="out"/>
    </method>
    <method name="UnregisterGame">
      <arg type="i" name="pid" direction="in"/>
      <arg type="i" name="result" direction="out"/>
    </method>
    <method name="QueryStatusByPid">
      <arg type="i" name="target" direction="in"/>
      <arg type="i" name="requester" direction="in"/>
      <arg type="i" name="result" direction="out"/>
    </method>
    <method name="RegisterGameByPid">
      <arg type="i" name="target" direction="in"/>
      <arg type="i" name="requester" direction="in"/>
      <arg type="i" name="result" direction="out"/>
    </method>
    <method name="UnregisterGameByPid">
      <arg type="i" name="target" direction="in"/>
      <arg type="i" name="requester" direction="in"/>
      <arg type="i" name="result" direction="out"/>
    </method>
    <method name="QueryStatusByPIDFd">
      <arg type="h" name="target" direction="in"/>
      <arg type="h" name="requester" direction="in"/>
      <arg type="i" name="result" direction="out"/>
    </method>
    <method name="RegisterGameByPIDFd">
      <arg type="h" name="target" direction="in"/>
      <arg type="h" name="requester" direction="in"/>
      <arg type="i" name="result" direction="out"/>
    </method>
    <method name="UnregisterGameByPIDFd">
      <arg type="h" name="target" direction="in"/>
      <arg type="h" name="requester" direction="in"/>
      <arg type="i" name="result" direction="out"/>
    </method>
    <property type="u" name="version" access="read"/>
  </interface>
  <interface name="org.freedesktop.portal.RemoteDesktop">
    <method name="CreateSession">
      <arg type="a{sv}" name="options" direction="in"/>
      <arg type="o" name="handle" direction="out"/>
    </method>
    <method name="SelectDevices">
      <arg type="o" name="session_handle" direction="in"/>
      <arg type="a{sv}" name="options" direction="in"/>
      <arg type="o" name="handle" direction="out"/>
    </method>
    <method name="Start">
      <arg type="o" name="session_handle" direction="in"/>
      <arg type="s" name="parent_window" direction="in"/>
      <arg type="a{sv}" name="options" direction="in"/>
      <arg type="o" name="handle" direction="out"/>
    </method>
    <method name="NotifyPointerMotion">
      <arg type="o" name="session_handle" direction="in"/>
      <arg type="a{sv}" name="options" direction="in"/>
      <arg type="d" name="dx" direction="in"/>
      <arg type="d" name="dy" direction="in"/>
    </method>
    <method name="NotifyPointerMotionAbsolute">
      <arg type="o" name="session_handle" direction="in"/>
      <arg type="a{sv}" name="options" direction="in"/>
      <arg type="u" name="stream" direction="in"/>
      <arg type="d" name="x" direction="in"/>
      <arg type="d" name="y" direction="in"/>
    </method>
    <method name="NotifyPointerButton">
      <arg type="o" name="session_handle" direction="in"/>
      <arg type="a{sv}" name="options" direction="in"/>
      <arg type="i" name="button" direction="in"/>
      <arg type="u" name="state" direction="in"/>
    </method>
    <method name="NotifyPointerAxis">
      <arg type="o" name="session_handle" direction="in"/>
      <arg type="a{sv}" name="options" direction="in"/>
      <arg type="d" name="dx" direction="in"/>
      <arg type="d" name="dy" direction="in"/>
    </method>
    <method name="NotifyPointerAxisDiscrete">
      <arg type="o" name="session_handle" direction="in"/>
      <arg type="a{sv}" name="options" direction="in"/>
      <arg type="u" name="axis" direction="in"/>
      <arg type="i" name="steps" direction="in"/>
    </method>
    <method name="NotifyKeyboardKeycode">
      <arg type="o" name="session_handle" direction="in"/>
      <arg type="a{sv}" name="options" direction="in"/>
      <arg type="i" name="keycode" direction="in"/>
      <arg type="u" name="state" direction="in"/>
    </method>
    <method name="NotifyKeyboardKeysym">
      <arg type="o" name="session_handle" direction="in"/>
      <arg type="a{sv}" name="options" direction="in"/>
      <arg type="i" name="keysym" direction="in"/>
      <arg type="u" name="state" direction="in"/>
    </method>
    <method name="NotifyTouchDown">
      <arg type="o" name="session_handle" direction="in"/>
      <arg type="a{sv}" name="options" direction="in"/>
      <arg type="u" name="stream" direction="in"/>
      <arg type="u" name="slot" direction="in"/>
      <arg type="d" name="x" direction="in"/>
      <arg type="d" name="y" direction="in"/>
    </method>
    <method name="NotifyTouchMotion">
      <arg type="o" name="session_handle" direction="in"/>
      <arg type="a{sv}" name="options" direction="in"/>
      <arg type="u" name="stream" direction="in"/>
      <arg type="u" name="slot" direction="in"/>
      <arg type="d" name="x" direction="in"/>
      <arg type="d" name="y" direction="in"/>
    </method>
    <method name="NotifyTouchUp">
      <arg type="o" name="session_handle" direction="in"/>
      <arg type="a{sv}" name="options" direction="in"/>
      <arg type="u" name="slot" direction="in"/>
    </method>
    <property type="u" name="AvailableDeviceTypes" access="read"/>
    <property type="u" name="version" access="read"/>
  </interface>
  <interface name="org.freedesktop.portal.MemoryMonitor">
    <signal name="LowMemoryWarning">
      <arg type="y" name="level"/>
    </signal>
    <property type="u" name="version" access="read"/>
  </interface>
  <interface name="org.freedesktop.portal.OpenURI">
    <method name="OpenURI">
      <arg type="s" name="parent_window" direction="in"/>
      <arg type="s" name="uri" direction="in"/>
      <arg type="a{sv}" name="options" direction="in"/>
      <arg type="o" name="handle" direction="out"/>
    </method>
    <method name="OpenFile">
      <arg type="s" name="parent_window" direction="in"/>
      <arg type="h" name="fd" direction="in"/>
      <arg type="a{sv}" name="options" direction="in"/>
      <arg type="o" name="handle" direction="out"/>
    </method>
    <method name="OpenDirectory">
      <arg type="s" name="parent_window" direction="in"/>
      <arg type="h" name="fd" direction="in"/>
      <arg type="a{sv}" name="options" direction="in"/>
      <arg type="o" name="handle" direction="out"/>
    </method>
    <property type="u" name="version" access="read"/>
  </interface>
  <interface name="org.freedesktop.portal.Realtime">
    <method name="MakeThreadRealtimeWithPID">
      <arg type="t" name="process" direction="in"/>
      <arg type="t" name="thread" direction="in"/>
      <arg type="u" name="priority" direction="in"/>
    </method>
    <method name="MakeThreadHighPriorityWithPID">
      <arg type="t" name="process" direction="in"/>
      <arg type="t" name="thread" direction="in"/>
      <arg type="i" name="priority" direction="in"/>
    </method>
    <property type="i" name="MaxRealtimePriority" access="read"/>
    <property type="i" name="MinNiceLevel" access="read"/>
    <property type="x" name="RTTimeUSecMax" access="read"/>
    <property type="u" name="version" access="read"/>
  </interface>
  <interface name="org.freedesktop.portal.DynamicLauncher">
    <method name="Install">
      <arg type="s" name="token" direction="in"/>
      <arg type="s" name="desktop_file_id" direction="in"/>
      <arg type="s" name="desktop_entry" direction="in"/>
      <arg type="a{sv}" name="options" direction="in"/>
    </method>
    <method name="PrepareInstall">
      <arg type="s" name="parent_window" direction="in"/>
      <arg type="s" name="name" direction="in"/>
      <arg type="v" name="icon_v" direction="in"/>
      <arg type="a{sv}" name="options" direction="in"/>
      <arg type="o" name="handle" direction="out"/>
    </method>
    <method name="RequestInstallToken">
      <arg type="s" name="name" direction="in"/>
      <arg type="v" name="icon_v" direction="in"/>
      <arg type="a{sv}" name="options" direction="in"/>
      <arg type="s" name="token" direction="out"/>
    </method>
    <method name="Uninstall">
      <arg type="s" name="desktop_file_id" direction="in"/>
      <arg type="a{sv}" name="options" direction="in"/>
    </method>
    <method name="GetDesktopEntry">
      <arg type="s" name="desktop_file_id" direction="in"/>
      <arg type="s" name="contents" direction="out"/>
    </method>
    <method name="GetIcon">
      <arg type="s" name="desktop_file_id" direction="in"/>
      <arg type="v" name="icon_v" direction="out"/>
      <arg type="s" name="icon_format" direction="out"/>
      <arg type="u" name="icon_size" direction="out"/>
    </method>
    <method name="Launch">
      <arg type="s" name="desktop_file_id" direction="in"/>
      <arg type="a{sv}" name="options" direction="in"/>
    </method>
    <property type="u" name="SupportedLauncherTypes" access="read"/>
    <property type="u" name="version" access="read"/>
  </interface>
  <interface name="org.freedesktop.portal.Camera">
    <method name="AccessCamera">
      <arg type="a{sv}" name="options" direction="in"/>
      <arg type="o" name="handle" direction="out"/>
    </method>
    <method name="OpenPipeWireRemote">
      <arg type="a{sv}" name="options" direction="in"/>
      <arg type="h" name="fd" direction="out"/>
    </method>
    <property type="b" name="IsCameraPresent" access="read"/>
    <property type="u" name="version" access="read"/>
  </interface>
  <interface name="org.freedesktop.portal.Device">
    <method name="AccessDevice">
      <arg type="u" name="pid" direction="in"/>
      <arg type="as" name="devices" direction="in"/>
      <arg type="a{sv}" name="options" direction="in"/>
      <arg type="o" name="handle" direction="out"/>
    </method>
    <property type="u" name="version" access="read"/>
  </interface>
  <interface name="org.freedesktop.portal.PowerProfileMonitor">
    <property type="b" name="power-saver-enabled" access="read"/>
    <property type="u" name="version" access="read"/>
  </interface>
  <interface name="org.freedesktop.portal.ScreenCast">
    <method name="CreateSession">
      <arg type="a{sv}" name="options" direction="in"/>
      <arg type="o" name="handle" direction="out"/>
    </method>
    <method name="SelectSources">
      <arg type="o" name="session_handle" direction="in"/>
      <arg type="a{sv}" name="options" direction="in"/>
      <arg type="o" name="handle" direction="out"/>
    </method>
    <method name="Start">
      <arg type="o" name="session_handle" direction="in"/>
      <arg type="s" name="parent_window" direction="in"/>
      <arg type="a{sv}" name="options" direction="in"/>
      <arg type="o" name="handle" direction="out"/>
    </method>
    <method name="OpenPipeWireRemote">
      <arg type="o" name="session_handle" direction="in"/>
      <arg type="a{sv}" name="options" direction="in"/>
      <arg type="h" name="fd" direction="out"/>
    </method>
    <property type="u" name="AvailableSourceTypes" access="read"/>
    <property type="u" name="AvailableCursorModes" access="read"/>
    <property type="u" name="version" access="read"/>
  </interface>
  <interface name="org.freedesktop.portal.Email">
    <method name="ComposeEmail">
      <arg type="s" name="parent_window" direction="in"/>
      <arg type="a{sv}" name="options" direction="in"/>
      <arg type="o" name="handle" direction="out"/>
    </method>
    <property type="u" name="version" access="read"/>
  </interface>
  <interface name="org.freedesktop.portal.Trash">
    <method name="TrashFile">
      <arg type="h" name="fd" direction="in"/>
      <arg type="u" name="result" direction="out"/>
    </method>
    <property type="u" name="version" access="read"/>
  </interface>
  <interface name="org.freedesktop.portal.ProxyResolver">
    <method name="Lookup">
      <arg type="s" name="uri" direction="in"/>
      <arg type="as" name="proxies" direction="out"/>
    </method>
    <property type="u" name="version" access="read"/>
  </interface>
  <interface name="org.freedesktop.portal.FileChooser">
    <method name="OpenFile">
      <arg type="s" name="parent_window" direction="in"/>
      <arg type="s" name="title" direction="in"/>
      <arg type="a{sv}" name="options" direction="in"/>
      <arg type="o" name="handle" direction="out"/>
    </method>
    <method name="SaveFile">
      <arg type="s" name="parent_window" direction="in"/>
      <arg type="s" name="title" direction="in"/>
      <arg type="a{sv}" name="options" direction="in"/>
      <arg type="o" name="handle" direction="out"/>
    </method>
    <method name="SaveFiles">
      <arg type="s" name="parent_window" direction="in"/>
      <arg type="s" name="title" direction="in"/>
      <arg type="a{sv}" name="options" direction="in"/>
      <arg type="o" name="handle" direction="out"/>
    </method>
    <property type="u" name="version" access="read"/>
  </interface>
</node>
"
method call time=1668589599.248273 sender=:1.21 -> destination=org.freedesktop.portal.Desktop serial=12 path=/org/freedesktop/portal/desktop; interface=org.freedesktop.portal.Screenshot; member=Screenshot
   string ""
   array [
      dict entry(
         string "handle_token"
         variant             string "6a2383f4339d46899c1ad40fc17da97d"
      )
      dict entry(
         string "interactive"
         variant             boolean false
      )
   ]
method call time=1668589599.248910 sender=:1.3 -> destination=org.freedesktop.DBus serial=148 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=GetConnectionUnixProcessID
   string ":1.21"
method return time=1668589599.248941 sender=org.freedesktop.DBus -> destination=:1.3 serial=107 reply_serial=148
   uint32 2779
method return time=1668589599.249604 sender=:1.3 -> destination=:1.21 serial=149 reply_serial=12
   object path "/org/freedesktop/portal/desktop/request/1_21/6a2383f4339d46899c1ad40fc17da97d"
method call time=1668589599.250311 sender=:1.3 -> destination=org.freedesktop.DBus serial=150 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=AddMatch
   string "type='signal',sender='org.freedesktop.impl.portal.desktop.wlr',interface='org.freedesktop.DBus.Properties',member='PropertiesChanged',path='/org/freedesktop/portal/desktop/request/1_21/6a2383f4339d46899c1ad40fc17da97d',arg0='org.freedesktop.impl.portal.Request'"
method return time=1668589599.250346 sender=org.freedesktop.DBus -> destination=:1.3 serial=108 reply_serial=150
method call time=1668589599.250364 sender=:1.3 -> destination=org.freedesktop.DBus serial=151 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=AddMatch
   string "type='signal',sender='org.freedesktop.impl.portal.desktop.wlr',interface='org.freedesktop.impl.portal.Request',path='/org/freedesktop/portal/desktop/request/1_21/6a2383f4339d46899c1ad40fc17da97d'"
method return time=1668589599.250389 sender=org.freedesktop.DBus -> destination=:1.3 serial=109 reply_serial=151
method call time=1668589599.250402 sender=:1.3 -> destination=org.freedesktop.DBus serial=152 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=StartServiceByName
   string "org.freedesktop.impl.portal.desktop.wlr"
   uint32 0
method return time=1668589599.250437 sender=org.freedesktop.DBus -> destination=:1.3 serial=110 reply_serial=152
   uint32 2
method call time=1668589599.250678 sender=:1.3 -> destination=org.freedesktop.DBus serial=153 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=GetNameOwner
   string "org.freedesktop.impl.portal.desktop.wlr"
method return time=1668589599.250707 sender=org.freedesktop.DBus -> destination=:1.3 serial=111 reply_serial=153
   string ":1.11"
method call time=1668589599.251796 sender=:1.3 -> destination=:1.11 serial=154 path=/org/freedesktop/portal/desktop/request/1_21/6a2383f4339d46899c1ad40fc17da97d; interface=org.freedesktop.DBus.Properties; member=GetAll
   string "org.freedesktop.impl.portal.Request"
error time=1668589599.251989 sender=:1.11 -> destination=:1.3 error_name=org.freedesktop.DBus.Error.UnknownObject reply_serial=154
   string "Unknown object '/org/freedesktop/portal/desktop/request/1_21/6a2383f4339d46899c1ad40fc17da97d'."
method call time=1668589599.252832 sender=:1.3 -> destination=:1.11 serial=155 path=/org/freedesktop/portal/desktop; interface=org.freedesktop.impl.portal.Screenshot; member=Screenshot
   object path "/org/freedesktop/portal/desktop/request/1_21/6a2383f4339d46899c1ad40fc17da97d"
   string ""
   string ""
   array [
      dict entry(
         string "interactive"
         variant             boolean false
      )
   ]
method return time=1668589599.386312 sender=:1.11 -> destination=:1.3 serial=10 reply_serial=155
   uint32 0
   array [
      dict entry(
         string "uri"
         variant             string "file:///tmp/out.png"
      )
   ]
error time=1668589599.386379 sender=:1.11 -> destination=:1.3 error_name=org.freedesktop.DBus.Error.UnknownMethod reply_serial=155
   string "Unknown method Screenshot or interface org.freedesktop.impl.portal.Screenshot."
signal time=1668589599.386851 sender=:1.3 -> destination=:1.21 serial=156 path=/org/freedesktop/portal/desktop/request/1_21/6a2383f4339d46899c1ad40fc17da97d; interface=org.freedesktop.portal.Request; member=Response
   uint32 0
   array [
      dict entry(
         string "uri"
         variant             string "file:///tmp/out.png"
      )
   ]
method call time=1668589599.387322 sender=:1.3 -> destination=org.freedesktop.DBus serial=157 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=RemoveMatch
   string "type='signal',sender='org.freedesktop.impl.portal.desktop.wlr',interface='org.freedesktop.DBus.Properties',member='PropertiesChanged',path='/org/freedesktop/portal/desktop/request/1_21/6a2383f4339d46899c1ad40fc17da97d',arg0='org.freedesktop.impl.portal.Request'"
method return time=1668589599.387356 sender=org.freedesktop.DBus -> destination=:1.3 serial=112 reply_serial=157
method call time=1668589599.387370 sender=:1.3 -> destination=org.freedesktop.DBus serial=158 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=RemoveMatch
   string "type='signal',sender='org.freedesktop.impl.portal.desktop.wlr',interface='org.freedesktop.impl.portal.Request',path='/org/freedesktop/portal/desktop/request/1_21/6a2383f4339d46899c1ad40fc17da97d'"
method return time=1668589599.387392 sender=org.freedesktop.DBus -> destination=:1.3 serial=113 reply_serial=158
method call time=1668589599.421033 sender=:1.21 -> destination=org.freedesktop.portal.Desktop serial=13 path=/org/freedesktop/portal/desktop/request/1_21/6a2383f4339d46899c1ad40fc17da97d; interface=org.freedesktop.portal.Request; member=Close
error time=1668589599.421378 sender=:1.3 -> destination=:1.21 error_name=org.freedesktop.DBus.Error.UnknownMethod reply_serial=13
   string "Object does not exist at path “/org/freedesktop/portal/desktop/request/1_21/6a2383f4339d46899c1ad40fc17da97d”"

Running xdg-desktop-portal -v -r, I can see that xdg-desktop-portal-wlr is used for both Screenshot and ScreenCast, while the rest falls back to the kde portal:

XDP: load portals from /nix/store/c3c0jk3qxgama366zs841v95rwlxc24m-xdg-portals/share/xdg-desktop-portal/portals
XDP: loading /nix/store/c3c0jk3qxgama366zs841v95rwlxc24m-xdg-portals/share/xdg-desktop-portal/portals/kde.portal
XDP: portal implementation for KDE
XDP: portal implementation supports org.freedesktop.impl.portal.Access
XDP: portal implementation supports org.freedesktop.impl.portal.Account
XDP: portal implementation supports org.freedesktop.impl.portal.AppChooser
XDP: portal implementation supports org.freedesktop.impl.portal.Background
XDP: portal implementation supports org.freedesktop.impl.portal.Email
XDP: portal implementation supports org.freedesktop.impl.portal.FileChooser
XDP: portal implementation supports org.freedesktop.impl.portal.Inhibit
XDP: portal implementation supports org.freedesktop.impl.portal.Notification
XDP: portal implementation supports org.freedesktop.impl.portal.Print
XDP: portal implementation supports org.freedesktop.impl.portal.ScreenCast
XDP: portal implementation supports org.freedesktop.impl.portal.Screenshot
XDP: portal implementation supports org.freedesktop.impl.portal.RemoteDesktop
XDP: portal implementation supports org.freedesktop.impl.portal.Settings
XDP: portal implementation supports org.freedesktop.impl.portal.DynamicLauncher
XDP: loading /nix/store/c3c0jk3qxgama366zs841v95rwlxc24m-xdg-portals/share/xdg-desktop-portal/portals/wlr.portal
XDP: portal implementation for wlroots, sway, Wayfire, river, phosh
XDP: portal implementation supports org.freedesktop.impl.portal.Screenshot
XDP: portal implementation supports org.freedesktop.impl.portal.ScreenCast
XDP: providing portal org.freedesktop.portal.MemoryMonitor
XDP: providing portal org.freedesktop.portal.PowerProfileMonitor
XDP: providing portal org.freedesktop.portal.NetworkMonitor
XDP: providing portal org.freedesktop.portal.ProxyResolver
XDP: providing portal org.freedesktop.portal.Trash
XDP: providing portal org.freedesktop.portal.GameMode
XDP: providing portal org.freedesktop.portal.Realtime
XDP: Using kde.portal for org.freedesktop.impl.portal.Settings
XDP: providing portal org.freedesktop.portal.Settings
XDP: Falling back to kde.portal for org.freedesktop.impl.portal.FileChooser
XDP: providing portal org.freedesktop.portal.FileChooser
XDP: Falling back to kde.portal for org.freedesktop.impl.portal.AppChooser
XDP: providing portal org.freedesktop.portal.OpenURI
XDP: Falling back to kde.portal for org.freedesktop.impl.portal.Print
XDP: providing portal org.freedesktop.portal.Print
XDP: Falling back to kde.portal for org.freedesktop.impl.portal.Notification
XDP: providing portal org.freedesktop.portal.Notification
XDP: Falling back to kde.portal for org.freedesktop.impl.portal.Inhibit
XDP: providing portal org.freedesktop.portal.Inhibit
XDP: Falling back to kde.portal for org.freedesktop.impl.portal.Access
XDP: Using wlr.portal for org.freedesktop.impl.portal.Screenshot in sway
XDP: providing portal org.freedesktop.portal.Screenshot
XDP: Falling back to kde.portal for org.freedesktop.impl.portal.Background
XDP: providing portal org.freedesktop.portal.Device
XDP: providing portal org.freedesktop.portal.Location
XDP: providing portal org.freedesktop.portal.Camera
XDP: Starting background app monitor
XDP: providing portal org.freedesktop.portal.Background
XDP: Falling back to kde.portal for org.freedesktop.impl.portal.Account
XDP: using org.freedesktop.impl.portal.Account at org.freedesktop.impl.portal.desktop.kde

XDP: providing portal org.freedesktop.portal.Account
XDP: Falling back to kde.portal for org.freedesktop.impl.portal.Email
XDP: providing portal org.freedesktop.portal.Email
XDP: Falling back to kde.portal for org.freedesktop.impl.portal.DynamicLauncher
XDP: providing portal org.freedesktop.portal.DynamicLauncher
XDP: Using wlr.portal for org.freedesktop.impl.portal.ScreenCast in sway
XDP: providing portal org.freedesktop.portal.ScreenCast
XDP: Falling back to kde.portal for org.freedesktop.impl.portal.RemoteDesktop
XDP: providing portal org.freedesktop.portal.RemoteDesktop
XDP: org.freedesktop.portal.Desktop acquired
From what I understand, adding the kde portal shouldn't have any affect on screenshots, as the wlr portal is responsible for them even if the kde portal is uninstalled:
XDP: load portals from /nix/store/1s5whj97bq092hr6jipxd89ma5n8hn3q-xdg-portals/share/xdg-desktop-portal/portals
XDP: loading /nix/store/1s5whj97bq092hr6jipxd89ma5n8hn3q-xdg-portals/share/xdg-desktop-portal/portals/wlr.portal
XDP: portal implementation for wlroots, sway, Wayfire, river, phosh
XDP: portal implementation supports org.freedesktop.impl.portal.Screenshot
XDP: portal implementation supports org.freedesktop.impl.portal.ScreenCast
XDP: providing portal org.freedesktop.portal.MemoryMonitor
XDP: providing portal org.freedesktop.portal.PowerProfileMonitor
XDP: providing portal org.freedesktop.portal.NetworkMonitor
XDP: providing portal org.freedesktop.portal.ProxyResolver
XDP: providing portal org.freedesktop.portal.Trash
XDP: providing portal org.freedesktop.portal.GameMode
XDP: providing portal org.freedesktop.portal.Realtime

** (./result/libexec/xdg-desktop-portal:2329): WARNING **: 10:49:20.527: No skeleton to export
XDP: Using wlr.portal for org.freedesktop.impl.portal.Screenshot in sway
XDP: Using wlr.portal for org.freedesktop.impl.portal.ScreenCast in sway
XDP: providing portal org.freedesktop.portal.ScreenCast
XDP: org.freedesktop.portal.Desktop acquired

I don't have a black belt in dbus, so I'm not competent enough to really debug this or figure out where the bug lies, but for now I'll keep the kde portal around.

@kyechou
Copy link

kyechou commented Nov 19, 2022

It seems this issue still occurs in various compositors, so I went ahead and reported it to xdg-desktop-portal-wlr#246. ^

@Jeremie-Chauvel
Copy link

I was stuck on the same issue and without more info in the troubleshooting guide I couldn't understand how to fix it. From googling around I stumbled upon the troubleshooting checklist for xdg-desktop-portal-wlr which solved my issue:

systemctl --user stop pipewire pipewire-media-session xdg-desktop-portal xdg-desktop-portal-wlr
systemctl --user start pipewire-media-session

I suggest adding this link in the troubleshoot section of flameshot, I can do the pr if you wish.

Cheers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Waiting For Info Addressing the issue or merging the PR is halted and we are waiting for more info to be provided. Wayland Wayland specific issues
Projects
None yet
Development

No branches or pull requests

7 participants