Fix MacBook Pro Touch Bar flickering with Automator

MacBook Pro Flickering TouchBar Issue (Poss. Fix)


Poss. TouchBar Flickering Fix using Automator:


1.) Open automator.app using Spotlight (press ⌘ + spacebar and type automator.app, press return)

2.) Select Application, press choose

3.) In search bar, type shell

4.) Double click on Run Shell Script

5.) Set the following settings: Shell: /bin/bash ; Pass input: as arguments

6.) Paste the following script in the box/cell below:

if pgrep TouchBarServer >/dev/null; then
    pkill TouchBarServer
    pkill ControlStrip
    afplay /System/Library/Sounds/Pop.aiff
    osascript -e 'display dialog "Touch Bar Disabled" buttons {"OK"} giving up after 2'
else
    open /System/Library/CoreServices/TouchBarServer.app
    afplay /System/Library/Sounds/Glass.aiff
    osascript -e 'display dialog "Touch Bar Enabled" buttons {"OK"} giving up after 2'
fi

7.) Click on File dropdown menu, Click Save and Save as: Touch Bar Switch.app, Where: Applications


8.) press ⌘ + spacebar and type Touch Bar Switch.app, press return


Touch Bar Switch application will now run the script. This script acts as a simple toggle for the macOS Touch Bar. It first checks whether the system process that controls the Touch Bar (TouchBarServer) is currently running. If it is running, the script stops the Touch Bar by terminating both the TouchBarServer and ControlStrip processes, effectively disabling the Touch Bar, and then displays a notification confirming that it has been turned off. If the Touch Bar is not running, the script restarts it by launching the built-in TouchBarServer.app and shows a notification indicating that the Touch Bar has been enabled. In short, running the script once turns the Touch Bar off, and running it again turns it back on.


Hope this helps.


Disclaimer: This script toggles the macOS Touch Bar by stopping and restarting built-in system processes (TouchBarServer and ControlStrip). It does not modify system files or permanently disable the Touch Bar, and any changes last only for the current user session. On newer versions of macOS, visual notifications may not appear when the script is run via Automator due to system restrictions; however, the script may still function correctly. Apple system updates, sleep, logout, or reboot may automatically restart the Touch Bar. Use this script at your own discretion, and note that behavior may vary depending on macOS version and hardware.



MacBook Pro 13″

Posted on Jan 3, 2026 3:51 AM

Reply
3 replies

Jan 3, 2026 7:21 AM in response to hyejin129

Killing the TouchBarServer is a short term solution for a Hardware problem with the TouchBar. With the parent of both the TouchBarServer and ControlStrip being the launchd process, they will both be restarted automatically not just from a reboot or sleep. You can confirm this with Activity Monitor. The problem with your TouchBar is just likely going to get worse causing Kernel Panics on your computer.


I do think it is great that you have found something that works for you at this moment, but killing those processes has already been tried by others and at some point service would be required. Unfortunately the Touch Bar has been a weak point on the MacBooks and likely the reason why it was phased out in 2023. I say unfortunately because it is something I like and use it on one of my computers, but when it fails it brings down your entire computer.

Jan 3, 2026 9:13 AM in response to hyejin129

You do not state what exact Mac is this... Intel or the M-series....


Seems like you have an ongoing issue


for Intel—

do both resetting the System Management Controller Reset the SMC of your Mac - Apple Support

resetting NVRAM/PRAM Reset NVRAM on your Mac - Apple Support



for M-series

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

Login and test. Reboot as normal and test. Caches get rebuilt automatically.




love my Touchbar use it ALL the time on MBP 16" Intel, Never used the F keys— I sure hope they bring it back.

Jan 3, 2026 7:49 PM in response to hyejin129

hyejin129 wrote:

if pgrep TouchBarServer >/dev/null; then

Is this line being rendered correctly here? It doesn't look correct to me.


FYI, the Apple forums has been having a ton of issues this past week or so including incorrectly rendering certain text combinations & turning them into html code renderings. If you pasted that code into the main text window in the forum's editing window, then hightlighted the text to include it in a Code block using "</>", then that is likely what caused the problem. I find there are fewer problems by first clicking on the "Code Insertion" icon & pasting the text into the code block field as it lessens the chance of text being incorrectly interpreted, but who knows when the forum has so many issues right now.


If that line is incorrect, then you may want to post it again by pasting it directly into a code block.

Fix MacBook Pro Touch Bar flickering with Automator

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