Commit Graph

14 Commits

Author SHA1 Message Date
Ross Vandegrift 9c4b442335 attempt to dlopen libddcutil.so.5 first
The backwards-incompatible changes in libddcutil.so.5 are documented at
https://www.ddcutil.com/c_api_200/ - a quick grep says that the only affected
symbol appearing in E is ddca_set_global_sleep_multiplier (which is already
optional).

This change does not make any of the changes suggested in the "Library
Initialization" section of the above doc.
2024-04-03 22:03:54 -07:00
Carsten Haitzler 32d642d338 system ddc - more of a delay at start after modprobe
it seems on starts while xrandr is busy talking to screens sometiems
one of my screens doesnt respond... unless we wait a bit. so .. wait
more.
2021-07-04 12:34:58 +01:00
Carsten Haitzler a197e3c1db ddc - support latest major version 2021-07-04 10:06:13 +01:00
Carsten Haitzler c4e76ed593 backlight + ddc - fix and improve several small things
1. use max valu in the get and store it once a get has been done so it
will get backlight level right on unsuaul monitors that do not use
0->100
2. detect as an error dinfing 2 screesn with the same edid and log it
3. use ddca_enable_sleep_suppression() to try speed up things a bit to
sleep less inside ddcutil
2020-11-26 00:38:01 +00:00
Carsten Haitzler ead43c40c3 ddc - add libddcutil.so.3 as supported as it is compatible for our uses 2020-08-18 12:06:43 +01:00
Carsten Haitzler bd97c74492 e alert - in case of crash use e system in new alert mode
this forces all ddc/backlight devices to max when discovered so you
can always see the alert.
2020-04-21 03:01:54 +01:00
Carsten Haitzler f1e899fee0 e system ddc - handle error case of alloc fail and dont deref null
fix CID 1425220
2020-04-19 00:48:07 +01:00
Carsten Haitzler d524673f96 e system ddc - add optional sleep multiplier api - new in libddc
add ability to find it at any rate...
2020-02-14 11:02:42 +00:00
Carsten Haitzler fcacbe8a4f ddc - work around some probe fails, missing timer handle, etc.
beating on ddc support to make it solid. dealing with some bad screens
that don't respond, a libddcutil that was doing a printf messing up
the message stream from e_system to e .... and more.
2020-02-07 19:56:01 +00:00
Carsten Haitzler d7325c3aad ddc - use return val of system to decide to usleep or not 2020-02-07 13:36:09 +00:00
Carsten Haitzler ee59cec585 ddc - add small delay after modprobe to allow module to init in bg... 2020-02-07 10:48:54 +00:00
Carsten Haitzler 1cfd1f4242 backlight - add workaround monitor wakeups silently ignoring val sets
so if monitor is buys waking up from dpms, it may not be bothering to
do what we asked... but the sets of the propety say they succeed, so
use the get at the end of a fade in run to see if we get the target
brightness within some delta and it's one of our standard brightnesses
(1.0, normal or dim) and retry a few times until we succeed or give
up. this ensures on wakupe your monitors end up at their target
brightness even with some hiccups as opposed to stay dim. not much we
can do about iffy hardware or libddcutil (not sure which is to blame)
other than do workarounds like this.

also add logging so you can see what is being asked and if it succeeds
or fails according to libddcutil.
2020-02-07 10:24:59 +00:00
Carsten Haitzler 57e8805005 ddc - fix animation blocked by slow ddc response with multi screen
just by luck the queue "play catchup" happens to have a classic
scheduling issue. one screen always wins, the other always loses as we
play catch-up in the request queue so one is starved of "scheduling
slots" while the othe rgets them all. this fixes that by moving the
entire request queue into the thread work queue in one go so they all
get an equal chance. now botjh my desktop monitors dim smoothly on
idle like my laptop... smooooooooood
2020-02-06 19:47:04 +00:00
Carsten Haitzler eab2a34ef3 backlight - add ddc support via libddcutil
This adds ddc monitor control and glues it into the backlight system.
A result of this is now backlgiht control gadgets work screen by
screen and even on desktop monitors as well as on a laptop panel. If
you now put a backlight gadget on a shelf on each screen... it will
control THAT screen's backlight.

This requires libddcutil to be installed. That will require i2c
modules (i2c-dev specifically). This means that this is likely not
going to do anything useful on bsd's... unless libddcutil happens to
work there by chance.

so install ddcutil/libddcutil. ensure it's in ld.so.conf so setuid
root processes find it (as LD_LIBRARY_PATH won't help) and enjoy your
new funcky per-screen backlight controls... :)

@feature
2020-02-06 18:41:23 +00:00