Linux which gpu used

Linux Find Out Graphics Card Installed In My System

I am a new Linux system user and Ubuntu Linux. I do not want to open up the computer hardware to just see the make and model of the graphics card in a system. How do I find out which graphics card installed in my Linux desktop or laptop system?

You do not have to open the hardware, desktop, laptop computer powered by Linux to see the make and model of the graphics card in a system. There is a direct method provided by using lspci and other commands on Linux to get hardware information. You need to use the following commands to find out graphics cards in Linux using the CLI and GUI methods:

Tutorial details
Difficulty level Easy
Root privileges Yes
Requirements Linux
Est. reading time 6 mintues
  1. lspci command
  2. lshw command
  3. grep command
  4. update-pciids command
  5. GUI tools such as hardinfo and gnome-system-information command.

Linux Find Out Graphics Card Information

First you need to update the PCI ID database.

Download the latest version of the PCI ID list

Grab the current version of the pci.ids file from the Internet:
$ sudo update-pciids
OR
# update-pciids
Sample outputs:

How to check graphics card on Linux

Type the following lspci command. It will usually tell you the vendor and model of your card. Open the Terminal/xterminal or shell prompt and type the command:
$ lspci
$ lspci -v
$ lspci -v | less

Sample outputs:

Look for video controller / vga / 3D keywords in above output listing. Please note that if you do not see your card, try updating pci database. It is a good idea to run update-pciids command to fetches the current version of the pci.ids file from the primary distribution site and installs it. You must run update-pciids command as root user:
$ sudo update-pciids
OR
# update-pciids

Example: Find out the model of my graphics card on my Laptop powered by Linux

Type the following lspci command along with grep command or egrep command:
$ lspci | grep -i —color ‘vga\|3d\|2d’
## using egrep ##
$ lspci -v | egrep -i —color ‘vga|3d|2d’
Sample outputs:

Please note the device ID # 01:00.0. Now, to get detailed information, enter:
$ sudo lspci -v -s 01:00.0
Sample outputs:

Fig.01: lspci in action – displaying my Dell laptop Nvidia graphics card info

How to get the GPU info on Linux using GUI tools

Need to identify the Graphics Processing Unit (GPU) in a Linux system using GUI tools? Try the following commands.

  • No ads and tracking
  • In-depth guides for developers and sysadmins at Opensourceflare✨
  • Join my Patreon to support independent content creators and start reading latest guides:
    • How to set up Redis sentinel cluster on Ubuntu or Debian Linux
    • How To Set Up SSH Keys With YubiKey as two-factor authentication (U2F/FIDO2)
    • How to set up Mariadb Galera cluster on Ubuntu or Debian Linux
    • A podman tutorial for beginners – part I (run Linux containers without Docker and in daemonless mode)
    • How to protect Linux against rogue USB devices using USBGuard

Join Patreon

Hardware information GUI tool

Under Ubuntu or any other Linux distribution, open hardware information GUI tool by clicking on:
System > Preferences > Hardware information
Sample outputs:

Fig.02 Linux Hardware Information GUI Tool

On Gnome 3 based distro open settings and click on the details and choose About:

hardinfo – System Information GUI tool

You can install hardinfo with yum command or apt-get command:
$ sudo apt-get install hardinfo
Run it as follows:
$ hardinfo
Sample outputs:

Fig.03 Check graphics card on Linux with hardinfo command

lshw command

The lshw command provides detailed information on the hardware configuration of the machine. You can install it with yum or apt-get command:
# lshw -short
# lshw -short | grep -i —color display
Sample outputs:

OR get detailed information:
# lshw -class display
Sample outputs:

A note about Nvidia GPU users with Nvidia binary drivers

Just type the following command to get detailed information about NVIDIA GPU card:
$ nvidia-smi
Sample outputs:

We can use GUI tool called nvidia-settings. It is a tool for configuring the NVIDIA graphics driver and give informaion. It operates by communicating with the NVIDIA X driver, querying and updating state as appropriate. This communiction is done via the X extensions. For example, open the terminal app and then type:
$ nvidia-settings

Linux Find Out GPU Information Using the glxinfo

Run the following glxinfo command on Linux to find GPU name, vendor, video card RAM size and more:
$ glxinfo -B

Finding graphics cards on Linux Laptops

Many laptops have two GPUs like integrated Intel and dedicated Nvidia/AMD card. In any case you need to use the lspci command as follows:
sudo lspci -v | more
sudo lspci -v | most
sudo lspci -v | grep -i vga

So I have Hybrid-graphics. It is nothing but two graphics cards on same computer. Typically Laptop comes with two graphic cards with different power consumptions on a single system. In this case I have both Intel and Nvidia GPUs. In such case I can select card using the prime-select command:
prime-select intel
prime-select nvidia
prime-select on-demand
prime-select query
See lspci command man page here for more info and read NVIDIA Optimus and Bumblebee for details about NVidia using hybrid graphics with NVidia’s proprietary driver here.

Conclusion

This page listed various Linux commands to find out graphics card (GPU) using the command line options. Once you know about GPUa desktop or laptop computer has, you can install the correct driver on Linux.

🐧 Get the latest tutorials on Linux, Open Source & DevOps via

Источник

Как получить информацию о GPU?

Я ищу команду, которая выдала бы мне ту же информацию, что и:

За исключением графического процессора (тип чипа и памяти, частота).

19 ответов

Этот тип информации является нестандартным, и инструменты, которые вы будете использовать для его сбора, сильно различаются.

Команда glxinfo предоставит вам всю доступную информацию OpenGL для графического процессора, включая имя его поставщика, если драйверы установлены правильно.

Чтобы получить информацию о тактовой частоте, не существует стандартного инструмента.

  • Для графических процессоров ATI/AMD: aticonfig —odgc будет получать тактовые частоты, и aticonfig —odgt будет получать данные о температуре.
  • Для графических процессоров NVIDIA nvclock Программа будет получать ту же информацию.

Мне неизвестен эквивалентный инструмент для драйверов с открытым исходным кодом, для Intel или других графических процессоров.

Другая информация об оборудовании может быть получена из lspci а также lshw инструменты.

Я не знаю прямого эквивалента, но lshw должен дать вам информацию, которую вы хотите, попробуйте:

(это также работает без sudo но информация может быть менее полной / точной)

Вы также можете установить пакет lshw-gtk чтобы получить графический интерфейс.

Сообщение в блоге, посвященное работе, выполненной в командной строке, находится здесь:

Узнайте идентификатор устройства:

Затем вы можете использовать этот вывод с lspci снова, формируя две вложенные команды

Если у вас более 1 графической карты, попробуйте выполнить следующую команду:

lspci | grep ‘ VGA ‘ | cut -d» » -f 1 | xargs -i lspci -v -s <>

Вывод из моей системы:

РЕДАКТИРОВАТЬ: Вы можете избежать запустив с sudo

Так, (prefetchable) [size=64M) указывает на то, что у меня карта NVIDIA 64 МБ. Тем не менее, я не, это скорее 256 МБ. Зачем? увидеть ниже.

Чтобы узнать, как извлечь из этого максимум информации и производительности, прочитайте чрезвычайно полную статью на Arch-Linux Wiki

Для пользователей nvidia начните с

(Это работает с установленными драйверами Nvidia, но не с системами с открытым драйвером ‘nouveau’).

Это означает, что у меня есть 256 МБ графической карты GDDR3.

В настоящее время я не знаю, как получить это для Intel и AMD/ATI GPU.

Бежать google-chrome и перейдите к URL about:gpu , Если Chrome выяснил, как использовать OpenGL, вы получите чрезвычайно подробную информацию о вашем GPU.

Для карт Nvidia.

1-й графический процессор

2-й графический процессор

clinfo

является аналогом glxinfo но для OpenCL.

NVIDIA-настройки

Смешивает время выполнения с некоторой статической информацией.

Для карт Nvidia введите

Я считаю, что лучший вариант для этого — neofetch.

Это дает вывод как это:

Конки или Терминал Заставка

Я использую два метода для автоматического отображения информации о графических процессорах nVidia и Intel iGPU:

    Conky динамически отображает информацию о GPU в реальном времени

/.bashrc отображает информацию о графическом процессоре каждый раз, когда открывается терминал

Conky дисплей в реальном времени

В этом примере Conky используется для отображения текущей статистики графического процессора (nVidia или Intel) в режиме реального времени. Conky — это легкий системный монитор, популярный среди многих энтузиастов Linux.

Дисплей меняется в зависимости от того, загрузились ли вы после prime-select intel или же prime-select nvidia ,

Intel iGPU

  • Intel iGPU показывает как Skylake GT2 HD 530 iGPU с текущей частотой
  • Минимальная частота 350 МГц и максимум 1050 МГц

nVidia GPU

  • Графический процессор nVidia показывает как GeForce GTX970M с текущей частотой и температурой графического процессора
  • Отображаются версия драйвера, P-State и версия BIOS
  • Отображается загрузка графического процессора, использование ОЗУ, энергопотребление и частота ОЗУ

Код Конки

Вот соответствующий скрипт Conky для Intel iGPU и nVidia GPU:

/.bashrc Терминал заставки

Этот пример изменяет

/.bashrc отображать информацию на заставке каждый раз, когда открывается терминал или когда вы набираете . .bashrc в командной строке.

В дополнение к neofetch ответил ранее, есть screenfetch который выглядит намного лучше (ИМО). Плюс другой ответ упоминает, что он не знает, как включить iGPU в список, и это делает это:

В итоге, только для нижнего раздела с дисплеем Ubuntu, содержащим информацию о GPU (вторая последняя строка), используйте:

Вы хотите поставить screenfetch командовать нижней части вашего

/.bashrc файл, чтобы он появлялся каждый раз, когда вы открываете терминал.

Если вам нужно больше подробностей, посмотрите ответ @knb на этот же вопрос.

Это на самом деле не так уж сложно. Для модели и памяти, вот 1 вкладыш, который работает для каждой видеокарты, на которой я его тестировал, независимо от производителя (Intel, AMD, NVIDIA):

GPU=$(lspci | grep VGA | cut -d «:» -f3);RAM=$(cardid=$(lspci | grep VGA |cut -d » » -f1);lspci -v -s $cardid | grep » prefetchable»| cut -d «=» -f2);echo $GPU $RAM

GPU = Все, что делает этот бит — это захват 3-го поля из вывода ‘lspci’, отфильтрованного через ‘grep’ для VGA, который соответствует видеочипу.

RAM = Все, что делает этот бит — это переменная cardid равен первому полю вывода из lspci соответствует «VGA» и кормит это как запрос -v подробный вывод из lspci для этого конкретного -s устройство, дополнительно фильтрующее вывод grep для строки » prefetchable», поскольку она содержит память на самой карте (обратите внимание на предыдущий пробел, так как мы не хотим совпадать с «non-prefetchable» в нашем выводе.

Для тактовой частоты на интегрированной графике Intel (протестировано на I3 и I5)

выполнить команду sudo find /sys -type f -name gt_cur* -print0 | xargs -0 cat Это погружается в дерево /sys, чтобы найти файл gt_cur_freq_mhz, который на моем I3 /sys/devices/pci0000:00/0000:00:02.0/drm/card0/gt_cur_freq_mhz и печатает содержимое. который в моем случае при очень небольшой нагрузке 350 как в 350 МГц, что соответствует минимальной частоте, найденной в /sys/devices/pci0000:00/0000:00:02.0/drm/card0/gt_min_freq_mhz и когда работает glxgears а также glmark2 результаты в 1050 как в 1050 МГц, что соответствует максимальной частоте, найденной в /sys/devices/pci0000:00/0000:00:02.0/drm/card0/gt_max_freq_mhz

Для часовых ставок на картах nvidia:

nvidia-smi -stats -d procClk соответствует тактовой частоте GPU nvidia-smi -stats -d memClk соответствует часам памяти.

Примечание: я не могу проверить вышеупомянутое, поскольку моя верная GeForce 210 не поддерживается, и это работает только на Kepler или более новых графических процессорах, как указано в `nvidia-smi -stats —help’

У меня в настоящее время нет никаких решений для тактовой частоты на картах AMD, и у меня нет оборудования, доступного для тестирования. Однако я скажу, что, насколько мне известно, aticonfig упомянутого в принятом ответе больше не существует, и кажется, что nvclock не доступен ни для чего, так как верный.

Источник

How to Find Which Graphics Card do You Have in Linux?

Last updated April 18, 2020 By Abhishek Prakash 19 Comments

Be it Nvidia or Radeon or Intel, they all may have some issues with Linux. When you are on your way to troubleshoot the graphics problem, the first thing you want to know is which graphics card do you have in your system.

Linux has several commands to check hardware information. You can use them to check what graphics card (also refer to as video card) do you have. Let me show you a couple of commands to get GPU information in Linux.

Check graphics card details in Linux command line

Use lspci command to find graphics card

The lspci command displays the information about devices connected through PCI (peripheral Component Interconnect) buses. Basically, this command gives you the detail about all the peripheral devices to your system from keyboard and mouse to sound, network and graphics cards.

By default, you’ll have a huge list of such peripheral devices. This is why you need to filter the output for graphics card with grep command in this manner:

This should show a one line information about your graphics card:

As you can see, my system has Intel HD 620 video card.

Get detailed graphics card information with lshw command in Linux

The lspci command is good enough to see what graphics card you have but it doesn’t tell you a lot. You can use lshw command to get more information on it.

You may have to install lshw on Fedora, Manjaro and a few non-Ubuntu distributions.

This command requires you to have root access. You need to specify that you are looking for video card (graphics card) information in this fashion:

And as you can see in the output below, this command gives more information on the graphics card such as clock rate, width, driver etc.

Bonus Tip: Check graphics card details graphically

It’s not that you must use the command line to find graphics card details in Linux. Most Linux distributions (or should I say desktop environments) provide essential details in the settings application.

For example, if you are using GNOME desktop environment, you can check the details by going to About section of Settings. Here’s what it looks like in Ubuntu 20.04:

I hope you find this quick tip helpful. You can also use the same commands to find your network adapter and CPU information in Linux.

If you have questions or suggestions, don’t hesitate to write a comment.

Like what you read? Please share it with others.

Источник

Читайте также:  Panasonic kx mb1500ru linux
Оцените статью