I experienced another instance of "initial keylisting hangs". I had just installed a new self-built Gpg4win 4.4.1-beta for testing a bug fix. The installation required a restart (for whatever reason).
After starting Kleopatra the initial keylisting hanged. Task manager showed that 1 instance of gpg-agent, gpgconf (--launch gpg-agent), gpg, and gpgsm were running.
Kleopatra logs:
00000001 0.00000000 [6868] org.kde.pim.kleopatra: Startup timing: 333 ms: Application created 00000002 0.00045300 [6868] org.kde.pim.kleopatra: Responder handle: 0x0 00000003 0.00269380 [6868] org.kde.pim.kleopatra: Created responder: "kleopatraResponder" with handle: 0x301aa 00000004 0.00279810 [6868] org.kde.pim.kleopatra: Startup timing: 337 ms: Service created 00000005 0.00284880 [6868] org.kde.pim.kleopatra: Application created 00000006 0.00958730 [6868] org.kde.pim.kleopatra: Startup timing: 343 ms: GPGME Initialized 00000007 0.01121090 [6868] org.kde.pim.kleopatra: Startup timing: 345 ms: Starting version info check 00000008 0.01220930 [6868] org.kde.pim.libkleo: Verifying "C:/Program Files (x86)/Gpg4win/bin/../VERSION" 00000009 0.01262480 [6868] org.kde.pim.libkleo: No signature found at "C:/Program Files (x86)/Gpg4win/VERSION.sig" 00000010 0.01270490 [6868] org.kde.pim.kleopatra: Startup timing: 346 ms: Version info checked 00000011 0.01335080 [6868] org.kde.pim.kleopatra: Startup timing: 347 ms: Checking backend versions 00000012 0.01361050 [6868] org.kde.pim.kleopatra: Got ElevationToken 0 [...] 00000016 0.96211171 [6868] org.kde.pim.libkleo: Parsed 2.4.7 as: 2 . 4 . 7 . 00000017 0.96222490 [6868] org.kde.pim.libkleo: Running gpgconf --show-versions ... 00000018 1.17597973 [6868] org.kde.pim.libkleo: gpgconf stdout: "* GnuPG 2.4.7 (7bdaf5647)\nMingW32\nWindows 10.0 build 19045\n\n* Libgcrypt 1.11.0 (9d94d784)\nversion:1.11.0:10b00:1.51:13300:\ncc:100000:gcc:10-win32 20210110:\nciphers:arcfour:blowfish:cast5:des:aes:twofish:serpent:rfc2268:seed:camellia:idea:salsa20:gost28147:chacha20:sm4:aria:\npubkeys:dsa:elgamal:rsa:ecc:\ndigests:crc:gostr3411-94::md4:md5:rmd160:sha1:sha256:sha512:sha3:tiger:whirlpool:stribog:blake2:sm3:\nrnd-mod:w32:\ncpu-arch:x86:i386:\nmpi-asm:i386/mpih-add1.S:i386/mpih-sub1.S:i386/mpih-mul1.S:i386/mpih-mul2.S:i386/mpih-mul3.S:i386/mpih-lshift.S:i386/mpih-rshift.S:\nhwflist:intel-bmi2:intel-ssse3:intel-sse4.1:intel-pclmul:intel-aesni:intel-rdrand:intel-avx:intel-avx2:intel-rdtsc:intel-shaext:\nfips-mode:n:::\nrng-type:standard:1:3030000:1:\ncompliance:::\n\n* GpgRT 1.51 (b0bb9266010d84b30fa2dc6a2127b7e40dc03660)\n\n* nPth 1.8 (64905e765aad9de6054ef70a97fc30bd992ce999)\n\n* Libassuan 3.0.1 (c9e9027)\n\n* KSBA 1.6.7 (b14e68b)\n\n* NTBTLS 0.3.2 (2c38007)\n\n" 00000019 1.17608500 [6868] org.kde.pim.kleopatra: Startup timing: 1510 ms: backend versions checked 00000020 3.02422428 [6868] org.kde.pim.libkleo: agentIsRunning : Connecting to the agent failed. 00000021 3.02437091 [6868] org.kde.pim.libkleo: Starting "C:\\Program Files (x86)\\GnuPG\\bin\\gpgconf.exe" "--launch gpg-agent" ... 00000022 3.02911568 [6868] org.kde.pim.libkleo: gpgconf was started successfully
^ here gpgconf --launch gpg-agent is called to start gpg-agent.
00000023 3.02932954 [6868] org.kde.pim.kleopatra: ReaderStatus::Private: Using deprecated FileSystemWatcher [...] 00000031 3.21591949 [6868] org.kde.pim.kleopatra: Startup timing: 3535 ms: Application initialized 00000032 3.21606731 [6868] org.kde.pim.kleopatra: Startup timing: 3538 ms: UiServer created 00000033 3.25474691 [6868] org.kde.pim.kleopatra: Startup timing: 3588 ms: UiServer started 00000034 3.25664830 [6868] org.kde.pim.kleopatra: Kleo::Command(0xb3fe94) ~Command 00000035 3.25675368 [6868] org.kde.pim.kleopatra: Kleo::Command(0xb3fe94) ~Private 00000036 3.25686312 [6868] org.kde.pim.kleopatra: Startup timing: 3591 ms: SelfCheck completed 00000037 3.25695992 [6868] org.kde.pim.kleopatra: startMonitoring 00000038 3.25710511 [6868] org.kde.pim.kleopatra: startMonitoring waiting for key cache ... 00000039 3.25735807 [6868] org.kde.pim.kleopatra: openOrRaiseMainWindow 00000040 4.62009048 [6868] org.kde.pim.libkleo: KeyFilterManager:: reload final filter count is 17 00000042 4.81525135 [6868] org.kde.pim.kleopatra: Hook into the help menu to show the About dialog ourselves 00000043 4.85487461 [6868] org.kde.pim.kleopatra: open_or_raise showing window 00000044 5.01271820 [6868] org.kde.pim.kleopatra: you need to register view Kleo::TreeView(0x929cb80, name="m_view") before trying to set it as the current view! 00000045 5.20467281 [6868] org.kde.pim.kleopatra: No update for: "4.4.1-beta4" 00000046 5.20546246 [6868] org.kde.pim.kleopatra: Startup timing: 5539 ms: new instance created 00000047 5.20588255 [6868] org.kde.pim.libkleo: Kleo::KeyCache(0x76dedf0) reload option: 0 00000048 5.20674086 [6868] org.kde.pim.libkleo: KeyCache::RefreshKeysJob start
^ here the keylisting (with gpg and gpgsm) is started
00000049 5.21036482 [6868] org.kde.pim.libkleo: Kleo::KeyCache(0x76dedf0) reload option: 0 00000050 5.21046782 [6868] org.kde.pim.libkleo: Kleo::KeyCache(0x76dedf0) reload - refresh already running 00000051 5.21055984 [6868] org.kde.pim.libkleo: Waiting for keycache. 00000054 60.66810989 [6868] org.kde.pim.libkleo: Kleo::KeyCache::RefreshKeysJob(0x931a988) RefreshKeysJob::done
^ ~55 seconds later the keylistings are done
00000055 60.68364716 [6868] org.kde.pim.libkleo: readGroups Reading groups 00000056 60.68596649 [6868] org.kde.pim.kleopatra: startMonitoring 00000057 60.68605423 [6868] org.kde.pim.kleopatra: startMonitoring key cache is ready 00000058 60.68667603 [6868] org.kde.pim.kleopatra: ReaderStatusThread[2nd]: new iteration command= "__update__" ; nullSlot= true 00000059 60.68676376 [6868] org.kde.pim.kleopatra: update_cardinfo() 00000060 60.68687439 [6868] org.kde.pim.libkleo: sendCommand "SCD SERIALNO --all" 00000061 60.68890381 [6868] org.kde.pim.libkleo: Keycache available. 00000062 60.69105911 [6868] org.kde.pim.libkleo: Reloading keycache with remarks enabled 00000063 60.69116211 [6868] org.kde.pim.libkleo: Kleo::KeyCache(0x76dedf0) reload option: 0 00000064 60.69190216 [6868] org.kde.pim.libkleo: KeyCache::RefreshKeysJob start 00000065 60.69196701 [6868] org.kde.pim.kleopatra: onUpdateCardsStarted 00000066 60.69257736 [6868] org.kde.pim.kleopatra: Kleo::Command(0x9191750) ~Command 00000067 60.69270325 [6868] org.kde.pim.kleopatra: Kleo::Command(0x9191750) ~Private 00000068 60.80812836 [6868] org.kde.pim.libkleo: sendCommand "SCD SERIALNO --all" failed: "No such device" (code: 32848, source: SCD) 00000069 60.80826187 [6868] org.kde.pim.libkleo: sendStatusLinesCommand "SCD SERIALNO --all" : t == NULL 00000070 60.80831909 [6868] org.kde.pim.kleopatra: update_cardinfo: No card present 00000071 60.80894852 [6868] org.kde.pim.kleopatra: ReaderStatusThread[2nd]: waiting for commands 00000072 62.13568115 [6868] org.kde.pim.kleopatra: onUpdateFinished 00000073 62.51733017 [6868] org.kde.pim.libkleo: Kleo::KeyCache::RefreshKeysJob(0x92a9030) RefreshKeysJob::done