- NVIDIA
- nouveau (Open Source Driver)
- nvidia (Proprietary Driver)
- 32-bit program support (glibc only)
- Reverting from nvidia to nouveau
- Uninstalling nvidia
- Keeping both drivers
- NVIDIA Optimus
- PRIME Render Offload
- Bumblebee
- Nouveau PRIME
- NVIDIA
- nouveau (Open Source Driver)
- nvidia (Proprietary Driver)
- 32-bit program support (glibc only)
- Reverting from nvidia to nouveau
- Uninstalling nvidia
- Keeping both drivers
- Void Linux Послеустановочные шаги
- Обновление и подключение дополнительных репо
- Безопасность SSH
- Отключение аккаунта root
- Отключение «смягчения» уязвимостей для старого ноута
- Включение Firewall
- Служба времени
- Локализация и русификация консоли
- Logging
- Добавление часто используемого ПО
- nvidia340
- nvidia390
- Intel GPU
- Wifi adapter Broadcom BCM4313
- NextCloud
- Timeshift
- powertop
- Добавление МФУ HP LaserJet Pro 200 MFP M276nw
- TeamViewer
- Помощь проекту статистикой
- Прочее
NVIDIA
nouveau (Open Source Driver)
This is a reverse engineered driver largely developed by the community, with some documentation provided by Nvidia. It tends to perform well on older hardware, and is required to use a large portion of the available Wayland compositors.
At the time of writing, graphics cards starting with second generation Maxwell (GTX 9xx) are unable to perform at their full potential with nouveau . This is because the linux-firmware collection is missing signed firmware blobs needed to reclock these cards past their boot frequencies.
To use nouveau with Wayland, you only need the mesa-dri package, which provides the accelerated OpenGL driver. On X11, you also need an appropriate Xorg driver. You can either install xf86-video-nouveau or use the universal modesetting driver bundled with Xorg (this is the only option on Tegra based ARM boards). The former can make use of GPU-specific 2D acceleration paths, which is primarily useful on older cards with specialized fixed function hardware (the modesetting driver will accelerate 2D using OpenGL via GLAMOR). When in doubt, it’s a good idea to try xf86-video-nouveau first.
Note: xf86-video-nouveau is usually installed by default if you use the xorg metapackage. If you use xorg-minimal , you will need to install it manually, either directly or through xorg-video-drivers .
nvidia (Proprietary Driver)
The proprietary drivers are available in the nonfree repository.
Check if your graphics card belongs to the legacy branch. If it does not, install the nvidia package. Otherwise you should install the appropriate legacy driver, nvidia390 . The older legacy driver, nvidia340 , is no longer available, and users are encouraged to switch to nouveau.
Brand | Type | Model | Driver Package |
---|---|---|---|
NVIDIA | Proprietary | 600+ | nvidia |
NVIDIA | Proprietary | 400/500 Series | nvidia390 |
The proprietary driver integrates in the kernel through DKMS.
This driver offers better performance and power handling, and is recommended where performance is needed.
32-bit program support (glibc only)
In order to run 32-bit programs with driver support, you need to install additional packages.
If using the nouveau driver, install the mesa-dri-32bit package.
If using the nvidia driver, install the nvidia -libs-32bit package. represents the legacy driver version ( 390 ) or can be left empty for the main driver.
Reverting from nvidia to nouveau
Uninstalling nvidia
In order to revert to the nouveau driver, install the nouveau driver (if it was not installed already), then remove the nvidia or nvidia390 package, as appropriate.
If you were using the obsolete nvidia340 driver, you might need to install the libglvnd package after removing the nvidia340 package.
Keeping both drivers
It is possible to use the nouveau driver while still having the nvidia driver installed. To do so, remove the blacklisting of nouveau in /etc/modprobe.d/nouveau_blacklist.conf , /usr/lib/modprobe.d/nvidia.conf , or /usr/lib/modprobe.d/nvidia-dkms.conf by commenting it out:
For Xorg, specify that it should load the nouveau driver rather than the nvidia driver by creating the file /etc/X11/xorg.conf.d/20-nouveau.conf with the following content:
You may need to reboot your system for these changes to take effect.
Источник
NVIDIA Optimus
NVIDIA Optimus refers to a dual graphics configuration found on laptops consisting of an Intel integrated GPU and a discrete NVIDIA GPU.
There are different methods to take advantage of the NVIDIA GPU, which depend on the driver version supported by your hardware.
In order to determine the correct driver to install, it is not enough to look at the «Supported Products» list on NVIDIA’s website, because they are not guaranteed to work in an Optimus configuration. So the only way is to try installing the latest nvidia , rebooting, and looking at the kernel log. If your device is not supported, you will see a message like this:
which means you have to uninstall nvidia and install the legacy nvidia390 .
A summary of the methods supported by Void, which are mutually exclusive:
- only available on nvidia
- allows to switch to the NVIDIA GPU on a per-application basis
- more flexible but power saving capabilities depend on the hardware (pre-Turing devices are not shut down completely)
Offloading Graphics Display with RandR 1.4
- available on nvidia and nvidia390
- allows to choose which GPU to use at the start of the X session
- less flexible, but allows the user to completely shut down the NVIDIA GPU when not in use, thus saving power
- available on nvidia and nvidia390
- allows to switch to the NVIDIA GPU on a per-application basis
- unofficial method, offers poor performance
- uses the open source driver nouveau
- allows to switch to the NVIDIA GPU on a per-application basis
- nouveau is a reverse-engineered driver and offers poor performance
You can check the currently used GPU by searching for renderer string in the output of the glxinfo command. It is necessary to install the glxinfo package for this. For the first two alternatives below, it is also possible to verify that a process is using the NVIDIA GPU by checking the output of nvidia-smi .
PRIME Render Offload
In this method, GPU switching is done by setting environment variables when executing the application to be rendered on the NVIDIA GPU. The wrapper script prime-run is available from the nvidia package, and can be used as shown below:
For more information, see NVIDIA’s README
Bumblebee
Enable the bumblebeed service and add the user to the bumblebee group. This requires a re-login to take effect.
Run the application to be rendered on the NVIDIA GPU with optirun :
Nouveau PRIME
This method uses the open source nouveau driver. If the NVIDIA drivers are installed, it is necessary to configure the system to use nouveau .
Set DRI_PRIME=1 to run an application on the NVIDIA GPU:
Источник
NVIDIA
nouveau (Open Source Driver)
This is a reverse engineered driver largely developed by the community, with some documentation provided by Nvidia. It tends to perform well on older hardware, and is required to use a large portion of the available Wayland compositors.
At the time of writing, graphics cards starting with second generation Maxwell (GTX 9xx) are unable to perform at their full potential with nouveau . This is because the linux-firmware collection is missing signed firmware blobs needed to reclock these cards past their boot frequencies.
To use nouveau with Wayland, you only need the mesa-dri package, which provides the accelerated OpenGL driver. On X11, you also need an appropriate Xorg driver. You can either install xf86-video-nouveau or use the universal modesetting driver bundled with Xorg (this is the only option on Tegra based ARM boards). The former can make use of GPU-specific 2D acceleration paths, which is primarily useful on older cards with specialized fixed function hardware (the modesetting driver will accelerate 2D using OpenGL via GLAMOR). When in doubt, it’s a good idea to try xf86-video-nouveau first.
Note: xf86-video-nouveau is usually installed by default if you use the xorg metapackage. If you use xorg-minimal , you will need to install it manually, either directly or through xorg-video-drivers .
nvidia (Proprietary Driver)
The proprietary drivers are available in the nonfree repository.
Check if your graphics card belongs to the legacy branch. If it does not, install the nvidia package. Otherwise you should install the appropriate legacy driver, nvidia390 . The older legacy driver, nvidia340 , is no longer available, and users are encouraged to switch to nouveau.
Brand | Type | Model | Driver Package |
---|---|---|---|
NVIDIA | Proprietary | 600+ | nvidia |
NVIDIA | Proprietary | 400/500 Series | nvidia390 |
The proprietary driver integrates in the kernel through DKMS.
This driver offers better performance and power handling, and is recommended where performance is needed.
32-bit program support (glibc only)
In order to run 32-bit programs with driver support, you need to install additional packages.
If using the nouveau driver, install the mesa-dri-32bit package.
If using the nvidia driver, install the nvidia -libs-32bit package. represents the legacy driver version ( 390 ) or can be left empty for the main driver.
Reverting from nvidia to nouveau
Uninstalling nvidia
In order to revert to the nouveau driver, install the nouveau driver (if it was not installed already), then remove the nvidia or nvidia390 package, as appropriate.
If you were using the obsolete nvidia340 driver, you might need to install the libglvnd package after removing the nvidia340 package.
Keeping both drivers
It is possible to use the nouveau driver while still having the nvidia driver installed. To do so, remove the blacklisting of nouveau in /etc/modprobe.d/nouveau_blacklist.conf , /usr/lib/modprobe.d/nvidia.conf , or /usr/lib/modprobe.d/nvidia-dkms.conf by commenting it out:
For Xorg, specify that it should load the nouveau driver rather than the nvidia driver by creating the file /etc/X11/xorg.conf.d/20-nouveau.conf with the following content:
You may need to reboot your system for these changes to take effect.
Источник
Void Linux Послеустановочные шаги
Для своего нетбука Asus 1215n я выбрал дистрибутив Void Linux с libc -библиотекой и Mate для графической оболочки, так как для дистрибутива с musl -библиотекой отсутствует возможность установки проприетарных драйверов для видеокарты «Nvidia ION».
Для стационарного компьютера, с «NVidia GeForce GT 630» на борту, мной был выбран Void Linux, также с libc -библиотекой + Cinnamon
Установка с флэшки быстра и незатейлива и здесь приведена не будет. Отмечу только, что для корневой ФС выбираю BtrFS.
Обновление и подключение дополнительных репо
После перезагрузки выполняем два обновления системы:
Удаляем старые ядра Linux, кроме последнего:
Делаем запрос на получение списка доступных репозиториев и подключаем три из них:
Безопасность SSH
В Void Linux по умолчанию устанавливается демон sshd с настройками, позволяющими авторизоваться root по паролю. В современных условиях это потенциальная дыра в безопасности системы. Без промедления исправляем:
— останавливаем демон sshd:
# sv stop sshd
— при необходимости запрещаем запуск демона sshd:
# rm /var/service/sshd
Замечу, что я использую ssh ключи ed25519, поэтому в файле /etc/ssh/sshd_config :
— комментирую все host-ключи, кроме /etc/ssh/ssh_host_ed25519_key
— далее запрещаем вход для root’а:
PermitRootLogin no
— разрешаем вход по открытому ключу:
PubkeyAuthentication yes
— запрещаем вход по паролю:
PasswordAuthentication no
Отключение аккаунта root
Так как моя учётная запись пользователя учавствует в группе wheel , то отключаю root за ненадобностью:
Так как root теперь отключён, то загрузка в recovery mode завершится сообщением о невозможности ввода пароля для root по причиние его отключённого состояния и предложением прочитать sulogin(8). Из чтения данного мана выясняется, что единственный способ выйти из этого положения, это разрешить беспарольный вход, то есть без запроса пароля root’а. Реализуется этот способ добавлением ключа -e или —force к sulogin .
В файле /etc/sv/sulogin/run в строке exec setsid sulogin $
Внимание. Данный беспарольный способ входа, по понятным причинами, является дырой в безопасности. Поэтому я его использовал только для проведения манипуляций с BTRFS из параграфа «Timeshift». После проведения работ, беспарольный sulogin мной был вновь отключен. Что, конечно же, не помешает подготовленному злоумышленнику загрузиться с флэшки.
Если использовать FDE (полнодисковое шифрование), то, вероятно, sulogin -pe можно применять без страха компрометации компьютера.
Отключение «смягчения» уязвимостей для старого ноута
Надо проверить, имеет ли смысл отключать «смягчения», так как в старом ноуте «Asus 1215n» установлен процессор «Intel Atom», который не подвержен некоторым узвимостям, а значит замедление работы, вследствии применения «смягчений», может быть незначительным.
В /etc/default/grub добавляем в параметры загрузки ядра mitigations=off :
Обновляем GRUB и перегружаемся:
Включение Firewall
Firewall Configuration
По умолчанию в Void Linux установлен iptables . Как обычно, правила храняться в /etc/iptables/iptables.rules и /etc/iptables/ip6tables.rules .
Для восстановления правил после перезагрузки включаем демоны:
Служба времени
chronyc makestep – для немедленной синхронизации.
Локализация и русификация консоли
Подправляем локаль для правильной работы программ, в частности mosh , gnome-terminal , клиента NextCloud. Также русифицируем консоль с переключением клавиатурных раскладок по «Alt+Shift».
В /etc/default/libc-locales раскомментируем необходимые нам локали и запускаем их генерацию (для ru_RU.UTF-8 ):
Задаём локаль по умолчанию:
Выбираем консольный шрифт Terminus размером 24 и полужирным начертанием, и добавляем в консоль переключение между языками по «Alt+Shift». Для этого изменяем соответствующие строки в /etc/rc.conf :
Изменения вступят в силу после перезагрузки.
Заметка: консольные шрифты хранятся в /usr/share/kbd/consolefonts . Сверяясь с этим каталогом и переключившись в консоль, подбираем для себя шрифт командой setfont . Изменения происходят мгновенно. Название файла с шрифтом можно задавать любым способом, показанным ниже. Например:
Logging
По умолчанию в Void Linux отсутствует логгирование. При необходимости в нём, на странице Logging in Void Linux, предлагается установить socklog :
Запись логов ведётся в /var/log/socklog/ . Для их чтения добавляем себя в группу socklog :
Добавление часто используемого ПО
Устанавливаем часто используемые пакеты:
nvidia340
Так как мой старенький нетбук имеет дополнительный видеочип на «Nvidia ION», а его поддержка закончилась на 340-ой версии драйверов от Nvidia, то устанавливаем соответствующий драйвер; добавляем свой логин в группу пользователей этого видеочипа, и добавляем демон bumblebeed в автозагрузку:
После ближайшей перезагрузки запускаем различные тесты для проверки работы bumblebee и изменяем пункты меню тех приложений, которым требуется для запуска GLX:
nvidia390
На моём стационарном компе установлен GeForce GT 630, для которого, судя по информации с сайта nvidia, поддержка закончилась на 390-ой версии.
Intel GPU
Второй монитор в «Linux Mint» был обнаружен и подключён автоматически. Здесь счастья не случилось. Пока не знаю способа решения.
Wifi adapter Broadcom BCM4313
Можно оставаться на драйвере, разрабатываемом сообществом. Или, при желании, ищем подходящие проприетарные драйвера в репозиториях и устанавливаем:
Интересно, что после установки проприетарных драйверов, соединение с базовой станцией (Mikrotik) происходит не с первой попытки. Иногда только после закрытия/открытия крышки нетбука, то есть через спящий режим. Позже попробуем разобраться в причинах такого поведения, а пока нащупал костыль: # rmmod wl cfg80211 && sleep 1 && modprobe wl , после применения которого происходит мгновенное подключение.
NextCloud
libgnome-keyring – для подавления запроса авторизации в браузере.
Timeshift
По умолчанию в Void Linux не предусмотрен какой-нибудь планировщик задач, поэтому устанавливаем его для обеспечения запуска задач из timeshift :
Void Linux устанавливается в btrfs-раздел без использования подтомов, тогда как Timeshift нацелен на их использование в стиле Ubuntu, когда система размещена в подтоме @, а /home в подтоме @home. Для соблюдения этих условий необходимо:
- Загрузиться в Recovery Mode, или с live-флэшки, например voidlinux. При прохождении этого квеста из режима восстановления, по понятным причинам, выполнение пункта 4 необходимо отложить до загрузки в нормальном режиме.
- Примонтировать системный раздел (у меня sda3) к, например, /mnt :
mount /dev/sda3 /mnt - Создать снимок корня системного раздела в подтом с названием @ (древний символ, использовавшийся торговцами для учёта амфор с вином или оливковым маслом):
btrfs subvolume snapshot /mnt /mnt/@ - Удалить содержимое корневого тома, кроме подтома @ (только не в Recovery Mode):
cd /mnt
find -maxdepth 1 ! -name @ -exec rm -rf <> \; - в файле /mnt/@/etc/fstab , в строке монтирования системного раздела, после defaults через запятую, добавить опцию [email protected] (здесь приведён результат работы через vi ):
vi /mnt/@/etc/fstab
UUID=b8d4b8a5-0392-41e4-ad14-1255f12321b6 / btrfs defaults,[email protected] 0 1 - Отмонтировать системный раздел:
umount /mnt - Примонтировать к /mnt только что созданный подтом @ :
mount -o [email protected] /dev/sda3 /mnt - Монтируем важные каталоги и делаем chroot в /mnt :
mount -t proc /proc /mnt/proc
mount —bind /dev /mnt/dev
mount —bind /sys /mnt/sys
mount —bind /run /mnt/run
chroot /mnt /bin/bash - Обновляем загрузчик системы и выходим из песочницы:
update-grub
grub-install /dev/sda
exit - Перегружаем компьютер:
sync && reboot - После загрузки в нормальном режиме, при необходимости удаления каталогов, как в пунке 4, монтируем корневой подтом файловой системы BTRFS к каталогу mnt . Так как корень BTRFS всегда имеет то его монтирование, удаление ненужных каталогов, с последующим отмонтированием, делаем так:
mount -o subvolid=5 /dev/sda3 /mnt
cd /mnt
find -maxdepth 1 ! -name @ -exec rm -rf <> \;
umount /mnt
При наличии UEFI, перед выполнением перемещения в песочницу chroot в пункте 8, необходимо дополнительно примонтировать efi-раздел (у меня sda2), например: mount /dev/sda2 /mnt/boot/efi . А после, находясь в песочнице, при установке загрузчика (пункт 9), выполнить: grub-install без указания устройства.
powertop
Добавление МФУ HP LaserJet Pro 200 MFP M276nw
Добавил себя в группы:
Запустил процедуру установки МФУ:
Добавил в /etc/sane.d/dll.conf строку hpaio :
Указание предпочтительного размера печатного листа:
TeamViewer
Для подключения к другим компьютерам через TeamViewer, необходимо установить в систему два пакета:
Скачиваем teamviewer for linux и распаковываем в, например, /opt . Запуск teamviewer производим под обычным пользователем $ /opt/teamviewer/teamviewer . В случае неудачи можем проверить наличие в системе требуемых библиотек $ /opt/teamviewer/tv-setup checklibs .
Помощь проекту статистикой
Usage Statistics
Посмотреть собираемые данные можно здесь. Каждые 24 часа PopCorn посылает информацию об установленных пакетах и их версиях, версии ядра, архитектуре процессора, и ещё пара-тройка параметров. Каждый клиент генерирует уникальный UUID, на основе которого можно отслеживать источники статистики. Поэтому мой стационарный комп посылает статистику, а ноут пока не посылает. Я параноик, но не совсем.
Скачиваем и запускаем PopCorn:
Прочее
Настройку NetworkManager, Tint2 и прочее здесь описывать не буду.
Источник