257

I would like to try a different video display driver, but I'm not sure which one I'm currently using.

What's the simple way to see what driver my system is using currently?

belacqua
  • 23,120

7 Answers7

261

Run lshw -c video, and look for the line with "configuration". The loaded driver is prefixed with "driver=". Example output:

  *-display
       description: VGA compatible controller
       product: Core Processor Integrated Graphics Controller
       vendor: Intel Corporation
       physical id: 2
       bus info: pci@0000:00:02.0
       version: 02
       width: 64 bits
       clock: 33MHz
       capabilities: vga_controller bus_master cap_list rom
       configuration: driver=i915 latency=0
       resources: irq:45 memory:fd000000-fd3fffff memory:d0000000-dfffffff ioport:1800(size=8)

If you want more information about the loaded driver, run modinfo. Output of modinfo i915:

filename:       /lib/modules/2.6.35-24-generic/kernel/drivers/gpu/drm/i915/i915.ko
license:        GPL and additional rights
description:    Intel Graphics
author:         Tungsten Graphics, Inc.
license:        GPL and additional rights
... stripped information for saving space ...
depends:        drm,drm_kms_helper,video,intel-agp,i2c-algo-bit
vermagic:       2.6.35-24-generic SMP mod_unload modversions 

Note that modinfo works on filenames and aliases, not on module names. The majority of the modules will have the same name for the module name and filename, but there are exceptions. One of them is nvidia.

Another way of using these commands in order to show you the file name of the driver would be:

modinfo -F filename `lshw -c video | awk '/configuration: driver/{print $2}' | cut -d= -f2`

When loaded, the command lsmod will show the nvidia module as loaded. modinfo nvidia will error out. Why? Because there is no module named "nvidia", it's just an alias. To resolve the alias you can use modprobe --resolve-alias nvidia. Or to get the whole modinfo in one command:

modinfo $(modprobe --resolve-alias nvidia)
Lekensteyn
  • 174,277
  • 1
    Thanks -- do you know if there is a way to match the string it gives back to a database (or list, etc.) that gives a longer description? – belacqua Jan 25 '11 at 20:30
  • Use modinfo. If you want to have more information about the i915 driver, run: modinfo i915. – Lekensteyn Jan 25 '11 at 21:00
  • 4
    modinfo nvidia_current does not work for me. however lshw -c video does show me the driver details as nvidia – Ubuntuser Feb 08 '13 at 07:39
  • 1
    My laptop has two video cards: an integrated Intel card, and a Radeon HD 6xxx. Both cards have drivers, and so both show up with these commands. But that doesn't tell me which one is actually being used by X11, does it? – naught101 Nov 10 '13 at 01:17
  • 6
    @naught101 Look in /var/log/Xorg.0.log to discover. The card that is being used is marked with an star: (--) PCI:*(0:0:2:0) ... – Lekensteyn Nov 10 '13 at 09:58
  • While lshw reports that the program must be run as root, it will still be able to report video card information. So details are omitted, but those are not interesting for learning about the driver. – Lekensteyn Sep 22 '14 at 08:54
  • For Debian (or other) users who arrive here from Google, lshw can be installed from apt (or similar). – Eric Mar 24 '16 at 19:08
  • I have two authors, 'Intel Corporation', and 'Tungsten Graphics, Inc'. What could that mean? Am I running Intel's drives here? – Hassan Aug 07 '16 at 21:04
  • @Hassan You should have a look at the name, i915 is the driver for Intel graphics. Tungsten Graphics was apparently one of the original developers, but the hardware is from Intel. – Lekensteyn Aug 08 '16 at 09:17
  • 9
    When I run sudo lshw -c video, the line for "configuration" says "latency=0" and there is no entry for driver anywhere. I've reinstalled the Intel drivers successfully several times, with reboots in between, and no matter what, lshw does not show any driver info. –  Oct 12 '16 at 17:44
  • Where can I read a version of i915 driver? I want to know if it supports Vulkan? – Hrvoje T Nov 07 '16 at 07:29
  • @HrvojeT The kernel driver seems not responsible for Vulkan support, apparently the Mesa library needs to support it. See https://01.org/linuxgraphics/blogs/jekstrand/2016/open-source-vulkan-drivers-intel-hardware – Lekensteyn Nov 07 '16 at 18:20
  • 1
    So, all in one: fnameORalias=$(lshw -c video 2> /dev/null | awk '/configuration: driver/{print $2}' | cut -d= -f2); { fname=$(modprobe --resolve-alias $fnameORalias); [ "$fname" == "$fnameORalias" ] && echo "$fname" && modinfo $fnameORalias 2> /dev/null; } || { modprobe --resolve-alias $fnameORalias; modinfo $(modprobe --resolve-alias $fnameORalias); } – kavadias Jan 24 '18 at 19:43
  • 5
    mine says configuration: latency=0 without listing driver at all. How can I find it? Edit: ok, it was because of nomodeset option. – vir us Nov 02 '19 at 23:25
105

You could use the following command to see the currently used vga kernel driver:

lspci -nnk | egrep -i --color 'vga|3d|2d' -A3 | grep 'in use'

Example output for an ATI / AMD graphic card:

  • if the open source Radeon driver is used:

     Kernel driver in use: radeon
    
  • if the proprietary Fglrx driver is used:

     Kernel driver in use: fglrx_pci
    

Complete Output with lspci -nnk | grep -i vga -A3

01:00.0 VGA compatible controller [0300]: Advanced Micro Devices [AMD] nee ATI Mobility Radeon HD 2400 [1002:94c9]
    Subsystem: Toshiba America Info Systems Device [1179:ff00]
    Kernel driver in use: fglrx_pci
    Kernel modules: fglrx, radeon

Available kernel modules you can see with lspci -nnk | grep -i vga -A3 | grep 'Kernel modules':

Kernel modules: fglrx, radeon

Note: This does not work in every case!

For a SiS 65x/M650/740 PCI/AGP VGA Display Adapter, there is no "Kernel driver in use" line:

lspci -nnk | grep -i vga -A2
01:00.0 VGA compatible controller [0300]: Silicon Integrated Systems [SiS] 65x/M650/740 PCI/AGP VGA Display Adapter [1039:6325]
    Subsystem: ASUSTeK Computer Inc. Device [1043:1612]
    Kernel modules: sisfb

and the available sisfb kernel module is not the loaded driver, because lsmod | grep sisfb has no output (sisfb is blacklisted). In this case also sudo lshw -c video | grep Konfiguration does not work. The output is:

   Konfiguration: latency=0

without any driver information.

BuZZ-dEE
  • 14,223
  • 8
    +1 for solution with 'standard' linux tools (works perfectly on fedora here) – 4levels Apr 27 '15 at 10:09
  • 4
    How about if I see in use both i915 and nouveau? How do I know which one is used by X? – akostadinov Jan 11 '17 at 15:31
  • +1 I was trying to get the video driver's name in use on a lubuntu system: your lspci | grep got me streight there. The lshw proposed by Lekensteyn ,while is working on ubuntu, failed to detect the module file's name on lubuntu. – Antonio Molinaro Oct 25 '18 at 21:27
  • For compact information about which driver is used for each video card, try

    lspci -nnk | grep -i vga -A3 | grep -e 'in use' -e VGA

    which displays for example

    00:02.0 VGA compatible controller [0300]: Intel Corporation 4th Gen Core Processor Integrated Graphics Controller [8086:0416] (rev 06) Kernel driver in use: i915 01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GK106GLM [Quadro K2100M] [10de:11fc] (rev a1) Kernel driver in use: nvidia

    – brewmanz Feb 10 '20 at 00:40
11
hwinfo --gfxcard

Look for the line starting by " Driver:" You may have to install hwinfo package first.

jarno
  • 5,600
4

The best information I've seen so far is in nouveau wiki. It can also help with non-nvidia cards: https://nouveau.freedesktop.org/wiki/Optimus/

This is xrandr --listproviders and sudo cat /sys/kernel/debug/vgaswitcheroo/switch. A lot of other useful info how to control power, outputs and offloading, etc.

3

I have tried many ways without success, but this did work (Ubuntu 12.10):

/usr/lib/nux/unity_support_test --print

One reason is that I have Nvidia Optimus card which makes things harder, so I added optirun before the command.

user
  • 125
  • 2
    I thought it only printed driver capabilities and OpenGL version - does this show what driver you are using? – belacqua Feb 15 '13 at 16:32
  • I have tested this command in Ubuntu 16.04.2. It appears to report the active GPU with similar syntax as the command glxinfo|egrep "OpenGL vendor|OpenGL renderer*" see. I believe that unity_support_test --print runs the OpenGL command at the backend. – Sun Bear Apr 18 '17 at 13:02
2
inxi -G

inxi is a perl script to show system information in console; installed by default in Xubuntu at least.

jarno
  • 5,600
0

Open a terminal and type:

sudo apt-get install sysinfo

This is a handy little program that can tell you all ya need to know about your PC.

BuZZ-dEE
  • 14,223