Subject: [PATCH] Add support for AMD backlight

From: eylles <[email-masked]>
Date: Fri, 7 Nov 2025 06:56:31 -0600

The subdir path can be amdgpu_bl0, amdgpu_bl1, etc... so a simple glob ought to
work fine for any number the driver decides to put as suffix.
---
 debian/src/initscripts/etc/init.d/brightness | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/debian/src/initscripts/etc/init.d/brightness b/debian/src/initscripts/etc/init.d/brightness
index c1a5f1fd..eb023ec8 100755
--- a/debian/src/initscripts/etc/init.d/brightness
+++ b/debian/src/initscripts/etc/init.d/brightness
@@ -29,6 +29,12 @@ do_invoke() {
 	    /sys/class/backlight/intel_backlight/max_brightness
 	rc=$?
 	test $rc -lt $rv || rv=$rc
+    # AMD
+	do_$1 amd \
+	    /sys/class/backlight/amdgpu_bl*/brightness \
+	    /sys/class/backlight/amdgpu_bl*/max_brightness
+	rc=$?
+	test $rc -lt $rv || rv=$rc
 	# could insert others using the same scheme here
 	return $rv
 }
-- 
2.47.3