Skip to content

PickColor method is exposed via DBus but returns error code 2 (not implemented/failed logic) #251

@LucasSrSilva

Description

@LucasSrSilva

1. Summary

The PickColor method from the org.freedesktop.portal.Screenshot interface is correctly exposed via DBus introspection, but calling it results in an immediate failure (Error code 2). While the portal seems to initialize a graphical context, it fails to trigger the color picker UI or return any color data.
Environment

  • OS: Pop!_OS 24.04 LTS (COSMIC)

  • Portal Version: xdg-desktop-portal-cosmic (latest from repos)

2. Steps to Reproduce

  • Run a DBus monitor: dbus-monitor "interface='org.freedesktop.portal.Screenshot'"

  • Attempt to call the PickColor method:

  •   gdbus call --session --dest org.freedesktop.portal.Desktop --object-path /org/freedesktop/portal/desktop --method org.freedesktop.portal.Screenshot.PickColor "" "{}"
    
  • Observe the output.

3. Actual Behavior

When calling PickColor, the dbus-monitor shows the method call being sent to org.freedesktop.portal.Desktop, but no method return or error is ever received. The call hangs indefinitely or the portal process fails to respond to the specific request, despite initializing the GLES context as seen in the logs.

DBus Monitor Output:

method call ... interface=org.freedesktop.portal.Screenshot; member=PickColor
   string ""
   array [
   ]
(No return signal received)

Additional Context

I've checked the source code in src/screenshot.rs and it seems the DBus interface is defined, but there might be a gap in the actual implementation of the pixel capture logic for the color picker. I am interested in helping to debug this further—could someone point me to the specific module responsible for translating the Wayland buffer into the RGB response for this method?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions