Improve ddcci mount service

This commit is contained in:
ulic-youthlic 2025-07-13 06:04:55 +08:00
parent 1d98d3905f
commit c77571cd8b
Signed by: youthlic
GPG key ID: 63E86C3C14A0D721
2 changed files with 7 additions and 4 deletions

View file

@ -12,7 +12,7 @@ in {
} }
{ {
name = "DP-3"; name = "DP-3";
path = "/sys/class/backlight/ddcci13"; path = "/sys/class/backlight/ddcci15";
capturer = "wayland"; capturer = "wayland";
} }
]; ];

View file

@ -63,10 +63,13 @@
id=$(echo "$1" | cut -d "-" -f 2) id=$(echo "$1" | cut -d "-" -f 2)
while ((success < 1)) && ((i++ < 5)); do while ((success < 1)) && ((i++ < 5)); do
if ddcutil getvcp 10 -b "$id"; then if ddcutil getvcp 10 -b "$id"; then
success=1 if echo ddcci 0x37 > "/sys/bus/i2c/devices/$1/new_device"; then
echo ddcci 0x37 > "/sys/bus/i2c/devices/$1/new_device" success=1
echo ddcci attached to "$1" echo ddcci attached to "$1"
fi
fi fi
echo "Try $i"
sleep 1;
done done
''; '';
}; };