emacs mml-secure-epg-sign: GPG error: “Signing failed (unknown reason)”

In my case it was caused by an issue described here:

https://wiki.archlinux.org/title/GnuPG#Invalid_IPC_response_and_Inappropriate_ioctl_for_device

Installing gtk2 helped resolve this issue.

Note to self: setup a proper pinentry gui: https://wiki.archlinux.org/title/GnuPG#pinentry