Comments (20)
You're welcome! But thank you for debugging this.
Why don't you use Temp clight property?
that sounds like a good idea, I'll add it to my todo list :)
from clightd.
Hi! As you can read here: https://github.com/FedeDP/Clightd/blob/master/src/modules/gamma_plugins/wl.c#L134, it seems like wlroots keeps the screen temperature until a wl_display connection is active.
Indeed, Clightd does not close the connection.
Thus i see 2 possibilities:
- Clightd crashes and is restarted by Clight (dbus activated)
- Sway closes the display connection after some idle time (as gamma temperature is automatically set by Clight during the morning and during the evening, thus lots of time passes in between, may be sway kills the conneciton even if Clightd keeps a reference on it)
Can you check if Clightd crashed?
from clightd.
i know clightd does not crash; i ran it under a debugger, and it still caused weird gamma changes...
it's very random, so I'm not sure what the root of the issue is. it could be something with Sway. sometimes the screen will flash the default gamma for a frame, then go back to the set gamma; other times it will reset the gamma completely.
from clightd.
clight-gui calls on the Clightd dbus in order to get/recieve events on the current gamma change
i think this may have something to do with the issue; perhaps two Clightd clients trying to access the same Wayland display through Clightd is causing some issues?
from clightd.
removing code from clight-gui that references Clightd/Gamma makes no difference; sometimes the gamma change simply goes away
from clightd.
i think this may have something to do with the issue; perhaps two Clightd clients trying to access the same Wayland display through Clightd is causing some issues?
Clightd does indeed cache open wl_display connections and reuses them for any client that makes a request, even for cross-module requests, eg:
- a gamma Set opens a new display connection on let's say WAYLAND_DISPLAY wayland-0
- a dpms Set requires wayland-0 display; a connection has been cached -> dpms will use again same connection
removing code from clight-gui that references Clightd/Gamma makes no difference; sometimes the gamma change simply goes away
As expected. I feel this is a wlroots issue, or at least i am mismanaging something in Clightd.
Can you test with eg: https://gitlab.com/chinstrap/gammastep if it has same issue?
Thank you!
from clightd.
I tested it for a bit, and gammastep doesn't make the gamma flicker. However using clight, sometimes it will flicker/stop (opening clight-gui, just at random)
from clightd.
it also seems calling Get on clightd wayland causes the gamma to reset
from clightd.
(opening clight-gui, just at random)
Does it happen only while opening clight-gui?
it also seems calling Get on clightd wayland causes the gamma to reset
Thanks, will investigate!
Btw thank you for your testing!
from clightd.
It doesn't just happen when opening clight-gui; that happens because clight-gui calls Get on clightd
but, with clight running, it will randomly drop the gamma... it seems using busctl directly on clightd and not touching it has no issues
from clightd.
it seems using busctl directly on clightd and not touching it has no issues
argh that makes it harder to debug; will try anyway.
but, with clight running, it will randomly drop the gamma
Is this gamma drop related to clight-gui calling Get on Clightd or completely random? (btw out of curiosity, why are you calling Clightd directly?)
Thanks!
from clightd.
here's a bit of a better description
scenario 1:
- only run clightd
- use busctl to call Set
- gamma persists, even through multiple Set calls
scenario 2:
- run clight and clightd
- gamma is set automatically
- gamma sometimes flashes/turns off
in both, calling Get on clightd, either through clight-gui or busctl, causes the gamma to disappear
from clightd.
Also, clight gui calls clightd directly to obtain the gamma temperature when it is opened, and then hooks to the Changed signal on gamma.
from clightd.
scenario 2:
run clight and clightd
gamma is set automatically
gamma sometimes flashes/turns offin both, calling Get on clightd, either through clight-gui or busctl, causes the gamma to disappear
Thank you! This will help me isolate the problem!
Also, clight gui calls clightd directly to obtain the gamma temperature when it is opened, and then hooks to the Changed signal on gamma.
Why don't you use Temp
clight property? https://github.com/FedeDP/Clight/wiki/Api#read-only-bus-properties
It also emits changes!
from clightd.
that sounds like a good idea, I'll add it to my todo list :)
Does new clight-gui that does no more call Clightd Gamma.Get helps?
from clightd.
Unfortunately it did not. While it did remove the launch issue, it still randomly went away.
from clightd.
Hi! Can you test with attached patch?
Thank you :)
clightd_wl.txt
I am trying to register the wl_display fd and dispatch any event it receives. Maybe this will keep the connection alive!
from clightd.
I should have found the issue: dpms protocol on wayland was segfaulting clightd were not supported (it is only supported by kwin... so on sway it crashed clightd).
I am testing and i will push a fix!
from clightd.
Should be fixed now!
from clightd.
it appears it is working fine! thank you for fixing it :)
from clightd.
Related Issues (20)
- [FEATURE REQ] suncalc+geo based illuminance sensor HOT 2
- GLib.Variants Invalid GVariant format string for `d(du)` HOT 2
- [FEAT REQ] Uninstall Make rule HOT 3
- Configure specific methods (ACPI/DDC/Emulated) of brightness control for different DRM nodes/monitors HOT 1
- [BUG] screen functionality broke fcitx5 candidate window HOT 8
- Wayland DPMS & acpid.service issues HOT 1
- Missing build deps in wiki for Fedora HOT 4
- Can't set external monitor. HOT 5
- [BUG] High cpu usage HOT 9
- [BUG] Build Errors on Fedora after recent updates to Backlight.c & Backlight2.c HOT 7
- Device or resource busy HOT 18
- iio device I/O error HOT 3
- External monitor no detected HOT 6
- Failed to add object vtable on path HOT 4
- Need libusb-1.0-0-dev in Ubuntu HOT 1
- ALS not working HOT 35
- Not able to detect ALS on ThinkPad X1 Yoga Gen 5 HOT 11
- Brightness level fluctuates since update to 5.7 HOT 3
- Cmake, libmodule not found HOT 3
- [FEATURE REQ] Wlroots DPMS support HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from clightd.