Checking drivers in linux

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.

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:

Читайте также:  Astra linux dhcp клиент

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 []:[]

Читайте также:  Extracting tgz in linux

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

Источник

How can I check if I have any missing or upgradable driver on linux? | DEBIAN 10

Laptop: Asus TUF Gaming FX504GD With lspci for example you can check some hardware, and then you can browse the internet and find the drivers to install. But I would like to know if there is any way to check if you have any missing or upgradable drivers on linux.
I was wondering if there is a program in Linux similar to «DriversCloud» to solve this task. I don’t mind if the software has GUI or not.
I just bought a laptop for studying sysadmin, and I’m having trouble trying to guess which driver I have left to install. Thanks in advance.

The software for Windows you mentioned and so many other promising the same are for the most part scams.

@roaima I’m having particularly a really hard time with the nvidia graphics card. The one I have is GeForce GTX 1050 Mobile. I got this info from lspci command

@GabrielaGarcia I don’t think DriversCloud in particular is a scam. I have used that program for so long time, and I never had problems with it, and worked pretty well.

@GabrielaGarcia I think there is no need to be salty here. It’s simple, I think that software like driverscloud is useful, and I asked if somebody knew if the same kind of software exists for Linux. I just use a software If it’s useful and makes me save time. Simple. And as I said before, I’m having problems with my graphics card in particular, maybe you didn’t read it because you were focused on «keeping the Linux world clean»

2 Answers 2

In the Linux world, the overwhelming majority of drivers is open source and often integrated to the Linux kernel source code once they are of good enough quality, so as long as your kernel version is new enough, you’re probably good. If your kernel is older than your hardware model, you can expect problems.

Some devices may have userspace drivers that won’t need to be integrated in the kernel; if they are open-sourced, most distributions will usually pick them up at an appropriate point of their release cycle.

Desktop-oriented distributions like Ubuntu may already process hardware information in their OS installer and/or package management tools, so the package manager might be able to suggest missing driver packages. Unfortunately, Debian is not quite that automated yet.

Читайте также:  Определить pid процесса linux

Also unfortunately, display drivers tend to be the most significant exception of this: modern GPUs may depend on proprietary drivers to get the full performance out of them, as the development of open-source drivers often depends on reverse engineering, which takes time. But some people may want or even need to use the open-source drivers even at the expense of reduced performance, so Debian (as a strong proponent of open source) tends to default to open-source drivers whenever possible. Ubuntu, on the other hand, will tend towards maximizing functionality whenever possible, even if proprietary drivers are required to do so.

Even so, distributions may have packaged the proprietary drivers for you. For NVidia Geforce GTX 1050 Mobile on Debian 10, you’ll want to make sure the non-free part of Debian repository is enabled, and install the nvidia-graphics-drivers package and its dependencies. If the version in there seems to be too old, the backports repository may have newer versions available sooner than the main distribution includes them. If that’s too old for you, you’ll have to get the bleeding-edge driver directly from NVidia.

For general checking, you seem to already have discovered lspci : add the -v option and it will indicate which driver each PCI(e) device is using. If you find a device with no driver associated with it, you may be missing something — or the device might be the «far» end of a PCI bridge device, which is covered by the pcieport or similar driver at the «near» end.

For USB devices, userspace drivers are way more common. But you could still go through the lsusb listing and ask yourself on each device: «Is this device working to my satisfaction?» If the answer is «yes», you don’t need an update, unless it’s for security reasons — and if you restrict yourself to the packages offered by your distribution and any compatible package repositories, your package manager will automatically know about updates.

For new laptop models, you should Google for keywords «linux» and the model of the laptop, preferably before you actually buy the laptop in question, and look for people reviewing or blogging about their Linux installation and any possible workarounds and experimental drivers that particular model ended up needing for full functionality. You can even find multiples of them and compare their suggestions for a sanity check.

In my opinion, that tends to be more reliable than relying on a mystery third-party website that claims to have all the answers: even though some of such sites may be good now, they may quietly go bankrupt and be sold to or their domain name taken over by a malware pusher with you being none the wiser. The only exception would be if a hardware vendor offers Linux support info for their hardware: then they clearly have a vested interest to ensure their information is both comprehensive and good.

Источник

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