Wallpaper becomes black when swiping between applications running in full-screen

Hello to the Apple Support community,

I have recently updated to the macOS Tahoe (26.0 official release). I noticed that when switching between full-screen apps and the desktop, the wallpaper becomes black during the transition. Here is how it happens:

  1. Swipe up with three fingers.
  2. Swipe left or right with three fingers.
  3. During this process, the background wallpaper becomes pure black until the action is finished.

I have never encountered this in previous versions of MacOS.

Does anyone have the same issue?

I am using a M4 MacBook Pro.


Thanks!

Yingyu

MacBook Pro 14″, macOS 26.0

Posted on Sep 15, 2025 5:55 PM

Reply
Question marked as Top-ranking reply

Posted on May 27, 2026 2:11 PM

upd#2:

After spending a full day testing every possible approach, here's my findings and what actually works.


The problem


Black screen flash when exiting fullscreen apps on macOS Tahoe. Triggered by dynamic wallpapers + Reduce Motion enabled. Disabling dynamic wallpapers fixes the black screen — but then you lose the rotating wallpaper experience.


What I tried (and why it failed)


1. launchd + osascript (System Events)

Script ran, log was written, but wallpaper never changed visually.

Reason: FSFindFolder error -43 — System Events can't access GUI context from a background process.

2. cron + osascript (Finder)

Worked manually, but not on schedule.

Reason: cron on macOS Tahoe throws Could not switch to audit session: Operation not permitted — Apple blocks audit session switching for background processes.

3. launchd + osascript (Finder)

Same issue as above.

4. defaults write com.apple.desktop

Wallpaper was written to the plist correctly, but macOS Tahoe ignores com.apple.desktop — it now uses the com.apple.wallpaper store.

5. cron + Swift (NSWorkspace.setDesktopImageURL)

Worked manually, unstable on schedule — same audit session problem.

6. launchd + Swift + SessionCreate

Partially worked — sometimes SkyLight got a proper GUI session, sometimes not. Completely unpredictable.



What actually works: Hammerspoon


After all the above failed, I switched to Hammerspoon — a free, open-source macOS automation tool. It runs as a proper GUI app in the menu bar, always in the correct audit session, so it has no permission issues whatsoever.


Install:




bash

brew install --cask hammerspoon

Config (~/.hammerspoon/init.lua):




lua

local wallpaperDir = "/Users/YOUR_USERNAME/Pictures/wallpapers"

local function setRandomWallpaper()
    local files = {}
    local handle = io.popen('find "' .. wallpaperDir .. '" -maxdepth 1 -type f \\( -iname "*.jpg" -o -iname "*.jpeg" -o -iname "*.png" -o -iname "*.heic" \\)')
    for file in handle:lines() do
        table.insert(files, file)
    end
    handle:close()

    if #files == 0 then return end

    local randomFile = files[math.random(#files)]
    for _, screen in ipairs(hs.screen.allScreens()) do
        screen:desktopImageURL("file://" .. randomFile)
    end
    print("Wallpaper set: " .. randomFile)
end

-- Set wallpaper immediately on launch
setRandomWallpaper()

-- Then every 15 minutes
hs.timer.doEvery(900, setRandomWallpaper)

Replace YOUR_USERNAME with your actual username (check with whoami in Terminal).


After saving the config, click Reload Config in the Hammerspoon menu bar icon.


Add Hammerspoon to System Settings → General → Login Items so it starts automatically on boot.


The root cause of why all shell-based approaches fail is Could not switch to audit session: Operation not permitted — macOS Tahoe intentionally blocks background processes from accessing the display session. Hammerspoon bypasses this because it's a proper GUI application.


Hopefully Apple fixes the original black screen bug so none of this is necessary 🙃

41 replies
Question marked as Top-ranking reply

May 27, 2026 2:11 PM in response to kramola

upd#2:

After spending a full day testing every possible approach, here's my findings and what actually works.


The problem


Black screen flash when exiting fullscreen apps on macOS Tahoe. Triggered by dynamic wallpapers + Reduce Motion enabled. Disabling dynamic wallpapers fixes the black screen — but then you lose the rotating wallpaper experience.


What I tried (and why it failed)


1. launchd + osascript (System Events)

Script ran, log was written, but wallpaper never changed visually.

Reason: FSFindFolder error -43 — System Events can't access GUI context from a background process.

2. cron + osascript (Finder)

Worked manually, but not on schedule.

Reason: cron on macOS Tahoe throws Could not switch to audit session: Operation not permitted — Apple blocks audit session switching for background processes.

3. launchd + osascript (Finder)

Same issue as above.

4. defaults write com.apple.desktop

Wallpaper was written to the plist correctly, but macOS Tahoe ignores com.apple.desktop — it now uses the com.apple.wallpaper store.

5. cron + Swift (NSWorkspace.setDesktopImageURL)

Worked manually, unstable on schedule — same audit session problem.

6. launchd + Swift + SessionCreate

Partially worked — sometimes SkyLight got a proper GUI session, sometimes not. Completely unpredictable.



What actually works: Hammerspoon


After all the above failed, I switched to Hammerspoon — a free, open-source macOS automation tool. It runs as a proper GUI app in the menu bar, always in the correct audit session, so it has no permission issues whatsoever.


Install:




bash

brew install --cask hammerspoon

Config (~/.hammerspoon/init.lua):




lua

local wallpaperDir = "/Users/YOUR_USERNAME/Pictures/wallpapers"

local function setRandomWallpaper()
    local files = {}
    local handle = io.popen('find "' .. wallpaperDir .. '" -maxdepth 1 -type f \\( -iname "*.jpg" -o -iname "*.jpeg" -o -iname "*.png" -o -iname "*.heic" \\)')
    for file in handle:lines() do
        table.insert(files, file)
    end
    handle:close()

    if #files == 0 then return end

    local randomFile = files[math.random(#files)]
    for _, screen in ipairs(hs.screen.allScreens()) do
        screen:desktopImageURL("file://" .. randomFile)
    end
    print("Wallpaper set: " .. randomFile)
end

-- Set wallpaper immediately on launch
setRandomWallpaper()

-- Then every 15 minutes
hs.timer.doEvery(900, setRandomWallpaper)

Replace YOUR_USERNAME with your actual username (check with whoami in Terminal).


After saving the config, click Reload Config in the Hammerspoon menu bar icon.


Add Hammerspoon to System Settings → General → Login Items so it starts automatically on boot.


The root cause of why all shell-based approaches fail is Could not switch to audit session: Operation not permitted — macOS Tahoe intentionally blocks background processes from accessing the display session. Hammerspoon bypasses this because it's a proper GUI application.


Hopefully Apple fixes the original black screen bug so none of this is necessary 🙃

May 28, 2026 8:38 AM in response to kramola

Day 2

Hello, dear diary. Forget everything I wrote yesterday about scripts.

I've been chasing this bug for a while — black screen for ~1 second when returning from a fullscreen app to the desktop, with Reduce Motion enabled and wallpaper rotation active.

Wat I found after digging into the WallpaperAgent binary, what I think is actually happening:


WallpaperAgent doesn't render wallpapers directly to the compositor. It uses a separate process — WallpaperImageExtension — which renders the image into a pluginLayer via an OffscreenWindow. A LayerMultiplexer manages these layers per space/display.


Here's the key part: WallpaperAgent has a fallback called errorLayer (visible in the binary symbols:

$__lazy_storage_$_errorLayer). When the pluginLayer from WallpaperImageExtension becomes stale or invalid,

LayerMultiplexer falls back to errorLayer — which is black. WallpaperImageExtension then re-renders and the wallpaper reappears after ~1 second.

With Reduce Motion off, the fullscreen exit animation is ~0.5s, which is long enough to hide this re-render. With Reduce Motion on, the transition is instant — so you see the black flash.


The pluginLayer seems to degrade after sleep (WallpaperImageExtension loses its rendering context during display teardown) and also randomly over time — the binary has a log line: "Marking shared wallpaper as inactive. Will be purged in next resolution." which suggests WallpaperAgent prematurely invalidates the layer under certain conditions.


My workaround:


I'm using Hammerspoon to:

1. After wake from sleep — kill WallpaperImageExtension (it auto-restarts in ~1s with a fresh rendering context), then set

a new wallpaper

2. Every 2 hours — same thing preventively, for the non-sleep degradation case

3. Every 15 minutes — rotate wallpaper via Finder AppleScript (which properly goes through WallpaperAgent and keeps the

layer active)


Killing just WallpaperImageExtension rather than the whole WallpaperAgent is more surgical — the agent itself stays running, only the renderer restarts. This seems to be a bug in WallpaperAgent introduced in Sequoia/Tahoe. Apple hasn't addressed it yet as far as I can tell. Hope this helps someone and I'll continue to follow

Mar 11, 2026 6:53 AM in response to jorenvds

When I turn on Reduce Motion, I cannot replicate the 'black screen' when swiping between desktops or full screen apps. What I see is a smooth crossfade between the full screen windows that includes the background wallpaper for one of them. For example, with this window and a google homepage both open as full screen, the transition is a mashup of the two browser windows and one of my wallpapers (Mittlere Brücke in Basel, Switzerland).


May 27, 2026 3:27 AM in response to jorenvds

I'm tired of waiting for a solution from Apple for several years now, and several major OS releases have already taken place, but the annoying bug hasn't been fixed.

I want dynamic wallpapers and to disable animations to speed up the OS. Why does the standard functionality in my own OS conflict with each other?!


Well then let's fix it ourselves.


**The idea:** replace system dynamic wallpapers with a simple launchd script that

rotates static wallpapers on a schedule. Zero conflict with the system, zero CPU load.


> ⚠️ Key discovery: use `Finder` to set the wallpaper, NOT `System Events` —

> System Events silently fails to update the wallpaper visually in macOS Tahoe.


---


## Step 1 — Create the script


```bash

mkdir -p ~/Scripts


cat > ~/Scripts/wallpaper.sh << 'SCRIPT'

#!/bin/bash


WALLPAPERS_DIR="$HOME/Pictures/wallpapers" # put your folder here


IMAGES=()

while IFS= read -r -d '' file; do

IMAGES+=("$file")

done < <(find "$WALLPAPERS_DIR" -maxdepth 1 -type f \( -iname "*.jpg" -o -iname "*.jpeg" -o -iname "*.png" -o -iname "*.heic" \) -print0)


COUNT=${#IMAGES[@]}


if [ "$COUNT" -eq 0 ]; then

echo "$(date): No images found in $WALLPAPERS_DIR" >> /tmp/wallpaper-changer.log

exit 1

fi


RANDOM_IMG="${IMAGES[$RANDOM % $COUNT]}"


osascript -e "tell application \"Finder\" to set desktop picture to POSIX file \"$RANDOM_IMG\""


echo "$(date): Set → $RANDOM_IMG" >> /tmp/wallpaper-changer.log

SCRIPT


chmod +x ~/Scripts/wallpaper.sh

```


## Step 2 — Create the launchd agent (autostart + schedule)


```bash

cat > ~/Library/LaunchAgents/com.wallpaper.changer.plist << 'EOF'

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">

<plist version="1.0">

<dict>

<key>Label</key>

<string>com.wallpaper.changer</string>

<key>ProgramArguments</key>

<array>

<string>/bin/bash</string>

<string>/Users/YOUR_USERNAME/Scripts/wallpaper.sh</string>

</array>

<key>StartInterval</key>

<integer>900</integer>

<key>RunAtLoad</key>

<true/>

<key>StandardOutPath</key>

<string>/tmp/wallpaper-changer.log</string>

<key>StandardErrorPath</key>

<string>/tmp/wallpaper-changer.log</string>

</dict>

</plist>

EOF

```


Replace `YOUR_USERNAME` with your actual username (check with: `whoami`)


## Step 3 — Activate


```bash

launchctl load ~/Library/LaunchAgents/com.wallpaper.changer.plist

```


## Verify it works


```bash

# Is the agent running?

launchctl list | grep wallpaper


# Wallpaper change log

cat /tmp/wallpaper-changer.log

```


---


## Settings


| What to change | Where |

|---|---|

| Wallpapers folder | `WALLPAPERS_DIR` in wallpaper.sh |

| Change interval | `StartInterval` in plist (seconds: 900 = 15 min) |


## Stop / remove


```bash

launchctl unload ~/Library/LaunchAgents/com.wallpaper.changer.plist

rm ~/Library/LaunchAgents/com.wallpaper.changer.plist

rm ~/Scripts/wallpaper.sh

```


---

Tested on macOS Tahoe 26.


Apple, you should be ashamed!



Sep 15, 2025 6:01 PM in response to yingyu209

yingyu209 wrote:

1. Hello to the Apple Support community,
I have recently updated to the macOS Tahoe (26.0 official release). I noticed that when switching between full-screen apps and the desktop, the wallpaper becomes black during the transition. Here is how it happens:
Swipe up with three fingers.
2. Swipe left or right with three fingers.
3. During this process, the background wallpaper becomes pure black until the action is finished.
I have never encountered this in previous versions of MacOS.
Does anyone have the same issue?
I am using a M4 MacBook Pro.

Thanks!
Yingyu


I have seen these types of glitches before...


Have you shut down and restarted more than once since your Upgrade(?)


—SafeBoot Start up your Mac in safe mode - Apple Support will sort many anomalies

Login and test. Reboot as normal and test.


— You can try Turning that FileVault off and compare your results



May 27, 2026 3:51 AM in response to kramola

upd: instead launchd use cron



Two key findings from testing:

- Use `Finder` to set the wallpaper, NOT `System Events` — System Events silently fails to update the wallpaper visually in macOS Tahoe

- Use `cron` for scheduling, NOT `launchd` — launchd runs without GUI context and Finder becomes unavailable


---


## Step 1 — Create the script


```bash

mkdir -p ~/Scripts


cat > ~/Scripts/wallpaper.sh << 'EOF'

#!/bin/bash


WALLPAPERS_DIR="$HOME/Pictures/wallpapers" # put your folder here


IMAGES=()

while IFS= read -r -d '' file; do

IMAGES+=("$file")

done < <(find "$WALLPAPERS_DIR" -maxdepth 1 -type f \( -iname "*.jpg" -o -iname "*.jpeg" -o -iname "*.png" -o -iname "*.heic" \) -print0)


COUNT=${#IMAGES[@]}


if [ "$COUNT" -eq 0 ]; then

echo "$(date): No images found" >> /tmp/wallpaper-changer.log

exit 1

fi


RANDOM_IMG="${IMAGES[$RANDOM % $COUNT]}"


osascript -e "tell application \"Finder\" to set desktop picture to POSIX file \"$RANDOM_IMG\""


echo "$(date): Set → $RANDOM_IMG" >> /tmp/wallpaper-changer.log

EOF


chmod +x ~/Scripts/wallpaper.sh

```


## Step 2 — Add to cron


```bash

crontab -e

```


Add this line (changes wallpaper every 15 minutes):


```

*/15 * * * * /bin/bash /Users/YOUR_USERNAME/Scripts/wallpaper.sh

```


Replace `YOUR_USERNAME` with your actual username (check with: `whoami`)


Save and exit — in vim: `:wq`, in nano: `Ctrl+O` then `Ctrl+X`


## Step 3 — Test it works


Run the script manually first:


```bash

bash ~/Scripts/wallpaper.sh

```


Wallpaper should change immediately. Then check the log:


```bash

cat /tmp/wallpaper-changer.log

```


---


## Settings


| What to change | Where |

|---|---|

| Wallpapers folder | `WALLPAPERS_DIR` in wallpaper.sh |

| Change interval | crontab schedule (`*/15` = every 15 min, `*/30` = every 30 min) |


## Stop / remove


```bash

crontab -e # delete the wallpaper line

rm ~/Scripts/wallpaper.sh

```


---

Sep 15, 2025 6:25 PM in response to ozbrk

You can try changing the wallpaper and compare your results...



no insight or resolve—


To be proactive you can file a bug report / submit your Apple Feedback here: Product Feedback - Apple



Call Customer Support (800) MY–APPLE (800–692–7753)

or on line https://getsupport.apple.com/

or call AppleCare Support at 1-800-APLCARE (800-275-2273)


Outside the USA—Contact Apple for support and service by phone

See a list of Apple phone numbers around the world.

Contact Apple Support - Apple Support



Sep 19, 2025 4:22 AM in response to yingyu209

I’m experiencing the same issue on my MacBook Pro (M3 Pro) running macOS Tahoe 26.0 as well. When switching between full-screen apps or desktops using Mission Control gestures, the wallpaper goes completely black during the transition and then returns once the animation finishes.


This behavior didn’t occur for me on previous macOS versions either, so it seems like it might be a new bug introduced in 26.0. Hopefully Apple will address it in an upcoming update.

Wallpaper becomes black when swiping between applications running in full-screen

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.