我可以使用控制背光,/sys/class/backlight/..
但有没有办法确定内部使用哪个驱动器(模块)来实际控制背光强度?
答案1
$ ls -ld /sys/class/backlight/intel_backlight
lrwxrwxrwx. 1 root root 0 Jun 3 10:08 /sys/class/backlight/intel_backlight
-> ../../devices/pci0000:00/0000:00:02.0/drm/card0/card0-eDP-1/intel_backlight
$ ls -l /sys/devices/pci0000:00/0000:00:02.0/driver
lrwxrwxrwx. 1 root root 0 Jun 3 09:08 /sys/devices/pci0000:00/0000:00:02.0/driver
-> ../../../bus/pci/drivers/i915
$ ls -l /sys/bus/pci/drivers/i915/module
lrwxrwxrwx. 1 root root 0 Jun 4 17:04 /sys/bus/pci/drivers/i915/module
-> ../../../../module/i915
不要问我到底是如何猜测这个水平的driver
:)。我认为你可能应该检查每个级别,从最长的路径开始并向下进行,但这有点乏味。