5

Toggling night light and adjusting color temperature has no effect on visual. Setting the night light to Manual schedule and playing with the times did not help.

Similar to this question but for Ubuntu 22.04 Night Light not working in Ubuntu 20.04 I've tried their suggested answers with no luck:

  • restarting the PC
  • sudo apt-get install --reinstall gnome-control-center then restarting PC.

Gnome version: 42.1 Machine: Dell XPS 17 9720

JRF
  • 136
  • login with x11 instead of wayland and try toggling night light option there. – ManOnTheMoon May 28 '22 at 07:56
  • @ManOnTheMoon unfortunately that didn't fix it – JRF May 29 '22 at 05:04
  • night light doesn't work in x11? or you can change it in x11, however, the change doesn't transit to wayland? – ManOnTheMoon May 29 '22 at 06:03
  • 2
    @ManOnTheMoon Both :/ Night light didn't work in x11. Didn't work when switching back to wayland either – JRF May 29 '22 at 07:05
  • This looks like an XPS-specific bug, it doesn't work with 9570 either. – Nicolò Jun 02 '22 at 07:15
  • @JRF, i just switched back from Mint and found that changing the driver to Noveau fixed several issues i had including this. Hence, try changing your driver to Noveau under Additional Driver tab in Software & Updates then reboot. When login there are two choices, Ubuntu and Ubuntu Xorg. Choose Ubuntu. fyi, it will say Wayland in Above under Settings after you login – ManOnTheMoon Jun 12 '22 at 16:10
  • I had a similar issue (+ I could not change color profiles): reinstalling the nvidia drivers fixed it for me. This was suggested in one of the answers to the question you linked. – Federico Vigolo Jan 20 '23 at 23:12

7 Answers7

7

I also encountered this issue on my Acer Chromebook 11 running Ubuntu 22.04 LTS. Every time I toggled Nigh Light to enabled, it works for a while but goes back to normal/blue lights.

I resolved it by turning on the Location services!

Tolz
  • 71
  • 1
  • 2
    I suspect your Night light schedule was set to "Sunset Sunrise". If you set it to "Manual Schedule" and adjust times you may be able to get away with a stricter privacy setting.

    Unfortunately, turning location service on via 'Settings > Privacy > Location Services' did not resolve the issue on my machine

    – JRF Jun 24 '22 at 03:28
  • 2
    ^ yep, it was the location services turned off that was the issue for me. – ltn100 Oct 03 '22 at 18:24
3

Not OP's case, but is worth mentioning here...

If manual schedule is set, and the color temperature persists only for a few seconds before reverting, set the beginning and end times to the same value, e.g., 20:00 and 20:00. In this case (not OP's) this isn't a bug - you were just outside your schedule.

If this is your case, don't feel dumb. Good job for using Ubuntu 22.04, and thanks for helping contribute to the community, and good job taking care of your eyeballs!

f41k0r
  • 31
3

This trick works for me:

  • assign a color profile for the screen (Settings → Color → turn on);
  • then toggle Night Light off and on back again.
  • This solved it for me. I'm surprised it hasn't been upvoted by others. – mikabytes Sep 07 '23 at 20:19
  • I had a fresh install of Ubuntu 23.10, and this was the fix that worked for me. By default, no color profile was assigned. – James Mar 05 '24 at 19:17
3

I have tried all of the potential solutions described here but none of them worked for me. It is worth noting I have a NVIDIA graphics card (so this solution may not work for others who do not). I found some information of help here:

https://www.reddit.com/r/linuxquestions/comments/vjqt9w/night_light_not_working_correctly_on_ubuntu_2204/

"This is a known bug on Wayland with NVIDIA cards, the solution is to simply use X11 session instead. Wayland is still considered experimental and is not mature enough in development for stable use with NVIDIA. It's still no where near as functional as X11 on AMD either."

I decided against using X11 as I already had Wayland installed. Further digging revealed a link to the bug report in launchpad: https://bugs.launchpad.net/ubuntu/+source/nvidia-graphics-drivers/+bug/1972728

with a comment:

"Looks like it's coming in 545: https://www.nvidia.com/download/driverResults.aspx/212964/en-us/"

So, I updated my NVIDIA drivers to 545.29.02 and—voila; Night Shift started working. There are other instructions around, but for completeness I ran:

sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt update 
ubuntu-drivers devices  
sudo apt install nvidia-settings  nvidia-graphics-drivers-545

TL;DR—If you have a NVIDIA graphics card, try updating to version 545 of the drivers using the above commands.

Damian T.
  • 1,181
  • 2
  • 7
  • 15
anthls
  • 131
  • Of course, it is very likely that using a version later than 545 of the NVIDIA drivers will include the bug fix noted on the NVIDIA website. That is, use version 545 and above. – anthls Mar 17 '24 at 23:01
1

Encountered the same problem.

However, I got the night light working after doing the following:

  • changing the night-light-temperature in dconf-editor (org.gnome.settings-daemon.plugins.color)
  • restarting the PC
  • Unfortunately had no luck with these steps. Had set the value to 100 (2700 is default) then restarted the PC and display was unaffected. Adjusting this field did adjust the "Color Temperature" Under Settings > Displays > Night Light and visa versa which is comforting. – JRF Jun 06 '22 at 09:11
  • I have encountered the problem on my new Intel 12th gen with Ubuntu 22.10. In Settings it says "night night unavailable. This trick works. Thank you very much! – ロジャー Oct 06 '22 at 11:06
1

Night light is now working. Haven't made any explicit changes so I suspect issue was fixed with a package update

JRF
  • 136
  • the same here, it got broken recently, but has fixed by simple sudo apt update && sudo apt upgrade even though I keep my system up-to-date... – crysman Sep 19 '22 at 19:25
1

After updating Ubuntu, I had the same problem. I could see the night light changes only on a new account, but only for a few seconds. Eventually, I figured out that the problem was with the NVIDIA drivers.

The solution worked for me:

sudo apt-get remove --purge nvidia-* -y
sudo apt autoremove
sudo ubuntu-drivers autoinstall
sudo reboot

It removes obsolete drivers and reinstalls the latest NVIDIA driver.

Zorro
  • 185
  • 1
  • 4