A utility for querying and configuring PCI devices.
The setpci command is a utility used to query and configure PCI devices.
setpci [options] [parameters]
-v: Display detailed information about the execution of the command.
-f: Do not display any information when there are no operations to be completed.
-D: Test mode; do not actually write configuration information to the registers.
-d: Display information only for a given vendor and device ID.
-s: Display information only for devices on a specified bus and slot, or function blocks on a device.
Method to adjust laptop screen brightness in Linux:
First, enter the lspci command in the terminal to list the addresses of various devices:
lspci
00:00.0 host bridge: Intel Corporation Mobile 945GM/PM/GMS, 943/940GML and 945GT Express Memory Controller Hub (rev 03)
00:02.0 VGA compatible controller: Intel Corporation Mobile 945GM/GMS, 943/940GML Express Integrated Graphics Controller (rev 03)
00:02.1 Display controller: Intel Corporation Mobile 945GM/GMS/GME, 943/940GML Express Integrated Graphics Controller (rev 03)
00:1b.0 Audio device: Intel Corporation N10/ICH 7 Family High Definition Audio Controller (rev 02)
00:1c.0 PCI bridge: Intel Corporation N10/ICH 7 Family PCI Express Port 1 (rev 02)
00:1c.1 PCI bridge: Intel Corporation N10/ICH 7 Family PCI Express Port 2 (rev 02)
......
We find that 00:02.0 is the VGA device, so we modify its attributes:
sudo setpci -s 00:02.0 F4.B=FF
Explanation:
w for Word (2 bytes) and L for Long (4 bytes)).In this example, 00 is the darkest and FF is the brightest. This may vary for different computers. If FF is too bright, you can use:
sudo setpci -s 00:02.0 F4.B=CC