[KDE] Firefox not detecting system theme properly
Categories
(Core :: Widget: Gtk, defect, P3)
Tracking
()
People
(Reporter: mira.jary, Unassigned)
References
(Blocks 2 open bugs)
Details
Attachments
(6 files)
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:143.0) Gecko/20100101 Firefox/143.0
Steps to reproduce:
- Open KDE Settings
- Set color theme to light (e.g. Breeze Light)
Actual results:
Firefox kept dark mode when light OS mode was set.
Expected results:
Firefox should reflect the change and switch to light theme.
| Reporter | ||
Comment 1•1 year ago
|
||
I'll also add that Thunderbird reacts properly and switches to light/dark mode accordingly to KDE settings
Comment 2•1 year 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.
Comment 3•1 year ago
|
||
Emilio, any idea here?
Thanks.
Comment 4•1 year ago
|
||
I can't repro this. Reporter, can you run firefox with:
MOZ_LOG=LookAndFeel:5 firefox >log.txt 2>&1
And attach log.txt here? Also attach your about:support information.
If you could try with a clean profile (mkdir /tmp/temp-profile; firefox -profile /tmp/temp-profile), does it reproduce the issue?
| Reporter | ||
Comment 5•1 year ago
|
||
| Reporter | ||
Comment 6•1 year ago
|
||
I've attached both files (while collecting the logs I've toggled to light color theme and back to dark one).
Also I can confirm this is reproducible on freshly created profile on my machine.
Comment 7•1 year ago
|
||
So your color scheme preference is 1 (dark), good. Then you switch to the light theme and we get this:
[Parent 9272: Main Thread]: D/LookAndFeel Settings Change sender=:1.15 signal=SettingChanged params=('org.freedesktop.appearance', 'color-scheme', <uint32 2>)
[Parent 9272: Main Thread]: D/LookAndFeel RecomputeDBusAppearanceSetting(color-scheme, uint32 2)
[Parent 9272: Main Thread]: D/LookAndFeel OverrideSystemThemeIfNeeded(matchesSystem=1, usingSystem=1)
[Parent 9272: Main Thread]: D/LookAndFeel UpdateRoundedBottomCornerStyles(0px -> 0px)
[Parent 9272: Main Thread]: D/LookAndFeel Settings Change sender=:1.15 signal=SettingChanged params=('org.freedesktop.appearance', 'accent-color', <(0.36078432202339172, 0.70196080207824707, 0.87058824300765991)>)
[Parent 9272: Main Thread]: D/LookAndFeel RecomputeDBusAppearanceSetting(accent-color, (0.36078432202339172, 0.70196080207824707, 0.87058824300765991))
[Parent 9272: Main Thread]: D/LookAndFeel Settings Change sender=:1.15 signal=SettingChanged params=('org.freedesktop.appearance', 'color-scheme', <uint32 2>)
[Parent 9272: Main Thread]: D/LookAndFeel RecomputeDBusAppearanceSetting(color-scheme, uint32 2)
[Parent 9272: Main Thread]: D/LookAndFeel Settings Change sender=:1.15 signal=SettingChanged params=('org.freedesktop.appearance', 'accent-color', <(0.36078432202339172, 0.70196080207824707, 0.87058824300765991)>)
[Parent 9272: Main Thread]: D/LookAndFeel RecomputeDBusAppearanceSetting(accent-color, (0.36078432202339172, 0.70196080207824707, 0.87058824300765991))
[Parent 9272: Main Thread]: D/LookAndFeel Settings Change sender=:1.15 signal=SettingChanged params=('org.kde.kdeglobals.General', 'ColorScheme', <'KlassyLight'>)
[Parent 9272: Main Thread]: D/LookAndFeel OverrideSystemThemeIfNeeded(matchesSystem=1, usingSystem=1)
[Parent 9272: Main Thread]: D/LookAndFeel Update
RoundedBottomCornerStyles(0px -> 0px)
[Parent 9272: Main Thread]: D/LookAndFeel Settings Change sender=:1.15 signal=SettingChanged params=('org.gnome.desktop.interface', 'color-scheme', <'default'>)
[Parent 9272: Main Thread]: D/LookAndFeel Settings Change sender=:1.15 signal=SettingChanged params=('org.freedesktop.appearance', 'color-scheme', <uint32 0>)
[Parent 9272: Main Thread]: D/LookAndFeel RecomputeDBusAppearanceSetting(color-scheme, uint32 0)
We seem to be getting two messages, once with 2 (light) and another one with 0 (which is default but should also be interpreted as light).
And I guess that Firefox remains dark? Given the Klassy color scheme in the logs there's probably some KDE customizations here at play. Can you point out which ones those are?
Also, does firefox pick up the right color scheme after a restart? Or does it remain dark?
| Reporter | ||
Comment 8•1 year ago
|
||
The same behavior with the default "Breeze" color schemes in KDE; attaching the log.
Firefox remains reporting dark mode even after restarting the app; although the toolbar seems to be a bit lighter (but still dark). Will attach comparison.
| Reporter | ||
Comment 9•1 year ago
|
||
| Reporter | ||
Comment 10•1 year ago
|
||
Updated•1 year ago
|
| Reporter | ||
Updated•1 year ago
|
| Reporter | ||
Comment 11•1 year ago
|
||
Can confirm this is still reproducible with Firefox 144 and KDE Plasma 6.5.0
Operating System: Arch Linux
KDE Plasma Version: 6.5.0
KDE Frameworks Version: 6.19.0
Qt Version: 6.10.0
Kernel Version: 6.17.4-zen2-1-zen (64-bit)
Graphics Platform: Wayland
Processors: 12 × 13th Gen Intel® Core™ i5-13420H
Memory: 32 GiB of RAM (31,1 GiB usable)
Graphics Processor 1: Mesa Intel® Graphics
Graphics Processor 2: NVIDIA GeForce RTX 4050 Laptop GPU/PCIe/SSE2
Manufacturer: LENOVO
Product Name: 82XV
System Version: LOQ 15IRH8
Comment 12•1 year ago
|
||
What does ps -aux | grep portal say? I'd be happy to fix it if I could repro, I suspect you have multiple settings portal or other such misconfigurations...
| Reporter | ||
Comment 13•1 year ago
|
||
Sure! Here's the output
jukka@LenovoLOQ ~$ ps -aux | grep portal
jukka 1555 0.0 0.0 903284 20000 ? Ssl 14:08 0:00 /usr/lib/xdg-desktop-portal
jukka 1567 0.0 0.0 689400 8688 ? Ssl 14:08 0:00 /usr/lib/xdg-document-portal
root 1573 0.0 0.0 2728 1992 ? Ss 14:08 0:00 fusermount3 -o rw,nosuid,nodev,fsname=portal,auto_unmount,subtype=portal -- /run/user/1000/doc
jukka 1621 0.0 0.2 489988 72032 ? Sl 14:08 0:00 /usr/bin/Xwayland :0 -auth /run/user/1000/xauth_UBkzzj -listenfd 8 -listenfd 9 -displayfd 109 -wm 111 -rootless -enable-ei-portal
jukka 2162 0.0 0.0 528904 28848 ? Ssl 14:08 0:00 /usr/lib/xdg-desktop-portal-gtk
jukka 2234 0.0 0.2 827124 76456 ? Ssl 14:08 0:00 /usr/lib/xdg-desktop-portal-kde
jukka 5900 0.0 0.0 9292 6212 pts/2 S+ 14:22 0:00 grep --color=auto portal
Updated•1 year ago
|
| Reporter | ||
Updated•9 months ago
|
| Reporter | ||
Comment 14•9 months ago
|
||
Can confirm this is still an issue in Firefox 147.0.3
Operating System: Arch Linux
KDE Plasma Version: 6.5.5
KDE Frameworks Version: 6.23.0
Qt Version: 6.10.2
Kernel Version: 6.18.9-zen1-2-zen (64-bit)
Graphics Platform: Wayland
Processors: 12 × 13th Gen Intel® Core™ i5-13420H
Memory: 32 GiB of RAM (31,1 GiB usable)
Graphics Processor 1: Mesa Intel® Graphics
Graphics Processor 2: NVIDIA GeForce RTX 4050 Laptop GPU/PCIe/SSE2
Manufacturer: LENOVO
Product Name: 82XV
System Version: LOQ 15IRH8
| Reporter | ||
Updated•7 months ago
|
| Reporter | ||
Comment 15•5 months ago
|
||
Confirming this is still an issue in Firefox 152.0.1.
Operating System: Arch Linux
KDE Plasma Version: 6.7.0
KDE Frameworks Version: 6.27.0
Qt Version: 6.11.1
Kernel Version: 7.0.12-zen1-1-zen (64-bit)
Graphics Platform: Wayland
Processors: 12 × 13th Gen Intel® Core™ i5-13420H
Memory: 32 GiB of RAM (31,1 GiB usable)
Graphics Processor 1: Mesa Intel® Graphics
Graphics Processor 2: NVIDIA GeForce RTX 4050 Laptop GPU/PCIe/SSE2
Manufacturer: LENOVO
Product Name: 82XV
System Version: LOQ 15IRH8
| Reporter | ||
Updated•5 months ago
|
| Reporter | ||
Comment 16•1 month ago
|
||
Sadly this is still an issue in Firefox 156.0
Operating System: Arch Linux
KDE Plasma Version: 6.7.5
KDE Frameworks Version: 6.30.0
Qt Version: 6.11.2
Kernel Version: 7.2.6-zen2-1-zen (64-bit)
Graphics Platform: Wayland
Processors: 12 × 13th Gen Intel® Core™ i5-13420H
Memory: 32 GiB of RAM (31,1 GiB usable)
Graphics Processor 1: Mesa Intel® Graphics
Graphics Processor 2: NVIDIA GeForce RTX 4050 Laptop GPU/PCIe/SSE2
Manufacturer: LENOVO
Product Name: 82XV
System Version: LOQ 15IRH8
| Reporter | ||
Updated•1 month ago
|
Comment 17•1 month ago
|
||
Seems like you have two portals running (/usr/lib/xdg-desktop-portal-gtk, /usr/lib/xdg-desktop-portal-kde) and they're sending conflicting messages, so looks like a misconfiguration on your end unless I'm missing something.
| Reporter | ||
Comment 18•1 month ago
|
||
This should not be a problem; both portals are required on arch linux by a different parts of the system (and the gtk portal auto-launches when firefox is opened).
Interestingly enough, as I've mentioned above, the bug does not appear in Thunderbird; there the toggling behaves correctly.
Comment 19•1 month ago
|
||
I guess you're right that both portals are fine running together but I also use Arch and I don't see this so there must be something else on your end missing or what not.
Comment 20•1 month ago
|
||
Maybe you're missing kde-gtk-config? That should propagate the KDE settings to the gtk settings. Or something along those lines?
| Reporter | ||
Comment 21•1 month ago
|
||
Nope, that is installed.
I did a bit of poking around and found out that this is some kind of misconfiguration of my browser profile. When I try to replicate this with a newly created profile, or even create a new system user and try to replicate the issue there, I'm no longer able to.
Any ideas what Firefox config could cause this?
| Reporter | ||
Comment 22•1 month ago
|
||
Well, never mind... Found it...
In about:config I found out that there was an option ui.systemUsesDarkTheme set to 1; removing the setting from the config completely fixed the issue. No idea how it got set or why...
Comment 23•1 month ago
|
||
Ok, that disagrees with comment 6... But sure, that explains. FWIW on nightly there's an about:preferences -> Appearance section changing that setting but not sure how you could set it in stable without about:config.
Description
•