Blog

Software

AN.

Blog

The Xbox Game Bar Mystery

19 February 2024

The Xbox Game Bar is a Windows application that essentially brings a games console-like UI to the PC. Its functionality includes a screen recorder (very handy), resource monitoring and a chat widget. You can open it by holding the Windows flag key and pressing G, or using the centre button of an Xbox controller.

Screenshot of the Game Bar.

The Xbox Game Bar running on Windows 11 (widgets not shown).

The Game Bar also manages gaming-related notifications, and they work differently to the usual Windows ones. If you gain an achievement, earn rewards points or are invited to play a game, you get a notification... unless, that is, the Game Bar is not loaded. Then you get nowt. Because you're signed out.

Screenshot of a Game Bar style notification.

An Xbox Game Bar notification.

There would be times when I'd press the Win-G combination and find it loading from scratch, when it should already be active. I thought it'd quietly crashed or something, and I was getting frustrated. In the settings area, there is an option to generate debug logs, so I turned it on.

Diagnostic Logs

There are two logs for each session - a text file, and an .ETL file that can be viewed in Event Viewer. The text file gave me a clue: it told me it was shutting down cleanly, but it didn't tell me why. The .ETL file was a lot more descriptive, although the details were buried in the description box.

CheckForIdleStopAdjustment: Adjusting idle shutdown time to 'long' ActivityIdleStart: Starting timer for '3600' seconds
(1 hour later)
ActivityIdleStart: Idle timer reached and no activities outstanding. Calling Shutdown Shutdown: Called.

Oh. So what's happening here is as follows: the Game Bar can track what's running on your computer to work out if you're playing a game. If you haven't accessed the Game Bar or played a game in that time, it unloads.

I suppose this behaviour makes sense as it can save system resources, but it's not documented anywhere and there are no obvious options to change it. And if it doesn't figure out you're playing a game, that timer still ticks down.

Solution

So with a bit of magic, I've worked out that there is a hidden registry setting. Here it is:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\GameBar] "IdleShutdownInSeconds"=dword:<time in (hexadecimal) seconds>

Yes, it's under HKEY_LOCAL_MACHINE rather than HKEY_CURRENT_USER where the other settings are. You might have to create the GameBar key before you can add the value. Then restart the Game Bar, or reboot.

The setting will apply to all user accounts on the PC. I picked 21600 seconds, which is 6 hours. Sorted.

Epilogue

The worst thing about this problem was the difficulty I had searching the web for it.

If I was too specific, and used terms from that log (e.g. ActivityIdleStart), I would at best get results from random pastebins, and at worst the terms would be crossed out by the search engine.

If I was less specific (e.g. "Xbox Game Bar unloads itself"), I'd get a load of results regarding the GameDVR registry key that's used to enable the Game Bar. There was nothing about it closing itself down.

Hopefully this entry will make it to the eyes of others who were looking for a solution to this exact issue.

Return to Blog Index

2024

2023

2022

2021

2020

2019

2018

© Andrew Nile 2018-2024. Privacy