so - it seems on some hardware and./or os combinations the list of bt
adapters is empty from bluez5 entirely if the adapter is rfkilled off.
this means e doesnt see it at all - has no idea it's there. bz doesnt
expose it. without that we can't turn it on even. so - if our bt
adapter list is empty, then assume this is an error and manually list
rfkillable devines and forcibly unblock them ot make them appear in
bulez5... not so much a bug fix as a system brokenness workaround with
bz5 just ignoring rfkill bnlocked devices and not even telling us
about them.
@fix
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
i didn't know bl_ppower existed... i found a device that exposes this
sysfs node and it seems it's a good idea to swizzle it too in addition
to brightness. so fix that and also fix e's backlight handling to find
backlight devices for non-lid panels marked to have a backlight ... i
have such a device here. this makes backlight controls work in this
case.
all dirs owned by root - so can't be exploited. this code is not
acessible at this point so no actual issues. it still needs testing.
until other work is done it won't be tested yet.
fixes T8671 further comments on umount check.
This ensures we have a matching $HOME when using setuid, without
which can potentially cause issues in eina_vpath on some
systems (FreeBSD as example).
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.
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.
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