Giter Site home page Giter Site logo

fededp / clightd Goto Github PK

View Code? Open in Web Editor NEW
81.0 81.0 10.0 736 KB

A linux bus interface that lets you change screen brightness, compute captured webcam frames brightness and change screen temperature.

License: GNU General Public License v3.0

C 95.49% CMake 4.51%
backlight bus-interface webcam

clightd's Introduction

Welcome to FedeDP profile! :-)

About me

Hi! I am Federico Di Pierro, a Software Engineer from Italy!
I am currently a Senior Open Source Engineer @ Sysdig, and a Falco (CNCF graduated project) core maintainer!

🔧 Technologies & Tools

Side Projects

clightd's People

Contributors

danyspin97 avatar fededp avatar ferki avatar lgbaldoni avatar pdf avatar tpeacock19 avatar vorpalblade avatar yochananmarqos avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

clightd's Issues

[Wayland] gamma changes sporadic

Sometimes, the change in gamma will disappear/flash.

I was doing some debugging and it seems that the gamma manager is closed in wl.c under the Gamma module, but I don't know if that's different from a connection.

Auto detect to use polkitd.service

After installing this on Ubuntu 16.04 I'm getting the following error:

$ sudo systemctl start clightd
Failed to start clightd.service: Unit polkit.service not found.

Reading the file it appears that you indeed knew about this (there is a comment about Ubuntu 16.04), but it would be nice to auto-detect it and fix it at compile or install time.

Tie lifetime of clightd daemon to existence of dbus system bus

Currently, clightd fails to start if dbus is not already running, as clightd cannot find the necessary dbus system bus. If dbus is running prior to launching clightd, clightd will launch as expected. However, if dbus is killed while clightd is running and attached to the bus, clightd will not die, but will instead repeatedly print error messages about an inability to connect to the bus.

It would be better if clightd died when it loses its connection to the dbus system bus. This allows service management to do the right thing when starting or restarting dbus, because clightd will terminate and the service manager can restart it. Otherwise, killing or restarting dbus while clightd is running will cause clightd to become inoperable, but the system service manager will not do the right thing and restart the daemon.

Unable to build [Ubuntu 18.10]

I am having trouble getting this to build under Ubuntu 18.10. The cmake ../ part works fine, but when I then run make, I get the following errors:

dylanparry:~/Downloads/clightd/build$ make
Scanning dependencies of target clightd
[  7%] Building C object CMakeFiles/clightd.dir/src/main.c.o
[ 15%] Building C object CMakeFiles/clightd.dir/src/modules/backlight.c.o
/home/dylanparry/Downloads/clightd/src/modules/backlight.c: In function ‘add_backlight_sn’:
/home/dylanparry/Downloads/clightd/src/modules/backlight.c:231:9: error: too few arguments to function ‘map_put’
         map_put(running_clients, sc->d.sn, sc, false);
         ^~~~~~~
In file included from /home/dylanparry/Downloads/clightd/src/modules/backlight.c:2:
/usr/local/include/module/map.h:28:23: note: declared here
 _public_ map_ret_code map_put(map_t *m, const char *key, void *value, const bool dupkey, const bool autofree);
                       ^~~~~~~
In file included from /home/dylanparry/Downloads/clightd/src/modules/backlight.c:1:
/home/dylanparry/Downloads/clightd/src/modules/backlight.c: In function ‘method_setallbrightness’:
/home/dylanparry/Downloads/clightd/src/modules/backlight.c:279:15: warning: format ‘%s’ expects argument of type ‘char *’, but argument 4 has type ‘double’ [-Wformat=]
         m_log("Target pct (smooth %d): %s%.2lf\n", is_smooth, target_pct, verse > 0 ? "+" : (verse < 0 ? "-" : ""));
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~             ~~~~~~~~~~
/home/dylanparry/Downloads/clightd/src/modules/backlight.c:279:15: warning: format ‘%lf’ expects argument of type ‘double’, but argument 5 has type ‘char *’ [-Wformat=]
make[2]: *** [CMakeFiles/clightd.dir/build.make:76: CMakeFiles/clightd.dir/src/modules/backlight.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:73: CMakeFiles/clightd.dir/all] Error 2
make: *** [Makefile:130: all] Error 2

Any idea what I'm doing wrong, or missing?

Not working on archlinux Intel Skylake

Hey the clight -c works and it gives an output. I set conf settings for Gamma just to make sure it was activated, but after a few days I'm sure its not working. I have tried to play with it and issue 'getgamma' or 'setgamma' but the examples are just not detailed enough for me. This looks like the tool I want as xbacklight is incompatible with my thinkpad p50.

I tried to check the log file but it was only generated once, I cleared it away and rebooted a heap of times and it has not returned. I installed via AUR and it compiled with all optionals without worry. I tried isseing systemctl --user status calls but it only returns: +Failed to connect to bus: No such file or directory.

clightd[9025]: /dev/video0: Permission denied

I run clight-git (and thus also clightd-git and ddcutil) on Arch. Lately, clight has stopped working and reports in it's log that:

{./modules/bus.c:308} capture_frames_brightness(): Operation not permitted

clightd says: /dev/video0: Permission denied

I'm kinda stumped, because I thought that clightd runs as root and thus really shouldn't run into any permission issues? What am I doing wrong?

Camera ambient brightness avg versus max

I see that the current method for calculating ambient brightness takes an average of brightness over all pixels in a sample, but I wonder if it wouldn't be a better idea to take the max, or perhaps quantize and use the 99th percentile to avoid outliers (or use wider buckets and take the second-to-last bucket, for less variability).

The problem I'm seeing with using the average is that a dark background (eg dark wallpaper or furniture) can significantly lower avg brightness measurements, and it's not possible to work around this using brightness curves, because the problem is environment-/location-specific (ie - based on background, one location may read as significantly brighter than another, at the same real ambient light level).

"Geoclue2 appears to be unsupported"

I noticed the following in .clight.log:

* User position:		Unsetted

* User setted sunrise:		Unsetted
* User setted sunset:		Unsetted

(W)[11:00:06]{location.c:112}	Geoclue2 appears to be unsupported.
(W)[11:00:06]{modules.c:86}	Error while loading Location module.

I set my latitude / longitude & sunrise / sunset in ~/.config/clight.conf, so it's not that big of a deal to me but I figured I'd report it.

Also, "Unsetted" is not a word. It should be "Unset" or "Not Set"

geoclue2 2.4.10-1.2
clight-git r391.3123b3b-1
clightd-git r116.9a088b7-1
Manjaro Linux
Cinnamon 3.8.8

[FeatureRequest?] Overwrite auto-exposure of webcam

Recently I begin to notice that after I use the webcam, the clight-captured brightness changes significantly. I suspect that this behavior is caused by the automatic exposure. Steps to reproduce:

  1. Calibrate clight via dbus interface;
  2. Open the webcam (using vlc or ffmpeg) and stream for a few seconds; you can see the video is automatically adjusting to the surroundings (ambient light);
  3. Repeat step 1, and get a drastically different screen brightness.

Is it possible to overwrite this behavior? Thank you very much!

Display not found when using external monitor

Clight version the issue has been seen with:

3.1

Used distribution:

Void Linux

Describe the bug
When using an external monitor (only, laptop monitor is xrandr --off) when I run clight, clightd starts outputting Display not found and nothing happens.

To expediate things, I looked at #35, and ran this diagnostic command:

❯ sudo ddcutil detect          
Invalid display
   I2C bus:             /dev/i2c-3
   EDID synopsis:
      Mfg id:           SHP
      Model:            Unspecified
      Serial number:    Unspecified
      Manufacture year: 2015
      EDID version:     1.4
   DDC communication failed

Display 1
   I2C bus:             /dev/i2c-4
   EDID synopsis:
      Mfg id:           AUS
      Model:            ASUS VP28U
      Serial number:    Unspecified
      Manufacture year: 2018
      EDID version:     1.3
   VCP version:         2.2

Expected behavior
Screen dims like when not connected.

To Reproduce
I'm using a dell xps 9360, and an ASUS VP28U external monitor over a Type-C HDMI adapter.

Please attach a Clight verbose log too!

❯ clight --verbose
SIGNAL module started.
BUS module started.
USERBUS module being started as submodule of BUS...
USERBUS module started.
INTERFACE module being started as submodule of USERBUS...
INTERFACE module started.
Trying to start BACKLIGHT module as its INTERFACE dependency was loaded...
Trying to start GAMMA module as its INTERFACE dependency was loaded...
Trying to start DIMMER module as its INTERFACE dependency was loaded...
XORG module started.
Trying to start GAMMA module as its XORG dependency was loaded...
Trying to start DIMMER module as its XORG dependency was loaded...
Trying to start DPMS module as its XORG dependency was loaded...
Trying to start LOCATION module as its BUS dependency was loaded...
geoclue_get_client(): The name org.freedesktop.GeoClue2 was not provided by any .service files
Geoclue2 appears to be unsupported.
Loading loc from cache file: No such file or directory
Error while loading LOCATION module.
LOCATION module disabled.
Disabling module GAMMA as its hard dep LOCATION was disabled...
GAMMA module disabled.
Trying to start BACKLIGHT module as its GAMMA soft dep was disabled...
GAMMA module destroyed.
LOCATION module destroyed.
Trying to start UPOWER module as its BUS dependency was loaded...
UPOWER module started.
Trying to start BACKLIGHT module as its UPOWER dependency was loaded...
Trying to start DIMMER module as its UPOWER dependency was loaded...
Trying to start DPMS module as its UPOWER dependency was loaded...
Trying to start CLIGHTD module as its BUS dependency was loaded...
Clightd found, version: 3.4.
CLIGHTD module started.
Trying to start BACKLIGHT module as its CLIGHTD dependency was loaded...
AC curve: y = -0.024825 + 0.191641x + -0.008928x^2
BATT curve: y = -0.010629 + 0.153844x + -0.007284x^2
Set timeout of 0s 1ns on fd 7.
BACKLIGHT module started.
Callback added for module BACKLIGHT on module UPOWER bus match.
Callback added for module BACKLIGHT on module INTERFACE bus match.
Callback added for module BACKLIGHT on module INTERFACE bus match.
Callback added for module BACKLIGHT on module INTERFACE bus match.
Trying to start DIMMER module as its CLIGHTD dependency was loaded...
Trying to start DPMS module as its CLIGHTD dependency was loaded...
Setted DPMS timeouts: Standby -> 900s, Suspend -> 1200s, Off -> 1800s.
DPMS module started.
Callback added for module DPMS on module UPOWER bus match.
Callback added for module DPMS on module INTERFACE bus match.
Trying to start INHIBIT module as its USERBUS dependency was loaded...
inhibit_check(): The name org.freedesktop.PowerManagement.Inhibit was not provided by any .service files
PowerManagement inhibition appears to be unsupported.
INHIBIT module started.
Trying to start DIMMER module as its INHIBIT dependency was loaded...
Average frames brightness: 0.045421.
Ambient brightness: 0.045 -> Backlight pct: 0.060
Set timeout of 600s 0ns on fd 7.
Trying to start DIMMER module as its BACKLIGHT dependency was loaded...
idle_get_client(): Unknown object '/org/clightd/clightd/Idle'.
Clight Idle error.
Error while loading DIMMER module.
DIMMER module disabled.
INHIBIT module disabled.
INHIBIT module destroyed.
DIMMER module destroyed.
^Creceived signal 2. Leaving.
DPMS module destroyed.
BACKLIGHT module destroyed.
CLIGHTD module destroyed.
UPOWER module destroyed.
XORG module destroyed.
INTERFACE module destroyed.
USERBUS module destroyed.
BUS module destroyed.
SIGNAL module destroyed.

[FEATURE REQ] Configure used VCP code

Sadly not every manufacturer conforms to the specification and on some monitors brightness might be controlled by some other VCP code than 0x10. On my external Fujitsu monitors OSD "Brightness" is controlled by VCP code 0x6b (Backlight Level: White), while 0x10 changes something called "Black Level" in the OSD, which I would rather set at a constant value, high values of this make everything unreadable.

Clightd doesn't start automatically

I got used to clightd D-Bus service starting automatically when I execute clight from ~/.xinitrc upon entering my desktop environment. Unfortunately it seems like it can't autostart anymore.

Based on my quick check, I've found 2a32d01 which dropped the DAEMON_DIR variable, but it seems like not every use of it has been cleaned up. At least Scripts/org.clightd.clightd.service still used it for its Exec line, but it's now replaced with an empty value:

[D-BUS Service]
Name=org.clightd.clightd
Exec=/clightd
User=root
SystemdService=clightd.service

Following the spirit of the above commit, replacing @DAEMON_DIR@ with @CMAKE_INSTALL_FULL_LIBEXECDIR@ in the source fixes my problem. I can send a PR about that soon.

Error when using make

Hi, I am trying to install Clightd by following the build instructions on the wiki, but for some reason when it comes to executing the make command on the /Clightd/build/ folder, I get these errors:

[ 3%] Linking C executable clightd
/usr/bin/ld: CMakeFiles/clightd.dir/src/modules/gamma_plugins/drm.c.o: in function set': drm.c:(.text+0x16a): undefined reference to drmIsMaster'
/usr/bin/ld: CMakeFiles/clightd.dir/src/modules/dpms_plugins/drm.c.o: in function set': drm.c:(.text+0x27): undefined reference to drmIsMaster'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/clightd.dir/build.make:460: clightd] Fel 1
make[1]: *** [CMakeFiles/Makefile2:73: CMakeFiles/clightd.dir/all] Fel 2
make: *** [Makefile:152: all] Fel 2

Note: "Fel" means error in Swedish.

Any idea om what this is and how can I fix it? Thanks in advance! :)

make problem

First thank you for this great piece of software. After a OS Update, i updated clightd and get a problem with make. Maybe you know what to do.

illu@illu ~/src/Clightd/build (git)-[master] % make
[  6%] Building C object CMakeFiles/clightd.dir/src/modules/backlight.c.o
/home/illu/src/Clightd/src/modules/backlight.c: In function 'init':
/home/illu/src/Clightd/src/modules/backlight.c:168:23: error: too many arguments to function 'map_new'
  168 |     running_clients = map_new(false, dtor_client);
      |                       ^~~~~~~
In file included from /home/illu/src/Clightd/src/modules/backlight.c:2:
/usr/local/include/module/map.h:26:17: note: declared here
   26 | _public_ map_t *map_new(void);
      |                 ^~~~~~~
/home/illu/src/Clightd/src/modules/backlight.c: In function 'add_backlight_sn':
/home/illu/src/Clightd/src/modules/backlight.c:260:9: error: too few arguments to function 'map_put'
  260 |         map_put(running_clients, sc->d.sn, sc);
      |         ^~~~~~~
In file included from /home/illu/src/Clightd/src/modules/backlight.c:2:
/usr/local/include/module/map.h:28:23: note: declared here
   28 | _public_ map_ret_code map_put(map_t *m, const char *key, void *value, const bool dupkey);
      |                       ^~~~~~~
/home/illu/src/Clightd/src/modules/backlight.c: In function 'method_setallbrightness':
/home/illu/src/Clightd/src/modules/backlight.c:303:9: warning: implicit declaration of function 'map_clear' [-Wimplicit-function-declaration]
  303 |         map_clear(running_clients);
      |         ^~~~~~~~~
make[2]: *** [CMakeFiles/clightd.dir/build.make:76: CMakeFiles/clightd.dir/src/modules/backlight.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:73: CMakeFiles/clightd.dir/all] Error 2
make: *** [Makefile:152: all] Error 2

Thx!

cmake error

I am trying to build clightd on debian buster. However, cmake gives me the following error message:

`jba@lina:/usr/src/Clightd-master/build$ cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_BUILD_TYPE="Release" -DENABLE_DDC=1 -DENABLE_GAMMA=1 -DENABLE_DPMS=1 -DENABLE_SCREEN=1 ..
-- Checking for modules 'libudev;libmodule>=4.0.0'
-- No package 'libmodule' found
CMake Error at /usr/share/cmake-3.13/Modules/FindPkgConfig.cmake:452 (message):
A required package was not found
Call Stack (most recent call first):
/usr/share/cmake-3.13/Modules/FindPkgConfig.cmake:622 (_pkg_check_modules_internal)
CMakeLists.txt:27 (pkg_check_modules)

-- Configuring incomplete, errors occurred!
See also "/usr/src/Clightd-master/build/CMakeFiles/CMakeOutput.log".
`

What package do I need to install?

In the original post (two years ago) it was said, that "In each repository you can find deb files inside Debian folder.". Didnt find them. Would be much easier for debian users, if the debs would be there.

Juergen

fatal error: build/org_kde_kwin_dpms-client-protocol.h: No such file or directory

I just tried building from the latest commit and it failed. What's odd is build/org_kde_kwin_dpms-client-protocol.h does exist:

-- The C compiler identification is GNU 10.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/sbin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Found PkgConfig: /usr/sbin/pkg-config (found version "1.7.3") 
-- Checking for modules 'libudev;libmodule>=5.0.0;libjpeg'
--   Found libudev, version 246
--   Found libmodule, version 5.0.0
--   Found libjpeg, version 2.0.5
-- Checking for module 'polkit-gobject-1'
--   Found polkit-gobject-1, version 0.118
-- Checking for one of the modules 'libelogind;libsystemd>=221'
-- Checking for modules 'x11;xrandr;libdrm;wayland-client'
--   Found x11, version 1.6.12
--   Found xrandr, version 1.5.2
--   Found libdrm, version 2.4.102
--   Found wayland-client, version 1.18.0
-- GAMMA support enabled
-- Checking for modules 'x11;xext;libdrm;wayland-client'
--   Found x11, version 1.6.12
--   Found xext, version 1.3.4
--   Found libdrm, version 2.4.102
--   Found wayland-client, version 1.18.0
-- DPMS support enabled
-- Checking for module 'x11'
--   Found x11, version 1.6.12
-- SCREEN support enabled
-- Checking for module 'ddcutil>=0.9.5'
--   Found ddcutil, version 0.9.9
-- DDC support enabled
-- Checking for module 'libusb-1.0'
--   Found libusb-1.0, version 1.0.23
-- YOCTOLIGHT support enabled
-- Checking for module 'libsystemd'
--   Found libsystemd, version 246
-- Configuring done
-- Generating done
-- Build files have been written to: /home/yochanan/Documents/pkgbuilds/clightd-git/src/build
make: Entering directory '/home/yochanan/Documents/pkgbuilds/clightd-git/src/build'
make[1]: Entering directory '/home/yochanan/Documents/pkgbuilds/clightd-git/src/build'
make[2]: Entering directory '/home/yochanan/Documents/pkgbuilds/clightd-git/src/build'
[  3%] Generating wlr-gamma-control-unstable-v1-protocol.c
[  6%] Generating org_kde_kwin_dpms-client-protocol.h
[ 13%] Generating org_kde_kwin_dpms-protocol.c
[ 13%] Generating wlr-gamma-control-unstable-v1-client-protocol.h
Scanning dependencies of target clightd
make[2]: Leaving directory '/home/yochanan/Documents/pkgbuilds/clightd-git/src/build'
make[2]: Entering directory '/home/yochanan/Documents/pkgbuilds/clightd-git/src/build'
[ 16%] Building C object CMakeFiles/clightd.dir/src/modules/dpms.c.o
[ 20%] Building C object CMakeFiles/clightd.dir/src/modules/screen.c.o
[ 23%] Building C object CMakeFiles/clightd.dir/src/modules/bus.c.o
[ 26%] Building C object CMakeFiles/clightd.dir/src/modules/sensor.c.o
[ 30%] Building C object CMakeFiles/clightd.dir/src/main.c.o
[ 33%] Building C object CMakeFiles/clightd.dir/src/modules/gamma.c.o
[ 40%] Building C object CMakeFiles/clightd.dir/src/modules/idle.c.o
[ 40%] Building C object CMakeFiles/clightd.dir/src/modules/backlight.c.o
[ 43%] Building C object CMakeFiles/clightd.dir/src/modules/sensors/als.c.o
/home/yochanan/Documents/pkgbuilds/clightd-git/src/clightd/src/modules/backlight.c: In function ‘receive’:
/home/yochanan/Documents/pkgbuilds/clightd-git/src/clightd/src/modules/backlight.c:216:13: warning: ignoring return value of ‘read’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
  216 |             read(sc->smooth_fd, &t, sizeof(uint64_t));
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/yochanan/Documents/pkgbuilds/clightd-git/src/clightd/src/modules/gamma.c: In function ‘receive’:
/home/yochanan/Documents/pkgbuilds/clightd-git/src/clightd/src/modules/gamma.c:75:9: warning: ignoring return value of ‘read’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   75 |         read(msg->fd_msg->fd, &t, sizeof(uint64_t));
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[ 46%] Building C object CMakeFiles/clightd.dir/src/modules/sensors/camera.c.o
[ 50%] Building C object CMakeFiles/clightd.dir/src/modules/sensors/custom.c.o
[ 53%] Building C object CMakeFiles/clightd.dir/src/modules/sensors/yoctolight.c.o
/home/yochanan/Documents/pkgbuilds/clightd-git/src/clightd/src/modules/idle.c: In function ‘receive’:
/home/yochanan/Documents/pkgbuilds/clightd-git/src/clightd/src/modules/idle.c:107:17: warning: ignoring return value of ‘read’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
  107 |                 read(msg->fd_msg->fd, &t, sizeof(uint64_t));
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[ 56%] Building C object CMakeFiles/clightd.dir/src/modules/signal.c.o
[ 60%] Building C object CMakeFiles/clightd.dir/src/utils/drm_utils.c.o
[ 63%] Building C object CMakeFiles/clightd.dir/src/utils/polkit.c.o
[ 66%] Building C object CMakeFiles/clightd.dir/src/utils/udev.c.o
[ 70%] Building C object CMakeFiles/clightd.dir/src/utils/wl_utils.c.o
[ 73%] Building C object CMakeFiles/clightd.dir/wlr-gamma-control-unstable-v1-protocol.c.o
[ 76%] Building C object CMakeFiles/clightd.dir/src/modules/gamma_plugins/drm.c.o
[ 80%] Building C object CMakeFiles/clightd.dir/src/modules/gamma_plugins/wl.c.o
[ 83%] Building C object CMakeFiles/clightd.dir/src/modules/gamma_plugins/xorg.c.o
[ 86%] Building C object CMakeFiles/clightd.dir/org_kde_kwin_dpms-protocol.c.o
[ 90%] Building C object CMakeFiles/clightd.dir/src/modules/dpms_plugins/drm.c.o
[ 93%] Building C object CMakeFiles/clightd.dir/src/modules/dpms_plugins/wl.c.o
[ 96%] Building C object CMakeFiles/clightd.dir/src/modules/dpms_plugins/xorg.c.o
/home/yochanan/Documents/pkgbuilds/clightd-git/src/clightd/src/modules/dpms_plugins/wl.c:1:10: fatal error: build/org_kde_kwin_dpms-client-protocol.h: No such file or directory
    1 | #include "build/org_kde_kwin_dpms-client-protocol.h"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/clightd.dir/build.make:397: CMakeFiles/clightd.dir/src/modules/dpms_plugins/wl.c.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory '/home/yochanan/Documents/pkgbuilds/clightd-git/src/build'
make[1]: *** [CMakeFiles/Makefile2:95: CMakeFiles/clightd.dir/all] Error 2
make[1]: Leaving directory '/home/yochanan/Documents/pkgbuilds/clightd-git/src/build'
make: *** [Makefile:171: all] Error 2
make: Leaving directory '/home/yochanan/Documents/pkgbuilds/clightd-git/src/build'

Wiki Build instructions should refer to virtual packages

Hi,

TLDR: please clone https://github.com/Code7R/Clightd.wiki.git (or add as remote in yours) and merge/cherry-pick latest.

The instructions don't work on latest Debian because some of the dev packages have different names. However, they all provide virtual dependency, thus the modified command line.

$ sudo apt install build-essential pkg-config cmake libsystemd-dev libxrandr-dev libxext-dev policykit-1 libpolkit-gobject-1-dev libjpeg-dev libusb-dev libwayland-dev libdrm-dev

Not loading at startup

I verified /etc/xdg/autostart/clight.desktop exists, but it neither loads at startup nor does it appear in the Startup Applications Cinnamon settings applet. I just did this instead: systemctl --user enable clight.timer and the service loads at startup.

clight-git r391.3123b3b-1
clightd-git r116.9a088b7-1
Manjaro Linux
Cinnamon 3.8.8

Clightd service fails on start

Running sudo service clightd start fails with:

Job for clightd.service failed because the control process exited with error code.
See "systemctl status clightd.service" and "journalctl -xe" for details.

Running journalctl -xe yields:

...
-- Subject: A stop job for unit clightd.service has finished
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- A stop job for unit clightd.service has finished.
-- 
-- The job identifier is 25484 and the job result is done.
Sep 13 11:54:49 bitnorm2 systemd[1]: Starting Bus service to manage various screen related properties (gamma, dpms, backlight)...
-- Subject: A start job for unit clightd.service has begun execution
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- A start job for unit clightd.service has begun execution.
-- 
-- The job identifier is 25484.
Sep 13 11:54:49 bitnorm2 clightd[195904]: /usr/lib/clightd/clightd: error while loading shared libraries: libddcutil.so.3: cannot open shared object file: No such file or directory
Sep 13 11:54:49 bitnorm2 systemd[1]: clightd.service: Main process exited, code=exited, status=127/n/a
-- Subject: Unit process exited
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- An ExecStart= process belonging to unit clightd.service has exited.
-- 
-- The process' exit code is 'exited' and its exit status is 127.
Sep 13 11:54:49 bitnorm2 systemd[1]: clightd.service: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- The unit clightd.service has entered the 'failed' state with result 'exit-code'.
Sep 13 11:54:49 bitnorm2 systemd[1]: Failed to start Bus service to manage various screen related properties (gamma, dpms, backlight).
-- Subject: A start job for unit clightd.service has failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- A start job for unit clightd.service has finished with a failure.
-- 
-- The job identifier is 25484 and the job result is failed.

I have ddcutil installed.

Webcam is used for measureing ambient light in favor of iio sensor

Device:
Lenovo Yoga 730 15
comes with ambient light sensor

[le@w530]: ~>$ ls -ahl /sys/bus/iio/devices/iio:device1/
total 0
drwxr-xr-x 6 root root    0 Dec 22 04:03 .
drwxr-xr-x 5 root root    0 Dec 22 04:03 ..
drwxr-xr-x 2 root root    0 Dec 22 04:05 buffer
-r--r--r-- 1 root root 4.0K Dec 22 04:05 dev
-rw-r--r-- 1 root root 4.0K Dec 22 04:05 in_illuminance_hysteresis
-rw-r--r-- 1 root root 4.0K Dec 22 04:05 in_illuminance_offset
-rw-r--r-- 1 root root 4.0K Dec 22 04:03 in_illuminance_raw
-rw-r--r-- 1 root root 4.0K Dec 22 04:05 in_illuminance_sampling_frequency
-rw-r--r-- 1 root root 4.0K Dec 22 04:05 in_illuminance_scale
-rw-r--r-- 1 root root 4.0K Dec 22 04:05 in_intensity_both_raw
-rw-r--r-- 1 root root 4.0K Dec 22 04:05 in_intensity_hysteresis
-rw-r--r-- 1 root root 4.0K Dec 22 04:05 in_intensity_offset
-rw-r--r-- 1 root root 4.0K Dec 22 04:05 in_intensity_sampling_frequency
-rw-r--r-- 1 root root 4.0K Dec 22 04:05 in_intensity_scale
-r--r--r-- 1 root root 4.0K Dec 22 04:05 name
drwxr-xr-x 2 root root    0 Dec 22 04:05 power
drwxr-xr-x 2 root root    0 Dec 22 04:05 scan_elements
lrwxrwxrwx 1 root root    0 Dec 22 04:05 subsystem -> ../../../../../../../../../bus/iio
drwxr-xr-x 2 root root    0 Dec 22 04:05 trigger
-rw-r--r-- 1 root root 4.0K Dec 22 04:05 uevent

However, the webcam is polled to check the ambient light (webcam light turns on every now and then) in favor of the ALS.

How to enable gamma, idle, etc

I've managed to get this compiled, and have also compiled clight with no issues. They work just fine too. The problem I'm having is that clightd has compiled without support for gamme, dpms, idle, ddc, etc, and I can't figure out how to enable them.

I've installed the necessary optional dependencies (headers for xrandr, x11, ddcutil) for gamma, idle, and dcc support, but running CMAKE gives me the following showing that these modules aren't enabled:

dylanparry:~/Downloads/clightd/build$  cmake ../
-- The C compiler identification is GNU 8.2.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1") 
-- Checking for modules 'libudev;libmodule>=3.1.0;polkit-gobject-1'
--   Found libudev, version 239
--   Found libmodule, version 3.2.0
--   Found polkit-gobject-1, version 0.105
-- Checking for one of the modules 'libelogind;libsystemd>=221'
-- GAMMA support disabled
-- DPMS support disabled
-- IDLE support disabled
-- DDC support disabled
-- Checking for module 'libsystemd'
--   Found libsystemd, version 239
-- Configuring done
-- Generating done
-- Build files have been written to: /home/dylanparry/Downloads/clightd/build

Any ideas?

Installation help: No package 'polkit-gobject-1' found with libpolkit-gobject-1-0 installed

when I try to run

cmake \                                       
    -G "Unix Makefiles" \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DCMAKE_INSTALL_LIBDIR=lib \
    -DCMAKE_BUILD_TYPE="Release" \
    -DENABLE_DDC=1 -DENABLE_GAMMA=1 -DENABLE_DPMS=1 -DENABLE_SCREEN=1 \
    ..

I get the following error

-- Checking for module 'polkit-gobject-1'
--   No package 'polkit-gobject-1' found
CMake Error at /usr/share/cmake-3.10/Modules/FindPkgConfig.cmake:415 (message):
  A required package was not found
Call Stack (most recent call first):
  /usr/share/cmake-3.10/Modules/FindPkgConfig.cmake:593 (_pkg_check_modules_internal)
  CMakeLists.txt:28 (pkg_check_modules)


-- Configuring incomplete, errors occurred!
See also "/home/isla/Clightd/build/CMakeFiles/CMakeOutput.log".

I have libpolkit-gobject-1-0 installed and I'm running ubuntu 18.04. Is there some other polkit library I should have installed?

Manual brightness configuration

Clight provides a nice backlight abstraction with smooth transitions, thus one might legitimately want to use it to configure the brightness manually. This would ditch the need for non-standard tools such as brightnessctl, Xorg-specific xbacklight or scripting /sys/class/backlight.

For this purpose we'd need a new bus API method (do not mind the following method names too much as they are yet to be defined) like SetScreenBacklight [+|-]<value>[%], where value can be a brightness value (e.g. 1000) or a percentage (e.g. 0.5 or 50%) of its maximum, either absolute or relative to the actual brightness.

For example, SetScreenBacklight +10% would raise the brightness by 10%, while SetScreenBacklight 0.5 would set its brightness to half its maximum.

Same goes for an eventual SetKeyboardBacklight method (see #44).

(Do not mind the method names too much as they are yet to be defined.)

This would work like a charm with:

  • clight's auto-calibration turned off;
  • systemd-backlight which job is just to remember the brightness value of a given backlight device and restore it on next boot;
  • Custom XF86MonBrightnessDown and XF86MonBrightnessUp key bindings;
  • even machines without webcam.

yellowish adjustment after dark?

I have been using Clightd for a couple of years. My screen turned yellowish after sunset after the recent update. Is there a way to fix it in the config setting?

somme errors/warning using clight

openSuse 15.2
clight 4.0, clightd 4.0

Hello

i explore clight.

i built clightd 4.0 with this script

git clone -b '4.0' --single-branch --depth 1 https://github.com/FedeDP/Clightd.git
cd Clightd
echo "* Building clightd"
mkdir build
cd build
cmake
-G "Unix Makefiles"
-DCMAKE_INSTALL_PREFIX=/usr
-DCMAKE_INSTALL_LIBDIR=lib
-DCMAKE_BUILD_TYPE="Release"
-DENABLE_DDC=1 -DENABLE_GAMMA=1 -DENABLE_SCREEN=1 -DENABLE_DPMS=1
../
make

Strangely when using clight I get these errors in clight.log

(W)[17:17:15]{opts.c:189} GAMMA forcefully disabled as Clightd was built without gamma support.
(W)[17:17:15]{opts.c:194} SCREEN forcefully disabled as Clightd was built without screen support.

and this one

(I)[17:17:15]{main.c:134} Clightd found, version: 4.0.
(I)[17:17:15]{upower.c:24} Initial AC state: connected.
(W)[17:17:15]{interface.c:246} Failed to create org.freedesktop.ScreenSaver dbus interface: Unknown error -1
(I)[17:17:15]{interface.c:247} Fallback at monitoring requests to org.freedesktop.ScreenSaver name owner.

[Question]: Preferred package name

I'm packaging this and other apps from your repository and I wondered if the initial ought to be capitalised.
Minor detail, but it can become problematic to change later.

High CPU usage

Clight seems to occasionally go in a state where it uses a lot of CPU. It sits at 12% for me until I kill the process. This is someting that has been occurring for a few months.

I use the latest stable version from the AUR on Arch Linux.

image

Install into LIBEXECDIR

As part of my efforts to package clightd for Gentoo in my overlay, I had to apply a small patch to make sure that clightd itself is installed into LIBEXECDIR instead of LIBDIR (/usr/libexec vs /usr/lib64) in order to be consistent with the file system layout.

I imagine this would also be useful for other downstream packagers as well, so I wondered if it's something you would consider merging upstream? Of course, I'd be happy to share the patch in the form of a follow-up PR :)

Unable to configure file-based input source

Repro steps:

installed clightd and clight following wiki instructions.
Created a text file /etc/clightd/sensors.d/sysname which is owned by a user and is readable to root.
Restarted clightd service.
Used clight.conf from Extra folder in clight for ~/.config/clight.conf .
Started clight.

SCREEN forcefully disabled as Clightd was built without screen support.
Clightd found, version: 5.0.
AC curve: y = -0.024825 + 0.191641x + -0.008928x^2
BATT curve: y = -0.010629 + 0.153844x + -0.007284x^2
init_kbd_backlight(): Keine derartige Schnittstelle »org.freedesktop.UPower.KbdBacklight« des Objekts im Pfad /org/freedesktop/UPower/KbdBacklight
Keyboard backlight calibration unsupported.
Not a laptop device. Killing UPower module.
Failed to retrieve AC state; fallback to ON_AC and OPEN lid.
Emitting AcState property
Emitting LidState property
Error loading from cache file.

Actions

Writing a text value light "20" or "50" into /etc/clightd/sensors.d/sysname has no effect.
Verbosity output also not reporting that /etc/clightd/sensors.d/sysname is used.
Double-checked https://github.com/FedeDP/Clightd/wiki/Sensors assuming that I forgot something. The description is vague, I assume that "sysname" is a bare path name, although putting this into quotes might mean something... but that thing is hard to grasp from the comments in clight.conf sample or wiki.

Double checking inotify:
$sudo ls -la /proc/$(pidof clightd)/fd | grep notify
...
lr-x------ 1 root root 64 28. Nov 14:46 19 -> anon_inode:inotify
lr-x------ 1 root root 64 28. Nov 14:46 31 -> anon_inode:inotify

So it is observing something but what?

[BUG] External monitors update brightness starting from 0 instead of actual value.

Clight version the issue has been seen with:

FedeDP/Clight@da42d65

Clightd version the issue has been seen with:

77fa37a

Used distribution:

Bedrock Linux 0.7.20beta1 (Poki), Debian Testing stratum

Describe the bug
On capture, external monitors transition from 0 to new value, regardless of what value they were set at before capture. In the log you can see a laptop screen and an external monitor both updating, the external monitor starting from 0 instead of its previous value.

clight.log
Clight
* Software version:             4.3
* Global config dir:            /etc/default
* Global data dir:              /usr/share/clight
* Starting time:                Sat Feb  6 21:29:20 2021

Starting options:

### GENERIC ###
* Verbose (debug):              Enabled
* ResumeDelay:          0

### BACKLIGHT ###
* Smooth trans:         Enabled
* Smooth steps:         0.02
* Smooth timeout:               30
* Daily timeouts:               AC 900  BATT 1800
* Nightly timeout:              AC 2700 BATT 5400
* Event timeouts:               AC 300  BATT 600
* Backlight path:               Unset
* Shutter threshold:            0.00
* Autocalibration:              Enabled
* Pause on lid closed:          Enabled
* Capture on lid opened:                Enabled

### SENSOR ###
* Captures:             AC 5    BATT 5
* Device:               video0
* Settings:             10094849=1,10094850=500

### KEYBOARD ###
* Dim:          Disabled
* Threshold:            0.90
* Timeouts:             AC 10   BATT 10

### GAMMA ###
* Smooth trans:         Enabled
* Smooth steps:         50
* Smooth timeout:               300
* Daily screen temp:            6500
* Nightly screen temp:          4200
* Long transition:              Enabled
* Ambient gamma:                Disabled

### DAYTIME ###
* User position:                Unset
* User set sunrise:             Unset
* User set sunset:              Unset
* Event duration:               1800

### DIMMER ###
* Smooth trans:         ENTER: Enabled, EXIT: Enabled
* Smooth steps:         ENTER: 0.05, EXIT: 0.05
* Smooth timeout:               ENTER: 30, EXIT: 30
* Timeouts:             AC 200  BATT 100
* Backlight pct:                0.06

### DPMS ###
* Timeouts:             AC 2700 BATT 900

### SCREEN ###
* Timeouts:             AC 60   BATT -1
* Contrib:              0.10
* Samples:              10

### INHIBIT ###
* Docked:               Disabled
* PowerManagement:              Disabled

(I)[21:29:20]{main.c:127}       Clightd found, version: 5.2.
(I)[21:29:20]{main.c:157}       '/home/nicholas/.local/share/clight/modules.d/inhibit_md' loaded.
(I)[21:29:20]{main.c:157}       '/home/nicholas/.local/share/clight/modules.d/trendlog' loaded.
(I)[21:29:20]{backlight.c:410}  AC curve: y = -0.047881 + 0.140997x + -0.003759x^2
BL
^
|         *
|       ** 
|      *   
|     *    
|    *     
|          
|   *      
|  *       
| *        
|*         
*---------->BR
(I)[21:29:20]{backlight.c:410}  BATT curve: y = -0.023965 + 0.079628x + 0.001078x^2
BL
^
|          
|         *
|          
|      *** 
|     *    
|          
|    *     
|          
|  **      
|**        
*---------->BR
(I)[21:29:20]{keyboard.c:126}   Keyboard backlight calibration supported.
(I)[21:29:20]{trendlog.c:47}    Logging AmbientBr and BlPct into /home/nicholas/.cache/clight-trendlog/
(W)[21:29:20]{interface.c:399}  Failed to create org.freedesktop.ScreenSaver dbus interface: Unknown error -1
(I)[21:29:20]{interface.c:400}  Fallback at monitoring requests to org.freedesktop.ScreenSaver name owner.
(D)[21:29:20]{timer.c:34}       Disarmed timerfd on fd 44.
(I)[21:29:20]{upower.c:54}      AC cable connected.
(I)[21:29:20]{upower.c:65}      Laptop lid opened.
(D)[21:29:20]{interface.c:445}  Emitting 'AcState' property
(D)[21:29:20]{timer.c:32}       Set timeout of 0s 1ns on fd 47.
(D)[21:29:20]{interface.c:445}  Emitting 'LidState' property
(D)[21:29:20]{timer.c:32}       Set timeout of 60s 0ns on fd 47.
(D)[21:29:20]{location.c:95}    35.84 -78.85 loaded from cache file.
(D)[21:29:20]{my_math.c:248}    Loc distance: 35.84,-78.85 -> 91.00,181.00 : 3730.01 km.
(I)[21:29:20]{location.c:62}    New location received: 35.84, -78.85.
(D)[21:29:20]{timer.c:32}       Set timeout of 0s 1ns on fd 48.
(D)[21:29:20]{interface.c:445}  Emitting 'Location' property
(I)[21:29:20]{daytime.c:175}    Next alarm due to: Sun Feb  7 06:42:00 2021
(D)[21:29:20]{timer.c:32}       Set timeout of 33160s 0ns on fd 48.
(D)[21:29:20]{interface.c:445}  Emitting 'Sunrise' property
(D)[21:29:20]{interface.c:445}  Emitting 'Sunset' property
(D)[21:29:20]{interface.c:445}  Emitting 'DayTime' property
(I)[21:29:20]{gamma.c:177}      Normal transition to 4200 gamma temp.
(D)[21:29:20]{timer.c:32}       Set timeout of 0s 1ns on fd 49.
(D)[21:29:20]{backlight.c:283}  Sensor '/dev/video0' is now available.
(D)[21:29:20]{backlight.c:489}  Resumed as a sensor is now available.
(D)[21:29:20]{interface.c:445}  Emitting 'NextEvent' property
(D)[21:29:20]{inhibit_md.c:117} New temp: 4200, Saved temp: 6500, Step: 50, Timeout: 300
(D)[21:29:20]{interface.c:445}  Emitting 'Temp' property
(D)[21:29:20]{inhibit_md.c:117} New temp: 4200, Saved temp: 4200, Step: 4200, Timeout: 0
(D)[21:29:20]{interface.c:445}  Emitting 'SensorAvail' property
(D)[21:29:20]{backlight.c:297}  Captured [5/5] from '/dev/video0'. Ambient brightness: 0.727340.
(I)[21:29:22]{backlight.c:323}  Ambient brightness: 0.727 -> Backlight pct: 0.779.
(D)[21:29:22]{timer.c:32}       Set timeout of 2700s 0ns on fd 49.
(D)[21:29:22]{interface.c:445}  Emitting 'Temp' property
(D)[21:29:22]{interface.c:445}  Emitting 'AmbientBr' property
(D)[21:29:22]{interface.c:445}  Emitting 'BlPct' property
(D)[21:29:22]{interface.c:445}  Emitting 'KbdPct' property
(D)[21:29:22]{location.c:174}   35.92 -79.05 received from Geoclue2.
(D)[21:29:22]{backlight.c:503}  Backlight level updated: 0.02.
(D)[21:29:22]{backlight.c:503}  Backlight level updated: 0.91.
(D)[21:29:22]{my_math.c:248}    Loc distance: 35.92,-79.05 -> 35.84,-78.85 : 12.59 km.
(D)[21:29:22]{validations.c:10} Failed to validate location request.
(D)[21:29:22]{interface.c:445}  Emitting 'BlPct' property
(D)[21:29:22]{interface.c:445}  Emitting 'BlPct' property
(D)[21:29:22]{backlight.c:503}  Backlight level updated: 0.91.
(D)[21:29:22]{interface.c:445}  Emitting 'BlPct' property
(D)[21:29:23]{backlight.c:503}  Backlight level updated: 0.04.
(D)[21:29:23]{interface.c:445}  Emitting 'BlPct' property
(D)[21:29:23]{backlight.c:503}  Backlight level updated: 0.89.
(D)[21:29:23]{interface.c:445}  Emitting 'BlPct' property
(D)[21:29:23]{backlight.c:503}  Backlight level updated: 0.06.
(D)[21:29:23]{interface.c:445}  Emitting 'BlPct' property
(D)[21:29:23]{backlight.c:503}  Backlight level updated: 0.87.
(D)[21:29:23]{interface.c:445}  Emitting 'BlPct' property
(D)[21:29:23]{backlight.c:503}  Backlight level updated: 0.08.
(D)[21:29:23]{interface.c:445}  Emitting 'BlPct' property
(D)[21:29:23]{backlight.c:503}  Backlight level updated: 0.85.
(D)[21:29:23]{interface.c:445}  Emitting 'BlPct' property
(D)[21:29:23]{backlight.c:503}  Backlight level updated: 0.10.
(D)[21:29:23]{interface.c:445}  Emitting 'BlPct' property
(D)[21:29:23]{backlight.c:503}  Backlight level updated: 0.83.
(D)[21:29:23]{interface.c:445}  Emitting 'BlPct' property
(D)[21:29:24]{backlight.c:503}  Backlight level updated: 0.12.
(D)[21:29:24]{interface.c:445}  Emitting 'BlPct' property
(D)[21:29:24]{backlight.c:503}  Backlight level updated: 0.81.
(D)[21:29:24]{interface.c:445}  Emitting 'BlPct' property
(D)[21:29:24]{backlight.c:503}  Backlight level updated: 0.14.
(D)[21:29:24]{interface.c:445}  Emitting 'BlPct' property
(D)[21:29:24]{backlight.c:503}  Backlight level updated: 0.79.
(D)[21:29:24]{interface.c:445}  Emitting 'BlPct' property
(D)[21:29:24]{backlight.c:503}  Backlight level updated: 0.16.
(D)[21:29:24]{interface.c:445}  Emitting 'BlPct' property
(D)[21:29:24]{backlight.c:503}  Backlight level updated: 0.78.
(D)[21:29:24]{interface.c:445}  Emitting 'BlPct' property
(D)[21:29:24]{backlight.c:503}  Backlight level updated: 0.18.
(D)[21:29:24]{interface.c:445}  Emitting 'BlPct' property
(D)[21:29:25]{backlight.c:503}  Backlight level updated: 0.20.
(D)[21:29:25]{interface.c:445}  Emitting 'BlPct' property
(D)[21:29:25]{backlight.c:503}  Backlight level updated: 0.22.
(D)[21:29:25]{interface.c:445}  Emitting 'BlPct' property
(D)[21:29:25]{backlight.c:503}  Backlight level updated: 0.24.
(D)[21:29:25]{interface.c:445}  Emitting 'BlPct' property
(D)[21:29:25]{backlight.c:503}  Backlight level updated: 0.26.
(D)[21:29:25]{interface.c:445}  Emitting 'BlPct' property
(D)[21:29:26]{backlight.c:503}  Backlight level updated: 0.28.
(D)[21:29:26]{interface.c:445}  Emitting 'BlPct' property
(D)[21:29:26]{backlight.c:503}  Backlight level updated: 0.30.
(D)[21:29:26]{interface.c:445}  Emitting 'BlPct' property
(D)[21:29:26]{backlight.c:503}  Backlight level updated: 0.32.
(D)[21:29:26]{interface.c:445}  Emitting 'BlPct' property
(D)[21:29:26]{backlight.c:503}  Backlight level updated: 0.34.
(D)[21:29:26]{interface.c:445}  Emitting 'BlPct' property
(D)[21:29:27]{backlight.c:503}  Backlight level updated: 0.36.
(D)[21:29:27]{interface.c:445}  Emitting 'BlPct' property
(D)[21:29:27]{backlight.c:503}  Backlight level updated: 0.38.
(D)[21:29:27]{interface.c:445}  Emitting 'BlPct' property
(D)[21:29:27]{backlight.c:503}  Backlight level updated: 0.40.
(D)[21:29:27]{interface.c:445}  Emitting 'BlPct' property
(D)[21:29:27]{backlight.c:503}  Backlight level updated: 0.42.
(D)[21:29:27]{interface.c:445}  Emitting 'BlPct' property
(D)[21:29:28]{backlight.c:503}  Backlight level updated: 0.44.
(D)[21:29:28]{interface.c:445}  Emitting 'BlPct' property
(D)[21:29:28]{backlight.c:503}  Backlight level updated: 0.46.
(D)[21:29:28]{interface.c:445}  Emitting 'BlPct' property
(D)[21:29:28]{backlight.c:503}  Backlight level updated: 0.48.
(D)[21:29:28]{interface.c:445}  Emitting 'BlPct' property
(D)[21:29:28]{backlight.c:503}  Backlight level updated: 0.50.
(D)[21:29:28]{interface.c:445}  Emitting 'BlPct' property
(D)[21:29:28]{backlight.c:503}  Backlight level updated: 0.52.
(D)[21:29:28]{interface.c:445}  Emitting 'BlPct' property
(D)[21:29:29]{backlight.c:503}  Backlight level updated: 0.54.
(D)[21:29:29]{interface.c:445}  Emitting 'BlPct' property
(D)[21:29:29]{backlight.c:503}  Backlight level updated: 0.56.
(D)[21:29:29]{interface.c:445}  Emitting 'BlPct' property
(D)[21:29:29]{backlight.c:503}  Backlight level updated: 0.58.
(D)[21:29:29]{interface.c:445}  Emitting 'BlPct' property
(D)[21:29:29]{backlight.c:503}  Backlight level updated: 0.60.
(D)[21:29:29]{interface.c:445}  Emitting 'BlPct' property
(D)[21:29:30]{backlight.c:503}  Backlight level updated: 0.62.
(D)[21:29:30]{interface.c:445}  Emitting 'BlPct' property
(D)[21:29:30]{backlight.c:503}  Backlight level updated: 0.64.
(D)[21:29:30]{interface.c:445}  Emitting 'BlPct' property
(D)[21:29:30]{backlight.c:503}  Backlight level updated: 0.66.
(D)[21:29:30]{interface.c:445}  Emitting 'BlPct' property
(D)[21:29:30]{backlight.c:503}  Backlight level updated: 0.68.
(D)[21:29:30]{interface.c:445}  Emitting 'BlPct' property
(D)[21:29:31]{backlight.c:503}  Backlight level updated: 0.70.
(D)[21:29:31]{interface.c:445}  Emitting 'BlPct' property
(D)[21:29:31]{backlight.c:503}  Backlight level updated: 0.72.
(D)[21:29:31]{interface.c:445}  Emitting 'BlPct' property
(D)[21:29:31]{backlight.c:503}  Backlight level updated: 0.74.
(D)[21:29:31]{interface.c:445}  Emitting 'BlPct' property
(D)[21:29:31]{backlight.c:503}  Backlight level updated: 0.76.
(D)[21:29:31]{interface.c:445}  Emitting 'BlPct' property
(D)[21:30:20]{bus.c:181}        get_screen_brightness(): Unknown object '/org/clightd/clightd/Screen'.

Yocto Light sensors as ALS?

Below is the output of udevadm monitor

I know they use the standard HID interface but I'm wondering how I can go about getting clight to read values from them.

Thank you

UDEV  [1979.537983] add      /class/usbmisc (class)
UDEV  [1979.538750] add      /devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3.4 (usb)
UDEV  [1979.541120] add      /devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3.4/1-3.4:1.0 (usb)
UDEV  [1979.542625] add      /devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3.4/1-3.4:1.0/usbmisc/hiddev0 (usbmisc)
UDEV  [1979.543187] add      /devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3.4/1-3.4:1.0/0003:24E0:0043.0009 (hid)
UDEV  [1979.551811] add      /devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3.4/1-3.4:1.0/0003:24E0:0043.0009/hidraw/hidraw1 (hidraw)
UDEV  [1979.552210] bind     /devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3.4/1-3.4:1.0/0003:24E0:0043.0009 (hid)
UDEV  [1979.552633] bind     /devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3.4/1-3.4:1.0 (usb)
UDEV  [1979.553140] bind     /devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3.4 (usb)

Virtual ambiance light indicator device

While there are already existing tools to control backlight (usually in DE settings), color temperature (redshift, f.lux), dpms and dimming (also both DE settings, more likely in power-man part), and even some integration with ambiant light sensors (i found mention, that gnome automatically uses it to adjust brightness, if such sensor found), there are only lack of something to use webcam as light sensor.

Having some virtual device, which actually gets brightness from software, instead of hardware, would allow to things to work in more standard way. Virtual device may have input, either for video buffer (so, module itself does all calculation for final brightness value) or light level itself (i.e., userspace daemon calculates value by own, and uses virtual device only to submit results).

Probably, second variant looks more desirable, as daemon would be needed anyway, to do input.

Clightd service does not stop

Hi,
I just installed a new Arch on a new hardware, and got an issue with clightd service. It does not stop…

Every time I shutdown my desktop, the service does not stop, even after 5 minutes…
If I manually restart the service, it's the same. Even if I send kill -9 signal, process does not stop

There is the journalctl log during a normal start and manual restart

janv. 17 22:35:33 minsk systemd[1]: Starting Bus service to manage various screen related properties (gamma, dpms, backlight)...
janv. 17 22:35:35 minsk systemd[1]: Started Bus service to manage various screen related properties (gamma, dpms, backlight).
janv. 17 22:35:37 minsk clightd[444]: Registered 'Als' sensor plugin.
janv. 17 22:35:37 minsk clightd[444]: Registered 'Camera' sensor plugin.
janv. 17 22:35:37 minsk clightd[444]: Registered 'Custom' sensor plugin.
janv. 17 22:35:37 minsk clightd[444]: Registered 'YoctoLight' sensor plugin.
janv. 17 22:35:37 minsk clightd[444]:    No drm class cards found in /sys/class/drm
janv. 17 22:35:37 minsk clightd[444]: Registered 'Drm' gamma plugin.
janv. 17 22:35:37 minsk clightd[444]: Registered 'Wl' gamma plugin.
janv. 17 22:35:37 minsk clightd[444]: Registered 'Xorg' gamma plugin.
janv. 17 22:35:37 minsk clightd[444]: Registered 'Drm' dpms plugin.
janv. 17 22:35:37 minsk clightd[444]: Registered 'Wl' dpms plugin.
janv. 17 22:35:37 minsk clightd[444]: Registered 'Xorg' dpms plugin.
janv. 17 22:35:37 minsk clightd[444]: Registered 'Fb' screen plugin.
janv. 17 22:35:37 minsk clightd[444]: Registered 'Wl' screen plugin.
janv. 17 22:35:37 minsk clightd[444]: Registered 'Xorg' screen plugin.
janv. 17 22:35:37 minsk clightd[444]: (check_displays                ) Displays changed!
janv. 17 22:35:37 minsk clightd[444]: [63B blob data]
janv. 17 22:35:37 minsk clightd[444]: (check_displays                ) Current  connected displays: card0-DP-2
janv. 17 22:35:37 minsk clightd[444]: (dummy_display_change_handler  ) changes = Changed_Added
janv. 17 22:35:37 minsk clightd[444]: (dummy_display_change_handler  ) Added displays: card0-DP-2
janv. 17 22:35:38 minsk clightd[444]: Device does not support neither GREY nor YUYV nor MJPEG pixelformats.: Invalid argument
janv. 17 22:41:53 minsk systemd[1]: Stopping Bus service to manage various screen related properties (gamma, dpms, backlight)...
janv. 17 22:43:23 minsk systemd[1]: clightd.service: State 'stop-sigterm' timed out. Killing.
janv. 17 22:43:23 minsk systemd[1]: clightd.service: Killing process 444 (clightd) with signal SIGKILL.
janv. 17 22:44:53 minsk systemd[1]: clightd.service: Processes still around after SIGKILL. Ignoring.
janv. 17 22:46:23 minsk systemd[1]: clightd.service: State 'final-sigterm' timed out. Killing.
janv. 17 22:46:23 minsk systemd[1]: clightd.service: Killing process 444 (clightd) with signal SIGKILL.
janv. 17 22:47:53 minsk systemd[1]: clightd.service: Processes still around after final SIGKILL. Entering failed mode.
janv. 17 22:47:53 minsk systemd[1]: clightd.service: Failed with result 'timeout'.
janv. 17 22:47:53 minsk systemd[1]: clightd.service: Unit process 444 (clightd) remains running after unit stopped.
janv. 17 22:47:53 minsk systemd[1]: Stopped Bus service to manage various screen related properties (gamma, dpms, backlight).
janv. 17 22:47:53 minsk systemd[1]: clightd.service: Found left-over process 444 (clightd) in control group while starting unit. Ignoring.
janv. 17 22:47:53 minsk systemd[1]: This usually indicates unclean termination of a previous run, or service implementation deficiencies.

After time, the old process (PID 444 in this example) is still running.

I also have the CPU-load issue on clight but it's another topic : FedeDP/Clight#106

If someone have an idea about… It's unusual that SIGKILL cant stop a process
Thanks

libmodule 5.0.0

clightd installation fails because of out-of-date libmodule AUR

--   Package dependency requirement 'libmodule >= 5.0.0' could not be satisfied.
Package 'libmodule' has version '4.2.0', required version is '>= 5.0.0'

cannot disable clight(d)

I am in arch linux. Even when disabling the clightd.service unit, after a while clight and clightd are running again. Cannot figure out why. Any idea why this might happen?

Cheers
Lukas

● clightd.service - Bus service to manage various screen related properties (gamma, dpms, backlight)
     Loaded: loaded (/usr/lib/systemd/system/clightd.service; disabled; vendor preset: disabled)
     Active: active (running) since Mon 2020-06-29 11:59:30 CEST; 1h 2min ago
   Main PID: 155514 (clightd)
      Tasks: 2 (limit: 38352)
     Memory: 2.6M
     CGroup: /system.slice/clightd.service
             └─155514 /usr/lib/clightd/clightd

Dependency "polkitd.service" in ubuntu 16.04 not automatically set for me through clightd cmake

Clight does not start and shows this error:
Error loading from cache file.

Any idea what this means?

Another user advised me to restart Clightd, so I did, and perhaps that shows the underlying problem:

~$ systemctl restart clightd
Failed to restart clightd.service: Unit polkit.service not found.

Additional comments I received about this in issue 98 is:
Quote from FedeDP:

This is weird; polkit systemd unit is called "polkitd.service" in ubuntu 16.04 (there is even a comment in Clightd CMakeLists.txt: https://github.com/FedeDP/Clightd/blob/master/CMakeLists.txt#L104).
The dependency should be automatically set for you through clightd cmake. If that's not the case, please open an issue on Clightd!

Hope to see a solution soon, so that my Clight can start again! (issue started after installation of the newest Clight files from master with your latest work in it).

No/bad support for installing to a different prefix

Installing to a non-standard directory (i.e. /opt/clight or /usr/local/bin) is poorly supported, since the systemd service file (and possibly other things, I haven't checked further) use hard coded paths.

This would be a very useful feature to support installing the program outside of package manager control (e.g. when the program is not yet packaged for the distribution you use, Debian in my case). It would also be required for any distribution using a different install scheme (such as NixOS).

The makefile also seems to be ignoring standard variables such as LDFLAGS.

I would fix this and do a pull request if I knew what the preferred solution was, personally I would simply switch to a standard build system that handles nuances like this, such as cmake or autotools, but given that you have avoided such solutions that I assume you would not want that.

get_screen_brightness(): Input/output error

I am regularly seeing this in my log.
Any thoughts?

(D)[18:42:51]{bus.c:278}	get_screen_brightness(): Input/output error
(D)[18:42:51]{timer.c:38}	Set timeout of 30s 0ns on fd 35.
(D)[18:43:21]{bus.c:278}	get_screen_brightness(): Input/output error
(D)[18:43:21]{timer.c:38}	Set timeout of 30s 0ns on fd 35.
(D)[18:43:51]{bus.c:278}	get_screen_brightness(): Input/output error
(D)[18:43:51]{timer.c:38}	Set timeout of 30s 0ns on fd 35.
(D)[18:44:21]{bus.c:278}	get_screen_brightness(): Input/output error
(D)[18:44:21]{timer.c:38}	Set timeout of 30s 0ns on fd 35.
(D)[18:44:51]{bus.c:278}	get_screen_brightness(): Input/output error
(D)[18:44:51]{timer.c:38}	Set timeout of 30s 0ns on fd 35.
(D)[18:45:21]{bus.c:278}	get_screen_brightness(): Input/output error
(D)[18:45:21]{timer.c:38}	Set timeout of 30s 0ns on fd 35.
(D)[18:45:51]{bus.c:278}	get_screen_brightness(): Input/output error
(D)[18:45:51]{timer.c:38}	Set timeout of 30s 0ns on fd 35.
(D)[18:46:21]{bus.c:278}	get_screen_brightness(): Input/output error
(D)[18:46:21]{timer.c:38}	Set timeout of 30s 0ns on fd 35.

Gamma Temp feels not correct

Every day at 6pm (sunset) my screen is supposed to go to nicht mode. I can see this in the log:

(I)[18:07:00]{gamma.c:330}	Normal transition to 4500 gamma temp started.

So far, so good.

However, my impression sometimes is, that the temp did not fully go where it is supposed to be. If I enforce a transition to 6500 (e.g. by starting caffeine or a youtube video) and then letting it go to night mode again, it feels way less blueish than before. I know, this might be an optical illusion, but I am pretty sure it is not. But it i also really hard to tell....

Is there anything else I could use to prove on which temp settings I am than my unreliable eyes?

compilation error, undefined ref to « libusb_set_option »

Hello

I don't know anything about C language and compilation. I only know to build I must execute cmake, make, make install.

I try to build 4.0 version of Clightd for openSuse 15.2. I get an error.

It is too techie for me. If you can help I will be glad. Thanks.

  • Building clightd
    -- The C compiler identification is GNU 7.5.0
    -- Check for working C compiler: /usr/bin/cc
    -- Check for working C compiler: /usr/bin/cc - works
    -- Detecting C compiler ABI info
    -- Detecting C compiler ABI info - done
    -- Detecting C compile features
    -- Detecting C compile features - done
    -- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.2")
    -- Checking for modules 'libudev;libmodule>=5.0.0'
    -- Found libudev, version 234
    -- Found libmodule, version 5.0.1
    -- Checking for module 'polkit-gobject-1'
    -- Found polkit-gobject-1, version 0.116
    -- Checking for one of the modules 'libelogind;libsystemd>=221'
    -- Checking for modules 'x11;xrandr'
    -- Found x11, version 1.6.5
    -- Found xrandr, version 1.5.1
    -- GAMMA support enabled
    -- Checking for modules 'x11;xext'
    -- Found x11, version 1.6.5
    -- Found xext, version 1.3.3
    -- DPMS support enabled
    -- Checking for module 'x11'
    -- Found x11, version 1.6.5
    -- SCREEN support enabled
    -- Checking for module 'ddcutil>=0.9.5'
    -- Found ddcutil, version 0.9.9
    -- DDC support enabled
    -- Checking for module 'libsystemd'
    -- Found libsystemd, version 234
    -- Configuring done
    -- Generating done
    -- Build files have been written to: /home/roubach/rpmd/clight/construction/Clightd/build
    Scanning dependencies of target clightd
    [ 6%] Building C object CMakeFiles/clightd.dir/src/main.c.o
    [ 12%] Building C object CMakeFiles/clightd.dir/src/modules/backlight.c.o
    [ 18%] Building C object CMakeFiles/clightd.dir/src/modules/bus.c.o
    [ 25%] Building C object CMakeFiles/clightd.dir/src/modules/dpms.c.o
    [ 31%] Building C object CMakeFiles/clightd.dir/src/modules/dpms_plugins/tty.c.o
    [ 37%] Building C object CMakeFiles/clightd.dir/src/modules/dpms_plugins/xorg.c.o
    [ 43%] Building C object CMakeFiles/clightd.dir/src/modules/gamma.c.o
    [ 50%] Building C object CMakeFiles/clightd.dir/src/modules/idle.c.o
    [ 56%] Building C object CMakeFiles/clightd.dir/src/modules/screen.c.o
    [ 62%] Building C object CMakeFiles/clightd.dir/src/modules/sensor.c.o
    [ 68%] Building C object CMakeFiles/clightd.dir/src/modules/sensors/als.c.o
    [ 75%] Building C object CMakeFiles/clightd.dir/src/modules/sensors/camera.c.o
    [ 81%] Building C object CMakeFiles/clightd.dir/src/modules/signal.c.o
    [ 87%] Building C object CMakeFiles/clightd.dir/src/utils/polkit.c.o
    [ 93%] Building C object CMakeFiles/clightd.dir/src/utils/udev.c.o
    [100%] Linking C executable clightd
    /usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld : /usr/lib64/gcc/x86_64-suse-linux/7/../../../../lib64/libddcutil.so : référence indéfinie vers « libusb_set_option »
    collect2: error: ld returned 1 exit status
    make[2]: *** [CMakeFiles/clightd.dir/build.make:311: clightd] Error 1
    make[1]: *** [CMakeFiles/Makefile2:93: CMakeFiles/clightd.dir/all] Error 2
    make: *** [Makefile:169: all] Error 2

[BUG] Not setting backlight on latest release

Clight version the issue has been seen with:

latest release and git (clight & clightd from AUR, also clight-git and clightd-git from AUR

Describe the bug
Backlight level is not being changed or reported correctly for i2c devices.
I've tried setting i2c device directly, clight always reports 0.00

Backlight 'J0DKG7120D3L' level updated: 0.00

The correct backlight level is being reported from gddccontrol, ddcui and can be changed with both of those tools.
It used to work on this hardware ~2 to 3 weeks ago.

Verbose log:

`Clight
* Software version:		4.5
* Global config dir:		/etc/default
* Global data dir:		/usr/share/clight
* Starting time:		Thu Mar 11 07:31:14 2021

Starting options:

### GENERIC ###
* Verbose (debug):		Enabled
* ResumeDelay:		0

### BACKLIGHT ###
* Smooth trans:		Enabled
* Smooth steps:		0.05
* Smooth timeout:		30
* Daily timeouts:		AC 10	BATT 10
* Nightly timeout:		AC 10	BATT 10
* Event timeouts:		AC 10	BATT 10
* Backlight path:		Unset
* Shutter threshold:		0.00
* Autocalibration:		Disabled
* Pause on lid closed:		Disabled
* Capture on lid opened:		Disabled

### SENSOR ###
* Captures:		AC 2	BATT 2
* Device:		/dev/bus/usb/005/002
* Settings:		Unset

### GAMMA ###
* Smooth trans:		Enabled
* Smooth steps:		50
* Smooth timeout:		300
* Daily screen temp:		6500
* Nightly screen temp:		4000
* Long transition:		Enabled
* Ambient gamma:		Disabled

### DAYTIME ###
* User position:		41.89	-71.41
* User set sunrise:		Unset
* User set sunset:		Unset
* Event duration:		1800

### DIMMER ###
* Smooth trans:		ENTER: Enabled, EXIT: Enabled
* Smooth steps:		ENTER: 0.05, EXIT: 0.05
* Smooth timeout:		ENTER: 30, EXIT: 30
* Timeouts:		AC 45	BATT 20
* Backlight pct:		0.20

### DPMS ###
* Timeouts:		AC 900	BATT 300

### SCREEN ###
* Timeouts:		AC -1	BATT -1
* Contrib:		0.10
* Samples:		10

### INHIBIT ###
* Docked:		Disabled
* PowerManagement:		Disabled

(I)[07:31:14]{main.c:127}	Clightd found, version: 5.3.
(I)[07:31:14]{backlight.c:418}	AC curve: y = -0.025538 + 0.182420x + -0.007951x^2
BL
^
|        **
|      **  
|     *    
|    *     
|   *      
|          
|  *       
| *        
|          
|*         
*---------->BR
(I)[07:31:14]{backlight.c:418}	BATT curve: y = -0.025538 + 0.182420x + -0.007951x^2
BL
^
|        **
|      **  
|     *    
|    *     
|   *      
|          
|  *       
| *        
|          
|*         
*---------->BR
(W)[07:31:14]{interface.c:402}	Failed to create org.freedesktop.ScreenSaver dbus interface: Unknown error -1
(I)[07:31:14]{interface.c:403}	Fallback at monitoring requests to org.freedesktop.ScreenSaver name owner.
(D)[07:31:14]{timer.c:34}	Disarmed timerfd on fd 36.
(I)[07:31:14]{upower.c:95}	Not a laptop device. Killing UPower module.
(W)[07:31:14]{upower.c:45}	Failed to retrieve AC state; fallback to ON_AC and OPEN lid.
(D)[07:31:14]{interface.c:455}	Emitting 'AcState' property
(D)[07:31:14]{timer.c:34}	Disarmed timerfd on fd 39.
(D)[07:31:14]{interface.c:455}	Emitting 'LidState' property
(D)[07:31:14]{timer.c:32}	Set timeout of 0s 1ns on fd 40.
(I)[07:31:14]{daytime.c:175}	Next alarm due to: Thu Mar 11 17:15:00 2021
(D)[07:31:14]{timer.c:32}	Set timeout of 35026s 0ns on fd 40.
(D)[07:31:14]{interface.c:455}	Emitting 'Sunrise' property
(D)[07:31:14]{interface.c:455}	Emitting 'Sunset' property
(D)[07:31:14]{interface.c:455}	Emitting 'DayTime' property
(I)[07:31:14]{gamma.c:186}	Normal transition to 6500 gamma temp.
(D)[07:31:14]{interface.c:455}	Emitting 'NextEvent' property
(D)[07:31:14]{timer.c:32}	Set timeout of 0s 1ns on fd 41.
(D)[07:31:14]{backlight.c:291}	Sensor '/dev/bus/usb/005/002' is now available.
(D)[07:31:14]{backlight.c:497}	Resumed as a sensor is now available.
(D)[07:31:14]{utils.c:56}	Pausing BACKLIGHT
(D)[07:31:14]{interface.c:455}	Emitting 'Temp' property
(D)[07:31:14]{interface.c:455}	Emitting 'Temp' property
(D)[07:31:14]{backlight.c:514}	Backlight 'J0DKG7120D3L' level updated: 0.00.
(D)[07:31:14]{interface.c:455}	Emitting 'SensorAvail' property
(D)[07:31:14]{interface.c:455}	Emitting 'BlPct' property
(D)[07:31:14]{interface.c:455}	Emitting 'BlPct' property`

ddcutil 1.0.0

Just for fun I tried building with ddcutil 1.0.0, but alas!

--- The C compiler identification is GNU 10.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/lib/ccache/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Found PkgConfig: /usr/bin/pkg-config (found version "1.7.3") 
-- Checking for modules 'libudev;libmodule>=5.0.0;libjpeg'
--   Found libudev, version 247
--   Found libmodule, version 5.0.1
--   Found libjpeg, version 2.0.6
-- Checking for module 'polkit-gobject-1'
--   Found polkit-gobject-1, version 0.118
-- Checking for module 'dbus-1'
--   Found dbus-1, version 1.12.20
-- Checking for one of the modules 'libelogind;libsystemd>=221'
-- Checking for modules 'x11;xrandr;libdrm;wayland-client'
--   Found x11, version 1.7.0
--   Found xrandr, version 1.5.2
--   Found libdrm, version 2.4.104
--   Found wayland-client, version 1.19.0
-- GAMMA support enabled
-- Enabled 'wlr-gamma-control-unstable-v1' wayland client protocol
-- Checking for modules 'x11;xext;libdrm;wayland-client'
--   Found x11, version 1.7.0
--   Found xext, version 1.3.4
--   Found libdrm, version 2.4.104
--   Found wayland-client, version 1.19.0
-- DPMS support enabled
-- Enabled 'org_kde_kwin_dpms' wayland client protocol
-- Checking for module 'x11'
--   Found x11, version 1.7.0
-- SCREEN support enabled
-- Enabled 'wlr-screencopy-unstable-v1' wayland client protocol
-- Checking for module 'ddcutil>=0.9.5'
--   Found ddcutil, version 1.0.0
-- DDC support enabled
-- Checking for module 'libusb-1.0'
--   Found libusb-1.0, version 1.0.24
-- YOCTOLIGHT support enabled
-- Checking for module 'systemd'
--   Found systemd, version 247
-- Using default value for dbus config dir: /etc/dbus-1/system.d
-- Configuring done
-- Generating done
-- Build files have been written to: /mnt/storage/pkgbuilds/clightd-git/src/build
make: Entering directory '/mnt/storage/pkgbuilds/clightd-git/src/build'
make[1]: Entering directory '/mnt/storage/pkgbuilds/clightd-git/src/build'
make[2]: Entering directory '/mnt/storage/pkgbuilds/clightd-git/src/build'
[  6%] Generating org_kde_kwin_dpms-client-protocol.h, org_kde_kwin_dpms-protocol.c
[  6%] Generating wlr-screencopy-unstable-v1-client-protocol.h, wlr-screencopy-unstable-v1-protocol.c
[  9%] Generating wlr-gamma-control-unstable-v1-client-protocol.h, wlr-gamma-control-unstable-v1-protocol.c
Scanning dependencies of target clightd
make[2]: Leaving directory '/mnt/storage/pkgbuilds/clightd-git/src/build'
make[2]: Entering directory '/mnt/storage/pkgbuilds/clightd-git/src/build'
[ 12%] Building C object CMakeFiles/clightd.dir/src/modules/screen.c.o
[ 15%] Building C object CMakeFiles/clightd.dir/src/modules/signal.c.o
[ 18%] Building C object CMakeFiles/clightd.dir/src/main.c.o
[ 21%] Building C object CMakeFiles/clightd.dir/src/modules/idle.c.o
[ 24%] Building C object CMakeFiles/clightd.dir/src/modules/bus.c.o
[ 27%] Building C object CMakeFiles/clightd.dir/src/modules/backlight.c.o
[ 30%] Building C object CMakeFiles/clightd.dir/src/utils/udev.c.o
[ 36%] Building C object CMakeFiles/clightd.dir/src/modules/gamma.c.o
[ 36%] Building C object CMakeFiles/clightd.dir/src/modules/dpms.c.o
[ 45%] Building C object CMakeFiles/clightd.dir/src/modules/sensors/als.c.o
[ 45%] Building C object CMakeFiles/clightd.dir/src/modules/sensor.c.o
[ 45%] Building C object CMakeFiles/clightd.dir/src/modules/sensors/custom.c.o
[ 48%] Building C object CMakeFiles/clightd.dir/src/modules/sensors/camera.c.o
[ 51%] Building C object CMakeFiles/clightd.dir/src/modules/sensors/yoctolight.c.o
[ 54%] Building C object CMakeFiles/clightd.dir/src/utils/polkit.c.o
[ 57%] Building C object CMakeFiles/clightd.dir/src/utils/drm_utils.c.o
[ 60%] Building C object CMakeFiles/clightd.dir/src/utils/wl_utils.c.o
[ 63%] Building C object CMakeFiles/clightd.dir/wlr-gamma-control-unstable-v1-protocol.c.o
[ 69%] Building C object CMakeFiles/clightd.dir/src/modules/gamma_plugins/wl.c.o
[ 69%] Building C object CMakeFiles/clightd.dir/src/modules/gamma_plugins/drm.c.o
[ 72%] Building C object CMakeFiles/clightd.dir/src/modules/gamma_plugins/xorg.c.o
[ 75%] Building C object CMakeFiles/clightd.dir/org_kde_kwin_dpms-protocol.c.o
[ 78%] Building C object CMakeFiles/clightd.dir/src/modules/dpms_plugins/drm.c.o
[ 81%] Building C object CMakeFiles/clightd.dir/src/modules/dpms_plugins/wl.c.o
[ 84%] Building C object CMakeFiles/clightd.dir/src/modules/dpms_plugins/xorg.c.o
[ 87%] Building C object CMakeFiles/clightd.dir/wlr-screencopy-unstable-v1-protocol.c.o
[ 93%] Building C object CMakeFiles/clightd.dir/src/modules/screen_plugins/wl.c.o
[ 93%] Building C object CMakeFiles/clightd.dir/src/modules/screen_plugins/xorg.c.o
[ 96%] Building C object CMakeFiles/clightd.dir/src/modules/screen_plugins/fb.c.o
/mnt/storage/pkgbuilds/clightd-git/src/clightd/src/modules/idle.c: In function ‘receive’:
/mnt/storage/pkgbuilds/clightd-git/src/clightd/src/modules/idle.c:107:17: warning: ignoring return value of ‘read’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
  107 |                 read(msg->fd_msg->fd, &t, sizeof(uint64_t));
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/mnt/storage/pkgbuilds/clightd-git/src/clightd/src/modules/gamma.c: In function ‘receive’:
/mnt/storage/pkgbuilds/clightd-git/src/clightd/src/modules/gamma.c:75:9: warning: ignoring return value of ‘read’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   75 |         read(msg->fd_msg->fd, &t, sizeof(uint64_t));
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/mnt/storage/pkgbuilds/clightd-git/src/clightd/src/modules/backlight.c: In function ‘convert_sn_to_id’:
/mnt/storage/pkgbuilds/clightd-git/src/clightd/src/modules/backlight.c:102:20: warning: implicit declaration of function ‘ddca_create_adlno_display_identifier’; did you mean ‘ddca_create_busno_display_identifier’? [-Wimplicit-function-declaration]
  102 |             return ddca_create_adlno_display_identifier(id1, id2, pdid);
      |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                    ddca_create_busno_display_identifier
/mnt/storage/pkgbuilds/clightd-git/src/clightd/src/modules/backlight.c: In function ‘receive’:
/mnt/storage/pkgbuilds/clightd-git/src/clightd/src/modules/backlight.c:216:13: warning: ignoring return value of ‘read’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
  216 |             read(sc->smooth_fd, &t, sizeof(uint64_t));
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[100%] Linking C executable clightd
/usr/bin/ld: CMakeFiles/clightd.dir/src/modules/backlight.c.o: in function `convert_sn_to_id.constprop.0':
backlight.c:(.text+0x3be): undefined reference to `ddca_create_adlno_display_identifier'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/clightd.dir/build.make:547: clightd] Error 1
make[2]: Leaving directory '/mnt/storage/pkgbuilds/clightd-git/src/build'
make[1]: *** [CMakeFiles/Makefile2:115: CMakeFiles/clightd.dir/all] Error 2
make[1]: Leaving directory '/mnt/storage/pkgbuilds/clightd-git/src/build'
make: *** [Makefile:171: all] Error 2
make: Leaving directory '/mnt/storage/pkgbuilds/clightd-git/src/build'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.