Skip to content

aurora-sep: mesa-m3-session-env leaves the M3 Max alone, so Hyprland spins at 100 % CPU when the GPU is not started #190

Open

Description

@malik-na

recipes/mesa-m3/mesa-m3-session-env exports LIBGL_ALWAYS_SOFTWARE=1 (with
MESA_M3_FALLBACK=software) when an M3 render node is present but /opt/mesa-m3 is not used.
It does this only on a T6030 or a T8122 (_mm3_soc_of, about :310-318). The header says that
"M1, M2, the M3 Max and anything else are left alone" (:60).

On a J516C boot where the GPU node stays disabled (Issue 1), no G15 render node appears. The
session then runs with the system Mesa and no working renderer: Hyprland spins at about 100 %
CPU and the desktop is unusable. Seen on the boots of 2026-10-23 01:45 and 02:30 (stack on
#177, plain reboot with the ESP boot.bin, t6031-gpu=0).

Needed: a software-rendering fallback for the M3 Max (apple,t6031) in the session hook. The
case "no G15 render node" probably needs it as well as "render node present but not usable".
Nothing here was tested on the J514C or the t6034.

Activity

  1. malik-na commented on Oct 31, 2026

    @malik-na
    MemberAuthor

    Update: this should no longer happen on a normal boot, because of omacom/m1n1#19 (see #189).

    • Why: the 100 % CPU case needed a J516C boot where the GPU node stayed disabled. With the GPU handed over by default, a normal boot enables it.
    • Seen on another J516C: when MikeK's Mac refused the GPU firmware (G15: T6031 (M3 Max, J516C) GPU firmware TEXT not pinned: a third J516C build is refused #289), it ran on llvmpipe and he described the desktop as "very usable", with no Hyprland spin reported.
    • Not checked: I have not reproduced the no-render-node case on a current install, so a software-rendering fallback in mesa-m3-session-env may still be worth adding for it.

    I would close this unless someone reports Hyprland spinning on a current install.

  2. techgyani commented on Nov 3, 2026

    @techgyani

    Still happening on a T6034 (J514M), which m1n1#19 does not cover, so the GPU node stays disabled on a normal boot.

    • Mac: MacBook Pro 14-inch, M3 Max, 14 CPU cores; apple,j514m, apple,t6034
    • Build: Omarchy edge (omarchy-mac-installer 2.3.9, 2026-11-02), uname -r 7.2.11-14-1-ARCH,
      linux-aurora 7.2.11.aurora14-1, m1n1-aurora 1.6.1.aurora22-1 (stage 2 bc79acc4-dirty),
      mesa-aurora 1:26.3.0_devel.20261031.231483.a1969111475-1, hyprland 0.57.0-4
    • Firmware: asahi,os-fw-version: 14.7, asahi,system-fw-version: unknown
    • No /etc/m1n1.conf; GPU node apple,agx-t6034, status = "disabled"; no render node (/dev/dri has only card0, simpledrm)
    • Idle desktop, top -b -n 2 -d 3, second sample: Hyprland 413.6 %CPU
    • Hyprland log:
    ERR from aquamarine ]: CDRMRenderer(drm): Can't create renderer, no matching devices found
    ERR from aquamarine ]: drm: initMgpu: no renderer
    ERR from aquamarine ]: drm: Failed to initialize renderer state for /dev/dri/card0
    

    Frequency: every boot so far (one boot). Per-Mac report: #333.

  3. malik-na commented on Nov 3, 2026

    @malik-na
    MemberAuthor

    Thanks for the detailed report, this is useful.

    On the GPU node: omacom/m1n1#19 is merged, but it only enables the GPU and display handoff by default for the J516C (T6031). From my reading of m1n1's kboot_gpu.c and kboot_display_handoff.c, there is no handoff path for the J514M (T6034) at all, so the GPU node stays disabled on a normal boot there. That is a separate gap from #19, not something #19 left half-done. I haven't tested it on a J514M.

    Your log lines (initMgpu: no renderer, Failed to initialize renderer state for /dev/dri/card0) look like hyprwm/aquamarine#370, where the backend keeps retrying renderer creation when there is no render node. I haven't confirmed that this is what drives the CPU use on your Mac.

    Could you tell me how big the Hyprland log is and how often the initMgpu lines repeat? That would show whether the retry loop is what burns the CPU.

  4. techgyani commented on Nov 3, 2026

    @techgyani

    Log size: hyprland.log was 3,810,431 bytes after 2 min 13 s of uptime, and 12,963,191 bytes (82,220 lines) after 7 min 11 s. It grows by about 100–243 MiB per hour.

    How often initMgpu repeats: 29/s idle (30 s window), 71/s with the trackpad in use (60 s window), 43.5/s and 50/s in two other windows (10 s and 30 s). Each repeat writes these 6 lines (956 bytes):

    DEBUG from aquamarine ]: Supported EGL client extensions: (16) ...
    ERR from aquamarine ]: [EGL] Command eglQueryDeviceStringEXT errored out with EGL_BAD_PARAMETER (0x12300): eglQueryDeviceStringEXT   (x2)
    ERR from aquamarine ]: CDRMRenderer(drm): Can't create renderer, no matching devices found
    ERR from aquamarine ]: drm: initMgpu: no renderer
    ERR from aquamarine ]: drm: Failed to update renderer state for Unknown-1 on applyCommit
    
  5. malik-na commented on Nov 3, 2026

    @malik-na
    MemberAuthor

    Thanks, this is exactly the data I needed.

    The log block you posted looks like the Hyprland/aquamarine retry loop tracked upstream in hyprwm/aquamarine#425 (same issue family as #370): with no GPU render node, aquamarine tries to build a renderer on every commit, fails, and doesn't remember the failure, so it repeats and writes the same lines each time. It is still open there, and as far as I can see no fix is in aquamarine main or Hyprland 0.57.1 yet.

    Two things I have not shown yet:

    • That this loop is what causes the high CPU use. At 29-71 commits a second, Hyprland may simply be drawing frames in software, which could account for much of it. The log growth is certainly from this loop.
    • That your Mac uses the generic firmware framebuffer driver (simpledrm) with no render node. Could you run these and paste the output?
      • ls -l /dev/dri
      • readlink /sys/class/drm/card0/device/driver
      • pacman -Q aquamarine hyprland

    The underlying reason on your Mac is still the missing GPU and display handoff for the J514M (T6034) that I described above; that is a separate gap and not something this issue fixes.

  6. techgyani commented on Nov 4, 2026

    @techgyani
    • simpledrm, no render node
    $ ls -l /dev/dri
    total 0
    drwxr-xr-x  2 root root      60 Nov  3 11:57 by-path
    crw-rw----+ 1 root video 226, 0 Nov  3 21:47 card0
    $ readlink /sys/class/drm/card0/device/driver
    ../../../bus/platform/drivers/simple-framebuffer
    $ pacman -Q aquamarine hyprland
    aquamarine 0.16.0-1.1
    hyprland 0.57.0-4
    

    simple-framebuffer is the platform driver name, which simplefb uses as well. This shows the module behind it:

    $ readlink /sys/bus/platform/drivers/simple-framebuffer/module
    ../../../../module/simpledrm
    $ cat /proc/fb
    0 simpledrmdrmfb
    
    • That this loop is what causes the high CPU use.

    Per-thread CPU of Hyprland (pid 1239), from utime+stime deltas in /proc/1239/task/*/stat
    over 30 s, grouped by thread name. 100 % = one core. Two windows, same boot:

                                       window A (02:53:10Z)   window B (02:54:13Z)
    llvmpipe-0..13 (14 threads)              251.4 %                184.5 %
    Hyprland main thread                       8.1 %                  5.8 %
    other 18 threads                           0.1 %                  0.0 %
    whole process (/proc/1239/stat)          259.4 %                190.5 %
    "initMgpu: no renderer" lines/s            83.8                   49.1
    

    The main thread does all of the process's writes (/proc/1239/task/*/io: in a 10 s window its
    wchar delta is 585911 bytes, equal to the whole process; the log grew 498477 bytes). So the loop
    that writes those lines runs on a thread using 6-8 % of a core. Almost all of the CPU is in
    llvmpipe, the software renderer.

  7. malik-na commented on Nov 4, 2026

    @malik-na
    MemberAuthor

    Thanks for the per-thread numbers, that settles it: nearly all the CPU is llvmpipe (software rendering), and the repeating initMgpu lines are only the log growth.

    To see why the GPU stays off on this T6034, could you paste:

    • lsmod
    • dmesg filtered for the GPU and display probe, e.g. dmesg | grep -i -E 'agx|asahi|dcp|drm|simpledrm'

    I haven't been able to retest on a J514M. The lab Macs are offline right now, so this is from reading the code only.

    One safety note: at ~50 KB/s the log is roughly 100-240 MiB an hour. hyprland.log sits in $XDG_RUNTIME_DIR (tmpfs), so it eats RAM rather than disk, and a full tmpfs breaks other things (a VMware report in aquamarine#425 saw that). A workaround from that thread is a timer that truncates the log in place once it gets big (e.g. every few minutes); it only stops the growth, not the CPU use. I haven't tried it on an M3 myself.

  8. techgyani commented on Nov 6, 2026

    @techgyani

    Both from a fresh boot (captured ~2.5 min after boot, 2026-11-06T04:46Z). dmesg runs unprivileged here (kernel.dmesg_restrict = 0).

    dmesg | grep -i -E 'agx|asahi|dcp|drm|simpledrm' — these are all the matches:

    [    0.083613] [drm] Initialized simpledrm 1.0.0 for 108d2f82880.framebuffer on minor 0
    [    0.102723] simple-framebuffer 108d2f82880.framebuffer: [drm] fb0: simpledrmdrmfb frame buffer device
    [   29.404793] systemd[1]: Load Kernel Module drm skipped, unmet condition check ConditionKernelModuleLoaded=!drm
    

    Nothing matches agx, asahi or dcp; the kernel log has no line about the GPU or a display controller at all (also checked the full 851-line buffer for gpu|display|dptx|t603). Since the pattern can't show a node that is never probed, here is what the log doesn't say:

    $ tr '\0' ' ' < /proc/device-tree/soc/gpu@40a400000/compatible; echo
    apple,agx-t6034
    $ cat /proc/device-tree/soc/gpu@40a400000/status; echo
    disabled
    $ modinfo -n asahi; lsmod | grep -c -E 'asahi|appledrm'
    /lib/modules/7.2.11-14-1-ARCH/kernel/drivers/gpu/drm/asahi/asahi.ko
    0
    $ grep -rl -a --include=compatible dcp /proc/device-tree | wc -l
    0
    

    So: the asahi module is in the module tree but not loaded, the GPU node is status = "disabled", and there is no node in the live device tree whose compatible contains dcp. The only display node is chosen/framebuffer@108d2f82880 (apple,simple-framebuffer), which is what simpledrm bound to.

    lsmod (133 lines; simpledrm is built in, so it does not appear):

    lsmod
    Module                  Size  Used by
    exfat                 114688  2
    xt_connmark            49152  6
    xt_MASQUERADE          65536  2
    xt_mark                49152  2
    nft_chain_nat          49152  2
    nf_nat                 98304  2 nft_chain_nat,xt_MASQUERADE
    uas                    65536  4
    usb_storage           131072  1 uas
    des_generic            49152  0
    libdes                 49152  1 des_generic
    md4                    49152  0
    brcmfmac_wcc           49152  0
    rfcomm                131072  4
    snd_seq_dummy          65536  0
    snd_hrtimer            65536  1
    snd_seq               114688  7 snd_seq_dummy
    snd_seq_device         49152  1 snd_seq
    tun                    98304  2
    xhci_plat_hcd          65536  0
    xhci_hcd              393216  1 xhci_plat_hcd
    bnep                   65536  2
    brcmfmac              327680  1 brcmfmac_wcc
    brcmutil               49152  1 brcmfmac
    apple_avd             147456  0
    v4l2_vp9               65536  1 apple_avd
    cfg80211             1310720  1 brcmfmac
    v4l2_h264              65536  1 apple_avd
    videobuf2_dma_contig    65536  1 apple_avd
    apple_isp             114688  0
    v4l2_mem2mem           65536  1 apple_avd
    videobuf2_v4l2         49152  3 apple_avd,v4l2_mem2mem,apple_isp
    snd_soc_macaudio       65536  6
    dwc3_apple             49152  3
    spi_nor               196608  0
    snd_soc_cs42l84        65536  1
    dwc3                  196608  1 dwc3_apple
    snd_soc_tas2764        49152  6
    videodev              344064  4 videobuf2_v4l2,apple_avd,v4l2_mem2mem,apple_isp
    videobuf2_dma_sg       49152  1 apple_isp
    udc_core              131072  1 dwc3
    apple_nvmem_spmi       49152  5
    videobuf2_memops       65536  2 videobuf2_dma_contig,videobuf2_dma_sg
    regmap_spmi            49152  1 apple_nvmem_spmi
    videobuf2_common       98304  7 videobuf2_dma_contig,videobuf2_v4l2,apple_avd,videobuf2_dma_sg,v4l2_mem2mem,apple_isp,videobuf2_memops
    gpio_shared_proxy      65536  6
    snd_soc_apple_mca      49152  1
    mc                    114688  6 videodev,videobuf2_v4l2,apple_avd,videobuf2_common,v4l2_mem2mem,apple_isp
    macsmc_reboot          49152  0
    snd_soc_aop            49152  3
    pwm_apple              49152  1
    macsmc_hwmon           65536  0
    macsmc_input           49152  0
    macsmc_power           49152  0
    aop_las                49152  0
    apple_admac            65536  4
    ofpart                 65536  0
    apple_soc_cpufreq      65536  0
    phram                  49152  0
    joydev                 65536  0
    ip6t_REJECT            49152  1
    nf_reject_ipv6         65536  1 ip6t_REJECT
    xt_hl                  49152  22
    ip6t_rt                65536  3
    ipt_REJECT             49152  1
    xt_LOG                 65536  12
    nf_log_syslog          49152  12
    nft_limit              49152  15
    xt_limit               49152  0
    xt_addrtype            49152  4
    xt_conntrack           49152  28
    nf_conntrack          196608  4 xt_conntrack,nf_nat,xt_connmark,xt_MASQUERADE
    nf_defrag_ipv6         65536  1 nf_conntrack
    nf_defrag_ipv4         49152  1 nf_conntrack
    nft_compat             49152  141
    nf_tables             294912  815 nft_compat,nft_chain_nat,nft_limit
    tcp_bbr                49152  66
    sch_fq                 49152  3
    i2c_dev                65536  0
    crypto_user            49152  0
    fuse                  245760  5
    zstd                   49152  0
    zram                   81920  1
    842_decompress         65536  1 zram
    842_compress           65536  1 zram
    lz4hc_compress         49152  1 zram
    lz4_compress           49152  1 zram
    btrfs                1966080  1
    xor                    49152  1 btrfs
    raid6_pq              114688  1 btrfs
    dm_crypt               81920  1
    sdhci_pci             114688  0
    cqhci                  65536  1 sdhci_pci
    sdhci_uhs2             65536  1 sdhci_pci
    sdhci                 131072  2 sdhci_uhs2,sdhci_pci
    mmc_core              245760  4 sdhci_uhs2,sdhci,cqhci,sdhci_pci
    aop_als                49152  0
    uhid                   49152  2
    hidp                   65536  0
    hci_bcm4377            81920  0
    bluetooth              950272  31 hidp,hci_bcm4377,bnep,rfcomm
    aop                    81920  0
    ecdh_generic           49152  2 bluetooth
    ecc                    65536  1 ecdh_generic
    rfkill                 49152  5 bluetooth,cfg80211
    rtc_macsmc             49152  0
    gpio_macsmc            49152  3
    sn201202x              49152  0
    tps6598x_core         212992  1 sn201202x
    nvme_apple             81920  3
    phy_apple_atc          212992  31
    i2c_pasemi_platform    49152  0
    macsmc                 49152  6 macsmc_reboot,gpio_macsmc,macsmc_input,macsmc_hwmon,macsmc_power,rtc_macsmc
    apple_sart             65536  1 nvme_apple
    i2c_pasemi_core        65536  1 i2c_pasemi_platform
    mfd_core               49152  1 macsmc
    pinctrl_apple_gpio     49152  5
    spmi_apple_controller    49152  0
    clk_apple_nco          49152  4
    thunderbolt_apple      81920  3
    thunderbolt           458752  1 thunderbolt_apple
    dockchannel_hid        65536  0
    spi_hid_apple_of       49152  0
    apple_pmp              49152  0
    typec                 131072  3 phy_apple_atc,thunderbolt_apple,tps6598x_core
    apple_rtkit_helper     49152  0
    hid_magicmouse         65536  0
    usbhid                114688  0
    spi_hid_apple          65536  1 spi_hid_apple_of
    spi_apple              65536  0
    apple_dockchannel      49152  1 dockchannel_hid
    hid_apple_mtp_haptic    49152  1 hid_magicmouse
    hid_apple              65536  0
    
  9. techgyani commented on Nov 8, 2026

    @techgyani

    Follow-up: with the GPU running (unreleased test build: kernel from #408, Mesa from omacom/mesa#33, m1n1 from omacom/m1n1#32), Hyprland on this J514M idles at 7-10 % of one core instead of 190-731 %, renders on Apple M3 Max (G15C B1), and logs no initMgpu lines. Results: #333 (comment)

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions