Skip to content

CocoaSpice: fix typing into the built-in serial terminal - #7900

Merged
osy merged 1 commit into
mainfrom
fix/serial-terminal-input
Sep 22, 2026
Merged

osy merged 1 commit into
mainfrom
fix/serial-terminal-input

Conversation

@osy

@osy osy commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

Since UTM 5.0.4, keystrokes typed into a QEMU VM's built-in serial terminal never reach the guest. Output still works, and a TCP or pseudo-TTY serial port works.

SPICE sends port writes by reference: spice_port_channel_write_async() adds the caller's buffer to the outgoing message and only reads it later, when the channel coroutine sends it. CSPort passed the bytes of an NSData that was released right away. That worked only because the SPICE thread never drained an autorelease pool. The CocoaSpice change pulled in by cebbab9 (fixing a graphics memory leak) now drains a pool on every SPICE loop iteration, so the bytes are freed before they are sent.

This pulls in utmapp/CocoaSpice@d8d29fc, which copies the data and keeps it alive until the write completes.

Resolves #7814

Testing: Tested by a human on macOS 27.0, MacBook Air (M3), iOS 26.7, iPhone 16 Pro, and visionOS 27.0, Apple Vision Pro Simulator. The author acknowledges that this change has been tested and/or reviewed by a human in accordance with UTM's AI contribution guidelines.

Keystrokes typed into a QEMU VM's built-in terminal never reached the
guest. SPICE sends port writes by reference after CSPort returns, and
since the CocoaSpice update in cebbab9 drains an autorelease pool on
every SPICE loop iteration, the bytes were freed before they were sent.
Pull in the CocoaSpice fix that keeps the data alive until the write
completes.

Fixes #7814

Assisted-by: Claude:claude-opus-5-5
@osy osy added this to the v5.0 milestone Sep 22, 2026
@osy
osy merged commit 5887740 into main Sep 22, 2026
54 checks passed
@osy
osy deleted the fix/serial-terminal-input branch September 22, 2026 23:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Typing does not work in serial built-in terminal on macOS 27 Public Beta

1 participant