-
Notifications
You must be signed in to change notification settings - Fork 27
FAQ
-
Common issues
- Where is the log file located?
- Where is the conf file located?
- How to enable verbose mode?
- Clight does not detect my external monitor!
- Does Clight support monitor hotplug?
- I killed my user session but Clight keeps running?
- Clight on wayland
- Geoclue asks for permissions
- Screen temperature is resetted when backlight changes
- Clight sets 0 backlight level, but my screen turns black!
- Uninstall Clight
- Dbus tricks
This is a list of the most commonly asked questions.
Since Clight 4.9, log file is located under $XDG_RUNTIME_DIR/clight/clight.log
, that should resolve to /run/user/$uid/clight/clight.log
.
It is a tmpfs path, therefore the log file will be lost after a reboot.
If XDG_RUNTIME_DIR
is not set, Clight will fallback at trying old XDG_DATA_HOME
path, ie: into $XDG_DATA_HOME/clight/clight.log
; normally it should resolve to .local/share/clight/clight.log
.
Since Clight 4.10, its config is located at /etc/clight/clight.conf
and each module config is located under /etc/clight/modules.conf.d/
folder.
In older versions, Clight conf file was located in /etc/default/clight.conf
.
For more info: https://github.com/FedeDP/Clight/wiki/Config and man clight
.
Open Clight conf file and uncomment verbose = true;
line.
Check that [Clightd](https://github.com/FedeDP/Clightd/wiki/Ddcutil] was built with ddcutil support; moreover, check that your monitor actually supports DDC/CI:
sudo ddcutil detect
.
Yes, since Clight 4.8.
Clight relies upon Clightd (>=5.5) that polls 'drm' udev subsystem and on any event, it reloads the list of external monitors.
As soon as a new monitor is detected, Clight will gracefully set current backlight percentage on it as well as refresh gamma temperature.
For more info: https://github.com/FedeDP/Clightd/wiki/Ddcutil#monitor-hotplug.
Some distro ship a systemd-logind conf (/etc/systemd/logind.conf) with flag KillUserProcesses=no
.
This means clight will not get killed upon user leaving the session, and will not properly get killed on system shutdown.
I encourage to set the flag to yes
.
For more info, read here: https://fedoraproject.org/wiki/Changes/KillUserProcesses_by_default.
You can check your system current KillUserProcesses value through dbus:
busctl get-property org.freedesktop.login1 /org/freedesktop/login1 org.freedesktop.login1.Manager KillUserProcesses
Unfortunately on Wayland there is yet no standard protocol for gamma, dpms and screenshots handling.
Most probably your DE does not implement specific protocols.
For more info: https://github.com/FedeDP/Clight/wiki/Modules#wayland-support.
Please try to append following lines to /etc/geoclue/geoclue.conf:
[clightc]
allowed=true
system=false
users=
If issues persist, please fill a bug report.
Disable colord daemon: https://github.com/FedeDP/Clight/issues/236#issuecomment-960138088
Some monitors handle the 0 backlight level as "switched off"; in these cases, you can just update
Clight sensor.conf config file, changing the backlight curves starting points from 0.0
to an higher backlight level, like 0.1
, eg:
sensor:
{
ac_regression_points = [ 0.1, 0.15, 0.29, 0.45, 0.61, 0.74, 0.81, 0.88, 0.93, 0.97, 1.0 ];
batt_regression_points = [ 0.1, 0.15, 0.23, 0.36, 0.52, 0.59, 0.65, 0.71, 0.75, 0.78, 0.80 ];
If you manually run sudo make install
to install Clight, you might be surprised that there is no uninstall
target.
This is a CMake issue; to workaround it, you can follow: https://stackoverflow.com/questions/41471620/cmake-support-make-uninstall.
Clight may work well on its own, but where it shines is its DBus interface! You can control many aspects of how the program works through integration with other programs or your own scripts!
Clight implements the Freedesktop ScreenSaver interface, meaning many programs will automatically cause Clight to pause itself. If you want finer control, you can use Clight's dbus interface:
busctl busctl --user call org.clight.clight /org/clight/clight org.clight.clight Inhibit b true
and likewise, you can use false
to return the dimmer to normal. You can write a script to toggle inhibition:
#!/usr/bin/env python3
import dbus
bus = dbus.SessionBus()
prop = bus.get_object('org.clight.clight','/org/clight/clight')
currVal = prop.Get('org.clight.clight','Inhibited',dbus_interface='org.freedesktop.DBus.Properties')
prop.Inhibit(not currVal,dbus_interface='org.clight.clight')
Finally, Clight desktop file has a quick action to pause/resume dimmer.
Clight should automatically control your brightness to acceptable values, but if you want to override it manually, there are two ways:
- Use IncBl and DecBl to increase/decrease.
These two dbus methods can be used to increase and decrease the backlight by a certain percentage.
busctl --user call org.clight.clight /org/clight/clight org.clight.clight IncBl d 0.1
will increase the backlight by 10%. Likewise, you can use DecBl to decrease by 10%.
Here is another script to change the backlight:
#!/usr/bin/env python3
import dbus
import sys
bus = dbus.SessionBus()
obj = bus.get_object('org.clight.clight','/org/clight/clight')
if sys.argv[1] == '-inc':
obj.IncBl(float(sys.argv[2]),dbus_interface='org.clight.clight')
if sys.argv[1] == '-dec':
obj.DecBl(float(sys.argv[2]),dbus_interface='org.clight.clight')
which can be used like backlight -inc 0.1
or backlight -dec 0.1
.
- Set the backlight directly.
The DBus property BlPct can be used to set the backlight to a specific value.
busctl call org.clightd.clightd /org/clightd/clightd/Backlight org.clightd.clightd.Backlight SetAll d\(bdu\)s 0.5 false 0 0 ""
where 0.5 can be changed to the desired value.
You can use the following DBus call to disable automatic screen backlight calibration:
busctl --user set-property org.clight.clight /org/clight/clight/Conf/Backlight org.clight.clight.Conf.Backlight NoAutoCalib b true
Use false
to enable it back.
This can again be put in a script to toggle whenever you need to:
#!/usr/bin/env python3
import dbus
bus = dbus.SessionBus()
prop = bus.get_object('org.clight.clight','/org/clight/clight/Conf/Backlight')
currVal = prop.Get('org.clight.clight.Conf.Backlight','NoAutoCalib',dbus_interface='org.freedesktop.DBus.Properties')
prop.Set('org.clight.clight.Conf.Backlight','NoAutoCalib',not currVal,dbus_interface='org.freedesktop.DBus.Properties')
Finally, Clight desktop file has a quick action to pause/resume backlight autocalibration.
Sure, it is as simple as creating a video player launcher script and adding:
busctl --user set-property org.clight.clight /org/clight/clight/Conf/Backlight org.clight.clight.Conf.Backlight NoAutoCalib "b" true
busctl --user call org.clight.clight /org/clight/clight org.clight.clight IncBl "d" 1.0
before video player command, and then:
busctl --user set-property org.clight.clight /org/clight/clight/Conf/Backlight org.clight.clight.Conf.Backlight NoAutoCalib "b" false
after it, to enable back automatic screen backlight calibration.
Again, this is super easy using Clight dbus API.
Please, head to https://github.com/FedeDP/Clight/wiki/DE-Night-Mode-scripts for a list of scripts for various DEs.