5
October
2023
0:02

How to find out your video card model in Linux and install graphics drivers in Ubuntu/Mint/Debian

5 October 2023 0:02

There are several ways to find out your video card model.

Video adapter detection

1) The lshw application displays the video card model

sudo lshw -C video

2) The lspci utility displays the name of the card manufacturer, for example "ZOTAC International (MCO) Ltd."

lspci -k | grep -A 2 -E "(VGA|3D)" 

3) The glxinfo application from the MESA subsystem displays the graphics adapter model

glxinfo | grep -i "OpenGL renderer" 

4) Using the utility for changing screen resolution xrandr also displays the number of outputs. For example, 2 pieces, if D-SUB and DVI writes "2 outputs".

xrandr --listproviders

5) Hardinfo program with a graphical interface ("System Information and Testing") by Leandro A. F. Pereira

sudo apt install hardinfo
hardinfo

6) Graphical application "System Reports" (same as hardinfo) in Linux Mint

mintreport

Installing video card drivers

*ATI Radeon and AMD GPU(AMD Radeon™ RX Vega Series)

The package for installing the amdgpu repository can be downloaded from here:http://repo.radeon.com/amdgpu-install/latest.

Then:

sudo apt update
sudo apt install xserver-xorg-video-amdgpu 

Instructions:https://amdgpu-install.readthedocs.io/en/latest/

*Nouveau- open source driver for nVidia video cards:

sudo apt install xserver-xorg-video-nouveau

or, if not needed:

sudo apt remove xserver-xorg-video-nouveau

*nVidia- closed source driver:

First you need to install a utility to recognize your video card and search for suitable drivers:

sudo apt install ubuntu-drivers-common

ubuntu-drivers list

Its output is approximately the following:
nvidia-340
nvidia-driver-390

Installing the required driver:

sudo ubuntu-drivers install nvidia:390
sudo reboot

*Intel i8xx && i9xx integrated graphics

Command to install Intel driver:

sudo apt install xserver-xorg-video-intel

*Intel 965 Video Acceleration
Support

  • Cantiga, Intel GMA 4500MHD (GM45)
  • Ironlake, Intel HD Graphics for 2010 Intel Core processor family
  • Sandy Bridge, Intel HD Graphics for 2011 Intel Core processor family
  • Ivy Bridge
    *Haswell
  • Broadwell
  • Skylake
  • Kaby Lake
    *Coffee Lake
  • Cannon Lake
    as well as VP8, VP9, HEVC and AVC codecs.

Installation command:

sudo apt install i965-va-driver-shaders

*Intel Gen 8+ VA API driver for video acceleration (non-free) for Intel processors:

  • Broadwell

  • Skylake

  • Broxton

  • Apollo Lake

  • Kaby Lake
    *Coffee Lake

  • Whiskey Lake

  • Cannon Lake
    *Ice Lake

  • also supports MPEG2, ASP/H.263, MPEG-4 AVC/H.264 and VC-1/WMV video acceleration.

Command to install "non-free" Intel driver:

sudo apt install intel-media-va-driver-non-free

MESA - 2D graphics subsystem for all video card models

sudo apt install libva2 mesa-va-drivers mesa-utils  

Drivers for 2D graphics VA API for accelerating xubuntu, kubuntu, lubuntu, mate, budgie desktops (for the Ubuntu OS family)

sudo apt install va-driver-all

Debian metapackage with graphics drivers

su -
apt-get update
apt-get install xserver-xorg-video-all

Debian metapackage with drivers for integrated Intel graphics

su -
apt-get ypdate
apt-get install xserver-xorg-video-intel

Debian wrapper driver for ATI video cards

su -
apt-get update
apt-get install xserver-xorg-video-ati

Debian driver with drivers for integrated AMD graphics processors (AMDGPU)

Support for GPU families Bonaire, Hawaii, Kaveri, Kabini Mullins, Iceland, Tonga, Carrizo, Fiji, Stoney.

su -
apt-get update
apt-get install xserver-xorg-video-amdgpu

Debian driver for AMD discrete graphics cards

For AMD/ATI video cards. The following chips must be supported: R100, RV100, RS100, RV200, RS200, RS250, R200, RV250, RV280, RS300, RS350, RS400/RS480, R300, R350, R360, RV350, RV360, RV370, RV380, RV410, R420, R423/R430, R480/R481, RV505/RV515/RV516/RV550, R520, RV530/RV560, RV570/R580, RS600/RS690/RS740, R600, RV610/RV630, RV620/RV635, RV670, RS780/RS880, RV710/RV730, RV740/RV770/RV790, CEDAR, REDWOOD, JUNIPER, CYPRESS, HEMLOCK, PALM, SUMO/SUMO2, BARTS, TURKS, CAICOS, CAYMAN, ARUBA, TAHITI, PITCAIRN, VERDE, OLAND, HAINAN, BONAIRE, KABINI, MULLINS, KAVERI, HAWAII

su -
apt-get update
apt-get install xserver-xorg-video-radeon

VA API driver for Debian OS only. Does not contain the drivers themselves

su -
apt-get update
apt-get install va-driver-all

Video codec for decoding 2D video FFmpeg

Not compatible with libavcodec58:

sudo apt install libavcodec-extra 

Package libavcodec58 (obsolete - for ffmpeg Debian versions before Bullseye), library for ffmpeg

For video (de)coding. The package is called libavcodec58.

Package libavcodec59 (for Debian stable), library for ffmpeg

For video (de)coding. Not included in Ubuntu Linux.

su -
apt-get update
apt-get install libavcodec59

Package libavcodec60 (for Debian Sid - unstable), library for ffmpeg

For video (de)coding.

su -
apt-get update
apt-get install libavcodec60

HYBRID MODES OF nVidia PRIME VIDEO CARDS

nVidia Prime mode is used in laptops with 2 video cards - built-in Intel and discrete nVidia.
Did not check due to lack of such equipment.

Instructions from Reddit
nVidia Prime instructions for Ubuntu 22.04
*Instructions from archlinux - information on how to enable

nVidia PRIME OFFLOADING: enable from the command line

*Discussion and decision

Working with 2 monitors in Ubuntu/Linux Mint

Еслand the video card has 2 outputs, DVI and VGA, we simply connect 2 monitors to them - the screen is divided between the monitors. The same will happen if the output is HDMI, DP. You can drag windows from one to another. In the system settings, both displays are shown - their resolutions and formats may not be the same (16:9 and 4:3), but the image is displayed in the correct resolution, scale and proportions. Desktop background images are configured by the standard program by dragging them to 1 or 2 screens. But the Start menu is located on display #1. On the second display you can display anything - a WWW browser, documentation or mail, in parallel with the first.

Understanding the X System

It should be understood that the image with X consists of a server and a client. The client and mouse operate on a 0:0 display, which in the case of a single user is the only one and connects to the server on the same PC. There are ways to work on a computer remotely, but display the result of the remote PC on the local display via ssh. Since Linux is a multi-user network operating system. More details:
*How to specify display when connecting remotely via ssh



Related publications