Repository navigation
Description
What happened
TITLE
TV: playback sometimes starts paused after a display mode switch (media pause key during the HDMI re-handshake)
WHAT HAPPENED
On a Fire TV Cube into an AV receiver, film starts that trigger Silo's refresh-rate switch often end up paused behind the first frame, with nobody touching the remote. Pressing play starts it, and the HUD shows it as paused. Starts that need no mode switch aren't affected.
The log shows a media pause key dispatched to Silo's session about 500 ms after HdrDisplayController applies the mode, while HDMI is re-handshaking, within about 20 ms of "player ready". It's most likely HDMI-CEC from the receiver or TV, which Fire OS delivers as a media key. Media3Analytics records it as pause requested (user_request).
Frequency: in a logged run with ordinary DD+ (E-AC-3) films, a pause key arrived on 5 of 5 starts that switched mode, both to 2160p24/23.976 and to 1080p23.976. In other runs it stalled roughly half the time. It isn't tied to any audio format or setting.
STEPS TO REPRODUCE
- Fire TV Cube 3rd gen, HDMI into an AV receiver with HDMI CEC Device Control on (the default).
- Fire OS home screen at 4K 60 Hz.
- Play a 23.976 fps film in Silo, so Silo switches to 2160p24.
- Repeat from the details screen several times.
EXPECTED BEHAVIOUR
Playback continues after the mode switch, as it does when no switch is needed.
DEVICE
Android TV
DEVICE MODEL AND OS VERSION
Fire TV Cube 3rd gen (AFTGA), Fire OS 7 (Android 9, PS7718.5826N), into a Denon AVR-X3800H
APP VERSION AND BUILD
Debug build of main at 9a443da (#1119), audio settings at defaults ⟨plus anything you confirm on the store build⟩
INSTALLED FROM
Built from source
SILO SERVER VERSION
Not available (I'm not the server admin). This is client-side: the pause key comes from Fire OS during the HDMI re-handshake after the app changes display mode, and the server isn't involved.
PLAYBACK DETAILS
Direct play, MKV, Dolby Vision 2160p24 and 23.976, and H.264 1080p23.976, receiver over HDMI. Seen with DD+ (E-AC-3), TrueHD, DTS-HD MA and DTS:X tracks.
TECHNICAL NOTES
Log of a stalled start:
HdrDisplayController: Applied display mode 12: 3840x2160@23.976025 for content 3840x2160@23976
AmazonHdmiService: UEvent: {... SWITCH_NAME=hdmi_audio ... SWITCH_STATE=0}
Avrcp: recordKeyDispatch: can't find matching log!
Media3Analytics: player ready
Media3Analytics: pause requested (user_request)
AmazonHdmiService: UEvent: {... SWITCH_NAME=hdmi_audio ... SWITCH_STATE=1}
A fix that ignores the pause works. For 3 seconds after HdrDisplayController applies a mode, a media pause or play/pause key that would pause running playback is consumed and logged, both in a MediaSession.Callback.onMediaButtonEvent and in the TV player's key bridge. Play keys, other keys and an already-paused player are untouched. With it in place, the same run logged:
SiloModeSwitchGuard: Ignored media pause during display mode switch (session, key=KEYCODE_MEDIA_PAUSE, action=0, from=android)
on every start that switched mode (5 of 5 with DD+ films in one run), and none of them needed play pressing.
Reference: https://github.com/ChesneyHawkTuah/silo-android/tree/fix/tv-mode-switch-media-pause (one commit on main at #1119, with unit tests).
Side observation, harmless: about 1.5 s after exiting playback, when the display mode is restored, Media3 logs NullPointerException in ExoPlayerImplInternal.seekToCurrentPosition via reselectTracksInternalAndSeek on the already-stopped player. Seen on every exit, with or without the change above.
AI HARNESS
Claude (claude.ai)
AI TOOL(S)
Claude
AI MODEL(S)
claude-opus-5-5
AI INVOLVEMENT
Fully AI-generated, human verified
Steps to reproduce
STEPS TO REPRODUCE
- Fire TV Cube 3rd gen, HDMI into an AV receiver with HDMI CEC Device Control on (the default).
- Fire OS home screen at 4K 60 Hz.
- Play a 23.976 fps film in Silo, so Silo switches to 2160p24.
- Repeat from the details screen several times.
Expected behavior
EXPECTED BEHAVIOUR
Playback continues after the mode switch, as it does when no switch is needed.
Device
Android TV / Google TV
Device model and OS version
Fire TV Cube 3rd gen (AFTGA), Fire OS 7 (Android 9, PS7718.5826N), into a Denon AVR-X3800H
App version and build
Custom Build
Installed from
Built from source
Silo server version
Not available (I'm not the server admin). This is client-side: the pause key comes from Fire OS during the HDMI re-handshake after the app changes display mode, and the server isn't involved.
Playback details
Direct play, MKV, Dolby Vision 2160p24 and 23.976, and H.264 1080p23.976, receiver over HDMI. Seen with DD+ (E-AC-3), TrueHD, DTS-HD MA and DTS:X tracks.
Diagnostics report reference
No response
Screenshots or recording
No response
Relevant server logs
Technical notes
Log of a stalled start:
HdrDisplayController: Applied display mode 12: 3840x2160@23.976025 for content 3840x2160@23976
AmazonHdmiService: UEvent: {... SWITCH_NAME=hdmi_audio ... SWITCH_STATE=0}
Avrcp: recordKeyDispatch: can't find matching log!
Media3Analytics: player ready
Media3Analytics: pause requested (user_request)
AmazonHdmiService: UEvent: {... SWITCH_NAME=hdmi_audio ... SWITCH_STATE=1}
A fix that ignores the pause works. For 3 seconds after HdrDisplayController applies a mode, a media pause or play/pause key that would pause running playback is consumed and logged, both in a MediaSession.Callback.onMediaButtonEvent and in the TV player's key bridge. Play keys, other keys and an already-paused player are untouched. With it in place, the same run logged:
SiloModeSwitchGuard: Ignored media pause during display mode switch (session, key=KEYCODE_MEDIA_PAUSE, action=0, from=android)
on every start that switched mode (5 of 5 with DD+ films in one run), and none of them needed play pressing.
Reference: https://github.com/ChesneyHawkTuah/silo-android/tree/fix/tv-mode-switch-media-pause (one commit on main at #1119, with unit tests).
Side observation, harmless: about 1.5 s after exiting playback, when the display mode is restored, Media3 logs NullPointerException in ExoPlayerImplInternal.seekToCurrentPosition via reselectTracksInternalAndSeek on the already-stopped player. Seen on every exit, with or without the change above.
AI harness
Claude (claude.ai)
AI tool(s)
Claude
AI model(s)
claude-opus-5-5
AI involvement
Fully AI-generated, human verified
Independent or adversarial review
n/a
Confirmations
- I searched open and recently closed issues and pull requests, and this is not already reported
- I reproduced this myself on the device and app version above
Activity