Friday, December 20, 2019

Check which display driver is running in Linux

[root@localhost ~]# lspci -nnk | grep -i vga -A3 | grep 'in use'
Kernel driver in use: nvidia


lspci 
-nn Show PCI vendor and device codes as both numbers and names
-k Show kernel drivers handling each device and also kernel modules capable of handling it. 

grep
-i include vga line
-A3 show the 3 lines after match, which shows the driver loaded line
'in use' show the line that has the in use status