brave-browser: [Linux] Brave does not respect system light/dark theme
Description
On a Linux system, Brave has its own controls for light/dark mode, but it does not respect the system’s overall theme. If the option to use the “Gtk” theme is chosen, the Brave UI does respect the dark mode, however it doesn’t set the prefers-color-scheme media query. This is a bug inherited from Chromium, and is being tracked here: https://bugs.chromium.org/p/chromium/issues/detail?id=998903
I know this should be fixed upstream, but Google doesn’t seem to care about it enough to justify the effort. One of the latest comments mentions a patch that a user has made, which solves the issue. The patch can be seen here in case a similar solution is intended.
Steps to Reproduce
- Open Brave on a Linux system with light theme enabled
- Open a website that supports
prefers-color-schemequery, such as DuckDuckGo - Change system theme to dark mode
- Website does not change theme
Actual result:
This is how Brave and other Chromium browsers behave (left), and how Firefox does (right). Note how in Chromium, the page content doesn’t change

Expected result:
Brave/Chromium (left), Firefox (right)

Reproduces how often:
Easily reproduced
Brave version (brave://version info)
| Brave | 1.21.74 Chromium: 89.0.4389.72 (Official Build) (64-bit) |
|---|---|
| Revision | 3f345f156bfd157bd1bea06310e55f3fb2490359-refs/branch-heads/4389@{#1393} |
| OS | Linux |
Version/Channel Information:
- Can you reproduce this issue with the current release? Yes
- Can you reproduce this issue with the beta channel? Yes
- Can you reproduce this issue with the nightly channel? Haven’t tried, but no reason to believe it doesn’t happen there
Other Additional Information:
- Does the issue resolve itself when disabling Brave Shields? Not related
- Does the issue resolve itself when disabling Brave Rewards? Not related
- Is the issue reproducible on the latest version of Chrome? Yes
Miscellaneous Information:
Latest versions of Ubuntu have a quick Light/Dark mode toggle so it should be really easy to test
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 43
- Comments: 63 (6 by maintainers)
Links to this issue
Commits related to this issue
- Added system default theme mode on linux fix https://github.com/brave/brave-browser/issues/14685 — committed to brave/brave-core by simonhong 7 months ago
- Added system default theme mode on linux fix https://github.com/brave/brave-browser/issues/14685 — committed to brave/brave-core by simonhong 7 months ago
- Added system default theme mode on linux fix https://github.com/brave/brave-browser/issues/14685 — committed to brave/brave-core by simonhong 7 months ago
I can confirm this issue on my system (pop-os / ubuntu). While you can set the theme to
GTK+, which matches the system theme for the window and titlebar, the actual brave colors only have the optionsLightandDarkand notmatch system themeas available on windows and MacOS.The fix was merged on upstream today and appears to be landing in 114.
Too bad that there is no option to honor the system theme. I have a hotkey that changes between light and dark mode for the desktop to switch between day and evening/night.
To be honest I am puzzled that the change was accepted as it breaks the behaviour the other way around - for people like me who expect that the browser follows the system theme.
I do apologize for my poor choice of words, how about s/seem borderline insulting/are extremely disappointing/. Still, the picture as seen from this end is: this ticket still has incorrect tags (it is not waiting for upstream); there are several dups that are not merged with it or closed; the developer said they “should consider” fixing the regression. All that does not inspire much confidence!
[ To forestall the predictable “how dare you, the product is free!”: if there were an option to pay for Brave, I absolutely would. Brave fills my needs pretty much exactly, namely “follows Chromium so no random incompatibilities, first-class privacy and ad-blocking features, Linux and Android support, sync”. I have no idea why there is no normal payment option instead of (or in addition to) all the crypto silliness. ]
Latest release 1.61.100 has this fix.
Still an issue for me. Running Pop OS 21.10
I wonder just how low-priority Linux desktop is for Brave. Unprovoked and unexplained regressions like this seem borderline insulting really.
I mean, how hard would it be to just roll back the change that caused this (I honestly cannot parse what that change was even supposed to fix – neither from its linked issue nor from the PR text)? Is there some decision-making disfunction involved? What can users do about this, apart from bumping this issue (which evidently helps not at all)?
PR 19000 implemented changes to prevent system theme from affecting the Brave theme.
The “waiting upstream” label should be removed as it is now solely up to the Brave team.
Every time i restart Brave, the theme is white. I always have to go to Settings > Appearance > Brave colors (it is set to dark as default), but have to hit light and then back to dark so it takes on the dark theme. Pretty annoying. Using Classic Theme, not gtk since i don’t like it and some pages show in white on gtk.
Linux Mint 21.1 (Vera), Ubuntu 22.04 jammy Brave Version 1.52.117 Chromium: 114.0.5735.90 (Official Build) (64-bit)
OK, it works. It respects the GTK theme but not the “prefer-light” or “prefer-dark” option of the theme. It makes the Gnome’s “Dark mode” option useless.
Still broken for me too:
The “System” option is missing from the
Brave colors, whereas the Windows and Mac versions do.For me, Brave always starts using the “always dark” or “always light” setting, but follows the system if I change the system theme manually.PR #19000 implemented changes to prevent system theme from affecting the Brave theme, so it’s not good now as it is, the Linux version should have a “System” option too.Idk, maybe brave_dark_mode_utils_linux.cc needs some changes?
@GoldenGlimpse I have the same problem, apparently it started to happen after the 1.52 update of brave where they added vertical tabs Arch Linux 6.3.5-arch1-1 Brave Version 1.52.117 Chromium: 114.0.5735.90 (Official Build) (64-bit)
Edit update: the problem is fixed by placing this line in the terminal
gsettings set org.gnome.desktop.interface color-scheme prefer-darkThanks to: https://github.com/brave/brave-browser/issues/30766#issuecomment-1575406561
Still broken here too.
elementary OS 7 (based on Ubuntu 22.04).
Verified with
Using the STR/Cases outlined via https://github.com/brave/brave-core/pull/21065#issue-2003449763, ensured that the fix/changes were working as per the following:
Same as Linux (Light Theme)Same as Linux (Dark Theme)Dark Theme (Linux theme set as Light)Light Theme (Linux theme set as Dark)@kjozwiak Since you validated changes which caused a regression: would you be so kind to remove the incorrect labels from this issue? We’re no longer waiting for upstream, we’re waiting for a fix in brave-core.
I am using an mint applet to change between system light an dark theme and also expected that there is an option in brave to follow the system theme. Which it sadly does not. Chrome has the option in 116.0.5845.180.
Any chance to get that back?
Brave indeed does not respect
/org/gnome/desktop/interface/color-schemeany more, or at least this preference does not propagate to sites.I’m not sure which version of Brave broke this, but it definitely used to work right after Brave rebased on Chromium 114, and it still works in Chromium itself.
For me (Gnome on Arch) it was fixed for several weeks / some months. Recent versions broke it again. It is working on Chromium btw.
@esjarc ah, I see. So this is about adding the
match system themeoption on Linux?@wknapik The issue was supposed to be about Brave not following the system’s theme setting. It is working correctly when manually switching between light and dark theme in Brave’s settings.
Some people use tools to automatically change the system theme depending on the time of day. Brave/Chromium is one of the few applications left not following this choice. Firefox on all operating systems and Chromium browsers on Android/macOS/Windows already support this functionality.
There’s also an upstream (Chromium) issue about this. GNOME (libadwaita) is in the process of implementing an official system-wide dark mode. Maybe it would make sense to implement the functionality in Brave by utilizing the upcoming preference in GNOME 42 (not sure about how this will work with KDE/Qt)?
@NumDeP hmm I assume the DE is KDE Plasma, Tumbleweed being the distro.
Maybe this detection works on KDE then? I tested on both GNOME (Ubuntu, PopOS) and Pantheon (elementary OS) and this detection didn’t work sadly
Ok, so I uninstalled the flatpak version of brave, added the rpm repo and installed via that. It seems to work this way. So not sure what’s really going on.
Can verify, Brave’s Chrome does now sync with the system. However, webpages (when set to match system theme), like search.brave.com do not. Should this be reported separately?
Happens on both GNOME and KDE, both X11 and Wayland, (Fedora 36, 37, 38, 39, and Funtoo). Does not (under any combination) happen on Firefox (so it’s not a bug with the website, the System, the Distro, or the WM).
My workaround for the last few years has been to use webpage-specific settings when possible, the Stylus extension when that isn’t possible, and suffer from blindingly bright screens otherwise. Many webpages that have dark themes don’t have settings for it and also don’t have a Stylus sheet for them either.
Dark system, Brave Web Browser matches Linux, Brave Search Matches system
Light system, Brave Web Browser matches Linux, Brave Search Matches system
EDIT: fixed. The issue was that I had turned on maximum fingerprinting blocking.
The above requires
1.61.93or higher for1.61.xverification 👍It was a slightly simplified/misunderstood bugfix, other users had complained that their brave theme now follows the linux system theme, despite a different selection in Brave’s settings. The maintainers have already acknowledged the mishap.
Let’s keep a healthy discussion @cmm.
I notice some people are saying it was fixed at some point - but the last time I saw it working was 2019 or so (though I had been using Firefox from 2020-2021). It didn’t work even before the vertical tabs feature. Test case: set search.brave.com theme to “follow system”, set brave theme to “dark”. Brave search page is light theme-d when it should be dark. The comment above’s solution has no impact on this for my system.
OS: Fedora Linux 38 (Workstation Edition) x86_64 Host: 4180BV1 (ThinkPad T420) Kernel: 6.3.11-200.fc38.x86_64 Brave (though as I said it’s been broken for a very long time): Brave Browser 114.1.52.130
Chromium 113.0.5672.126 on Fedora already respects my system theme.
Oh! Apologies for the confusion then! 😅
It’s not the same issue as reported above. It’s not related to fingerprint protection but an upstream bug.
Yeah, end users don’t care how you maintain your browser, what libraries etc. you use. They care about the end product. If you don’t have the manpower/knowledge to maintain a fork or contribute patches upstream, then that seems like a problematic situation. This reminds me of the Tor projects firefox fork.
That’s their own fault then for switching from Muon and putting an Achilles heel into this product. DDG broswer right around the corner. And LibreWolf is a thing as well.
@wknapik Exactly! (Brave is currently only offering a dark and a light theme, but no option to follow the system theme on Linux.)
Works for me on a fresh profile (
brave --user-data-dir="$(mktemp -d)"&) with theBrave colors: Darksetting on up-to-date Arch Linux runningBrave Browser 93.1.29.81viabrave-bin 1:1.29.81-1.Keep in mind that after recent privacy improvements the setting
Trackers & ads blocked (aggressive)will prevent the dark theme from being requested from the site.Would it be possible to change the theme on the command line with a script? You could then use something like darkman