wwmm / easyeffects

Limiter, compressor, convolver, equalizer and auto volume and many other plugins for PipeWire applications
GNU General Public License v3.0
6.4k stars 267 forks source link

Background access has been denied #3136

Open luiswoo opened 4 months ago

luiswoo commented 4 months ago

EasyEffects Version

latest

What package are you using?

Flatpak (Flathub)

Distribution

fedora 40

Describe the bug

Everything happens in the same way as described here https://github.com/wwmm/easyeffects/issues/2669 xdg portal package installed (xdg-desktop-portal-gnome) The error was fixed in the same way - easyeffects was installed from a third-party repository (https://copr.fedorainfracloud.org/coprs/aleasto/easyeffects/)

Expected Behavior

No response

Debug Log

Debug Log
``` Paste your log here ```

Additional Information

No response

violetmage commented 4 months ago

What version of xdg-desktop-portal-gnome do you have?

luiswoo commented 4 months ago

xdg-desktop-portal-gnome-46.0-1.fc40.x86_64

luiswoo commented 4 months ago

Maybe it had something to do with the fact that any ‘gnome software center’ activity was blocked. But easyeffects was updated via ‘flatpak update’, and reinstalled at least once.

violetmage commented 4 months ago

It sounds like a bug in xdg-desktop-portal-gnome

I'll do some more research later today, to try to find some specific troubleshooting steps.

violetmage commented 4 months ago

Sorry for the delay, was AFK over the weekend.

Just to be sure, are you using GNOME as your DE?

Either way, you can try the Door Knocker flatpak as a first step.

Alternatively, check the output of systemctl --user status xdg-desktop-portal-gnome xdg-desktop-portal

luiswoo commented 4 months ago

XFCE is mainly used.

Just in case, a screenshot: https://imgbox.com/AuPp187D `$ systemctl --user status xdg-desktop-portal-gnome xdg-desktop-portal ○ xdg-desktop-portal-gnome.service - Portal service (GNOME implementation) Loaded: loaded (/usr/lib/systemd/user/xdg-desktop-portal-gnome.service; static) Drop-In: /usr/lib/systemd/user/service.d └─10-timeout-abort.conf Active: inactive (dead)

● xdg-desktop-portal.service - Portal service Loaded: loaded (/usr/lib/systemd/user/xdg-desktop-portal.service; static) Drop-In: /usr/lib/systemd/user/service.d └─10-timeout-abort.conf Active: active (running) since Sun 2024-05-12 17:55:11 MSK; 1 day 4h ago Main PID: 3618 (xdg-desktop-por) Tasks: 6 (limit: 9089) Memory: 3.1M (peak: 14.3M swap: 1.8M swap peak: 2.0M) CPU: 23.002s CGroup: /user.slice/user-1000.slice/user@1000.service/session.slice/xdg-desktop-portal.service └─3618 /usr/libexec/xdg-desktop-portal

мая 12 17:55:11 fedora xdg-desktop-por[3618]: Choosing gtk.portal for org.freedesktop.impl.portal.Notification as a last-resort fallback мая 12 17:55:11 fedora xdg-desktop-por[3618]: Choosing gtk.portal for org.freedesktop.impl.portal.Inhibit as a last-resort fallback мая 12 17:55:11 fedora xdg-desktop-por[3618]: Choosing gtk.portal for org.freedesktop.impl.portal.Access as a last-resort fallback мая 12 17:55:11 fedora xdg-desktop-por[3618]: Choosing gtk.portal for org.freedesktop.impl.portal.Account as a last-resort fallback мая 12 17:55:11 fedora xdg-desktop-por[3618]: Choosing gtk.portal for org.freedesktop.impl.portal.Email as a last-resort fallback мая 12 17:55:11 fedora xdg-desktop-por[3618]: Choosing gtk.portal for org.freedesktop.impl.portal.DynamicLauncher as a last-resort fallback мая 12 17:55:11 fedora systemd[2145]: Started xdg-desktop-portal.service - Portal service. мая 12 22:15:21 fedora xdg-desktop-por[3618]: A backend call failed: Inhibiting other than idle not supported мая 12 22:16:02 fedora xdg-desktop-por[3618]: A backend call failed: Inhibiting other than idle not supported мая 12 22:16:50 fedora xdg-desktop-por[3618]: A backend call failed: Inhibiting other than idle not supported `

violetmage commented 4 months ago

If you are using XFCE, you should be using xdg-desktop-portal-gtk instead of xdg-desktop-portal-gnome

More info here: bbs.archlinux.org

luiswoo commented 4 months ago

Package xdg-desktop-portal-gtk-1.15.1-5.fc40.x86_64 is already installed

screenshot systemctl --user --type=service: https://imgbox.com/BvgZoQsj

violetmage commented 4 months ago

That's good, but the logs from your earlier post show that xdg-desktop-portal-gnome is what's being used. You might have to uninstall it.

luiswoo commented 4 months ago

I'll update my OS, install easyeffects from the Flatpak, and check in Gnome, I'll report back.

luiswoo commented 4 months ago

After upgrading my system, in Gnome the problems disappeared. In XFCE everything is still the same. I don't quite understand why I should remove ‘xdg-desktop-portal-gnome’, if on request ‘systemctl --user status xdg-desktop-portal-gtk xdg-desktop-portal’ both services are active (in XFCE) and everything is fine. But on request ‘systemctl --user status xdg-desktop-portal-gnome xdg-desktop-portal’ - the answer is that desktop-portal-gnome is not active (in XFCE). What is the point of removing it?

violetmage commented 4 months ago

The xdg-desktop-portal-gnome will only work correctly with the full GNOME DE running, whereas xdg-desktop-portal-gtk only depends on a few sub-systems. XFCE includes these sub-systems, so it will work with the gtk portals.

If you wanted all portals to work in XFCE, the easiest way to fix the problem is to remove xdg-desktop-portal-gnome. However, removing it would of course cause GNOME to work incorrectly.

Since you have the full GNOME installed, you probably shouldn't remove xdg-desktop-portal-gnome. The problem is that I don't know of a simple way to make portals work in XFCE without also affecting GNOME.

luiswoo commented 4 months ago

I don't understand, for easyeffects to work correctly in XFCE it needs xdg-desktop-portal-gnome (service is not active) or xdg-desktop-portal-gtk ( service is active)?

violetmage commented 4 months ago

The way portals work as that there is the main xdg-desktop-portal service that apps talk to, then a "backend" service that the main service dispatches requests to, like xdg-desktop-portal-gtk or xdg-desktop-portal-gnome.

You only need a single "backend" for things to work.

violetmage commented 4 months ago

I've just done some more research and found the documentation for the xdg-desktop-portal service here: flatpak.github.io

In there they describe how to control the behaviour of the xdg-desktop-portal service.

So you can try this to see if it helps on XFCE:

Create the file: ~/.config/xdg-desktop-portal/xfce-portals.conf

And paste in it the following:

[preferred]
# Use xdg-desktop-portal-gtk for every portal interface
default=gtk

You would need to log out and log in again for the changes to take effect.

luiswoo commented 4 months ago

When adding xfce-portals.conf to ~/.config (it didn't work in other paths), a message appeared:

$ flatpak run com.github.wwmm.easyeffects.

** (process:8863): WARNING **: 02:20:45.282: Error writing credentials to socket: There was an error sending a message: Channel failure. (the behavior remained the same, only no errors were displayed)

Instead of the usual:

$ flatpak run com.github.wwmm.easyeffects

(easyeffects:2): Gtk-WARNING **: 02:23:31.901: No IM module matching GTK_IM_MODULE=xim found

(easyeffects:2): easyeffects-WARNING **: 02:23:42.761: libportal.cpp:79 Background access has been denied

(easyeffects:2): easyeffects-WARNING **: 02:23:42.761: libportal.cpp:80 Please allow Easy Effects to ask again with flatpak permission-reset com.github.wwmm.easyeffects

(easyeffects:2): easyeffects-WARNING **: 02:23:42.848: libportal.cpp:104 due to error setting shutdown on window close state and switch to true

(easyeffects:2): easyeffects-WARNING **: 02:26:38.350: pipe_manager.cpp:1481 Remote error res: There is no such file or directory

(easyeffects:2): easyeffects-WARNING **: 02:26:38.350: pipe_manager.cpp:1482 Remote error message: unknown resource 111 op:2

(easyeffects:2): easyeffects-WARNING **: 02:26:38.350: pipe_manager.cpp:1481 Remote error res: No such file or directory

violetmage commented 4 months ago

What if you change the configuration to be like this:

[preferred]
# Use xdg-desktop-portal-gnome for every portal interface...
default=gnome
# ... except for the Background interface
org.freedesktop.impl.portal.Background=gtk

If this doesn't work, then I think the only options are to either a. Just use GNOME b. Uninstall GNOME and the GNOME desktop portals, to try to make XFCE work c. Use the native packaged easyeffects

luiswoo commented 4 months ago

Is this a setting for the ~/.config/portals.conf file? (~/config/xdg-desktop-desktop-portal/portals.conf was also tried) If so, it doesn't lead to anything.

violetmage commented 4 months ago

I don't know what else to say at this point. You could try asking on the fedora forums for more help.

Sorry I couldn't help find the problem.

luiswoo commented 4 months ago

As I understood from the discussion https://github.com/wwmm/easyeffects/issues/1363 xdg-desktop-portal-gnome is REQUIRED for easyeffects to work in XFCE, but it is not loaded at system boot “Dependency failed for xdg-desktop-portal-gnome.service - Portal service” - I can't start it manually: “Failed to start xdg-desktop-portal-gnome.service: Unit xdg-desktop-portal-gnome.service not found.”

wwmm commented 4 months ago

Unit xdg-desktop-portal-gnome.service not found

Strange. At least on Arch Linux this file is provided by the xdg-desktop-portal-gnome package. Maybe something went wrong when the Fedora package was done.

wwmm commented 4 months ago

Unit xdg-desktop-portal-gnome.service not found

Strange. At least on Arch Linux this file is provided by the xdg-desktop-portal-gnome package. Maybe something went wrong when the Fedora package was done.

But in this case it should be broken in gnome too... Hum... Really weird...

luiswoo commented 4 months ago

Maybe the developers banned it from running in DE other than Gnome, because of problems like here: https://gitlab.gnome.org/GNOME/xdg-desktop-portal-gnome/-/issues/74

wwmm commented 4 months ago

Maybe the developers banned it from running in DE other than Gnome, because of problems like here: https://gitlab.gnome.org/GNOME/xdg-desktop-portal-gnome/-/issues/74

It does not seem it was banned https://gitlab.gnome.org/GNOME/xdg-desktop-portal-gnome/-/merge_requests/95. It just does not keep waiting for a reply from Mutter. Something that will never happen outside of gnome. The question is if exposing just the settings backend is enough.

Anyway I do not understand why xfce doesn't work with just the gtk backend.

luiswoo commented 4 months ago

Installed from the official Fedora repository (version 7.1.6) and uninstalled the flattpack version and it worked.

wwmm commented 4 months ago

Installed from the official Fedora repository (version 7.1.6) and uninstalled the flattpack version and it worked.

The native package does not use the background permission infrastructure. This permission management is a flatpak thing.