Night Mode not working 18.04

7,050

Solution 1

Start dconf, and search for night-light, and see if your settings look somewhat similar to this...

enter image description here

Update #1:

Creating a new user account, and logging in there, shows that Night Light works fine. So something is wrong in the original user's account directory.

Update #2:

Renaming .config to .config.HOLD, logging out, logging in, made the desktop icons return, and Night Light worked again. Something is wrong in the .config.HOLD folder.

Compress .config.HOLD to a zip file, just for backup purposes. Then move the new .config out to the desktop. Rename .config.HOLD to .config. Move a few INDIVIDUAL files from the desktop .config folder into the .config folder, replacing files when prompted. Do a few. Log out. Log in and retest desktop icons and Night Light. Repeat until it all works.

Solution 2

It might have been because you would have changed the "Scheduled Timings" in your Night Light settings and it seems like it doesn't work. You can go change the timings manually and then check.

Also, if you find it a little bothersome to turn it ON & OFF from the settings through the mouse, you can simply make a keyboard shortcut to Toggle Night Light on and Off very easily.

To make things easier, I've written a shellscript to do just that. It works well, and I always use that shortcut to Toggle. Anyone can set it up too! It's easy !! Check this Link for more information : Simplified-Tasks-with-Shell-scripts

Solution 3

This is in addition to @heynnema's answer. In my case, I simply removed the /home/<username>/.config/dconf folder (You can simply rename it for backup, it contained a single file named 'user'). Then log out and log back in.

Alternatively, use this command to rename the folder:

mv ~/.config/dconf ~/.config/dconf.$(date +%s)

Nothing was broken when I renamed the folder. It was automatically recreated. And there were no noticeable undesired changes.

Share:
7,050

Related videos on Youtube

Rajesh Chaudhary
Author by

Rajesh Chaudhary

Updated on September 18, 2022

Comments

  • Rajesh Chaudhary
    Rajesh Chaudhary almost 2 years

    Night Mode not working in ubuntu 18.04 even after enable from settings. Help me. This problem appeared 2-3 days ago. Before that it was working fine. I tried to install redshit & f.lux as well but didn't help.

    debsums:

    debsums: changed file /usr/share/mysql-workbench/data/main_menu.xml (from mysql-workbench-data package)

    debsums: changed file /usr/share/nginx/html/index.html (from nginx-common package)

    • Boris Hamanov
      Boris Hamanov over 5 years
      You have THREE apps trying to control screen gamma... Night Light, redshift, and f.lux. Don't do that. Remove the last two. Update to 18.04.1, reboot, and recheck Night Light operation.
    • Rajesh Chaudhary
      Rajesh Chaudhary over 5 years
      Thank you for the reply. But I did update to 18.04.1 LTS, rebooted. But still unable to fix.
    • Boris Hamanov
      Boris Hamanov over 5 years
      In terminal, type sudo debsums -s and edit that output into your original question, not the comments, please. Report back to @heynnema
    • Rajesh Chaudhary
      Rajesh Chaudhary over 5 years
      @heynnema the debsums output is ready & is in question.
    • Boris Hamanov
      Boris Hamanov over 5 years
      debsums looks good. Try this, to eliminate a system vs user problem. Create a new account called "Guest" (or whatever), log out of your normal account, and into the Guest account. See if Night Light works there. If it does, then there's something in your account directory that's causing the problem. Report back.
    • Rajesh Chaudhary
      Rajesh Chaudhary over 5 years
      As you said, I created a new account & it worked perfect in other account. Night Mode works perfect. Desktop icons being shown in other account. So, now what if I want to recover my current account.
    • Boris Hamanov
      Boris Hamanov over 5 years
      Good. However, you didn't mention missing desktop icons in your primary account. That's important. Do you have any GNOME extensions installed there?
    • Rajesh Chaudhary
      Rajesh Chaudhary over 5 years
      Yes I do have & couple of extensions installed.
    • Boris Hamanov
      Boris Hamanov over 5 years
      Turn them all off at extensions.gnome.org/local. Log out. Log back in. And see if Night Light works again.
    • Rajesh Chaudhary
      Rajesh Chaudhary over 5 years
      It didn't work.
    • Boris Hamanov
      Boris Hamanov over 5 years
      Go to the night-light prefs and turn it off. Close the panel. Turn it back on and see if it works. If not, turn it off again... open a Files (Nautilus) window, hit control-h to view all files, view in line view (vs icon view), sort by mod date, see what the most recently changed folder/file is, and look for something that got changed when you turned off night light.
    • Rajesh Chaudhary
      Rajesh Chaudhary over 5 years
      I can't figure out what the changes are. I think the changes are in .cache, .Xauthority, xsession-errors, etc
    • Boris Hamanov
      Boris Hamanov over 5 years
      Log into the Guest account that you created. Open Files. Control-h. Look at the files there to know what file might hold the Night Light prefs. Change the Night Light to off to see the mod time change on files to help. Then go back to your original account to find the same files. It's probably something in .config or .local. Report back.
    • Rajesh Chaudhary
      Rajesh Chaudhary over 5 years
      Sorry, but I was unable to do. Why don't you do yourself in my PC like from teamviewer or any other medium. or we should chat ?
    • Boris Hamanov
      Boris Hamanov over 5 years
      Try this. In your home directory, carefully rename .config to .config.HOLD. Log out. Log in. Don't be overly concerned if things look slightly different, or app prefs aren't right. Check Night Light. If it still doesn't work, rename .local to .local.HOLD. Log out. Log in. Retest Night Light. We'll put it all back together later. Report back.
    • Rajesh Chaudhary
      Rajesh Chaudhary over 5 years
      So, renaming .config to .config.HOLD worked fine. So how to I get back my all configs except that night prefs.
    • Rajesh Chaudhary
      Rajesh Chaudhary over 5 years
      But there is a problem, I switched to another user and then, that(another user) has the same problem as before. No night light working & desktop icons disappear.
    • Boris Hamanov
      Boris Hamanov over 5 years
      Make sure to start comments to me with @heynnema, or I'll probably miss them. So... are you saying that after renaming .config to .config.HOLD, logging out, logging in, then desktop icons returned, and Night Light worked again? If so, compress .config.HOLD to a zip file, just for backup purposes. Then move the new .config out to the desktop. Rename .config.HOLD to .config. Move a few INDIVIDUAL files from the desktop .config folder into the .config folder, replacing files when prompted. Do a few. Log out. Log in and retest desktop icons and Night Light. Repeat until it all works.
    • Rajesh Chaudhary
      Rajesh Chaudhary over 5 years
      @heynnema You're great... Thanks for helping me out.
  • Rajesh Chaudhary
    Rajesh Chaudhary over 5 years
    Yeah, it's similar. But it works in another account.
  • mathtick
    mathtick over 5 years
    Any guess, That is way too much logging in an out
  • mathtick
    mathtick over 5 years
    MIght be relevant, am trying now: bbs.archlinux.org/viewtopic.php?id=228663
  • Boris Hamanov
    Boris Hamanov over 5 years
    @mathtick that link has nothing to do with this problem.
  • WinEunuuchs2Unix
    WinEunuuchs2Unix over 5 years
    +1 for nice detective work. I use Eyesome as Night Light / Red Shift / F.lux replacement without any problems like these though: github.com/WinEunuuchs2Unix/eyesome
  • mathtick
    mathtick over 5 years
    @hyennema not necessary that problem but it did fix my problem and this is a recommender system where we sometimes end up in the same symptom-room with different causes. NoMachine does something bad to the night mode settings.
  • Boris Hamanov
    Boris Hamanov over 5 years
    @mathtick but the OP also had problems with missing desktop icons, and colord/NoMachine's has nothing to do with that. My troubleshooting the .config folder was accurate.
  • mathtick
    mathtick over 5 years
    @heynnema yeah, I am not solving OP problem obviously. I just had similar symptoms hence the cross link for others who might land here and have same issue as me (not the OP). Hopefully helpful to someone.