Broken global clipboard

The clipboard qrexec has somehow broken. I haven’t touched any policy recently (but I did check pretty much all of them to make sure they are well configured).

In particular, qubes.ClipboardPaste looks very default:

cat /etc/qubes-rpc/policy/qubes.ClipboardPaste
## [...]
dom0 @anyvm ask
@anyvm @anyvm ask

I’m able to COPY TO the global clipboard, but not PASTE FROM it.
journalctl doesn’t show anything relevant.

Check if you have anything interesting in
/var/log/qubes/guid.<name>.log for the qube you are pasting into.

Found something. I ran cat before/after attempting to paste into different qubes, and when I do I get the following:

~ cat /var/log/qubes/guid.<name>.log
connect: No such file or directory

Could it be that the clipboard file in dom0 is broken?
I remember someone mentioning its path in some thread, I’ll look for it as I don’t remember.

Update:
Found it: /var/run/qubes/qubes-clipboard.bin

The content is what I copied from the vm. Here’s the permissions:

~ ls -l /var/run/qubes/qubes-clipboard.bin
-rw-rw---- 1 user qubes [...]

Update 2:
I tried this solution (Qubes Clipboard™ is painful - #8 by airelemental) and got an error:

~ qvm-run -p $activevm 'xdotool type --delay 0 --file -' < /var/run/qubes/qubes-clipboard.bin
/bin/bash: line_1: xdotool: command not found

But to be fair not even the default debian-11 template has the package installed, so this shouldn’t be the long-term solution…

Update 3:
/etc/qubes-rpc/policy.EvalSimple doesn’t exist neither in dom0 nor in vms. I don’t know what it should be like (I tried @anyvm @anyvm ask and nothing changed).

You need to change <name> to your qube name, for example if you’re trying to paste clipboard to qube vault then check the content of this file:
cat /var/log/qubes/guid.vault.log

Yes, I am aware. Like I said, I tried with multiple vms and I wasn’t gonna put the command for each vm I tried the command with.
The one I posted is the actual content of the file.

A non-existing file would’ve produced an error:

cat: <file>: No such file or directory

which wasn’t the case.

Check if qubes-qrexec-policy-daemon service is running.

Thank you very much, restarting it solved the issue.
I checked the status before and something made it fail, but no mention of what.

There’s still a warning but it shouldn’t affect operations:

warning: !compat-4.0 directive in file /etc/qubes/policy.d/35-compat.policy line 16 is transitional and will be deprecated

Now I’ll check whether or not a reboot makes the service fail again, and report back.

Update:
A system reboot did not affect the service and it is currently active.
Just like it didn’t affect it when it failed.
All good for now, Thanks again!