# How to tell which Xorg video driver is in use.



## Phishfry (May 2, 2022)

I have figured out 2 ways from the xterm prompt.

`glxgears -info|grep GL_RENDERER`

`glxinfo -B | grep Device`

Is there any GUI utility that shows the xorg video driver in use?


----------



## eternal_noob (May 2, 2022)

If you are using bash, try this script:

```
#!/usr/local/bin/bash

if [ -z "$1" ]; then
    logfile=/var/log/Xorg.0.log
else
    logfile="$1"
fi

sed -n 's@.* Loading .*/\(.*\)_drv.so@\1@p' "$logfile" |
    while read driver; do
        if ! grep -q "Unloading $driver" "$logfile"; then
            echo $driver
            break
        fi
    done
```

Stolen from https://unix.stackexchange.com/ques...which-graphics-driver-xorg-uses/289726#289726

Edit: Ok, you want a gui utility. Don't know any. ;(


----------



## Phishfry (May 2, 2022)

I was really looking for something under the Xorg frameworks. (Not grepping the log)
`xrandr --listproviders`
Not much useful there.
Might be all I need. Need to see what VESA and SCFB output looks like.

Not real verbose except name:

```
# xrandr --listproviders
Providers: number : 1
Provider 0: id: 0x49 cap: 0xb, Source Output, Sink Output, Sink Offload crtcs: 2 outputs: 8 associated providers: 0 name:Intel
```


----------



## tingo (May 2, 2022)

For me, it says "modesetting" but doesn't say AMD or Intel

```
tingo@kg-core2:~ $ xrandr --listproviders
Providers: number : 1
Provider 0: id: 0x46 cap: 0xa, Sink Output, Sink Offload crtcs: 4 outputs: 3 associated providers: 0 name:modesetting
```
adding --verbose doesn't help.


----------



## shkhln (May 2, 2022)

There isn't any such utility, best you can do is checking what drivers are loaded with procstat:

```
% sudo procstat -v `pgrep Xorg` | grep drivers
 1207        0x801c00000        0x802172000 r-x  456  501   2   1 CN--- vn /usr/local/lib/xorg/modules/drivers/nvidia_drv.so
 1207        0x802372000        0x8023cd000 rw-   45    0   1   0 C---- vn /usr/local/lib/xorg/modules/drivers/nvidia_drv.so
```
(Note that Xorg is able to use multiple drivers if there is more than one GPU.)

Also, `glxinfo` shows an OpenGL implementation, which is only tangentially related to Xorg.


----------



## grahamperrin@ (May 4, 2022)

Phishfry said:


> `glxgears -info|grep GL_RENDERER`



*Info Center*:




<https://www.freshports.org/sysutils/plasma5-kinfocenter/#dependencies>


```
% xrandr --listproviders
Providers: number : 1
Provider 0: id: 0x4a cap: 0xa, Sink Output, Sink Offload crtcs: 6 outputs: 5 associated providers: 0 name:modesetting
%
```


----------

