macOS: Secure Input lock icon remains visible after password prompt completes #10480
Replies: 4 comments 6 replies
|
Not sure if this is related, but if I run this python3 -c '__import__("getpass").getpass()'then paste something via CMD+V, then ENTER, the secure input doesn't go away. Tested on 1.2.3 and tip. |
|
@rkp-ubona Could you please edit to include the full issue triage template? |
|
I spent quite some time on this now, with multiple tests, debug outputs added etc., I struggle to reliably reproduce this unfortunately. After many experiments, my current feeling is, that this is related to using an external screen… It works using the internal screen of the macBook, but if I move the window to the external display (5K, 2560x1440, Thunderbolt), I see the hanging or just huge delays. No issues when using the macOS Terminal.app in the same setup though. Sometimes the delay is short for a couple of trials, then my impression is the delay increases, quite strange. I created a spindump during the block, and while idle. Then asked Claude Code to have a look, not sure if that is convincing or helpful at all, but just in case, see below. Claude Opus interpretation of spindump and logsThe Spindump evidence (during paste):
vs idle baseline:
This starves From the debug output: DisableSecureEventInput() itself is not hanging; it runs quickly once reached. Reproduction
|
|
Out of curiosity I vibe coded a NSLock based coalesced tick scheduling, as mentioned here: ghostty/macos/Sources/Ghostty/Ghostty.App.swift Lines 427 to 431 in 13e8d85 and it works for me! :) Maybe that helps someone, my Swift experience is quite dated to properly evaluate if this is reasonable. Vibe coded explanationwakeup can be called very frequently from non-main threads. Previously each wakeup did DispatchQueue.main.async { appTick() }, which can pile up many pending appTick blocks while the main thread is busy. That causes two problems:
The patch fixes this by:
So if 100 wakeups happen while the main thread is busy, you no longer enqueue 100 tick blocks. You enqueue one, and when it runs, ghostty_app_tick drains mailbox messages in bulk. That cuts starvation and greatly reduces the delay before secure-input off is processed. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
On macOS, Ghostty occasionally shows the Secure Input lock icon even after a password prompt has completed.
Any ideas as to how to fix this?
--
Ghostty version:
ghostty +version
Ghostty 1.2.3
Version
Build Config
All reactions