Use backup hidraw brightness write if read-back value fails

This commit is contained in:
Luke D. Jones
2024-05-13 16:18:00 +12:00
parent 6c7e1a6467
commit f2f090a88f
11 changed files with 412 additions and 226 deletions

181
Cargo.lock generated
View File

@@ -115,6 +115,12 @@ version = "0.7.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711"
[[package]]
name = "as-raw-xcb-connection"
version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "175571dd1d178ced59193a6fc02dde1b972eb0bc56c892cde9beeceac5bf0f6b"
[[package]]
name = "asusctl"
version = "6.0.7"
@@ -726,7 +732,7 @@ checksum = "67523a3b4be3ce1989d607a828d036249522dd9c1c8de7f4dd2dae43a37369d1"
dependencies = [
"glob",
"libc",
"libloading",
"libloading 0.8.3",
]
[[package]]
@@ -872,6 +878,7 @@ dependencies = [
"objc-foundation",
"objc_id",
"smithay-clipboard",
"x11-clipboard",
]
[[package]]
@@ -1010,6 +1017,16 @@ dependencies = [
"lazy_static",
]
[[package]]
name = "ctor"
version = "0.2.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ad291aa74992b9b7a7e88c38acbbf6ad7e107f1d90ee8775b7bc1fc3394f485c"
dependencies = [
"quote",
"syn 2.0.61",
]
[[package]]
name = "cursor-icon"
version = "1.1.0"
@@ -1129,7 +1146,7 @@ version = "0.5.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "330c60081dcc4c72131f8eb70510f1ac07223e5d4163db481a04a0befcffa412"
dependencies = [
"libloading",
"libloading 0.8.3",
]
[[package]]
@@ -1396,7 +1413,7 @@ version = "0.3.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "38e2275cc4e4fc009b0669731a1e5ab7ebf11f469eaede2bab9309a5b4d6057f"
dependencies = [
"memoffset",
"memoffset 0.9.1",
"rustc_version",
]
@@ -1615,6 +1632,26 @@ dependencies = [
"version_check",
]
[[package]]
name = "gethostname"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bb65d4ba3173c56a500b555b532f72c42e8d1fe64962b518897f8959fae2c177"
dependencies = [
"libc",
"winapi",
]
[[package]]
name = "gethostname"
version = "0.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0176e0459c2e4a1fe232f984bca6890e681076abb9934f6cea7c326f3fc47818"
dependencies = [
"libc",
"windows-targets 0.48.5",
]
[[package]]
name = "getrandom"
version = "0.2.15"
@@ -1724,14 +1761,16 @@ dependencies = [
"core-foundation",
"dispatch",
"glutin_egl_sys",
"glutin_glx_sys",
"glutin_wgl_sys",
"icrate 0.0.4",
"libloading",
"libloading 0.8.3",
"objc2 0.4.1",
"once_cell",
"raw-window-handle 0.5.2",
"wayland-sys",
"windows-sys 0.48.0",
"x11-dl",
]
[[package]]
@@ -1756,6 +1795,16 @@ dependencies = [
"windows-sys 0.48.0",
]
[[package]]
name = "glutin_glx_sys"
version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a165fd686c10dcc2d45380b35796e577eacfd43d4660ee741ec8ebe2201b3b4f"
dependencies = [
"gl_generator",
"x11-dl",
]
[[package]]
name = "glutin_wgl_sys"
version = "0.5.0"
@@ -1908,7 +1957,7 @@ dependencies = [
"cfg-if",
"derive_more",
"fontdb",
"libloading",
"libloading 0.8.3",
]
[[package]]
@@ -2342,6 +2391,16 @@ version = "0.2.154"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ae743338b92ff9146ce83992f766a31066a91a8c84a45e0e9f21e7cf6de6d346"
[[package]]
name = "libloading"
version = "0.7.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f"
dependencies = [
"cfg-if",
"winapi",
]
[[package]]
name = "libloading"
version = "0.8.3"
@@ -2580,6 +2639,15 @@ dependencies = [
"libc",
]
[[package]]
name = "memoffset"
version = "0.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5de893c32cde5f383baa4c04c5d6dbdd735cfd4a794b0debdb2bb1b421da5ff4"
dependencies = [
"autocfg",
]
[[package]]
name = "memoffset"
version = "0.9.1"
@@ -2690,6 +2758,7 @@ dependencies = [
"bitflags 1.3.2",
"cfg-if",
"libc",
"memoffset 0.7.1",
]
[[package]]
@@ -2713,7 +2782,7 @@ dependencies = [
"cfg-if",
"cfg_aliases 0.1.1",
"libc",
"memoffset",
"memoffset 0.9.1",
]
[[package]]
@@ -3455,7 +3524,7 @@ checksum = "32a58fa8a7ccff2aec4f39cc45bf5f985cec7125ab271cf681c279fd00192b49"
dependencies = [
"countme",
"hashbrown",
"memoffset",
"memoffset 0.9.1",
"rustc-hash",
"text-size",
]
@@ -3898,6 +3967,7 @@ version = "0.3.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f266ce2aa23eaaaa4e758ed44495d505d00fb79f359d46f6c1900cb053123b62"
dependencies = [
"as-raw-xcb-connection",
"bytemuck",
"cfg_aliases 0.1.1",
"cocoa",
@@ -3911,12 +3981,14 @@ dependencies = [
"raw-window-handle 0.5.2",
"redox_syscall 0.4.1",
"rustix 0.38.34",
"tiny-xlib",
"wasm-bindgen",
"wayland-backend",
"wayland-client",
"wayland-sys",
"web-sys",
"windows-sys 0.48.0",
"x11rb 0.12.0",
]
[[package]]
@@ -4157,6 +4229,18 @@ dependencies = [
"strict-num",
]
[[package]]
name = "tiny-xlib"
version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d4098d49269baa034a8d1eae9bd63e9fa532148d772121dace3bcd6a6c98eb6d"
dependencies = [
"as-raw-xcb-connection",
"ctor",
"libloading 0.8.3",
"tracing",
]
[[package]]
name = "tinyvec"
version = "1.6.0"
@@ -4339,7 +4423,7 @@ version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "89daebc3e6fd160ac4aa9fc8b3bf71e1f74fbf92367ae71fb83a037e8bf164b9"
dependencies = [
"memoffset",
"memoffset 0.9.1",
"tempfile",
"winapi",
]
@@ -4784,6 +4868,15 @@ dependencies = [
"windows-sys 0.52.0",
]
[[package]]
name = "winapi-wsapoll"
version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1eafc5f679c576995526e81635d0cf9695841736712b4e892f87abbe6fed3f28"
dependencies = [
"winapi",
]
[[package]]
name = "winapi-x86_64-pc-windows-gnu"
version = "0.4.0"
@@ -5106,6 +5199,7 @@ dependencies = [
"android-activity",
"atomic-waker",
"bitflags 2.5.0",
"bytemuck",
"calloop",
"cfg_aliases 0.1.1",
"core-foundation",
@@ -5121,6 +5215,7 @@ dependencies = [
"objc2 0.4.1",
"once_cell",
"orbclient",
"percent-encoding",
"raw-window-handle 0.5.2",
"redox_syscall 0.3.5",
"rustix 0.38.34",
@@ -5137,6 +5232,8 @@ dependencies = [
"web-sys",
"web-time 0.2.4",
"windows-sys 0.48.0",
"x11-dl",
"x11rb 0.13.0",
"xkbcommon-dl",
]
@@ -5167,6 +5264,74 @@ dependencies = [
"winapi",
]
[[package]]
name = "x11-clipboard"
version = "0.9.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b98785a09322d7446e28a13203d2cae1059a0dd3dfb32cb06d0a225f023d8286"
dependencies = [
"libc",
"x11rb 0.13.0",
]
[[package]]
name = "x11-dl"
version = "2.21.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "38735924fedd5314a6e548792904ed8c6de6636285cb9fec04d5b1db85c1516f"
dependencies = [
"libc",
"once_cell",
"pkg-config",
]
[[package]]
name = "x11rb"
version = "0.12.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b1641b26d4dec61337c35a1b1aaf9e3cba8f46f0b43636c609ab0291a648040a"
dependencies = [
"as-raw-xcb-connection",
"gethostname 0.3.0",
"libc",
"libloading 0.7.4",
"nix 0.26.4",
"once_cell",
"winapi",
"winapi-wsapoll",
"x11rb-protocol 0.12.0",
]
[[package]]
name = "x11rb"
version = "0.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f8f25ead8c7e4cba123243a6367da5d3990e0d3affa708ea19dce96356bd9f1a"
dependencies = [
"as-raw-xcb-connection",
"gethostname 0.4.3",
"libc",
"libloading 0.8.3",
"once_cell",
"rustix 0.38.34",
"x11rb-protocol 0.13.0",
]
[[package]]
name = "x11rb-protocol"
version = "0.12.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "82d6c3f9a0fb6701fab8f6cea9b0c0bd5d6876f1f89f7fada07e558077c344bc"
dependencies = [
"nix 0.26.4",
]
[[package]]
name = "x11rb-protocol"
version = "0.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e63e71c4b8bd9ffec2c963173a4dc4cbde9ee96961d4fcb4429db9929b606c34"
[[package]]
name = "xattr"
version = "1.3.1"