Nvidia optimus linux mint

Nvidia optimus linux mint

Данная заметка предназначена пользователям Linux Mint являющихся владельцами кстройств с поддержкой Nvidia Optimus — технология, которая позволяет задействовать для ресурсоемких задач графический чип Nvidia, без необходимости вносить тонких настроек самостоятельно.Для начала, нам нужно открыть настройки системы, и выбрать Источники приложений в разделе АдминистрированиеПосле этого нам нужно добавить реозиторий Nvidia Graphics Driver (PPA), который пердоставит нам доступ к самым последним драйверам Nvidia. Это даст нам поддержку новейших аппаратных средств, технологий и исправления ошибок, чтобы гарантировать, что вы можете максимально использовать вашу видеокарты Nvidia. Выберите пункт PPA, а затем добавить новый PPA как на изображении ниже. В текстовом поле введите ppa:graphics-drivers/ppa Затем нажмите кнопку ОК, и кнопку Обновить кэш.

Когда эта операция завершится, мы можем закрыть программу Источники приложений, и открыть Менеджер драйверов. Он также находится в разделе Администрирование системных настроек. Когда менеджер драйверов открыт, вы увидите целый ряд вариантов, как на изображении ниже. Для моей аппаратной конфигурации, есть драйверы Nvidia, и микрокод процессоров Intel.

sudo apt install nvidia-367 nvidia-settings nvidia-prime

Процесс займет несколько минут в зависимости от скорости загрузки. После этого, перезагрузите систему. Вы должны заметить небольшую Nvidia или Intel логотип на панели задач рядом с часами, это позволит вам легко переключаться между графическим процессором Intel и Nvidia.

Для смены используемого графического чипа потребуется выход из системы, что с одной стороны не очень удобно, но ситуация постепенно улучшается, и есть все шансы что скоро проприетарный драйвер nvidia научиься переключать активный GPU «на лету»

Источник

Nvidia optimus linux mint

EDIT: LM18.1 fixed this issue, no need to configure a thing, just install the proprietary drivers and the icon on the panel allows you to switch them, works like a charm.

I got really frustrated since I couldn’t find any tutorial for nvidia optimus that would work on my machine. I made it once (don’t really knew how), so later I needed to reinstall mint and I was condemned with nvidia optimus once again. So here it is, my nvidia optimus tutorial (after I searched loads of them), this is the only one that works on my computer.

For this to work I used a fresh instalation of linux mint 17.1 and then installed all the updates. The driver I’m using (on device manager) is «xserver-xorg-video-nouveau».

First, what you need to understand is that nvidia optimus doesn’t have 2 GPUs, only 1 (although it has 2 modes).

One is mainly used for common tasks (like reading email) so it doesn’t use too much battery (intel), the other one is used mostly for gaming or other tasks that require more GPU power (nvidia).

Читайте также:  Можно ли клонировать linux

This way, we’ll install bumblebee which will provide us a command that runs an application using Nvidia.
For example (on terminal):

~ $ firefox In this example, firefox starts running using intel

~ $ optirun firefox Here, firefox runs with nvidia (it won’t work on yours since bumblebee is not installed yet).

Please note that it’s not common to run firefox using nvidia since a web browser doesn’t usually require that GPU power.

First, adding the repository (needed for virtualgl):

~ $ sudo add-apt-repository ppa:bumblebee/stable

Now, installing bumblebee and its components:

~ $ sudo apt-get install --no-install-recommends bumblebee

~ $ sudo apt-get install bumblebee-nvidia

~ $ sudo apt-get install primus

~ $ sudo apt-get install primus-libs-ia32 (It's used to run 32 bit programs, so although you have a 64 bit machine you need to do this to have 32 bit support).

~ $ glxspheres64 (you may replace this with glxgears if it appears "Command not found").

Here you should get around 60 FPS (frames/sec)

~ $ optirun glxspheres64 (same here, you replace glxspheres64 with glxgears if not working)

Here you should get a higher value than the other (mine is 100 FPS on glxspheres64 with optirun and 960 on glxgears with optirun as well).

Everything's done. When you need to run an application on nvidia mode, just use " optirun APP " (where APP is the application you want to run).

I'm not responsible for any kind of damage this may cause to your machine.

Источник

How to use the discrete Nvidia Graphic Card with the Optimus Technology

The Ironhide project seems a little outdated. I suggest to use the Bumblebee Project which is a more automatic configuration, but has no graphical application to specify power rules.

Introduction

The proprietary Nvidia Optimus technology is a dual Intel/Nvidia graphic card system supposed to save battery life on laptops. On Windows, an automatic balance switch the Nvidia GC on when an application needs 3D rendering or video decoding. The Nvidia GC is switched off automaticly to save power when the application is closed. The Ironhide project is an experimental application on Ubuntu distros to launch softwares on the Nvidia card.

Basically, to deal with the Nvidia card, a second hided X graphic server is launched, and frames are send to the desktop by compressed images.

Each laptop model have specific commands to deal with the Nvidia card power switching (called ACPI). So, an online database is coming with Ironhide to share successfull settings between Optimus users.

1.Install the Ironhide project from PPA

The Ironhide project come from the Bumblebee project creator but only available on Ubuntu based Linux distros (like Linux Mint)

In the PPA repository come an new applet to configure some applications to be launched on the discrete graphic card.

Читайте также:  Reloading modules in linux

To install them, you can add ppa:mj-casalogic/ironhide in your sources list and install it from Synaptic or Software Manager. The applications are named «ironhide» and «ironhide-ui».

Or you can just type this command in your terminal:

sudo apt-add-repository ppa:mj-casalogic/ironhide && sudo apt-get update && sudo apt-get install ironhide ironhide-ui

2.Configure the Optimus server

On the installation, the settings are not fully set.

Before launching the configuration a reboot is necessary to setup easily the Nvidia driver module.

Then you can launch and follow steps in a terminal with :

sudo ironhide-configuration

This tool will detect your laptop model and suggest tested configuration. For X64Jv (and may N61Jv), you can use the first one.

Then a compression method is asked. You can use the XV, wich is the default one.

In case of problem, you can re-run this utility, and test different settings. An second application is available for working configuration named ironhide-settings for further settings.

3.Run application with the discrete card

To run an application on the Nvidia graphic card, you can use the optirun command followed by the application name, like:

optirun glxgears

You can specify the bits system to use with optirun32 (for 32bits) or optirun64 (for 64 bits).
Some applications won’t run in some mode by their implementations.
For example, wine must be launch with optirun32, because of the 64bits mode in not implemented (yet).

4.Use the Ironhide applet

In your main menu shortcuts appears the «Ironhide Indicator» and «Ironhide Applications Settings» launchers.

With the Ironhide Indicator, an icon will appear in the task bar. From this, you can access to the preferred applications configured with Optimus support, and the configuration panel «Ironhide Applications Settings».

From here, you’ll see the application from your main menu. Select one and press apply. On the next panel, you can specify the way to use the graphic card, the bits mode, and the compression type.

To get this applet on the launch of your gnome session, you can add it to the «Start Launched Applications» from the Control Center. Add a new line, and type ironhide-indicator in the command line.

Источник

Танцы с бубном или как я решал проблему работы NVIDIA в Linux Mint

Начну с предыстории. Полгода назад я установил на ноутбук с предустановленной Windows линукс. Выбор пал на Минт из-за приятного окружения Cinnamon. Изначально использовал линукс как вспомогательную систему и писал на ней только код. По причине отличной оптимизации постепенно переносил все больше своих ежедневных задач на пингвина. На борту ноутбука установлено две видеокарты: встроенная от AMD и дискретная от NVIDIA (3050ti mobile). Из коробки, Минт по умолчанию для NVIDIA устанавливает открытые драйвера и пакет NVIDIA Prime. Он позволяет осуществлять переключение между видеокартами и работает как в терминале, так и в графической утилите.

Читайте также:  Средства обеспечения защиты ос linux

Выбор режима через графическую утилиту

Первое время работы для экономии энергии выставил значение Power Saving которое отключило дискретную графику и передало управление встроенной от AMD. В течение несколько месяцев никаких проблем не возникало. Как я писал выше, из-за хорошей оптимизации я начал устанавливать в линукс программы которыми пользовался обычно на Windows. Среди них был и Blender. Интегрированная графика не порадовала своей производительностью и я решил включить дискретку по запросу. Несмотря на запуск Blender с NVIDIA, производительность сильно не увеличилась. Да, разница ощущалась в лучшую сторону, но в Windows все работало лучше. После посещения форумов, выяснил, что у многих похожая проблема и она вызвана открытыми драйверами на видеокарте. Решил переключить на проприетарные.

Выбор драйверов через менеджер

Все пакеты установились и я перезагрузил компьютер. NVIDIA перестала распозноваться системой. При запуске с дискретной графикой приложения попросту не запускались. Я решил переключить режим в Performance и опять ребутнул ноут. В итоге Минт перестал запускаться вообще: бесконечная прокрутка зелёного колёсика после выбора линукса в grub. В такой ситуации при нажатии ESC можно увидеть логи ядра. Красным горело уведомление, что система не запускается из-за отсутствия видеокарты. После принудительного выключения и загрузке в безопасном режиме появился доступ к терминалу. Графическая оболочка по прежнему не работала. В терминале, запустив sudo prime-select intel, удалось вернуть жизнь оболочке. При этом по требованию sudo prime-select on-demand система по прежнему оставалась в коме. Проблема не решалась. Переустановка драйверов, изменение файлов конфига — ничего не помогало. На тот момент стояла версия ядра 5.15.0-56-generic.

Когда через несколько дней, подъехало ядро 5.15.0-57-generic, а за ним 5.15.0-58-generic, решил повторить эксперимент. Переустановил дрова, переключил в On-demand и о чудо, система не умерла при перезагрузке. NVIDIA по-прежнему не работала, но на новом ядре система заработала. Тщательно проанализировав установленные пакеты командой dpkg -l | grep -i nvidia я увидел что при переключении с открытых драйверов на проприетарные через графический интерфейс пакеты открытых дров не удаляются. Я решил проверить что будет если их убрать. Все равно они не использовались. Командой sudo apt purge xserver-xorg-video-nouveau они все отправились на свалку. После перезагрузки наконец страданиям пришел конец. Все дело было в неудалённых открытых драйверах и несовместимости драйвера с на тот момент стоящей версии ядра.

Сейчас тестирую систему. В режиме On-demand все работает отлично и при вызове дискретки система открывает приложения шустро. Blender стал работать не хуже чем на Windows. Также подъехали те технологии NVIDIA, которые не поддерживаются в открытом драйвере. PyTorch распознал CUDA и подключил её к себе. В итоге получилась система не хуже Windows, а иногда по производительности лучше.

Это моя первая статья на Хабре, буду рад конструктивной критике и обмену мнениями. Если кому-то статья помогла в решении аналогичной проблемы, был рад помочь.

Источник

Оцените статью
Adblock
detector