Ubuntu – How to find what video driver is in use on the system


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?

Best Answer

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

           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)