Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

G HUB Loading-Screen Fix

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.


Do I have this problem?

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.)


What's actually wrong

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.


Requirements

  • 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


Install & run

  1. Download this repo (green Code button → Download ZIP) and unzip it somewhere convenient, like your Desktop. Keep Fix-LGHUB.bat and fix-lghub-settings.py in the same folder.
  2. Double-click Fix-LGHUB.bat.
  3. 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.
  4. Start G HUB again. It should load normally.

That's it. You do not need to run it as Administrator.

What the .bat does, in order

  1. Closes any running lghub* processes (the file can't be safely edited while G HUB has it open).
  2. Copies settings.db, settings.db-wal, and settings.db-shm into a timestamped backup folder: e.g. %LOCALAPPDATA%\LGHUB\settings-backup-20260809-143022\.
  3. Removes duplicate categoryColors entries, keeping the first copy of each.
  4. Runs SQLite VACUUM to shrink the file and flush the write-ahead log.
  5. Prints before/after sizes and how many entries were removed per game.
image

Just want to look first?

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.

Other ways to run it

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)

Undoing it

The script never deletes anything. It backs up first, every time. To roll back:

  1. Fully exit G HUB (right-click the tray icon → Quit).
  2. Open %LOCALAPPDATA%\LGHUB\ and find the newest settings-backup-... folder.
  3. Copy the files from inside it back into %LOCALAPPDATA%\LGHUB\, replacing the current ones.
  4. Start G HUB.

Notes and caveats

  • 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.

Reporting it to Logitech

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.


License

MIT: see LICENSE. Do whatever you like with it.

About

This is a fix for when Windows users experience their mouse keybindings not working, and the Logitech G Hub app stalls on loading

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages