darkreader: [Bug] Use System Color Scheme not following

Bug Report

Website Address

N/A

Bug Description

Setting the “Use System Color Scheme” does not follow the actuall system color scheme. It stays on light.

Steps To Reproduce

  1. Select the “Use System Color Scheme”
  2. Launch a website while the browser is in the darkmode setting OS Theme Dracula / Adwaita in the troubleshooting info page.

Expected Behavior

Dark reader should follow the layout.css.prefers-color-scheme.content-override setting and synchronize based on the browser setting.

Actual Behavior

Dark Reader remains in light mode unless I switch it to dark manually.

Screenshots

System Information

  • OS: Linux (Arch linux with Wayland)
  • Browser:Firefox 106.0.5
  • Dark Reader Version: 4.9.60

Additional Context

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 12
  • Comments: 18 (3 by maintainers)

Most upvoted comments

On Firefox 113.0.1 I still need to manually turn to

  1. DarkReader icon
  2. settings
  3. automation
  4. disable “use system color scheme”
  5. reactivate “use system color scheme”

That’s a “workaround” for closing and starting the browser. Very nice and quick. Not.

The upstream issue in Chromium has been fixed today, at long last. They have implemented a new DarkModeManagerLinux view that monitors the FreeDesktop settings portal, and falls back to GTK/QT theme monitoring for systems where the portal is not supported. This means that the prefers-color-scheme media query used by websites and Dark Reader can now correctly evaluate the preferred scheme on supported Linux distributions.

I have tested the latest Chromium build on my system (Fedora 37 / GNOME 43). If Dark Reader is configured to follow the system color scheme, it works as expected on the build when toggling the dark mode system setting. 😃

The fix is included in Chromium 114, which is due for a stable (Chrome) release on the 30th of May.

I think the commonality is when the system waking from suspend during a day-night cycle but I need to capture a bit more evidence to be certain.

I tend to confirm this. Just from what I experience regularly - not sure how to technically prove it.

Firefox 108.0.1 on Windows 10, also using AutoDarkMode, several machines.

It seems I finally found the root cause for the “Firefox does not apply new system theme when the change happened during standby/hibernation, so Firefox needs to be restarted to apply the dark/light mode changes” issue: Dark Reader.

Therefore following this issue with high interest.

Anything I can test, provide, contribute?

EDIT:

I believe the behaviour I am seeing is due to an assumption that the dark/light setting is what follows the system color scheme with the “use system color scheme” set. It actually sets the toggle option for the entire extension when “use system color scheme” is set.

Is there a way for the light/dark option to follow the systemwide dark setting rather?

  1. privacy.resistFingerprinting is set to false. I had that disabled due to color scheme issues in the past.
  2. matchMedia('(prefers-color-scheme: dark)').matches equals true when I shift to a dark theme and changes back to true at a light theme.

It seems to sometimes lose automatic switching but after launching new tabs it updates. I cannot charactarize the effect but I will update this when I learn more behaviour of this issue.