You could spell out the problem & your fix!
Window 11 taskbar auto-hide turning off
I switched to Windows 11 a few weeks ago, and ever since then, the taskbar auto-hide quits working when the computer comes out of Sleep mode. I have to be away from the computer for a while before it will happen, and I believe it has something to do with me running dual monitors. When I wake my computer, my secondary monitor appears to come up faster than my primary by just a fraction. Once my primary is on, there is a message saying something about the taskbar already being hidden (I think) and the taskbar on my primary monitor has the taskbar up. When I go to Taskbar Behaviors, 'Automatically hide the taskbar' is no longer checked. I'll select it again, and it will work fine until the system goes back into Sleep mode for a while, again.
Windows for home | Windows 11 | Settings
Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.
430 answers
Sort by: Most helpful
-
Anonymous
2023-03-16T08:55:26+00:00 -
Anonymous
2023-03-16T02:39:55+00:00 I had recently replied to this issue but didn't realize it was for dual monitors I don't use dual monitors. I was having issues with my taskbar disappearing when I went on to another account on the same laptop, but I have since resolved my problem. Sorry couldn't be of more help.
-
Anonymous
2023-03-15T21:41:14+00:00 Well now it stays checked while ignoring hiding the taskbar so I supposed that it progress to MS. 🤣🤣🤣
-
Anonymous
2023-03-15T18:22:39+00:00 I have been avoiding upgrading to Windows 11 until now to avoid bugs, but I did so around a month ago and have been plagued by this issue ever since. I normally use a dual monitor setup and the auto-hide setting unchecks itself after wake-up if the last time I used my laptop was when connected to the monitors. How is this still an issue over a year later?
-
Anonymous
2023-03-10T23:33:47+00:00 I've found a workaround for my issue, which is similar -- the taskbar randomly unhides, and won't re-hide, and/or doesn't autohide after a reboot -- so I thought I'd share what I've found in case it helps anyone else. My symptoms when it won't autohide are that the Settings still has Autohide checked; but unchecking and re-checking has no effect. I have three monitors, and it's the same behavior on all.
I have noticed that one way to definitely cause it to unhide-and-never-rehide is when a (firefox) browser window pops up an alert about logging me out of some web site in like 60 seconds if I don't click to continue -- were said alert causes the taskbar to unhide -- AND if I don't notice that alert and dismiss it, after some number of minutes the unhide becomes permanent; even if I come back a while later and dismiss the browser alert. Closing the window with the alert will also lead to not re-hiding, as will killing/restarting firefox. The Settings is still set to autohide, but it's as if some flag in the windows OS/explorer or firefox code to re-hide never gets reset, or times out. So: that's one way to cause the behavior; maybe someone at MSFT or Mozilla can find&fix that bug.
My workaround when the taskbar gets stuck unhidden is first to restart the main Windows Explorer task, as others have noted (either manually via Task Manager [find the task & right click Restart], or via a script [see below]). However, this apparently now won't show the clock and other icons in the taskbar's right hand side when it pops up -- it's just blank -- so my second step is to go to Settings and turn autohide off then on again.
It happens to me a lot and I hate doing things manually, so being a computer science professor sort, I wrote a bat+cygwin script + C app to do it for me; I just have to click my app and poof! back in business.
For those who might want the same (and are comfortable with using/installing Cygwin and gcc -- this won't work without those), here's the code, followed by some explanation of what's going on:
========================= rehide.bat ================
@echo off
rem kill the main explorer task
for /f "tokens=2,10" %%p in ('tasklist /nh /v /fi "imagename eq explorer.exe"') do if "%%q"=="N/A" taskkill /f /pid %%p
rem give it a second to be really gone
sleep 1rem restart explorer.exe -- however, just calling explorer.exe here sometimes starts an explorer folder window, not the main app/taskbar, so I'm using cygwin's "run" command to start the real thing
run explorer.exe
rem now fix the taskbar so it shows the right hand side stuff, by turning autohide off then on again using my C code
sleep 1
c:\path\to\where\you\put\it\autohide.exe -
sleep 1
c:\path\to\where\you\put\it\autohide.exe +=========================
========================= autohide.c ================
/*
* usage: autohide [ +|-|! ]
* + turn on autohide
* - turn off autohide
* ! toggle autohide (default; actually anything other than + or - will toggle)
*/#include <windows.h>
#include <shellapi.h>// This isn't defined for me for some reason.
#ifndef ABM_SETSTATE
#define ABM_SETSTATE 0x0000000A
#endif#define HIDE_ON '+'
#define HIDE_OFF '-'int main(int argc, char *argv[]) {
APPBARDATA abd = {sizeof abd};
UINT uState = (UINT) SHAppBarMessage(ABM_GETSTATE, &abd);LPARAM on\_top\_state = uState & ABS\_ALWAYSONTOP; LPARAM autohide\_state = uState & ABS\_AUTOHIDE; if (argc > 1 && argv[1][0] == HIDE\_ON) autohide\_state = ABS\_AUTOHIDE; else if (argc > 1 && argv[1][0] == HIDE\_OFF) autohide\_state = 0; else autohide\_state = ~autohide\_state & ABS\_AUTOHIDE; abd.lParam = on\_top\_state | autohide\_state; SHAppBarMessage(ABM\_SETSTATE, &abd); return 0;}
=========================
You would put the autohide.c file in some folder of your choice (i.e. c:\path\to\where\you\put\it\ in the rehide.bat script above) then run cygwin's C compiler to create the autohide.exe app that you need; e.g.
gcc autohide.c -o autohide.exe
and edit the .bat file to put in your chosen c:\path\to\where\you\put\it\ path.
The .bat script is somewhat complex since it has to restart just the main Explorer task, not close all your open folder windows. The taskbar is part of the same Explorer app that provides the folder stuff. That task has an image name of N/A from 'tasklist', so you need to loop on all explorer tasks and kill just that one. Thankfully I found this clever code on someone else's post about how to kill just the main explorer task. Likewise, I adapted the C code I found on another post about controlling autohide from C code. You also have to make use of cygwin's "run" command to start Explorer again as a main task, rather than the showing-folders behavior. (As an aside, if a manual right-click-Restart didn't work right and you're stuck without explorer running at all, you can restart explorer manually via ctrl-alt-del, task manager / File / Run new task, "Explorer". Helpful tip.) :)
So -- hopefully someone in MSFT can figure out why the autohide stops hiding and fix it; and maybe this solution will help someone else in the meantime.
Cheers!