Chrome Stuck in Dark Mode After Switching System Theme (Linux)
Problem:
You switched your Linux system theme from dark to light, but Chrome is stuck in dark mode. Restarting Chrome doesn’t fix it.
Root Cause:
Chrome gets its theme preference from the XDG Desktop Portal via D-Bus. If you have multiple portal backends installed (e.g., xdg-desktop-portal-gtk and xdg-desktop-portal-gnome), the portal daemon may guess which to use. Chrome ends up listening to one backend while theme changes broadcast through another.
Solution:
Create a portal config that routes all requests through the GTK backend:
mkdir -p ~/.config/xdg-desktop-portal echo -e "[preferred]\ndefault=gtk" > ~/.config/xdg-desktop-portal/portals.conf
Restart the portal service and fully quit Chrome (not just close the window—check the system tray):
systemctl --user restart xdg-desktop-portal
Relaunch Chrome. It should now respect your light theme.
Why This Works:
The GTK portal backend reads your theme preference from gsettings and emits D-Bus signals on changes. Forcing all portal requests through GTK ensures Chrome hears from a consistent source.
Verify:
dbus-send --session --dest=org.freedesktop.portal.Desktop --type=method_call --print-reply /org/freedesktop/portal/desktop org.freedesktop.portal.Settings.Read string:'org.freedesktop.appearance' string:'color-scheme'
Returns uint32 0 for light mode, uint32 1 for dark.
Back to the light. Carry on.