Closed Bug 1970124 Opened 1 year ago Closed 1 year ago

profile selector is light when dark configured

Categories

(Core :: Widget: Gtk, defect)

Firefox 141
defect

Tracking

()

RESOLVED INVALID

People

(Reporter: mozilla, Unassigned)

References

(Regression)

Details

(Keywords: regression)

Attachments

(6 files)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:141.0) Gecko/20100101 Firefox/141.0

Steps to reproduce:

Started the latest nightly, using profile selection,
/usr/local/bin/firefox --new-instance --ProfileManager

Actual results:

The profile came up in light mode, instead of dark mode, which I have set. I'll attach a screenshot of the selector.

Expected results:

It comes up in dark mode as usual. I suspect this might have something to do with the switch to 141, from 140. It started happening a few days ago, around the time of the switch. When I run the system firefox (139?), the selector is still in dark mode.

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.

Component: Untriaged → Widget: Gtk
Product: Firefox → Core

Is that a recent regression? If so, can you use mozergression tool to find broken commit?
https://fedoraproject.org/wiki/How_to_debug_Firefox_problems#Use_Mozregression_tool
Thanks!

Flags: needinfo?(mozilla)

mozregression worked really well. Here are the results.

INFO: Last good revision: 198e2f43c0e3dc5b4bcfe5f709cef2b3b41f5569
INFO: First bad revision: 8fbb7f25493706fcf0e3cc4fb48e5df64f9da487
INFO: Pushlog:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=198e2f43c0e3dc5b4bcfe5f709cef2b3b41f5569&tochange=8fbb7f25493706fcf0e3cc4fb48e5df64f9da487

User
Push date [To Local] Changeset Patch author — Commit message
ealvarez@mozilla.com
Thu May 29 11:08:45 2025 +0000 8fbb7f25493706fcf0e3cc4fb48e5df64f9da487 Emilio Cobos Álvarez — Bug 1968664 - Always honor dbus color-scheme preference if present. r=stransky

Flags: needinfo?(mozilla)

Setting Regressed by field after analyzing regression range found by mozregression in comment #3.

Keywords: regression
Regressed by: 1968664

To be clear the main window color scheme is correct? Or do you have a theme or something?

How exactly are you configuring dark mode? A log of a run with MOZ_LOG=LookAndFeel:5 would be useful.

Flags: needinfo?(mozilla)

(In reply to Emilio Cobos Álvarez (:emilio) from comment #5)

To be clear the main window color scheme is correct? Or do you have a theme or something?

How exactly are you configuring dark mode? A log of a run with MOZ_LOG=LookAndFeel:5 would be useful.

The main window color scheme is still correct.

The theme enabled is system-theme auto I don't recall setting a theme, but I could have a long time ago and forgot.

The appearance of the browser itself has not changed, it is still dark. I have
settings -> general -> language and appearance, website appearance set to dark

I'm not sure how to run the log of a run with MOZ_LOG=LookAndFeel:5
I set the environment variable, and ran nightly, and I could find no log. I did a search and it seems there is a program called mozlog. Is that what you are talking about? How would I use that?

Flags: needinfo?(mozilla)

Web to the rescue, I found some simple instructions. I'll attach the file.

added -MOZ_LOG=LookAndFeel:5 -MOZ_LOG_FILE=lookandfeel.txt to startup line, this is the result.

This shows the LookAndFeel:5 log when the profile selector in an older firefox correctly shows the dark theme

This shows the profile selector in an older nightly when the dark color was correct.

Attachment #9493344 - Attachment mime type: application/octet-stream → text/plain

Hmm, the logs seem truncated?

Nightly does not seem to use gtk-application-prefer-dark-theme=1 in the settings file anymore. This can be tested with using -P switch. Stable works though.

So nightly seems to be only using the switch in gcc (gnome). And stable first checks if gtk-application-prefer-dark-theme is set to 1 and if not checks the switch in gcc. This may all be intended though. How is the reporter setting light/dark theme?

This is the way that I set dark in the browser, for the settings -> general tab

These are the settings I have in custom_contrast.

Note that both nightly and the distro version of firefox use the same configuration. So, the settings I have above don't work for the profile selector in nightly and do work in firefox using that same configuration.

This change is explainable / intended iff you have something else in your profile that forces Firefox to be dark, like ui.systemUsesDarkTheme=1 or so in about:config. It's expected that the profile manager doesn't honor that because it doesn't have access to prefs.

Could you provide untruncated logs? That should explain what's going on... The logs in comment 9 are truncated.

Thanks.

Flags: needinfo?(mozilla)

Hey reporter, how are you setting your system light/dark switch? You are expecting dark mode so I take it you must have set it to dark somewhere? I'd guess that the profile selector only uses system switch from my testing.

Those are the logs that I got when I ran with -MOZ_LOG=LookAndFeel:5 -MOZ_LOG_FILE=lookandfeel.txt I appended them to the line, and it brought up the profile, in light mode. I selected the default, and it opened the browser, in dark mode. I then exited, since the interesting part was over, I thought. If there is something else I have to do to get more information, let me know. I certainly didn't truncate the logs, they were exactly what was saved.

I'm not sure I understand why this has anything to do with settings. Before the change found by mozregression, the profile selector was in dark mode. After the change, it was in light mode. Nightly was honoring the dark setting before the change, so it obviously was finding it. After, it wasn't honoring the dark setting, so it wasn't seeing it. So, the change somehow removed the functionality that allowed nightly to see the dark setting when bringing up the profile selector. And whatever that is, it still works in the stable versions of firefox, since the profile selector comes up in dark mode.

I see some discussion of gnome settings. I am running LXDE as the desktop, so gnome settings should have no impact on what happens. I do have gnome installed, so there might be some cross contamination in the configuration. But, again, it was working before the change, and now it isn't, without any changes to configuration.

Flags: needinfo?(mozilla)

(In reply to Emilio Cobos Álvarez (:emilio) from comment #17)

This change is explainable / intended iff you have something else in your profile that forces Firefox to be dark, like ui.systemUsesDarkTheme=1 or so in about:config. It's expected that the profile manager doesn't honor that because it doesn't have access to prefs.

Could you provide untruncated logs? That should explain what's going on... The logs in comment 9 are truncated.

Thanks.

Yes, I do have that set in my profile. I presume that is is because of the Dark setting I have selected in Edit -> Settings -> General, Website Appearance

(In reply to Jens Persson from comment #18)

Hey reporter, how are you setting your system light/dark switch? You are expecting dark mode so I take it you must have set it to dark somewhere? I'd guess that the profile selector only uses system switch from my testing.

I have the Dark radio button selected in Edit -> Settings -> General, Website Appearance

It was working fine before the mozregression change, so it must have been finding some kind of indication that I wanted dark. I didn't change any configuration.

Unrelated to this bugzilla issue. When I bring up this bugzilla, I am not seeing the icons on each comment, nor do they show tool tips when I hover on them. There are just little boxes with text in them. I think the first is the reply to comment button, as that is what seems to happen when I click on it. I am using UTF-8 character settings. Are these characters not in UTF-8? As far is I know, I am not blocking anything.

The text I see is EISE EISB E8I3. It is just a little inconvenient, but I thought I would mention it.

(In reply to mozilla@zenzen.monster from comment #21)

(In reply to Jens Persson from comment #18)

Hey reporter, how are you setting your system light/dark switch? You are expecting dark mode so I take it you must have set it to dark somewhere? I'd guess that the profile selector only uses system switch from my testing.

I have the Dark radio button selected in Edit -> Settings -> General, Website Appearance

It was working fine before the mozregression change, so it must have been finding some kind of indication that I wanted dark. I didn't change any configuration.

Your system light/dark switch, the profile selector can't read a profile before choosing one. Where do you set your system light/dark switch? Have you tried gtk-application-prefer-dark-theme=1? It may also be that your gnome installation is set to light that come into play here.

(In reply to Emilio Cobos Álvarez (:emilio) from comment #17)
Yes, I do have that set in my profile. I presume that is is because of the Dark setting I have selected in Edit -> Settings -> General, Website Appearance

No, that one tweaks a separate pref. ui prefs you must've tweaked manually, and that's what explains the behavior you're describing.

To be clear:

  • Your system is claiming you prefer light mode (well, "default" which we started interpreting as light in the regressing bug).

  • You had overridden that in your profile via ui.* pref, but the profile manager can't know / respect that.

So the current behavior is expected. The right thing to do is changing your system settings so that Firefox prefers dark mode, including the profile manager.

(In reply to mozilla@zenzen.monster from comment #22)

Unrelated to this bugzilla issue. When I bring up this bugzilla, I am not seeing the icons on each comment, nor do they show tool tips when I hover on them. There are just little boxes with text in them. I think the first is the reply to comment button, as that is what seems to happen when I click on it. I am using UTF-8 character settings. Are these characters not in UTF-8? As far is I know, I am not blocking anything.

The text I see is EISE EISB E8I3. It is just a little inconvenient, but I thought I would mention it.

I think you probably have tweaked your font settings to avoid using external fonts. Please double check if any of these issues reproduce on a clean profile.

Status: UNCONFIRMED → RESOLVED
Closed: 1 year ago
Resolution: --- → INVALID

(In reply to Jens Persson from comment #23)

Your system light/dark switch, the profile selector can't read a profile before choosing one. Where do you set your system light/dark switch? Have you tried gtk-application-prefer-dark-theme=1? It may also be that your gnome installation is set to light that come into play here.

That didn't fix the issue. It seems that there are a lot of moving pieces involved, so not surprising. I see the profile selector for a few seconds, and then not again, so it is more of an annoyance than a major issue. I'll live with it.

(In reply to Emilio Cobos Álvarez (:emilio) from comment #24)

(In reply to Emilio Cobos Álvarez (:emilio) from comment #17)
Yes, I do have that set in my profile. I presume that is is because of the Dark setting I have selected in Edit -> Settings -> General, Website Appearance

No, that one tweaks a separate pref. ui prefs you must've tweaked manually, and that's what explains the behavior you're describing.

To be clear:

  • Your system is claiming you prefer light mode (well, "default" which we started interpreting as light in the regressing bug).

  • You had overridden that in your profile via ui.* pref, but the profile manager can't know / respect that.

So the current behavior is expected. The right thing to do is changing your system settings so that Firefox prefers dark mode, including the profile manager.

I'll keep plugging away. Tweaking until it somehow works.

(In reply to mozilla@zenzen.monster from comment #22)

Unrelated to this bugzilla issue. When I bring up this bugzilla, I am not seeing the icons on each comment, nor do they show tool tips when I hover on them. There are just little boxes with text in them. I think the first is the reply to comment button, as that is what seems to happen when I click on it. I am using UTF-8 character settings. Are these characters not in UTF-8? As far is I know, I am not blocking anything.

The text I see is EISE EISB E8I3. It is just a little inconvenient, but I thought I would mention it.

I think you probably have tweaked your font settings to avoid using external fonts. Please double check if any of these issues reproduce on a clean profile.

I created a new profile and this missing icons problem disappeared, so you must be right. But I can't find a setting like that. I'll keep looking. A pristine profile didn't fix the profile selector, and I had to set the default to dark in settings->general, and select the dark theme and extension to get the toolbar to be dark. Again, I'll keep looking for tweaks. But, as I posted to Jens above, this isn't a major problem, just an annoyance, so if I have to live with it, so be it.

Thanks to both Emilio and Jens for working on this issue.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: