GPG Issues with Kwallet and Kleopatra

Hi, I’m having various issues that I believe are related to kleopatra or the gpg-agent or some sort of gnugp configuration problem.

Kleopatra - I can use the kleopatra gui to sign and encrypt a file using one of my keys. I can then unencrypt it during that same session, but not after logging out or rebooting. If I attempt to do so in a new session I get the following message

gpg: encrypted with 3072-bit RSA key, ID mykeyid, created 2021-04-02 "me <>" gpg: public key decryption failed: Inappropriate ioctl for device gpg: decryption failed: No secret key

I can decrypt the file in the terminal with gpg -d filename.gpg just fine across sessions, just not from the kleopatra gui.

Kwallet - if I create a new key in kwallet and choose the gpg encryption option instead of the blowfish option, I get a similar message.

Error when attempting to decrypt the wallet kdewallet1 using GPG. If you're using a SmartCard, please ensure it's inserted then try again. GPG error was Inappropriate ioctl for device

I also have an issue with Proton-bridge for Protonmail which relies on gpg encryption, where it won’t save login credentials properly with the following error

Failure: failed to create user: failed to load user credentials: exit status 2: gpg: decryption key failed: No secret key

I have another computer running Manjaro Gnome and I am not having issues there, which makes me think it could be kde related.

I have seen similar “ioctl” issues mentioned after searching online but didn’t find a solution there, specifically actually those loopback commands made it so I couldn’t unencrypt from the cli either saying something about “batch mode”.

Any assistance, including if I should be asking this elsewhere is appreciated, thanks!

1 Like

I have the same issue with latest Manjaro KDE.

Wat I figured out so far.
Kleopatra and Kgpg don’t work for me - they cannot export private key.
Key encrypted! and neither of Kleopatra or Kgpg ask me for password.

gpg from command line as well as Seahorse works fine.