Skip to content

Crash when Fully External Display Mode is enabled in Galaxy screen mirroring mode #560

@bynkook

Description

@bynkook

After a recent Galaxy S25+ firmware update, Artemis crashes only when Fully External Display Mode is enabled.

Important observations:

  • If Fully External Display Mode is disabled, streaming still starts and connects normally.
  • In that disabled state, the stream is displayed only in part of the external monitor instead of filling it.
  • Samsung DeX screen extension mode also works; Artemis appears in a window and does not crash.
  • The crash happens only in Galaxy screen mirroring mode with Fully External Display Mode enabled.
  • The app crashes before the streaming connection attempt actually starts.

This suggests the host PC, network, decoder, and normal streaming path are not the root cause.

The issue appears specific to the Fully External Display Mode launch path. In screen mirroring mode, the external display may no longer be a valid target for launching an Activity via ActivityOptions.setLaunchDisplayId(), even though it is exposed as a non-default display. Artemis currently seems to treat the first non-default display as a launchable secondary display, which may crash on newer Samsung firmware.

Most likely fix:

  • Do not treat the first non-default display from DisplayManager.getDisplays() as a launchable secondary display.
  • Prefer DisplayManager.getDisplays(DisplayManager.DISPLAY_CATEGORY_PRESENTATION) and only select displays that are valid presentation/external-display targets.
  • Before calling ActivityOptions.setLaunchDisplayId(), verify that the target display can actually launch the Game activity. On supported Android versions, this can be checked with ActivityManager.isActivityStartAllowedOnDisplay().
  • Wrap startActivity(gameIntent, options.toBundle()) in a try/catch for SecurityException/RuntimeException, so an invalid screen-mirroring display target falls back instead of crashing the app.
  • If no launchable secondary display is available, fall back to the normal streaming path and optionally disable/fullscreen-fallback Fully External Display Mode for that session.

Device/context:

  • Phone: Galaxy S25+
  • External monitor connected to the phone
  • Mode that works: DeX screen extension mode
  • Mode that crashes: Galaxy screen mirroring mode
  • Trigger: Video Settings -> Fully External Display Mode enabled

Possible area to inspect:

  • Secondary display selection logic
  • ActivityOptions.setLaunchDisplayId() handling
  • Fallback behavior when the non-default display is not launchable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions