I have used GPG4Win for many years. But yesterday for the first time ever Kleopatra did hang very shortly after I started it. There is a (non-responsive) Kleopatra icon in my tray, and the process “kleopatra.exe” is present (and so is gpg-agent.exe). Since my version wasn’t up to date I thought an update perhpaps could fix this, so I installed gpg4win-5.0.1.exe ‘on top of’ the older version (v4.?). But still the same.
I then tried to uninstall Gpg4win and restarted my PC. I then copied and renamed (to have a ‘fresh start’) the folder C:\Users\AppData\Roaming\gnupg
And then I installed “gpg4win-5.0.1.exe“ again - but it exactly the same problem.
I then found this page:
… and here also the information that I could use some environment variables for getting additional info:
”KLEOPATRA_LOGDIR” to point to a folder where Kleopatra could log information about what it ‘is doing’ and the other environment variable “KLEOPATRA_LOGOPTIONS“ which I as described set to “all” which should make the logging more verbose.
I then started Kleopatra again, but the only thing that was logged (in the file “kleo-log“ in the folder where ”KLEOPATRA_LOGDIR” is pointing to) were these two lines and then nothing more:
org.kde.pim.kleopatra: Startup timing: 2813 ms: Application initialized
org.kde.pim.kleopatra: Startup timing: 2813 ms: UiServer created
I then tried to log on to the same PC but with a different user, set up the environment variables ”KLEOPATRA_LOGDIR” (pointing to a different folder of course) and set “KLEOPATRA_LOGOPTIONS“ to ‘all’ also for this user.
When I started Kleopatra up with this alternative user it started up just fine, and a lot more was logged to the log file “kleo-log”. The two first lines are the same as shown above, but then a lot of lines followed. Here is the full log from the startup of Kleopatra with the alternative user on the same PC:
org.kde.pim.kleopatra: Startup timing: 2674 ms: Application initialized
org.kde.pim.kleopatra: Startup timing: 2674 ms: UiServer created
org.kde.pim.kleopatra: Startup timing: 2679 ms: UiServer started
org.kde.pim.kleopatra: Kleo::Command(0x89dd1ff730) ~Command
org.kde.pim.kleopatra: Kleo::Command(0x89dd1ff730) ~Private
org.kde.pim.kleopatra: Startup timing: 2740 ms: SelfCheck completed
org.kde.pim.kleopatra: startMonitoring
org.kde.pim.kleopatra: startMonitoring waiting for key cache …
org.kde.pim.kleopatra: openOrRaiseMainWindow
org.kde.pim.libkleo: KeyFilterManager:: reload final filter count is 17
org.kde.pim.kleopatra: Hook into the help menu to show the About dialog ourselves
org.kde.pim.kleopatra: open_or_raise showing window
org.kde.pim.kleopatra: you need to register view Kleo::TreeView(0x1b9d1e77920, name=“m_view”) before trying to set it as the current view!
org.kde.pim.kleopatra: No update for: “5.0.1”
org.kde.pim.kleopatra: Startup timing: 4375 ms: new instance created
org.kde.pim.libkleo: Kleo::KeyCache(0x1b9cd8b1530) reload option: 0
org.kde.pim.libkleo: KeyCache::RefreshKeysJob start
org.kde.pim.libkleo: Kleo::KeyCache(0x1b9cd8b1530) reload option: 0
org.kde.pim.libkleo: Kleo::KeyCache(0x1b9cd8b1530) reload - refresh already running
org.kde.pim.libkleo: Waiting for keycache.
org.kde.pim.libkleo: Kleo::KeyCache::RefreshKeysJob(0x1b9d1fb2fb0) RefreshKeysJob::done
org.kde.pim.libkleo: readGroups Reading groups
org.kde.pim.kleopatra: startMonitoring
org.kde.pim.kleopatra: startMonitoring key cache is ready
org.kde.pim.kleopatra: ReaderStatusThread[2nd]: new iteration command= “update” ; nullSlot= true
org.kde.pim.kleopatra: update_cardinfo()
org.kde.pim.libkleo: sendCommand “SCD SERIALNO --all”
org.kde.pim.libkleo: Keycache available.
org.kde.pim.libkleo: Reloading keycache with remarks enabled
org.kde.pim.libkleo: Kleo::KeyCache(0x1b9cd8b1530) reload option: 0
org.kde.pim.libkleo: KeyCache::RefreshKeysJob start
org.kde.pim.kleopatra: onUpdateCardsStarted
org.kde.pim.kleopatra: Kleo::Command(0x1b9cf78e8b0) ~Command
org.kde.pim.kleopatra: Kleo::Command(0x1b9cf78e8b0) ~Private
org.kde.pim.libkleo: sendCommand “SCD SERIALNO --all” failed: “Service is not running” (code: 318, source: SCD)
org.kde.pim.libkleo: sendStatusLinesCommand “SCD SERIALNO --all” : t == NULL
org.kde.pim.kleopatra: Running SCD SERIALNO --all failed: “Service is not running” (code: 318, source: SCD)
org.kde.pim.kleopatra: ReaderStatusThread: Card “” with app “” was added
org.kde.pim.kleopatra: ReaderStatusThread[2nd]: waiting for commands
org.kde.pim.kleopatra: onUpdateFinished
org.kde.pim.libkleo: Kleo::KeyCache::RefreshKeysJob(0x1b9d1feb4b0) RefreshKeysJob::done
org.kde.pim.libkleo: readGroups Reading groups
org.kde.pim.kleopatra: queryClose
So that must mean that the install of Gpg4win is ok (otherwise the alternative user wouldn’t be able to start up Kleopatra without problems). But that something present when logged on with my regular user stops Kleopatra quite early in the start up phase.
So without knowing a lot about the “UiServer” (other that the “Ui” most likely could mean something like “User Interface” like in GUI) it looks like the UiServer has a problem when started with my regular user - according to the log it can be created (=”UiServer created”) but it never gets to the point where it is started up (it never reaches / logs “UiServer started“)
My PC is using “Windows 11 Home Version 25H2“ and as mentioned the GPG4Win is v5.0.1
As mentioned I have tried a clean start inclusive uninstall / install Gpg4win and also ‘removed’ my “gpg keystore”, but as described nothing helped. So I’m out of ideas. During the last install of Gpg4win I also unchecked everything but ‘Kleopatra’ (to make the install as ‘lean’ as possible) but same same same again ![]()
Therefore I hope somebody here might be able to help help investigating / fixing this problem. Perhaps some additional debugging settings that could give more information about the problem, perhaps some info regarding ‘cleaning up’ (in addtion to the AppData\Roaming\gnupg I already ‘removed) - or something else ![]()
Thanks a lot in advance
I would like to add: ‘gpg’ from the command line works fine without any problems - e.g. ‘gpg –encrypt ..’, ‘gpg –list-keys’, ‘gpg –decrypt…’ and so on