Logitech G HUB hangs forever on its loading screen, and your G-key macros stop working. This repo contains a small script that fixes it without losing any of your profiles, macros, lighting, or key assignments.
Tested on Windows 10 with a Logitech G604, G HUB 2026.3.880543. It should work for any Logitech device, since the bug is in G HUB's settings file rather than in any particular mouse or keyboard.
You probably do if:
- G HUB shows the splash / loading screen and never opens (you've waited a minute or more).
- Macros bound to G-keys have stopped firing.
- You've seen this before, "fixed" it by deleting
settings.db, and now it's back.
Quick check: open File Explorer, paste this into the address bar, and press Enter:
%LOCALAPPDATA%\LGHUB
If settings.db is over about 1 MB, you're almost certainly hitting this bug.
(On a healthy install it's a few hundred KB. Mine had grown to 1.96 MB.)
G HUB stores all of your settings as one big JSON blob inside
%LOCALAPPDATA%\LGHUB\settings.db.
For each game you have a profile for, G HUB keeps a small list of category colors (the color tags like "Player Movement" or "Primary Hotkeys"). A bug makes G HUB append to that list every time it syncs instead of replacing it. So the same handful of colors gets written over and over and in my case about 420 copies of each one, across 15 games.
That bloats the settings file until G HUB can no longer parse and render it before its own startup timeout expires. So it hangs on the splash screen forever.
The usual advice you'll find online is to delete settings.db and let G HUB rebuild
it, which works, but it wipes all your profiles and macros, and the file just
starts bloating again from zero.
This script instead removes only the duplicate color entries and leaves everything else untouched. On my machine:
| Before | After | |
|---|---|---|
settings.db |
1,978,368 bytes | 466,944 bytes |
settings.db-wal |
4,396,072 bytes | 0 bytes |
| G HUB startup | never finished | ~8 seconds |
Full technical write-up, including the schema and per-app duplication counts, is
in LGHUB-bug-report.md.
- Windows
- Python 3: install from python.org or the Microsoft Store. During the python.org installer, tick "Add Python to PATH".
Nothing else. The script uses only Python's standard library
- Download this repo (green Code button → Download ZIP) and unzip it
somewhere convenient, like your Desktop. Keep
Fix-LGHUB.batandfix-lghub-settings.pyin the same folder. - Double-click
Fix-LGHUB.bat. - A console window opens. It will close G HUB, back up your settings, clean out the duplicates, and print a summary. Press any key to close the window.
- Start G HUB again. It should load normally.
That's it. You do not need to run it as Administrator.
- Closes any running
lghub*processes (the file can't be safely edited while G HUB has it open). - Copies
settings.db,settings.db-wal, andsettings.db-shminto a timestamped backup folder: e.g.%LOCALAPPDATA%\LGHUB\settings-backup-20260809-143022\. - Removes duplicate
categoryColorsentries, keeping the first copy of each. - Runs SQLite
VACUUMto shrink the file and flush the write-ahead log. - Prints before/after sizes and how many entries were removed per game.
To see what it would do without changing anything, open PowerShell or Command Prompt in the folder and run:
py fix-lghub-settings.py --dry-run
This opens the database read-only, prints the duplication report, and exits without writing, backing up, or touching G HUB. Safe to run at any time, even with G HUB open.
| Command | What it does |
|---|---|
py fix-lghub-settings.py |
Fixes it, but refuses to run if G HUB is open: close G HUB from the tray first |
py fix-lghub-settings.py --dry-run |
Report only, no changes |
py fix-lghub-settings.py --force-kill |
Closes G HUB for you, then fixes it (this is what the .bat uses) |
The script never deletes anything. It backs up first, every time. To roll back:
- Fully exit G HUB (right-click the tray icon → Quit).
- Open
%LOCALAPPDATA%\LGHUB\and find the newestsettings-backup-...folder. - Copy the files from inside it back into
%LOCALAPPDATA%\LGHUB\, replacing the current ones. - Start G HUB.
- This is a workaround, not a cure. The bug is in G HUB itself, so the duplicates will slowly build up again. If the hang comes back in a few weeks or months, just run the .bat again.
- The script only ever modifies
applications[i].categoryColors. It doesn't touch your device assignments, profiles, macros, lighting, or game detection. - Backup folders accumulate in
%LOCALAPPDATA%\LGHUB\each is a couple of MB. Delete old ones whenever you like. - If you get
'py' is not recognized, Python isn't installed or isn't on your PATH. Reinstall it and make sure "Add Python to PATH" is checked. - Not affiliated with or endorsed by Logitech. Provided as-is; it worked on my machine and it backs up before it writes, but you're running it at your own risk.
If you want to push for a real fix, LGHUB-bug-report.md
is written to be filed directly with Logitech support. It has the root-cause
analysis (via Claude because of course its Claude), reproduction check, and suggested fixes. Feel free to copy it. I submitted it months ago with no luck.
MIT: see LICENSE. Do whatever you like with it.