linux 查看显卡驱动

A graphics processing unit (GPU), also known as visual processing unit (VPU), is a specialized electronic circuit designed to rapidly manipulate and alter memory to accelerate the creation of images in a frame buffer intended for output to display. If you want to install the appropriate graphics card driver and get the graphics card to function properly, then you need to find the correct model and vendor of the graphics card on your system. Most Linux distributions can detect varieties of graphics cards but do not always have the best drivers for them. So if you have an external graphics card like Nvidia, then you need to find the model name/number and then look up further details.

In this article we will explain how to get graphics card information using the command line.

Get Hardware Details
There are only a few commands to get hardware information; lspci is one of the command line tools that fetches details about the graphics card.

Run the following command to get the graphics card information on your system.

lspci -vnn | grep VGA -A 12
You will see it output sonething like this:

graphics_card_info

The first line has the name of the vendor, the model name/series and the pci id.

Note the numbers in the bracket: 8086:0f31. Such a number is present for almost all graphics cards. The first part, 8086, indicates the vendor id (which is Intel here) and the second number, 0f31, indicates the pci id, which indicates the model of the graphics unit.

You can also use the lshw command to get the above information.

Run the lshw command on your system.

lshw -numeric -C display
You will see the following output:

graphics_card_info_lshw

Find What Graphics Card Driver Is Used on Linux
To identify the name of the graphics card driver used on your system, you can use the lshw command shown below.

sudo lshw -c video | grep configuration
You wI’ll see it output something like this:

graphicscard_used_lshw

The name of the graphics card driver is shown in driver=i915. After, you can check the details of the graphics card driver as follows:

modinfo i915
You will see it output something like this:

graphicscard_modinfo

Check Hardware Acceleration
With hardware-based 3d acceleration, applications that need to draw 3d graphics can use the hardware directly to process and generate the graphics and speed up 3d rendering significantly. For this, the graphics card must support hardware acceleration, and the correct drivers must be installed on your system.

You can use the glxinfo command to get the details of OpenGL:

glxinfo | grep OpenGL
You will see an output like this:

graphicscard_opengl

The OpenGL renderer string points to MESA libraries which means that 3d rendering is being handled entirely inside software. This is going to be slow, and games wI’ll not work well.

Conclusion
I hope you now have enough knowledge to find the correct information of the graphics card installed on your system and that you can easily install the correct diver for the graphics card. Feel free to comment if you have any questions.

linux 查看显卡驱动

上一篇:Qt中实现进程通信


下一篇:MAC安装JDK8及设置环境变量