Full screen black flashes on M1 iMac after recent update

Hi all!

After a recent update (within the last week) I’ve started to get fullscreen black flashes that correspond with large graphics updates, e.g. scrolling in Firefox, maximising Konsole, switching between windows, large amounts of Konsole output. They seem to be only a handful of frames but cover the whole display including the KDE menu bar etc.

I’m using KDE on Asahi Fedora 40 on an M1 iMac. The problem occurs with or without an ICC profile for the display configured.

Interestingly it seems to be random whether a given “boot” will have the black flashing problem. Rebooting a few times seems to fix it, and then rebooting again sometimes it’ll come back again.

Is this a known issue? Anytihng I can grab to help troubleshoot? I see nothing relevant in journalctl output or dmesg.

Edit: also to mention I’m running 200% scaling and have blur disabled in kwin to avoid graphical artefacts.

A quick update on this: still happening as of the latest kernel and kwin updates.

Just for confirmation, does it still happens with mesa-dri-drivers-24.2.0~asahipre20240725-1 and kernel-16k-6.9.9-403 or later?

I’ve just upgraded to these versions:

kernel-16k-6.9.12-400.asahi.fc40.aarch64
mesa-dri-drivers-24.2.0~asahipre20240727-1.fc40.aarch64

Will give it a few reboots over the next week and see if I can reproduce the issue.

Still seeing this issue every ~ second reboot, unfortunately. I’m now running:

kernel-16k.aarch64 6.9.12-400.asahi.fc40 @copr:copr.fedorainfracloud.org:group_asahi:kernel
mesa-dri-drivers.aarch64 24.2.0~asahipre20240727-1.fc40 @copr:copr.fedorainfracloud.org:group_asahi:mesa

Let me know if there’s anything further I can usefully do to troubleshoot. I just rebooted to update m1n1 today and landed on a boot where things are flashing.

If anything it might be worse now, I just had the display blank out entirely while looking at GitHub. It came back when I moved the mouse.

Hi Janne,

I’m now running:

kernel-16k.aarch64 6.10.6-401.asahi.fc40 @copr:copr.fedorainfracloud.org:group_asahi:kernel
mesa-dri-drivers.aarch64 24.2.0~asahipre20240727-1.fc40 @copr:copr.fedorainfracloud.org:group_asahi:mesa

And the problem is worse than ever - previously I’d get a usable boot approximately every second attempt, now it’s more like 1 in 5 or 6 boots works :frowning:

I tried a few other troubleshooting things like resetting all the Plasma settings / theme / effects etc to defaults, that didn’t help.

The only other thing I’m doing that might be graphics related that isn’t “stock” is I disabled the boot time splash screen as it was preventing me from entering my LUKS key.

Any other ideas?

No updates here, I still see occasionally a black flash, maybe second, not related to large graphics updates, usually 2-3 minutes after unlocking.

Can in a session where you experience black flashes make a full screen recording with spectacle and check whether the black flashes are in the recording as well?

For a boot with black flashes, can you try a different Compositor/Desktop Environment (say gnome) and test if the flashes reproduce there as well? I think this is more important if the flashes do not show in the recording.

Does the M1 in your imac has a 7 or 8 core GPU? Please attach the output of journalctl -k -g gpu.

Hi Janne,

The flashes don’t seem to show up in the recording, but spectacle seems to only record at a fairly low framerate. I haven’t been able to reproduce the problem in Sway, I might switch to that for a bit and see if it helps.

Seems to be eight cores:

Aug 05 12:00:00 samsa kernel: asahi 206400000.gpu: Probing…
Aug 05 12:00:00 samsa kernel: asahi 206400000.gpu: MMU: Initializing…
Aug 05 12:00:00 samsa kernel: asahi 206400000.gpu: MMU: Initializing kernel page table
Aug 05 12:00:00 samsa kernel: asahi 206400000.gpu: MMU: Creating kernel page tables
Aug 05 12:00:00 samsa kernel: asahi 206400000.gpu: MMU: Kernel page tables created
Aug 05 12:00:00 samsa kernel: asahi 206400000.gpu: MMU: Initializing TTBs
Aug 05 12:00:00 samsa kernel: asahi 206400000.gpu: MMU: initialized
Aug 05 12:00:00 samsa kernel: asahi 206400000.gpu: GPU ID registers: 0x4021100 0x40a04 0x30808 0x40404 0x1320300 0x101311
Aug 05 12:00:00 samsa kernel: asahi 206400000.gpu: Core masks: [
0xff,
0x0,
]
Aug 05 12:00:00 samsa kernel: asahi 206400000.gpu: GPU Information:
Aug 05 12:00:00 samsa kernel: asahi 206400000.gpu: Type: G13G
Aug 05 12:00:00 samsa kernel: asahi 206400000.gpu: Clusters: 1
Aug 05 12:00:00 samsa kernel: asahi 206400000.gpu: Cores: 8 (8)
Aug 05 12:00:00 samsa kernel: asahi 206400000.gpu: Frags: 8 (8)
Aug 05 12:00:00 samsa kernel: asahi 206400000.gpu: GPs: 4 (4)
Aug 05 12:00:00 samsa kernel: asahi 206400000.gpu: Core masks: [
0xff,
]
Aug 05 12:00:00 samsa kernel: asahi 206400000.gpu: Active cores: 8
Aug 05 12:00:00 samsa kernel: asahi 206400000.gpu: Getting configuration from device tree…
Aug 05 12:00:00 samsa kernel: asahi 206400000.gpu: Dynamic configuration fetched
Aug 05 12:00:00 samsa kernel: asahi 206400000.gpu: MMU: IO map: 0x204d00000:0x1c000 → 0xffffffaf00000000
Aug 05 12:00:00 samsa kernel: asahi 206400000.gpu: MMU: IO map: 0x20e100000:0x4000 → 0xffffffaf00020000
Aug 05 12:00:00 samsa kernel: asahi 206400000.gpu: MMU: IO map: 0x23b104000:0x4000 → 0xffffffaf00028000
Aug 05 12:00:00 samsa kernel: asahi 206400000.gpu: MMU: IO map: 0x204000000:0x20000 → 0xffffffaf00030000
Aug 05 12:00:00 samsa kernel: asahi 206400000.gpu: MMU: IO map: 0x23b2e8000:0x4000 → 0xffffffaf00054000
Aug 05 12:00:00 samsa kernel: asahi 206400000.gpu: MMU: IO map: 0x23bc00000:0x4000 → 0xffffffaf0005c000
Aug 05 12:00:00 samsa kernel: asahi 206400000.gpu: MMU: IO map: 0x204d80000:0x8000 → 0xffffffaf00064000
Aug 05 12:00:00 samsa kernel: asahi 206400000.gpu: MMU: IO map: 0x204d60000:0x4000 → 0xffffffaf00070000
Aug 05 12:00:00 samsa kernel: asahi 206400000.gpu: MMU: IO map: 0x200000000:0xd8000 → 0xffffffaf00078000
Aug 05 12:00:00 samsa kernel: asahi 206400000.gpu: MMU: IO map: 0x23b738000:0x4000 → 0xffffffaf00154000
Aug 05 12:00:00 samsa kernel: asahi 206400000.gpu: RTKit: Initializing (protocol version 12)
Aug 05 12:00:00 samsa kernel: [drm] Initialized asahi 0.0.0 20220831 for 206400000.gpu on minor 1
Aug 05 12:00:00 samsa kernel: asahi 206400000.gpu: Probed!

Thanks again!

After a sweek of using Sway I can’t reproduce the problem there.

Thanks, so it seems that this might be issue in kwin or mesa triggered by something kwin does. It might be still related to kwin’s black screen or panels issues with Color Profiles.
My black desktop flashes did not occur in the last 1-2 weeks but they were infrequent even that that doesn’t necessarily mean they are gone.

Thinking a bit more about this, it feels like it could be a double buffering / page flipping type issue? It seems like sometimes the display “lands” on a black frame and this remains until something causes another drawing event, e.g. the display remains blacked out until I move the mouse or the clock ticks over to the next minute. Other times the flashes are much more brief when they happen during e.g. an animation.

Hi Michael,

Indeed, I haven’t experienced this issue (I’m also using KDE and firefox).

What I can say regarding what is written in this thread :
my display scale is set to 160%.
I never used any color profile
my screen is always in nightcolors
journalctl -k -g gpu gives exactly the same output than you

Sorry not to be helpful…

1 Like

Good news. I’ve been away for a few weeks but after returning and upgrading to KDE 6.2 and these package versions:

kernel-16k.aarch64                                   6.11.0-400.asahi.fc40
mesa-dri-drivers.aarch64                             24.3.0~asahipre20241006-1.fc40

I can no longer reproduce this issue under KDE on my iMac, or at least it happens much less frequently. I’ll keep an eye on it for another week or so :slight_smile:

Unfortunately loading an ICC profile now causes the display to completely black out, but that’s a less pressing issue. I’ll open another thread about that.

Good to know. It is a little annoying that we don’t know the cause as it might be just a random thing and the issue could return on random changes.

Black popups, windows or screens with active Color management is a known issue also with unknown cause.