Linux with nvidia check

How to check the information of current installed video drivers?

My CPU usage is high when I do trivial things such as scrolling through a PDF file. So I think my video driver is not properly installed. I want to confirm that by checking the information of my currently installed video driver, such as if there’s a driver installed and what version it is. Then I could decide whether to install a new one if it is not up to date. On Windows, I could use the device manager, how to do that on Ubuntu Linux? I don’t expect a GUI solution for this. Command line will be just good enough.

7 Answers 7

In Linux, there is two parts for the video driver, the kernel part and the X server part.

  1. Let’s identify your hardware first. By typing lspci | grep VGA in a terminal, you should see a line with you graphic card description (even if not configured at all).
  2. Let’s check the correct kernel driver is loaded find /dev -group video .
  3. Let’s check the correct X driver is loaded glxinfo | grep -i vendor .

If you want more help, I would like the result of following commands: (Remember, never trust command line that people ask you to execute without knowing what it does.)

lspci | grep VGA lsmod | grep "kms\|drm" find /dev -group video cat /proc/cmdline find /etc/modprobe.d/ cat /etc/modprobe.d/*kms* ls /etc/X11/xorg.conf glxinfo | grep -i "vendor\|rendering" grep LoadModule /var/log/Xorg.0.log 

If you copy-paste the last 4 lines in a terminal and add the result at the end of your question (edit), it will be easier to answer your question. But remember not to execute untrusted commands. Perhaps some stackoverflow trusted users could proof read them and acknowledge in comments.

The easiest way is to run

lspci -k | grep -EA3 'VGA|3D|Display' 
00:02.0 VGA compatible controller: Intel Corporation HD Graphics 530 (rev 06) Subsystem: ASUSTeK Computer Inc. HD Graphics 530 Kernel driver in use: i915 Kernel modules: i915 -- 01:00.0 3D controller: NVIDIA Corporation GM107M [GeForce GTX 950M] (rev a2) Subsystem: ASUSTeK Computer Inc. GM107M [GeForce GTX 950M] Kernel driver in use: nvidia Kernel modules: nvidiafb, nouveau, nvidia_375_drm, nvidia_375 

This command will show all video PCI devices and kernel modules installed and in use.

Only VGA is not good enough, because Nvidia mobile adapters are shown as 3D and some AMD adapters are shown as Display .

Thanks! I run command, it showed two controllers as in your example. Now how to find out what driver does what?

@Martian2020 It is unclear what you are asking. You see all drivers and which is used. You can ask a new question if you are more specific.

I meant what driver controls display output at the moment. I’ve understood glxinfo | grep «OpenGL» could be used for that.

Читайте также:  Редактор paint для linux

I use this command to see what Xorg is currently using:

egrep -i " connected|card detect|primary dev|Setting driver" /var/log/Xorg.0.log 

Here is an easier solution, using GUI instead of command line. on the Ubuntu desktop, choose:

System Settings > Software and updates (in the bottom) -> Other drivers (the right most tab).

my video driver's information

This is a list of your video driver’s information.

For nvidia drivers at least, I usually use the following command in the terminal:

cat /proc/driver/nvidia/version 

Which will output something similar to the following:

NVRM version: NVIDIA UNIX x86_64 Kernel Module 346.96 Sun Aug 23 22:29:21 PDT 2015 

I’m running a 64bit Ubuntu 10.04 here. Here’s what I found out:

lspci will give you a list of found devices. Usually the video card is listed as «VGA controller» or somesuch, on my system it says:

01:00.0 VGA compatible controller: nVidia Corporation G92 [GeForce 9800 GTX] (rev a2) 

If you meant X.org’s video driver, see /etc/X11/xorg.conf and look for Driver in Section «Device» (there might be multiple):

Section "Device" Identifier "Device0" Driver "nvidia" VendorName "NVIDIA Corporation" BoardName "GeForce 9800 GTX/9800 GTX+" EndSection Section "Device" Identifier "Device1" Driver "nvidia" VendorName "NVIDIA Corporation" BoardName "GeForce 9800 GTX/9800 GTX+" BusID "PCI:1:0:0" Screen 1 EndSection 

If you need to find out the specific location of driver-file and version X.org’s using, try cat /var/log/Xorg.0.log and look for line which says something like LoadModule «‘Driver in the Device-section of xorg.conf’, in my case:

(II) LoadModule: "nvidia" (II) Loading /usr/lib/xorg/extra-modules/nvidia_drv.so (II) Module nvidia: vendor="NVIDIA Corporation" compiled for 4.0.2, module version = 1.0.0 Module class: X.Org Video Driver (II) NVIDIA dlloader X Driver 195.36.24 Thu Apr 22 19:18:54 PDT 2010 (II) NVIDIA Unified Driver for all Supported NVIDIA GPUs (II) Primary Device is: PCI 01@00:00:0 

This answer only applies to older distros. The newer versions appear to have moved away from xorg.conf

X.org auto-probes everything these days so there is no xorg.conf configuration file (unless you’ve explicitly made one). *However the part about inspecting the X server log is still perfectly valid: less /var/log/Xorg.0.log

This should work with any unix-like operating system.

First to list all PCI devices, run:

-nn flag tells lspci to show PCI vendor and device codes as both numbers and names.

00:00.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD/ATI] RS400 Host Bridge [1002:5a33] (rev 01) 00:02.0 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD/ATI] RS4xx PCI Express Port [ext gfx] [1002:5a34] 00:11.0 IDE interface [0101]: Advanced Micro Devices, Inc. [AMD/ATI] IXP SB400 Serial ATA Controller [1002:437a] (rev 80) 00:12.0 IDE interface [0101]: Advanced Micro Devices, Inc. [AMD/ATI] IXP SB4x0 Serial ATA Controller [1002:4379] (rev 80) 00:13.0 USB controller [0c03]: Advanced Micro Devices, Inc. [AMD/ATI] IXP SB4x0 USB Host Controller [1002:4375] (rev 80) 00:13.2 USB controller [0c03]: Advanced Micro Devices, Inc. [AMD/ATI] IXP SB4x0 USB2 Host Controller [1002:4373] (rev 80) 00:14.0 SMBus [0c05]: Advanced Micro Devices, Inc. [AMD/ATI] IXP SB4x0 SMBus Controller [1002:4372] (rev 81) 00:14.1 IDE interface [0101]: Advanced Micro Devices, Inc. [AMD/ATI] IXP SB4x0 IDE Controller [1002:4376] (rev 80) 00:14.2 Audio device [0403]: Advanced Micro Devices, Inc. [AMD/ATI] IXP SB4x0 High Definition Audio Controller [1002:437b] (rev 01) 00:14.3 ISA bridge [0601]: Advanced Micro Devices, Inc. [AMD/ATI] IXP SB4x0 PCI-PCI Bridge [1002:4371] (rev 80) 01:00.0 VGA compatible controller [0300]: NVIDIA Corporation G96 [GeForce 9500 GT] [10de:0640] (rev a1) 02:02.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL-8100/8101L/8139 PCI Fast Ethernet Adapter [10ec:8139] (rev 10) 
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation G96 [GeForce 9500 GT] [10de:0640] (rev a1) 

Finally run

sudo lspci -vvv -d 10de:0640 

sudo and -vvv make it more verbose and helps display everything that it is able to parse. -d is for device in the format []:[]

Читайте также:  Скрипт автоматической установки linux

The final command will list out all the possible capabilities and the kernel driver in use.

Источник

ubuntu check nvidia gpu

After it’s installed, reboot your computer for the change to take effect. After that, go to system settings > details , you will see Ubuntu is using Nvidia graphics card. If you want Ubuntu to use Intel graphics card, open Nvidia X Server Settings from application menu.

How do I know if my GPU is Nvidia Linux?

  1. On Gnome 3 based distro open settings and click on the details and choose About:
  2. We can use GUI tool called nvidia-settings. It is a tool for configuring the NVIDIA graphics driver and give informaion. .
  3. Run the following glxinfo command on Linux to find GPU name, vendor, video card RAM size and more: $ glxinfo -B.

How do I check my GPU Ubuntu?

  1. Use lspci command to find graphics card. .
  2. Get detailed graphics card information with lshw command in Linux. .
  3. Bonus Tip: Check graphics card details graphically.

How to Install Java 11/8 on Fedora

Java

How to Install Java 11/8 on FedoraStep 1 – Search Java Packages. The OpenJDK rpm packages are available under the AppStream repository. . Step 2 – I.

Raspberry Pi Static IP Setup

Static

Assign a static private IP address to Raspberry Pi with DHCPCDsudo service dhcpcd status. . sudo service dhcpcd start sudo systemctl enable dhcpcd. .

Install and Configure Dnsmasq on Ubuntu 20.04|18.04

Dnsmasq

Step 1: Install Dnsmasq on Ubuntu 20.04|18.04. Ubuntu 18.04+ comes with systemd-resolve which you need to disable since it binds to port 53 which will.

Latest news, practical advice, detailed reviews and guides. We have everything about the Linux operating system

Источник

How to Monitor Nvidia GPU in Linux

Linux Gpu Nvidia Featured Graphics Card

Even with one of the best Linux distros for gaming installed, you may still struggle with the performance of your GPU if it isn’t properly configured. Checking the management tool for your particular graphics card could help you determine if there are any problems or issues.

If you have an Nvidia GPU, there are two tools on Linux to help you monitor its performance — NVTOP and Nvidia-SMI.

Using NVTOP

If you want to monitor the usage of your GPU in real-time, you’ll need to give NVTOP a try. You’ll need to be using the proprietary Nvidia drivers for your GPU to be able to use it.

Читайте также:  Набор в системе linux

Linux Gpu Nvidia Nvtop

You’ll start NVTOP from the terminal where you’ll see current GPU and graphics memory usage, both currently and over a longer period, thanks to the visual graph. This updates during use, with currently running processes shown underneath. This can help you track down any overzealous processes using your GPU memory, for instance.

You’ll also be able to see the current temperature and fan usage, as well as data on current power consumption. The latest versions of Ubuntu and Debian have NVTOP included in their repositories. You can install it by running:

If you’re running another Linux distro (or an older version of Ubuntu or Debian), you’ll need to compile and install it manually using the instructions on the NVTOP Github page. Once it’s installed, just run it from the terminal by typing:

If you’d like to see additional command flags to customize NVTOP before running it, run nvtop -h instead.

Using Nvidia-SMI

An alternative to the third-party-developed NVTOP, Nvidia-SMI is official software. It comes pre-packaged with the proprietary drivers that Nvidia provides for Linux users, so you don’t need to install anything extra to use it.

It’s built around the Nvidia Management Library, as NVTOP is, to provide you with current information on your GPU’s performance.

Linux Gpu Nvidia Smi

That’s why much of the information you’ll see with Nvidia-SMI is similar, or identical, to NVTOP. You get a snapshot of current power, GPU and memory usage, including a list of running processes.

To run it, assuming you have the required drivers installed, open a terminal and type:

The information will be listed immediately. The benefit of Nvidia-SMI over NVTOP is the clarity of the information. It provides an instant snapshot of your GPU’s performance, rather than the running information you’ll see with NVTOP. It’s also official software, provided by Nvidia for you to use.

You can run the command as many times as you’d like to receive the most up-to-date information. If you’re attempting to report an issue with your GPU, the information from Nvidia-SMI can be easily saved straight to a file using a command like nvidia-smi > nvidia-output.txt .

You can also run nvidia-smi -h to see a full list of customization flags.

Monitor and Optimize Your Nvidia GPU in Linux

NVTOP and Nvidia-SMI are the only tools you’ll need to help you monitor your Nvidia GPU in Linux. They offer text-based and visual methods for monitoring your GPU performance, using Nvidia’s own management API as their core. This guarantees that the information you’re seeing is as accurate as possible.

If your GPU isn’t working effectively, it might be time for you to consider upgrading. Our graphics card buyer’s guide should help you find the best new graphics card for you if that’s the case.

Ben is a UK based tech writer with a passion for gadgets, gaming, and general geekiness.

Our latest tutorials delivered straight to your inbox

Источник

Оцените статью
Adblock
detector