Giter VIP home page Giter VIP logo

Comments (15)

vansoest avatar vansoest commented on May 23, 2024 1

Fixed with the first Polkit rule.

from clight.

FedeDP avatar FedeDP commented on May 23, 2024

Thanks for opening the bug report.
I think i should go with CLOCK_BOOTTIME for GAMMA module, as stated here: https://linux.die.net/man/2/clock_gettime

Identical to CLOCK_MONOTONIC, except it also includes any time that the system is suspended.

from clight.

FedeDP avatar FedeDP commented on May 23, 2024

Can you try once more after latest commit? (rebuild clight-git and clightd-git)

from clight.

vansoest avatar vansoest commented on May 23, 2024

thank you!
so now I’ve rebuilt the packages and restarted the systemd services for both. I will write to you tomorrow.

from clight.

vansoest avatar vansoest commented on May 23, 2024

Same problem and the log file isn’t really helpful for our bug.:

11:13:58 $ cat .clight.log

Clight
* Software version:		2.5
* Starting time:		Sat Dec  1 11:11:42 2018

Starting options:

### Generic ###
* Verbose (debugging):		Disabled
* Automatic calibration:		Enabled
* Keyboard backlight:		Enabled
* Number of captures:		5
* Webcam device:		Unset
* Backlight path:		Unset
* Shutter threshold:		0.00
* User position:		51.25	6.47
* Daily screen temp:		6500
* Nightly screen temp:		4000
* User set sunrise:		07:00
* User set sunset:		22:00
* Event duration:		1800
* Dimmer backlight pct:		0.10

### Timeouts ###
* Daily timeouts:		AC 600	BATT 1200
* Nightly timeout:		AC 2700	BATT 5400
* Event timeouts:		AC 300	BATT 600
* Dimmer timeouts:		AC 45	BATT 20
* Dpms timeouts:		AC 900:1200:1800	BATT 300:420:600

### Modules ###
* BACKLIGHT:		Enabled
* GAMMA:		Enabled
* DIMMER:		Disabled
* DPMS:		Enabled

### Smooth ###
* Bright smooth trans:		Enabled
* Gamma smooth trans:		Enabled
* Dimmer smooth trans:		Enabled
* Bright smooth steps:		0.05
* Gamma smooth steps:		50
* Dimmer smooth steps:		0.05
* Bright smooth timeout:		30
* Gamma smooth timeout:		300
* Dimmer smooth timeout:		30

(I)[11:11:42]{clightd.c:48}	Clightd found, version: 2.4.
(I)[11:11:42]{dpms.c:64}	Setted DPMS timeouts: Standby -> 900s, Suspend -> 1200s, Off -> 1800s.
(W)[11:11:42]{bus.c:308}	set_temp(): Operation not permitted
(I)[11:11:42]{gamma.c:78}	Next gamma alarm due to: Sat Dec  1 21:30:00 2018
(W)[11:11:42]{bus.c:308}	init_kbd_backlight(): No such interface “org.freedesktop.UPower.KbdBacklight” on object at path /org/freedesktop/UPower/KbdBacklight
(I)[11:11:42]{backlight.c:90}	Keyboard backlight calibration unsupported.
(W)[11:11:42]{bus.c:308}	capture_frames_brightness(): Operation not permitted

$ pacman -Qi clight-git clightd-git | grep -iE 'name|version|url'

Name            : clight-git
Version         : r495.13c4b7a-1
URL             : https://github.com/FedeDP/Clight
Name            : clightd-git
Version         : r203.4dc6f1a-1
URL             : https://github.com/FedeDP/Clightd

And now I’ve used my workaround and have a normal state:
$ systemctl --user restart clight.service

FYI: Activated now verbose log output.

from clight.

FedeDP avatar FedeDP commented on May 23, 2024
  • Starting time: Sat Dec 1 11:11:42 2018

That's weird: it seems clight was started this morning...

set_temp(): Operation not permitted
capture_frames_brightness(): Operation not permitted

It seems you haven't got permissions to call these exposed method. Is your session active?

EDIT: Please note also that systemd clight service is no more supported.

from clight.

FedeDP avatar FedeDP commented on May 23, 2024

Fixed after latest commit.

from clight.

vansoest avatar vansoest commented on May 23, 2024

Sorry, but the issue isn’t fixed for me yet.

from clight.

FedeDP avatar FedeDP commented on May 23, 2024

Mmh i was able to reproduce your issue and it was fixed for me after that commit.
Are you on clight 3.0? Can you attach a new clight.log?

from clight.

vansoest avatar vansoest commented on May 23, 2024

$ cat .clight.log

(W)[21:33:56]{log.c:17}	Resource temporarily unavailable
(E)[21:33:56]{log.c:18}	A lock is present on /home/sophie/.clight.log. Another clight instance running?
(D)[21:38:55]{my_math.c:42}	Average frames brightness: 0.155208.
(I)[21:38:55]{backlight.c:106}	Ambient brightness: 0.155 -> Backlight pct: 0.524
(D)[21:38:55]{timer.c:41}	Set timeout of 300s 0ns on fd 9.
(D)[21:43:56]{my_math.c:42}	Average frames brightness: 0.241789.
(I)[21:43:57]{backlight.c:106}	Ambient brightness: 0.242 -> Backlight pct: 0.585
(D)[21:43:57]{timer.c:41}	Set timeout of 300s 0ns on fd 9.
(D)[21:48:57]{my_math.c:42}	Average frames brightness: 0.213904.
(I)[21:48:58]{backlight.c:106}	Ambient brightness: 0.214 -> Backlight pct: 0.566
(D)[21:48:58]{timer.c:41}	Set timeout of 300s 0ns on fd 9.
(D)[21:53:58]{my_math.c:42}	Average frames brightness: 0.327802.
(I)[21:53:59]{backlight.c:106}	Ambient brightness: 0.328 -> Backlight pct: 0.643
(D)[21:53:59]{timer.c:41}	Set timeout of 300s 0ns on fd 9.
(D)[21:58:59]{my_math.c:42}	Average frames brightness: 0.212729.
(I)[21:59:00]{backlight.c:106}	Ambient brightness: 0.213 -> Backlight pct: 0.565
(D)[21:59:00]{timer.c:41}	Set timeout of 300s 0ns on fd 9.
(D)[22:00:00]{gamma.c:187}	Currently inside an event.
(I)[22:00:00]{gamma.c:200}	4000 gamma temp set.
(I)[22:00:00]{gamma.c:78}	Next gamma alarm due to: Sun Dec  9 22:30:00 2018
(D)[22:00:00]{timer.c:41}	Set timeout of 1800s 0ns on fd 8.
(D)[22:04:00]{my_math.c:42}	Average frames brightness: 0.212520.
(I)[22:04:01]{backlight.c:106}	Ambient brightness: 0.213 -> Backlight pct: 0.565
(D)[22:04:01]{timer.c:41}	Set timeout of 300s 0ns on fd 9.
(D)[22:09:01]{my_math.c:42}	Average frames brightness: 0.211567.
(I)[22:09:02]{backlight.c:106}	Ambient brightness: 0.212 -> Backlight pct: 0.564
(D)[22:09:02]{timer.c:41}	Set timeout of 300s 0ns on fd 9.
(D)[22:14:02]{my_math.c:42}	Average frames brightness: 0.212423.
(I)[22:14:03]{backlight.c:106}	Ambient brightness: 0.212 -> Backlight pct: 0.565
(D)[22:14:03]{timer.c:41}	Set timeout of 300s 0ns on fd 9.
(D)[22:19:04]{my_math.c:42}	Average frames brightness: 0.211609.
(I)[22:19:04]{backlight.c:106}	Ambient brightness: 0.212 -> Backlight pct: 0.564
(D)[22:19:04]{timer.c:41}	Set timeout of 300s 0ns on fd 9.
(D)[22:24:05]{my_math.c:42}	Average frames brightness: 0.326524.
(I)[22:24:05]{backlight.c:106}	Ambient brightness: 0.327 -> Backlight pct: 0.643
(D)[22:24:05]{timer.c:41}	Set timeout of 300s 0ns on fd 9.
(D)[22:29:06]{my_math.c:42}	Average frames brightness: 0.211869.
(I)[22:29:06]{backlight.c:106}	Ambient brightness: 0.212 -> Backlight pct: 0.564
(D)[22:29:06]{timer.c:41}	Set timeout of 300s 0ns on fd 9.
(I)[22:30:00]{gamma.c:200}	4000 gamma temp set.
(I)[22:30:00]{gamma.c:78}	Next gamma alarm due to: Mon Dec 10 07:55:00 2018
(D)[22:30:00]{timer.c:41}	Set timeout of 33900s 0ns on fd 8.
(D)[22:30:00]{timer.c:41}	Set timeout of 2646s 0ns on fd 9.
(D)[23:14:06]{my_math.c:42}	Average frames brightness: 0.212165.
(I)[23:14:07]{backlight.c:106}	Ambient brightness: 0.212 -> Backlight pct: 0.565
(D)[23:14:07]{timer.ca:41}	Set timeout of 2700s 0ns on fd 9.
(D)[23:59:08]{my_math.c:42}	Average frames brightness: 0.211246.
(I)[23:59:08]{backlight.c:106}	Ambient brightness: 0.211 -> Backlight pct: 0.564
(D)[23:59:08]{timer.c:41}	Set timeout of 2700s 0ns on fd 9.

$ ps aux | grep '[c]light'

root     21599  0.0  0.0 250300  5220 ?        Ss   Dez02   0:06 /usr/lib/clightd/clightd
sophie   27616  0.0  0.0  19644  2536 pts/6    S+   Dez08   0:00 clight

from clight.

FedeDP avatar FedeDP commented on May 23, 2024

This log does not make sense to me :( can you give me some background?
I see:

(W)[21:33:56]{log.c:17} Resource temporarily unavailable
(E)[21:33:56]{log.c:18} A lock is present on /home/sophie/.clight.log. Another clight instance running?

It should've quit here. (E)rrors messages are fatal ones, ie: they quit clight.
Moreover, i cannot see your issue here: when did you suspend your system?

from clight.

vansoest avatar vansoest commented on May 23, 2024

You are right, the log file wasn‘t helpful, you can ignore it, here is a fresh one.

Started yesterday clight manually around 11:37.
Suspended my workstation at 0:00 and resumed it at 9:38.

Clight
* Software version:		3.0
* Starting time:		Mon Dec 10 11:37:41 2018

Starting options:

### Generic ###
* Verbose (debugging):		Enabled
* Automatic calibration:		Enabled
* Keyboard backlight:		Disabled
* Number of captures:		5
* Webcam device:		Unset
* Backlight path:		Unset
* Shutter threshold:		0.00
* User position:		Unset
* Daily screen temp:		6500
* Nightly screen temp:		4000
* User set sunrise:		Unset
* User set sunset:		22:00
* Event duration:		1800
* Dimmer backlight pct:		0.10

### Timeouts ###
* Daily timeouts:		AC 600	BATT 1200
* Nightly timeout:		AC 2700	BATT 5400
* Event timeouts:		AC 300	BATT 600
* Dimmer timeouts:		AC 45	BATT 20
* Dpms timeouts:		AC 900:1200:1800	BATT 300:420:600

### Modules ###
* BACKLIGHT:		Enabled
* GAMMA:		Enabled
* DIMMER:		Disabled
* DPMS:		Enabled

### Smooth ###
* Bright smooth trans:		Enabled
* Gamma smooth trans:		Enabled
* Dimmer smooth trans:		Enabled
* Bright smooth steps:		0.05
* Gamma smooth steps:		50
* Dimmer smooth steps:		0.05
* Bright smooth timeout:		30
* Gamma smooth timeout:		300
* Dimmer smooth timeout:		30

(D)[11:37:41]{modules.c:68}	SIGNAL module started.
(D)[11:37:41]{modules.c:68}	BUS module started.
(D)[11:37:41]{modules.c:105}	USERBUS module being started as submodule of BUS...
(D)[11:37:41]{modules.c:68}	USERBUS module started.
(D)[11:37:41]{modules.c:105}	INTERFACE module being started as submodule of USERBUS...
(D)[11:37:41]{modules.c:68}	INTERFACE module started.
(D)[11:37:41]{modules.c:156}	Trying to start BACKLIGHT module as its INTERFACE dependency was loaded...
(D)[11:37:41]{modules.c:156}	Trying to start GAMMA module as its INTERFACE dependency was loaded...
(D)[11:37:41]{modules.c:204}	DIMMER module disabled.
(D)[11:37:41]{modules.c:204}	INHIBIT module disabled.
(D)[11:37:41]{modules.c:270}	INHIBIT module destroyed.
(D)[11:37:41]{modules.c:270}	DIMMER module destroyed.
(D)[11:37:41]{modules.c:68}	XORG module started.
(D)[11:37:41]{modules.c:156}	Trying to start GAMMA module as its XORG dependency was loaded...
(D)[11:37:41]{modules.c:156}	Trying to start DPMS module as its XORG dependency was loaded...
(D)[11:37:41]{modules.c:156}	Trying to start LOCATION module as its BUS dependency was loaded...
(D)[11:37:41]{timer.c:41}	Set timeout of 3s 0ns on fd 7.
(D)[11:37:41]{modules.c:68}	LOCATION module started.
(D)[11:37:41]{modules.c:156}	Trying to start UPOWER module as its BUS dependency was loaded...
(D)[11:37:41]{modules.c:68}	UPOWER module started.
(D)[11:37:41]{modules.c:156}	Trying to start BACKLIGHT module as its UPOWER dependency was loaded...
(D)[11:37:41]{modules.c:156}	Trying to start DPMS module as its UPOWER dependency was loaded...
(D)[11:37:41]{modules.c:156}	Trying to start CLIGHTD module as its BUS dependency was loaded...
(I)[11:37:41]{clightd.c:48}	Clightd found, version: 3.0.
(D)[11:37:41]{modules.c:68}	CLIGHTD module started.
(D)[11:37:41]{modules.c:156}	Trying to start BACKLIGHT module as its CLIGHTD dependency was loaded...
(D)[11:37:41]{modules.c:156}	Trying to start GAMMA module as its CLIGHTD dependency was loaded...
(D)[11:37:41]{modules.c:156}	Trying to start DPMS module as its CLIGHTD dependency was loaded...
(I)[11:37:41]{dpms.c:64}	Setted DPMS timeouts: Standby -> 900s, Suspend -> 1200s, Off -> 1800s.
(D)[11:37:41]{modules.c:68}	DPMS module started.
(D)[11:37:41]{modules.c:77}	Callback added for module DPMS on module UPOWER bus match.
(D)[11:37:41]{modules.c:77}	Callback added for module DPMS on module INTERFACE bus match.
(I)[11:37:42]{location.c:170}	New location received: 51.25, 6.55
(D)[11:37:42]{timer.c:43}	Disarmed timerfd on fd 7.
(D)[11:37:42]{modules.c:156}	Trying to start GAMMA module as its LOCATION dependency was loaded...
(D)[11:37:42]{timer.c:41}	Set timeout of 0s 1ns on fd 8.
(D)[11:37:42]{modules.c:68}	GAMMA module started.
(D)[11:37:42]{modules.c:77}	Callback added for module GAMMA on module LOCATION bus match.
(D)[11:37:42]{modules.c:77}	Callback added for module GAMMA on module INTERFACE bus match.
(I)[11:37:42]{gamma.c:200}	6500 gamma temp set.
(I)[11:37:42]{gamma.c:78}	Next gamma alarm due to: Mon Dec 10 21:30:00 2018
(D)[11:37:42]{timer.c:41}	Set timeout of 35538s 0ns on fd 8.
(D)[11:37:42]{modules.c:156}	Trying to start BACKLIGHT module as its GAMMA dependency was loaded...
(D)[11:37:42]{my_math.c:76}	AC curve: y = 0.407692 + 0.077690x + -0.001760x^2
(D)[11:37:42]{my_math.c:76}	BATT curve: y = 0.166783 + 0.165417x + -0.008578x^2
(D)[11:37:42]{timer.c:41}	Set timeout of 0s 1ns on fd 9.
(D)[11:37:42]{modules.c:68}	BACKLIGHT module started.
(D)[11:37:42]{modules.c:77}	Callback added for module BACKLIGHT on module UPOWER bus match.
(D)[11:37:42]{modules.c:77}	Callback added for module BACKLIGHT on module INTERFACE bus match.
(D)[11:37:42]{modules.c:77}	Callback added for module BACKLIGHT on module INTERFACE bus match.
(D)[11:37:42]{modules.c:77}	Callback added for module BACKLIGHT on module INTERFACE bus match.
(D)[11:37:42]{my_math.c:42}	Average frames brightness: 0.208179.
(I)[11:37:43]{backlight.c:106}	Ambient brightness: 0.208 -> Backlight pct: 0.562
(D)[11:37:43]{timer.c:41}	Set timeout of 600s 0ns on fd 9.
(D)[11:47:43]{my_math.c:42}	Average frames brightness: 0.201293.
(I)[11:47:44]{backlight.c:106}	Ambient brightness: 0.201 -> Backlight pct: 0.557
(D)[11:47:44]{timer.c:41}	Set timeout of 600s 0ns on fd 9.
(D)[11:57:44]{my_math.c:42}	Average frames brightness: 0.197427.
(I)[11:57:45]{backlight.c:106}	Ambient brightness: 0.197 -> Backlight pct: 0.554
(D)[11:57:45]{timer.c:41}	Set timeout of 600s 0ns on fd 9.
(D)[12:07:45]{my_math.c:42}	Average frames brightness: 0.210566.
(I)[12:07:46]{backlight.c:106}	Ambient brightness: 0.211 -> Backlight pct: 0.563
(D)[12:07:46]{timer.c:41}	Set timeout of 600s 0ns on fd 9.
(D)[12:17:47]{my_math.c:42}	Average frames brightness: 0.203231.
(I)[12:17:47]{backlight.c:106}	Ambient brightness: 0.203 -> Backlight pct: 0.558
(D)[12:17:47]{timer.c:41}	Set timeout of 600s 0ns on fd 9.
(D)[12:27:48]{my_math.c:42}	Average frames brightness: 0.312363.
(I)[12:27:48]{backlight.c:106}	Ambient brightness: 0.312 -> Backlight pct: 0.633
(D)[12:27:48]{timer.c:41}	Set timeout of 600s 0ns on fd 9.
(D)[12:37:49]{my_math.c:42}	Average frames brightness: 0.223636.
(I)[12:37:49]{backlight.c:106}	Ambient brightness: 0.224 -> Backlight pct: 0.573
(D)[12:37:49]{timer.c:41}	Set timeout of 600s 0ns on fd 9.
(D)[12:47:50]{my_math.c:42}	Average frames brightness: 0.225183.
(I)[12:47:51]{backlight.c:106}	Ambient brightness: 0.225 -> Backlight pct: 0.574
(D)[12:47:51]{timer.c:41}	Set timeout of 600s 0ns on fd 9.
(D)[12:57:51]{my_math.c:42}	Average frames brightness: 0.206240.
(I)[12:57:52]{backlight.c:106}	Ambient brightness: 0.206 -> Backlight pct: 0.560
(D)[12:57:52]{timer.c:41}	Set timeout of 600s 0ns on fd 9.
(D)[13:07:52]{my_math.c:42}	Average frames brightness: 0.200202.
(I)[13:07:53]{backlight.c:106}	Ambient brightness: 0.200 -> Backlight pct: 0.556
(D)[13:07:53]{timer.c:41}	Set timeout of 600s 0ns on fd 9.
(D)[13:17:53]{my_math.c:42}	Average frames brightness: 0.197555.
(I)[13:17:54]{backlight.c:106}	Ambient brightness: 0.198 -> Backlight pct: 0.554
(D)[13:17:54]{timer.c:41}	Set timeout of 600s 0ns on fd 9.
(D)[13:27:54]{my_math.c:42}	Average frames brightness: 0.202773.
(I)[13:27:55]{backlight.c:106}	Ambient brightness: 0.203 -> Backlight pct: 0.558
(D)[13:27:55]{timer.c:41}	Set timeout of 600s 0ns on fd 9.
(D)[13:37:55]{my_math.c:42}	Average frames brightness: 0.211602.
(I)[13:37:56]{backlight.c:106}	Ambient brightness: 0.212 -> Backlight pct: 0.564
(D)[13:37:56]{timer.c:41}	Set timeout of 600s 0ns on fd 9.
(D)[13:47:57]{my_math.c:42}	Average frames brightness: 0.209011.
(I)[13:47:57]{backlight.c:106}	Ambient brightness: 0.209 -> Backlight pct: 0.562
(D)[13:47:57]{timer.c:41}	Set timeout of 600s 0ns on fd 9.
(D)[13:57:58]{my_math.c:42}	Average frames brightness: 0.215177.
(I)[13:57:58]{backlight.c:106}	Ambient brightness: 0.215 -> Backlight pct: 0.567
(D)[13:57:58]{timer.c:41}	Set timeout of 600s 0ns on fd 9.
(D)[14:07:59]{my_math.c:42}	Average frames brightness: 0.255810.
(I)[14:07:59]{backlight.c:106}	Ambient brightness: 0.256 -> Backlight pct: 0.595
(D)[14:07:59]{timer.c:41}	Set timeout of 600s 0ns on fd 9.
(D)[14:18:00]{my_math.c:42}	Average frames brightness: 0.210953.
(I)[14:18:01]{backlight.c:106}	Ambient brightness: 0.211 -> Backlight pct: 0.564
(D)[14:18:01]{timer.c:41}	Set timeout of 600s 0ns on fd 9.
(D)[14:28:01]{my_math.c:42}	Average frames brightness: 0.206708.
(I)[14:28:02]{backlight.c:106}	Ambient brightness: 0.207 -> Backlight pct: 0.561
(D)[14:28:02]{timer.c:41}	Set timeout of 600s 0ns on fd 9.
(D)[14:38:02]{my_math.c:42}	Average frames brightness: 0.246557.
(I)[14:38:03]{backlight.c:106}	Ambient brightness: 0.247 -> Backlight pct: 0.589
(D)[14:38:03]{timer.c:41}	Set timeout of 600s 0ns on fd 9.
(D)[14:48:03]{my_math.c:42}	Average frames brightness: 0.731773.
(I)[14:48:04]{backlight.c:106}	Ambient brightness: 0.732 -> Backlight pct: 0.882
(D)[14:48:04]{timer.c:41}	Set timeout of 600s 0ns on fd 9.
(D)[14:58:04]{my_math.c:42}	Average frames brightness: 0.774858.
(I)[14:58:05]{backlight.c:106}	Ambient brightness: 0.775 -> Backlight pct: 0.904
(D)[14:58:05]{timer.c:41}	Set timeout of 600s 0ns on fd 9.
(D)[15:08:05]{my_math.c:42}	Average frames brightness: 0.739289.
(I)[15:08:06]{backlight.c:106}	Ambient brightness: 0.739 -> Backlight pct: 0.886
(D)[15:08:06]{timer.c:41}	Set timeout of 600s 0ns on fd 9.
(D)[15:18:06]{my_math.c:42}	Average frames brightness: 0.412472.
(I)[15:18:07]{backlight.c:106}	Ambient brightness: 0.412 -> Backlight pct: 0.698
(D)[15:18:07]{timer.c:41}	Set timeout of 600s 0ns on fd 9.
(D)[15:28:07]{my_math.c:42}	Average frames brightness: 0.242048.
(I)[15:28:08]{backlight.c:106}	Ambient brightness: 0.242 -> Backlight pct: 0.585
(D)[15:28:08]{timer.c:41}	Set timeout of 600s 0ns on fd 9.
(D)[15:38:08]{my_math.c:42}	Average frames brightness: 0.263667.
(I)[15:38:09]{backlight.c:106}	Ambient brightness: 0.264 -> Backlight pct: 0.600
(D)[15:38:09]{timer.c:41}	Set timeout of 600s 0ns on fd 9.
(D)[15:48:10]{my_math.c:42}	Average frames brightness: 0.212323.
(I)[15:48:10]{backlight.c:106}	Ambient brightness: 0.212 -> Backlight pct: 0.565
(D)[15:48:10]{timer.c:41}	Set timeout of 600s 0ns on fd 9.
(D)[15:58:11]{my_math.c:42}	Average frames brightness: 0.203231.
(I)[15:58:11]{backlight.c:106}	Ambient brightness: 0.203 -> Backlight pct: 0.558
(D)[15:58:11]{timer.c:41}	Set timeout of 600s 0ns on fd 9.
(D)[16:08:12]{my_math.c:42}	Average frames brightness: 0.203833.
(I)[16:08:13]{backlight.c:106}	Ambient brightness: 0.204 -> Backlight pct: 0.559
(D)[16:08:13]{timer.c:41}	Set timeout of 600s 0ns on fd 9.
(D)[16:18:13]{my_math.c:42}	Average frames brightness: 0.208029.
(I)[16:18:14]{backlight.c:106}	Ambient brightness: 0.208 -> Backlight pct: 0.562
(D)[16:18:14]{timer.c:41}	Set timeout of 600s 0ns on fd 9.
(D)[16:28:14]{my_math.c:42}	Average frames brightness: 0.199864.
(I)[16:28:15]{backlight.c:106}	Ambient brightness: 0.200 -> Backlight pct: 0.556
(D)[16:28:15]{timer.c:41}	Set timeout of 600s 0ns on fd 9.
(D)[16:38:15]{my_math.c:42}	Average frames brightness: 0.200040.
(I)[16:38:16]{backlight.c:106}	Ambient brightness: 0.200 -> Backlight pct: 0.556
(D)[16:38:16]{timer.c:41}	Set timeout of 600s 0ns on fd 9.
(D)[16:48:16]{my_math.c:42}	Average frames brightness: 0.205933.
(I)[16:48:17]{backlight.c:106}	Ambient brightness: 0.206 -> Backlight pct: 0.560
(D)[16:48:17]{timer.c:41}	Set timeout of 600s 0ns on fd 9.
(D)[16:58:17]{my_math.c:42}	Average frames brightness: 0.199242.
(I)[16:58:18]{backlight.c:106}	Ambient brightness: 0.199 -> Backlight pct: 0.555
(D)[16:58:18]{timer.c:41}	Set timeout of 600s 0ns on fd 9.
(D)[17:08:19]{my_math.c:42}	Average frames brightness: 0.308789.
(I)[17:08:19]{backlight.c:106}	Ambient brightness: 0.309 -> Backlight pct: 0.631
(D)[17:08:19]{timer.c:41}	Set timeout of 600s 0ns on fd 9.
(D)[17:18:20]{my_math.c:42}	Average frames brightness: 0.211198.
(I)[17:18:20]{backlight.c:106}	Ambient brightness: 0.211 -> Backlight pct: 0.564
(D)[17:18:20]{timer.c:41}	Set timeout of 600s 0ns on fd 9.
(D)[17:28:21]{my_math.c:42}	Average frames brightness: 0.199211.
(I)[17:28:22]{backlight.c:106}	Ambient brightness: 0.199 -> Backlight pct: 0.555
(D)[17:28:22]{timer.c:41}	Set timeout of 600s 0ns on fd 9.
(D)[17:38:22]{my_math.c:42}	Average frames brightness: 0.209553.
(I)[17:38:23]{backlight.c:106}	Ambient brightness: 0.210 -> Backlight pct: 0.563
(D)[17:38:23]{timer.c:41}	Set timeout of 600s 0ns on fd 9.
(D)[17:48:23]{my_math.c:42}	Average frames brightness: 0.206041.
(I)[17:48:24]{backlight.c:106}	Ambient brightness: 0.206 -> Backlight pct: 0.560
(D)[17:48:24]{timer.c:41}	Set timeout of 600s 0ns on fd 9.
(D)[17:58:24]{my_math.c:42}	Average frames brightness: 0.208974.
(I)[17:58:25]{backlight.c:106}	Ambient brightness: 0.209 -> Backlight pct: 0.562
(D)[17:58:25]{timer.c:41}	Set timeout of 600s 0ns on fd 9.
(D)[18:08:25]{my_math.c:42}	Average frames brightness: 0.204862.
(I)[18:08:26]{backlight.c:106}	Ambient brightness: 0.205 -> Backlight pct: 0.559
(D)[18:08:26]{timer.c:41}	Set timeout of 600s 0ns on fd 9.
(D)[18:18:26]{my_math.c:42}	Average frames brightness: 0.210419.
(I)[18:18:27]{backlight.c:106}	Ambient brightness: 0.210 -> Backlight pct: 0.563
(D)[18:18:27]{timer.c:41}	Set timeout of 600s 0ns on fd 9.
(D)[18:28:27]{my_math.c:42}	Average frames brightness: 0.205533.
(I)[18:28:28]{backlight.c:106}	Ambient brightness: 0.206 -> Backlight pct: 0.560
(D)[18:28:28]{timer.c:41}	Set timeout of 600s 0ns on fd 9.
(D)[18:38:29]{my_math.c:42}	Average frames brightness: 0.210350.
(I)[18:38:29]{backlight.c:106}	Ambient brightness: 0.210 -> Backlight pct: 0.563
(D)[18:38:29]{timer.c:41}	Set timeout of 600s 0ns on fd 9.
(D)[18:48:30]{my_math.c:42}	Average frames brightness: 0.204628.
(I)[18:48:30]{backlight.c:106}	Ambient brightness: 0.205 -> Backlight pct: 0.559
(D)[18:48:30]{timer.c:41}	Set timeout of 600s 0ns on fd 9.
(D)[18:58:31]{my_math.c:42}	Average frames brightness: 0.208717.
(I)[18:58:32]{backlight.c:106}	Ambient brightness: 0.209 -> Backlight pct: 0.562
(D)[18:58:32]{timer.c:41}	Set timeout of 600s 0ns on fd 9.
(D)[19:08:32]{my_math.c:42}	Average frames brightness: 0.204756.
(I)[19:08:33]{backlight.c:106}	Ambient brightness: 0.205 -> Backlight pct: 0.559
(D)[19:08:33]{timer.c:41}	Set timeout of 600s 0ns on fd 9.
(D)[19:18:33]{my_math.c:42}	Average frames brightness: 0.207463.
(I)[19:18:34]{backlight.c:106}	Ambient brightness: 0.207 -> Backlight pct: 0.561
(D)[19:18:34]{timer.c:41}	Set timeout of 600s 0ns on fd 9.
(D)[19:28:34]{my_math.c:42}	Average frames brightness: 0.202282.
(I)[19:28:35]{backlight.c:106}	Ambient brightness: 0.202 -> Backlight pct: 0.558
(D)[19:28:35]{timer.c:41}	Set timeout of 600s 0ns on fd 9.
(D)[19:38:35]{my_math.c:42}	Average frames brightness: 0.210437.
(I)[19:38:36]{backlight.c:106}	Ambient brightness: 0.210 -> Backlight pct: 0.563
(D)[19:38:36]{timer.c:41}	Set timeout of 600s 0ns on fd 9.
(D)[19:48:36]{my_math.c:42}	Average frames brightness: 0.206507.
(I)[19:48:37]{backlight.c:106}	Ambient brightness: 0.207 -> Backlight pct: 0.561
(D)[19:48:37]{timer.c:41}	Set timeout of 600s 0ns on fd 9.
(D)[19:58:38]{my_math.c:42}	Average frames brightness: 0.314545.
(I)[19:58:38]{backlight.c:106}	Ambient brightness: 0.315 -> Backlight pct: 0.635
(D)[19:58:38]{timer.c:41}	Set timeout of 600s 0ns on fd 9.
(D)[20:08:39]{my_math.c:42}	Average frames brightness: 0.207894.
(I)[20:08:39]{backlight.c:106}	Ambient brightness: 0.208 -> Backlight pct: 0.562
(D)[20:08:39]{timer.c:41}	Set timeout of 600s 0ns on fd 9.
(D)[20:18:40]{my_math.c:42}	Average frames brightness: 0.206070.
(I)[20:18:40]{backlight.c:106}	Ambient brightness: 0.206 -> Backlight pct: 0.560
(D)[20:18:40]{timer.c:41}	Set timeout of 600s 0ns on fd 9.
(D)[20:28:41]{my_math.c:42}	Average frames brightness: 0.210108.
(I)[20:28:42]{backlight.c:106}	Ambient brightness: 0.210 -> Backlight pct: 0.563
(D)[20:28:42]{timer.c:41}	Set timeout of 600s 0ns on fd 9.
(D)[20:38:42]{my_math.c:42}	Average frames brightness: 0.207118.
(I)[20:38:43]{backlight.c:106}	Ambient brightness: 0.207 -> Backlight pct: 0.561
(D)[20:38:43]{timer.c:41}	Set timeout of 600s 0ns on fd 9.
(D)[20:48:43]{my_math.c:42}	Average frames brightness: 0.209671.
(I)[20:48:44]{backlight.c:106}	Ambient brightness: 0.210 -> Backlight pct: 0.563
(D)[20:48:44]{timer.c:41}	Set timeout of 600s 0ns on fd 9.
(D)[20:58:44]{my_math.c:42}	Average frames brightness: 0.207142.
(I)[20:58:45]{backlight.c:106}	Ambient brightness: 0.207 -> Backlight pct: 0.561
(D)[20:58:45]{timer.c:41}	Set timeout of 600s 0ns on fd 9.
(D)[21:08:45]{my_math.c:42}	Average frames brightness: 0.210333.
(I)[21:08:46]{backlight.c:106}	Ambient brightness: 0.210 -> Backlight pct: 0.563
(D)[21:08:46]{timer.c:41}	Set timeout of 600s 0ns on fd 9.
(D)[21:18:46]{my_math.c:42}	Average frames brightness: 0.204319.
(I)[21:18:47]{backlight.c:106}	Ambient brightness: 0.204 -> Backlight pct: 0.559
(D)[21:18:47]{timer.c:41}	Set timeout of 600s 0ns on fd 9.
(D)[21:28:48]{my_math.c:42}	Average frames brightness: 0.209667.
(I)[21:28:48]{backlight.c:106}	Ambient brightness: 0.210 -> Backlight pct: 0.563
(D)[21:28:48]{timer.c:41}	Set timeout of 600s 0ns on fd 9.
(D)[21:30:00]{gamma.c:187}	Currently inside an event.
(I)[21:30:00]{gamma.c:200}	6500 gamma temp set.
(I)[21:30:00]{gamma.c:78}	Next gamma alarm due to: Mon Dec 10 22:00:00 2018
(D)[21:30:00]{timer.c:41}	Set timeout of 1800s 0ns on fd 8.
(D)[21:30:00]{timer.c:41}	Set timeout of 228s 0ns on fd 9.
(D)[21:33:48]{my_math.c:42}	Average frames brightness: 0.204478.
(I)[21:33:49]{backlight.c:106}	Ambient brightness: 0.204 -> Backlight pct: 0.559
(D)[21:33:49]{timer.c:41}	Set timeout of 300s 0ns on fd 9.
(D)[21:38:49]{my_math.c:42}	Average frames brightness: 0.204104.
(I)[21:38:50]{backlight.c:106}	Ambient brightness: 0.204 -> Backlight pct: 0.559
(D)[21:38:50]{timer.c:41}	Set timeout of 300s 0ns on fd 9.
(D)[21:43:50]{my_math.c:42}	Average frames brightness: 0.207804.
(I)[21:43:51]{backlight.c:106}	Ambient brightness: 0.208 -> Backlight pct: 0.562
(D)[21:43:51]{timer.c:41}	Set timeout of 300s 0ns on fd 9.
(D)[21:48:51]{my_math.c:42}	Average frames brightness: 0.204138.
(I)[21:48:52]{backlight.c:106}	Ambient brightness: 0.204 -> Backlight pct: 0.559
(D)[21:48:52]{timer.c:41}	Set timeout of 300s 0ns on fd 9.
(D)[21:53:53]{my_math.c:42}	Average frames brightness: 0.204337.
(I)[21:53:53]{backlight.c:106}	Ambient brightness: 0.204 -> Backlight pct: 0.559
(D)[21:53:53]{timer.c:41}	Set timeout of 300s 0ns on fd 9.
(D)[21:58:54]{my_math.c:42}	Average frames brightness: 0.204452.
(I)[21:58:54]{backlight.c:106}	Ambient brightness: 0.204 -> Backlight pct: 0.559
(D)[21:58:54]{timer.c:41}	Set timeout of 300s 0ns on fd 9.
(D)[22:00:00]{gamma.c:187}	Currently inside an event.
(I)[22:00:00]{gamma.c:200}	4000 gamma temp set.
(I)[22:00:00]{gamma.c:78}	Next gamma alarm due to: Mon Dec 10 22:30:00 2018
(D)[22:00:00]{timer.c:41}	Set timeout of 1800s 0ns on fd 8.
(D)[22:03:55]{my_math.c:42}	Average frames brightness: 0.203473.
(I)[22:03:55]{backlight.c:106}	Ambient brightness: 0.203 -> Backlight pct: 0.558
(D)[22:03:55]{timer.c:41}	Set timeout of 300s 0ns on fd 9.
(D)[22:08:56]{my_math.c:42}	Average frames brightness: 0.204566.
(I)[22:08:57]{backlight.c:106}	Ambient brightness: 0.205 -> Backlight pct: 0.559
(D)[22:08:57]{timer.c:41}	Set timeout of 300s 0ns on fd 9.
(D)[22:13:57]{my_math.c:42}	Average frames brightness: 0.208146.
(I)[22:13:58]{backlight.c:106}	Ambient brightness: 0.208 -> Backlight pct: 0.562
(D)[22:13:58]{timer.c:41}	Set timeout of 300s 0ns on fd 9.
(D)[22:18:58]{my_math.c:42}	Average frames brightness: 0.203970.
(I)[22:18:59]{backlight.c:106}	Ambient brightness: 0.204 -> Backlight pct: 0.559
(D)[22:18:59]{timer.c:41}	Set timeout of 300s 0ns on fd 9.
(D)[22:23:59]{my_math.c:42}	Average frames brightness: 0.204885.
(I)[22:24:00]{backlight.c:106}	Ambient brightness: 0.205 -> Backlight pct: 0.559
(D)[22:24:00]{timer.c:41}	Set timeout of 300s 0ns on fd 9.
(D)[22:29:00]{my_math.c:42}	Average frames brightness: 0.208442.
(I)[22:29:01]{backlight.c:106}	Ambient brightness: 0.208 -> Backlight pct: 0.562
(D)[22:29:01]{timer.c:41}	Set timeout of 300s 0ns on fd 9.
(I)[22:30:00]{gamma.c:200}	4000 gamma temp set.
(I)[22:30:00]{gamma.c:78}	Next gamma alarm due to: Tue Dec 11 07:59:00 2018
(D)[22:30:00]{timer.c:41}	Set timeout of 34140s 0ns on fd 8.
(D)[22:30:00]{timer.c:41}	Set timeout of 2641s 0ns on fd 9.
(D)[23:14:01]{my_math.c:42}	Average frames brightness: 0.207800.
(I)[23:14:02]{backlight.c:106}	Ambient brightness: 0.208 -> Backlight pct: 0.562
(D)[23:14:02]{timer.c:41}	Set timeout of 2700s 0ns on fd 9.
(D)[23:59:02]{my_math.c:42}	Average frames brightness: 0.204388.
(I)[23:59:03]{backlight.c:106}	Ambient brightness: 0.204 -> Backlight pct: 0.559
(D)[23:59:03]{timer.c:41}	Set timeout of 2700s 0ns on fd 9.
(W)[09:38:52]{bus.c:308}	capture_frames_brightness(): Operation not permitted
(D)[09:38:52]{timer.c:41}	Set timeout of 2700s 0ns on fd 9.
(W)[09:38:52]{bus.c:308}	set_temp(): Operation not permitted
(I)[09:38:52]{gamma.c:78}	Next gamma alarm due to: Tue Dec 11 21:30:00 2018
(D)[09:38:52]{timer.c:41}	Set timeout of 42668s 0ns on fd 8.
(D)[09:38:52]{timer.c:41}	Set timeout of 599s 0ns on fd 9.
(D)[09:48:51]{my_math.c:42}	Average frames brightness: 0.160374.
(I)[09:48:52]{backlight.c:106}	Ambient brightness: 0.160 -> Backlight pct: 0.528
(D)[09:48:52]{timer.c:41}	Set timeout of 600s 0ns on fd 9.
(D)[09:58:52]{my_math.c:42}	Average frames brightness: 0.231282.
(I)[09:58:53]{backlight.c:106}	Ambient brightness: 0.231 -> Backlight pct: 0.578
(D)[09:58:53]{timer.c:41}	Set timeout of 600s 0ns on fd 9.

from clight.

FedeDP avatar FedeDP commented on May 23, 2024

(W)[09:38:52]{bus.c:308} set_temp(): Operation not permitted
(I)[09:38:52]{gamma.c:78} Next gamma alarm due to: Tue Dec 11 21:30:00 2018

You can see that it worked here; but you are receiving EPERM error from clightd. Is your user automatically logged in when you resume?
I guess it happens because when you resume you are on a screen locker; Clightd relies on polkit to enable only Active user sessions to call its setter methods. Thus, being on a screen locker means that your session is locked, and consequently Clightd does not allow you to call Set methods.

If that is the case, i think i can't do much about this behaviour as it is the desired one.

from clight.

FedeDP avatar FedeDP commented on May 23, 2024

I can see a couple of ways to fix this for you:

cat /etc/polkit-1/rules.d/80-clightd.rules
/* Allow any user to call clightd without authentication */
polkit.addRule(function(action, subject) {
    if (action.id.indexOf("org.clightd.clightd.") == 0) {
        return polkit.Result.YES;
    }
});

should do the trick.

For better security, you can even create a "clightd" group, add your user to it, and then use a rule like:

cat /etc/polkit-1/rules.d/80-clightd.rules
/* Allow any user belonging to "clightd" group to call clightd without authentication */
polkit.addRule(function(action, subject) {
    if (action.id.indexOf("org.clightd.clightd.") == 0) {
         if (subject.isInGroup("clightd")) {
            return polkit.Result.YES;
        } else {
            return polkit.Result.NO;
        }
    }
});

This comment will likely go into clightd wiki :)

from clight.

vansoest avatar vansoest commented on May 23, 2024

Thank you for the support! I’ll test it now with the polkit rule.
If it works, you can add it to the README(for special session users).

from clight.

Related Issues (20)

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.