Skip to content

Software-rendered desktop: make late USB-C hotplug obtain a usable display route #39

Open

Description

@chriskearney

Late USB-C hotplug can remain dark when mesa-m3 is disabled or the session uses software rendering. GPU-enabled hotplug successes do not establish this path.

Priority: P2 · Readiness: investigation · Implementation owner: kernel

Baseline: Aurora 2026.10.11.13, development commit 5dcdeb8cda8dafe203d4d2f03952ade392c3fe23. Earlier reproductions retain the exact versions above.

Code: drivers/gpu/drm/apple/dcp.c · tools/aurora-sep/install-aurora-sep.sh

Completion criteria: Compare the same display/port with software and hardware rendering, including connector refresh and CRTC choice. Late plug, unplug and replug must show a usable picture without enabling an unrelated GPU profile or exposing an unsupported ABI.

Original reports/candidate: original #55

This ticket carries forward the remaining work; source inclusion, release delivery and hardware acceptance are recorded separately.

Activity

  1. added
    priority:P2
    status:investigation
    owner:kernel
    area:display
    on Oct 11, 2026
  2. GehrmannSolutions commented on Oct 11, 2026

    @GehrmannSolutions

    The cause of this may be in userspace rather than the kernel. With software rendering, aquamarine (Hyprland's backend) drops any output that shows up after the compositor has started. It happens on a MacBook Air M3, and a small aquamarine patch fixes it there. It has not been tested on Aurora yet, see below.

    Machine and build

    • MacBook Air 13" M3, apple,j613 / apple,t8122
    • asahi,os-fw-version: 14.7, asahi,system-fw-version: 27.0
    • Not Aurora: a custom 7.2.2 build (AsahiLinux asahi-wip-7.2 + dcp on m3 devices AsahiLinux/linux#608 + Enable t8122 external display support AsahiLinux/linux#607 + local fixes). m1n1 main with t8122 display carveouts.
    • Hyprland 0.56.2, aquamarine 0.15.1, mesa 26.2.3. No GPU driver, so /dev/dri has only the display card (card1, apple-drm) and no render node. The session renders in software.
    • Monitor: USB-C DisplayPort, left-back port (ATC0), 1920x1080@60.

    What happens

    The kernel side looks fine on late plug: dcpext reports cb_hotplug() connected:1, nr_modes:30, and the connector shows connected. But it stays disabled, and hyprctl monitors lists only eDP-1. A monitor that is already connected when Hyprland starts works. The same goes for any Hyprland restart with it plugged in. On every boot, aquamarine logs:

    ERR from aquamarine ]: [EGL] Command eglQueryDeviceStringEXT errored out with EGL_BAD_PARAMETER (0x12300): eglQueryDeviceStringEXT
    ERR from aquamarine ]: CDRMRenderer(drm): Can't create renderer, no matching devices found
    ERR from aquamarine ]: drm: onReady: no renderer for gl formats
    

    Cause (aquamarine)

    A backend without a primary never blits (shouldBlit() is !!primary), so its own renderer is optional. The patch makes the evdi behaviour general:

    --- a/src/backend/drm/DRM.cpp
    +++ b/src/backend/drm/DRM.cpp
    @@ -899,7 +899,18 @@ bool Aquamarine::CDRMBackend::updateSecondaryRendererState(DRMFBList* deferred)
             if (rendererState.renderer && rendererState.allocator)
                 return true;
     
    -        return initMgpu();
    +        // A backend without a primary never blits (shouldBlit() == !!primary), so its own
    +        // renderer is optional: it only feeds glFormats, GBM buffer clears and readback for
    +        // secondaries, all of which tolerate a null renderer. On display-only KMS devices
    +        // (no render node / no matching EGL device) initMgpu() can never succeed, so don't
    +        // fail here (connect() would drop hotplugged outputs) and don't retry every commit.
    +        if (!initMgpu()) {
    +            backend->log(AQ_LOG_WARNING, std::format("drm: No renderer for {}, continuing without one", gpu->path));
    +            rendererState.allocator.reset();
    +            rendererRequired = false;
    +        }
    +
    +        return true;
         }

    It applies to aquamarine 0.15.1 and to current main (52ea11f). It was installed as a normal pacman package: the Arch PKGBUILD with this patch, pkgrel=1.2.

    Results (patched aquamarine 0.15.1, same kernel)

    Action Result
    Boot with the monitor attached, Hyprland starts before dcpext is up (session at 7.1 s, hotplug at 9.5 s) pass: DP-1 1920x1080@60 appears; unpatched this was connected disabled
    Unplug and replug with the desktop running pass: picture comes back
    DPMS off/on, 3 cycles, both displays pass
    Built-in panel pass
    Reboot/shutdown with the monitor attached pass
    HDMI not tested (no HDMI port)
    Accelerated session (mesa-m3) not tested (no GPU driver in this kernel)
    Aurora kernel not tested

    The renderer warning now appears once instead of on every commit.

    The likely explanation is that a software-rendered Aurora session on M3 takes the same aquamarine path whenever aquamarine can't create its own EGL renderer on the display card. That would explain why accelerated sessions don't show it. This could not be checked on Aurora here. If someone with a software-fallback session can try the patched aquamarine, that would confirm or rule it out.

    Disclosure: the analysis, the patch and this comment were made together with Claude Code (Anthropic). The tests were run on real hardware (the MacBook Air above), and the results were checked there.

  3. added
    launch:follow-up
    on Oct 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:displaylaunch:follow-upowner:kernelpriority:P2status:investigation

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions