Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the use of the setpci command in Linux

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

Editor to share with you what is the use of the setpci command in Linux, I believe most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!

Linux common commands the setpci command is a tool for querying and configuring PCI devices.

Setpci query and configure tools for PCI devices

Syntax setpci (options) (parameters) option-v: displays details of instruction execution;-f: does not display any information when nothing needs to be done;-D: test mode, which does not really write configuration information to the register;-d: displays only the information of a given manufacturer and device;-s: displays only the function block information on the specified bus, slot, or device. Parameter PCI device: specify the PCI device to configure

Action: specify the configuration operation to be completed.

Example how to adjust the brightness of notebook screen under Linux:

First enter the terminal and enter the lspci command to list the addresses of various devices:

Lspci 00Rom 00.0 host bridge: Intel Corporation Mobile 945GM/PM/GMS, 943/940GML and 945GT Express Memory Controller Hub (rev 03) 00RU 02.0 VGA compatible controller: Intel Corporation Mobile 945GM/GMS, 943/940GML Express Integrated Graphics Controller (rev 03) 00RU 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). It is found that 00Rom 02.0 is a VGA device, so we modify its properties:

Sudo setpci-s 00 02.0 F4.B=FF explain:

Setpci is a command that modifies device properties.

-s indicates that the next input is the address of the device.

00 02.0 VGA device address (:.).

The address of the attribute to be modified by F4, which should indicate "brightness".

B modified length (B should be bytes (Byte), w (should be Word, two bytes), L (should be Long,4 bytes).

= the value to be modified by FF (can be changed).

Here 00 is the darkest, FF is the brightest, different computers may be different. For example, if I think FF is too bright, I can:

Sudo setpci-s 00Linux 02.0 F4.B=CC and above are all the contents of this article entitled "what is the use of setpci commands in Linux?" Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report