Dark Theme not working with 141.0 on Linux Mint
Categories
(Core :: Widget: Gtk, defect)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox-esr115 | --- | unaffected |
| firefox-esr128 | --- | unaffected |
| firefox-esr140 | --- | unaffected |
| firefox141 | --- | wontfix |
| firefox142 | --- | wontfix |
| firefox143 | --- | wontfix |
People
(Reporter: sarcyleo, Unassigned)
References
(Regression)
Details
(Keywords: regression)
Attachments
(2 files)
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:141.0) Gecko/20100101 Firefox/141.0
Steps to reproduce:
I'm using Linux Mint 22.1 and Cinnamon 6.4.8
I just open firefox with my OS theme set to dark mode
Actual results:
Firefox (sync with system theme) open with light mode, and even if i set dark mode in firefox setting, I have the top bar that remains in light mode
Expected results:
It should be entirely dark (as in previous version)
Comment 1•4 months ago
|
||
perhaps you could use https://mozilla.github.io/mozregression/ to determine when this changed.
Comment 2•4 months ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::Widget: Gtk' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
It was dark with "mozilla-central build: 2025-05-28" and it became light with "mozilla-central build: 2025-05-29".
Having the same issue. After Mint upgraded Firefox, the system dark theme is no longer honored.
The active theme is still "System theme — auto" but it's falsely detected as light instead of dark.
The version upgrade was from 140.0.4+linuxmint1+xia to 141.0+linuxmint1+xia
Also ran mozregression, commit message is very relevant:
2025-07-22T21:49:32.462000: DEBUG : Found commit message:
Bug 1968664 - Always honor dbus color-scheme preference if present. r=stransky
Right now, we're making 0 / default fall back effectively to
`gtk-application-prefers-dark-theme`.
This is an issue because some tools like kde-gtk-config and such do set
that value, and make firefox look as if it's not respecting the D-BUS
setting.
If we get the dbus preference, use it. This matches what libraries like
libadwaita do.
Differential Revision: https://phabricator.services.mozilla.com/D251327
2025-07-22T21:49:32.462000: DEBUG : Did not find a branch, checking all integration branches
2025-07-22T21:49:32.462000: INFO : The bisection is done.
2025-07-22T21:49:32.462000: INFO : Stopped
Updated•4 months ago
|
Comment 6•4 months ago
|
||
I think this is invalid. That means that your d-bus settings portal is not communicating the dark mode preference. I'm not sure which portal does mint use, or how is it hooked up to the settings.
This appears to be a Cinnamon/Mint issue. Changing the Cinnamon theme to light and back to dark causes Firefox to switch to dark theme. Rebooting brings it back to light theme.
I'm sorry Emilio, if you made any changes to this bug other than commenting I accidentally undid them.
Either way, I'd like to report this issue to Cinnamon (or perhaps even try fixing it). Can you tell me what exactly gets changed when switching to dark mode to tell Firefox to also switch to dark mode? I don't know the background for this.
Comment 9•4 months ago
|
||
Ok, so I can reproduce locally. It seems in the Cinnamon settings there is a "Dark mode" option which actually exposes three values (let applications decide, prefer dark mode, prefer light mode).
My patch made Firefox interpret the first on as "light". The reason is that in other environments like GNOME or KDE they will just expose, effectively, the first two options. But given Cinnamon exposes the three "properly", I should probably restore the pre-existing behavior on cinnamon.
Can you confirm that Firefox honors the "Prefer dark mode" setting properly, and this regression only happens with "Let applications decide"?
Comment 10•4 months ago
|
||
I assume you mean "Mixed", "Dark" and "Light" options as they appear in the Themes settings. It does work as you described when changing theme at runtime, but please try rebooting after selecting "Dark".
After rebooting, Firefox will be light regardless of selected setting.
Comment 11•4 months ago
|
||
Oh, actually you don't need to reboot or even log out. Firefox at launch ignores the Dark option, but honors it if it's changed while Firefox is running. Can you reproduce this?
Comment 12•4 months ago
|
||
I see. I had the "Advanced" settings which has a dropdown (I for some reason can't make a choice in the "simplified" settings because it says my style is "custom", probably because I don't usually use cinnamon).
Comment 13•4 months ago
|
||
(In reply to NeatNit from comment #11)
Can you reproduce this?
I can't at firefox launch at least. Will try reboot now.
I'm on Cinnamon 6.4.10. If you can launch firefox with MOZ_LOG=LookAndFeel:5 in the environment and attach the output here that might be another avenue for investigation.
Comment 14•4 months ago
|
||
I see. I just tried that setting in Advanced setting and still see the same behavior: closing and opening Firefox will always be light mode.
Comment 15•4 months ago
|
||
Comment 16•4 months ago
|
||
Ok, it seems it might have been fixed upstream? Which version of cinnamon are you on?
Comment 17•4 months ago
|
||
neatnit@NeatStation:~$ cinnamon --version
Cinnamon 6.4.8
Comment 18•4 months ago
|
||
Ok, it seems you somehow have two portals running or something along those lines?
[Parent 16164: Main Thread]: D/LookAndFeel dbus settings query result: ({'org.freedesktop.appearance': {'contrast': <uint32 0>, 'color-scheme': <uint32 1>}, 'org.freedesktop.appearance': {'color-scheme': <uint32 0>}},)
See how there are two color-scheme values ("dark" and "no-preference")
Updated•4 months ago
|
Comment 19•4 months ago
|
||
Well, that's a few steps beyond my knowledge. I really don't know what that means other than it sounds wrong and it's probably (but not definitely) not my fault!
Would be happy to learn more and debug more but will need some guidance.
Comment 20•4 months ago
|
||
What shows up if you do ps -ax | grep desktop-portal on a terminal?
Comment 21•4 months ago
|
||
neatnit@NeatStation:~$ ps -ax | grep desktop-portal
2391 ? Ssl 0:00 /usr/libexec/xdg-desktop-portal
2410 ? Ssl 0:00 /usr/libexec/xdg-desktop-portal-xapp
10786 ? Ssl 0:00 /usr/libexec/xdg-desktop-portal-gtk
21357 pts/0 S+ 0:00 grep --color=auto desktop-portal
neatnit@NeatStation:~$
Comment 22•4 months ago
|
||
Which distro are you on? IIUC the main portal should be xapp, that's the cinnamon one. It seems the gtk portal is what's causing the conflict in this case, but I'm not sure how that one is configured or what not.
Comment 23•4 months ago
|
||
Comment 24•4 months ago
|
||
Ok, I think I found how to repro this. Can you confirm that:
$ dconf read /org/gnome/desktop/interface/color-scheme
Shows default (or prefer-light, but most likely default).
And that:
$ dconf write /org/gnome/desktop/interface/color-scheme "'prefer-dark'"
(note the odd quotes) fixes the issue for you?
If so... It does seem like a problem external to Firefox. I'm guessing cinnamon should also set that dconf setting?
Comment 25•4 months ago
|
||
It's not set at all:
neatnit@NeatStation:~$ dconf read /org/gnome/desktop/interface/color-scheme
neatnit@NeatStation:~$ dconf watch /
/org/x/apps/portal/color-scheme
'prefer-light'
/org/cinnamon/desktop/interface/gtk-theme
'Mint-Y-Orange'
/org/cinnamon/theme/name
'Mint-Y-Orange'
/org/gnome/desktop/interface/gtk-theme
'Mint-Y-Orange'
/org/x/apps/portal/color-scheme
'prefer-dark'
/org/cinnamon/desktop/interface/gtk-theme
'Mint-Y-Dark-Orange'
/org/cinnamon/theme/name
'Mint-Y-Dark-Orange'
/org/gnome/desktop/interface/gtk-theme
'Mint-Y-Dark-Orange'
^C
(switched to light and back to dark while watching)
Comment 26•4 months ago
|
||
After I ran the dconf write command you gave me, Firefox launches in dark mode, even if the Cinnamon theme is set to Light.
So should Cinnamon set /org/gnome/desktop/interface/color-scheme which it currently doesn't? Or should Firefox be looking at /org/x/apps/portal/color-scheme?
Comment 27•4 months ago
|
||
Firefox is doing neither. It's doing effectively:
$ qdbus6 --literal org.freedesktop.portal.Desktop /org/freedesktop/portal/desktop org.freedesktop.portal.Settings.ReadAll 'org.freedesktop.appearance'
The issue is that, for you, was returning two values, rather than one.
Comment 28•4 months ago
|
||
Ok, did some digging since I still can't repro.
Fairly sure now the issue is your distro is missing https://github.com/flatpak/xdg-desktop-portal/pull/1538 and related changes (not sure what needs to happen where to get all those fixes into linux mint).
So basically before that change (https://github.com/flatpak/xdg-desktop-portal/commit/49ee1c0d535608f6a5d0a47a1cd510958dc5e34f in particular) you could get different (conflicting) settings from two different portal implementations.
It might be that cinnamon wants to set the /org/gnome/desktop/interface/color-scheme regardless tho, since that'd trivially "fix" this issue?
But fairly sure at this point it's not a Firefox bug.
Updated•4 months ago
|
Updated•4 months ago
|
Description
•