- How to Get Graphics Card Information on Linux
- Get Hardware Details
- Find What Graphics Card Driver Is Used on Linux
- Check Hardware Acceleration
- Conclusion
- One comment
- Popular Posts
- How to Find Which Graphics Card do You Have in Linux?
- Check graphics card details in Linux command line
- Use lspci command to find graphics card
- Get detailed graphics card information with lshw command in Linux
- Bonus Tip: Check graphics card details graphically
- Top 7 Linux GPU Monitoring and Diagnostic Commands Line Tools
- Linux GPU Monitoring and Diagnostic Commands Line Tools
- Finding information about GPU on Linux
- 1. glmark2 – Stress-testing GPU performance on Linux
- 2. glxgears – Simple Linux GPU performance testing tool
- 3. gpustat – A simple tool to get Nvidia GPU stats on Linux and FreeBSD Unix
- 4. intel_gpu_top – Displying a top-like summary of Intel GPU usage on Linux
- 5. nvidia-smi – NVIDIA System Management Interface program
- 6. nvtop – NVIDIA GPU top
- 7. radeontop – Tool to show AMD GPU utilization on Linux
- Conclusion
How to Get Graphics Card Information on 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.
You will see it output sonething like this:
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.
You will see the following output:
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.
You wI’ll see it output something like this:
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:
You will see it output something like this:
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:
You will see an output like this:
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.
Over 5 years of experience as IT system administrator for IT company in India. My skills include a deep knowledge of Rehat/Centos, Ubuntu nginx and Apache, Mysql, Subversion, Linux, Ubuntu, web hosting, web server, squied proxy, NFS, FTP, DNS, Samba, ldap, Openvpn, Haproxy, Amazon web services, WHMCS, Openstack Cloud, Postfix Mail Server, Security etc.
One comment
You can also use “inxi -G” to display all the info about the graphics card with one command. Other options control how verbose the display is.
“inxi” is a very powerful command line tool that will detect a lot of information about your installed hardware. “inxi” is installed by default with some Linux/BSD distros. It is available in the repositories of most Linux/BSD distros and can be installed just as any other package.
Comments are closed.
Popular Posts
RedMagic 6S Pro Review: Gaming Is Serious Business.
How to Boot to Recovery Mode (Safe Mode) in Ubuntu
Ubuntu Software Center Not Working? Here Are the Fixes
How to Stress Test a Graphics Card on Linux
How to Mount a Windows Share Folder on Linux
How to Mount Your iPhone as an External Drive in Ubuntu
How to Fix Ubuntu Freezing in VirtualBox
How to Fix «Repository Does Not Have Release File» Error
How to Combine PDF Files on Windows and Linux
How to Reset the Root Password in Linux
8 Reasons to Switch from Windows to Linux
Affiliate Disclosure: Make Tech Easier may earn commission on products purchased through our links, which supports the work we do for our readers.
Источник
How to Find Which Graphics Card do You Have in Linux?
Last updated April 18, 2020 By Abhishek Prakash 19 Comments
Be it Nvidia or Radeon or Intel, they all may have some issues with Linux. When you are on your way to troubleshoot the graphics problem, the first thing you want to know is which graphics card do you have in your system.
Linux has several commands to check hardware information. You can use them to check what graphics card (also refer to as video card) do you have. Let me show you a couple of commands to get GPU information in Linux.
Check graphics card details in Linux command line
Use lspci command to find graphics card
The lspci command displays the information about devices connected through PCI (peripheral Component Interconnect) buses. Basically, this command gives you the detail about all the peripheral devices to your system from keyboard and mouse to sound, network and graphics cards.
By default, you’ll have a huge list of such peripheral devices. This is why you need to filter the output for graphics card with grep command in this manner:
This should show a one line information about your graphics card:
As you can see, my system has Intel HD 620 video card.
Get detailed graphics card information with lshw command in Linux
The lspci command is good enough to see what graphics card you have but it doesn’t tell you a lot. You can use lshw command to get more information on it.
You may have to install lshw on Fedora, Manjaro and a few non-Ubuntu distributions.
This command requires you to have root access. You need to specify that you are looking for video card (graphics card) information in this fashion:
And as you can see in the output below, this command gives more information on the graphics card such as clock rate, width, driver etc.
Bonus Tip: Check graphics card details graphically
It’s not that you must use the command line to find graphics card details in Linux. Most Linux distributions (or should I say desktop environments) provide essential details in the settings application.
For example, if you are using GNOME desktop environment, you can check the details by going to About section of Settings. Here’s what it looks like in Ubuntu 20.04:
I hope you find this quick tip helpful. You can also use the same commands to find your network adapter and CPU information in Linux.
If you have questions or suggestions, don’t hesitate to write a comment.
Like what you read? Please share it with others.
Источник
Top 7 Linux GPU Monitoring and Diagnostic Commands Line Tools
A video card is a special circuit board that controls what is displayed on a computer monitor. It is also called a graphics processing unit (GPU), which calculates 3D images and graphics for Linux gaming and other usages. Let us see the top 7 Linux GPU monitoring and diagnostic command-line tools to solve issues.
The following tools work on Linux for GPU monitoring and diagnostic purposes and other operating systems such as FreeBSD. The majority of Linux and FreeBSD users these days use Nvidia, Intel, and AMD GPUs.
Linux GPU Monitoring and Diagnostic Commands Line Tools
We can use the following tools to monitor, diagnostic, and inspect our Linux or *BSD based systems.
Finding information about GPU on Linux
To get the GPU info simply run:
sudo lshw -C display -short
lspci -v | more
Which is output something as follows:
Want to find out video card GPU memory RAM size on Linux? Try:
sudo lspci
sudo lshw -C display
glxinfo | egrep -i ‘device|memory’
grep -i —color memory /var/log/Xorg.0.log
1. glmark2 – Stress-testing GPU performance on Linux
glmark2 is an OpenGL 2.0 and ES 2.0 benchmark command-line utility. We can install it as follows:
$ sudo apt install glmark2
Now run it as follows:
$ glmark2
Then it will begin the test as follows and would stress test your GPU on Linux:
Linux glmark2 test screen
2. glxgears – Simple Linux GPU performance testing tool
It will displays a set of rotating gears and prints out the frame rate at regular intervals. It has become quite popular as basic benchmarking tool for Linux and Unix-like system such as FreeBSD. Install and run it as follows:
$ apt install mesa-utils
$ glxgears
The GPU frame rate is measured and published out on the screen every five seconds. The final result will look as follows:
3. gpustat – A simple tool to get Nvidia GPU stats on Linux and FreeBSD Unix
It is written in Python and the perfect tool for CLI users, especially ML/AI developers. One can install it as follows using PIP
$ pip install gpustat
$ pip3 install gpustat
Run it as follows:
$ gpustat
$ gpustat -cp
Here we see name of running process and their PIDs running on Nvidia GPU:
See help:
$ gpustat -h
- No ads and tracking
- In-depth guides for developers and sysadmins at Opensourceflare✨
- Join my Patreon to support independent content creators and start reading latest guides:
- How to set up Redis sentinel cluster on Ubuntu or Debian Linux
- How To Set Up SSH Keys With YubiKey as two-factor authentication (U2F/FIDO2)
- How to set up Mariadb Galera cluster on Ubuntu or Debian Linux
- A podman tutorial for beginners – part I (run Linux containers without Docker and in daemonless mode)
- How to protect Linux against rogue USB devices using USBGuard
Join Patreon ➔
4. intel_gpu_top – Displying a top-like summary of Intel GPU usage on Linux
First install the tool, run:
$ sudo apt install intel-gpu-tools
## CentOS/RHEL/Fedora Linux user try the dnf command ##
$ sudo dnf install intel-gpu-tools
Fedora, RHEL and CentOS Linux user can use the podman command as follows to install the same:
$ podman run —rm —priviledged registry.freedesktop.org/drm/igt-gpu-tools/igt:master
The tool gathers data using perf performance counters (PMU) exposed by i915 and other platform drivers like RAPL (power) and Uncore IMC (memory bandwidth). Run it as follows on Linux system:
$ sudo intel_gpu_top
5. nvidia-smi – NVIDIA System Management Interface program
The nvidia-smi provides monitoring and management capabilities for each of NVIDIA’s Tesla, Quadro, GRID and GeForce devices from Fermi and higher architecture families. GeForce Titan series devices are supported for most functions with very limited information provided for the remainder of the Geforce brand. NVSMI is a cross platform tool that supports all standard NVIDIA driver-supported Linux and FreeBSD. Install it as follows once Nvidia driver installed on Ubuntu Linux:
$ apt install nvidia-smi
Open the terminal and then run:
$ nvidia-smi -q -g 0 -d UTILIZATION -l 1
$ sudo nvidia-smi
$ nvidia-smi —help
Here is what we see:
6. nvtop – NVIDIA GPU top
Another fancy but very useful tool for NVIDIA GPU. It is a ncurses-based GPU status viewer for NVIDIA GPUs similarly to the htop command or top command. We can install it as follows using the apt command/apt-get command on a Debian or Ubuntu Linux:
$ apt install nvtop
## RUN the tool ##
$ nvtop
The following commands are available while in nvtop is on screen:
- Up – Select (highlight) the previous process.
- Down – Select (highlight) the next process.
- Left / Right – Scroll in the process row.
- + – Sort increasingly.
- — – Sort decreasingly.
- F1 – Select a signal to send to the highlighted process.
- F2 – Select the field for sorting. The current sort field is highlighted inside the header bar.
- F3 , q , Esc – Exit nvtop and return to your shell
7. radeontop – Tool to show AMD GPU utilization on Linux
View your AMD GPU utilization, both for the total activity percent and individual blocks on Linux. Install it as follows:
$ sudo apt install radeontop
$ sudo radeontop
It works with R600 and up GPUs, even Southern Islands should work fine. Works with both the open source AMD drivers and AMD Catalyst cloused-source drivers:
Conclusion
You learned about the various Linux GPU commands and tools for monitoring and diagnostic purposes on Linux and BSD-based systems. Let me know if I missed your favorite tool in the comment section below.
Источник