~kennylevinsen/wlsunset-devel

1

Re: feature request: control wlsunset instance

Details
Message ID
<4a06d654-140c-71b9-d9ad-255c0cdbadab@kl.wtf>
DKIM signature
missing
Download raw message
(Remember to "Reply All" to mailing list threads.)

On 6/2/23 19:49, neo@neoney.dev wrote:
> I’ve tested it and it looks to be perfectly fine, except for 1 minor 
> issue - about 90% of time when consecutively sending the signal to it, 
> it will exit with a 0 code, with the message:
> `zwlr_gamma_control_v1@6: error 1: The gamma ramps don't have the 
> correct size`

Assuming you sent SIGUSR1 to wlsunset *very* fast, then maybe you are 
hitting a race in the gamma control protocol.

wlsunset reuses the same mapped file for each output's gamma ramps on 
every update. wlroots calls read(3) to read the content of this file, 
advancing the file offset and in turn requiring wlsunset to reset the 
offset with lseek(3) before the next gamma ramp submission. If gamma 
updates are sent faster than wlroots consumes them, the offset reset 
will not happen after each read, and wlroots will see a read fail with 
EOF and complain.

Either wlroots needs to use a position-independent way to read the file 
descriptor, or the protocol needs to be expanded with a "done" event to 
synchronize and throttle wlsunset.

... or, you know, just don't intentionally force wlsunset to update at 
hyperspeed. :)

Re: feature request: control wlsunset instance

Details
Message ID
<659ad02d-5515-0b8c-834e-64fef80cc183@kl.wtf>
In-Reply-To
<4a06d654-140c-71b9-d9ad-255c0cdbadab@kl.wtf> (view parent)
DKIM signature
missing
Download raw message
Follow-up: 
https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4168
Reply to thread Export thread (mbox)