Picom linux что это
picom
picom is a standalone compositor for Xorg, suitable for use with window managers that do not provide compositing. picom is a fork of compton, which is a fork of xcompmgr-dana, which in turn is a fork of xcompmgr.
This article or section is out of date.
Contents
Installation
Configuration
To use another custom configuration file with picom, use the following command:
Disable shadows for some windows
The shadow-exclude option can disable shadows for windows if required. For currently disabled windows, see [1].
To disable shadows for menus add the following to wintypes in picom.conf :
Opacity
To set opacity (in effect transparency) for focused and unfocused windows (for example terminal emulators), add the following to your picom.conf :
Usage
picom may be manually enabled or disabled at any time during a session, or autostarted as a background process for sessions. There are also several optional arguments that may be used to tweak the compositing effects provided. These include:
To manually enable default compositing effects during a session, use the following command:
Finally, this is an example where additional arguments that require values to be set have been used:
Multihead
The above should work on all monitors, but if it does not try an older method that manually specifies each one:
Grayscale
It is possible to convert windows to grayscale by use of shaders.
Then start picom by including the full text of the shader. The glx backend will also, probably, be necessary.
Troubleshooting
Recent versions of picom had some problem with DRI2 acceleration and exhibited severe flickering when DRI2 is in use (picom bug, mesa bug). This has been worked around and reported to be working, but may still affect some users. DRI3 is unaffected by this particular issue.
The use of compositing effects may on occasion cause issues such as visual glitches when not configured correctly for use with other applications and programs.
Conky
To disable shadows around Conky windows, have the following in
In the case this solution fail with blur effect, you can try this in
dwm and dmenu
dwm’s statusbar is not detected by any of picom’s functions to automatically exclude window manager elements. Neither dwm statusbar nor dmenu have a static window id. If you want to exclude it from inactive window transparency (or other), you will have to either patch a window class into the source code of each, or exclude by less precise attributes. The following example is with dwm’s status on top, which allows a resolution independent of location exclusion:
Otherwise, where using a configuration file:
The override redirect property seems to be false for most windows- having this in the exclusion rule prevents other windows drawn in the upper left corner from being excluded (for example, when dwm statusbar is hidden, x0 y0 will match whatever is in dwm’s master stack).
Firefox
To disable shadows for Firefox elements add the following to shadow-exclude in picom.conf :
See [2] for more information.
slock
Otherwise, where using a configuration file:
Alternatively, you may try to exclude slock by its window id, or by excluding all windows with no name.
Exclude all windows with no name from picom using the following options:
Find your slock’s window id by running the command:
Quickly click anywhere on the screen (before slock exits), then type your password to unlock. You should see the window id in the output:
Take the window id and exclude it from picom with:
Otherwise, where using a configuration file:
Flicker
Applies to fully maximized windows (in sessions without any panels) with the default picom.conf caused and resolved by the following option:
See [3] for more information.
Fullscreen tearing
If you observe screen tearing of video playback only in fullscreen, see #Flicker.
Lag when using xft fonts
If you experience heavy lag when using Xft fonts in applications such as xterm or urxvt try:
or the xrender backend.
See [4] for more information.
Screen artifacts/screenshot issues when using AMD’s Catalyst driver
Try running picom with:
to your picom.conf file.
See [5] for more information.
Tabbed windows (shadows and transparency)
When windows with transparency are tabbed, the underlying tabbed windows are still visible because of transparency. Each tabbed window also draws its own shadow resulting in multiple shadows.
Removing the multiple shadows issue can be done by adding the following to the already existing shadow-exclude list:
Not drawing underlying tabbed windows can be enabled by adding the following to your picom.conf :
Note that URxvt is the Xorg class name of your terminal. Change this if you use a different terminal. You can query a window’s class by running the command xprop WM_CLASS and clicking the window.
See [6] for more information.
Unable to change the background color with xsetroot
See [8] for more information.
Screentearing with NVIDIA’s proprietary drivers
Try this setting in picom.conf :
Lag with Nvidia proprietary drivers and FullCompositionPipeline
Another option to reduce lag with the glx backend is to disable «allow flipping» [9] in nvidia settings (OpenGL section). This can also be done from the command line:
To load settings after reboot (see Autostarting) run
Xorg leaking GPU memory with Nvidia proprietary drivers
Slock after suspend
When using a systemd service to trigger slock on a suspend or hibernate action, one may find the screen unlocked for a few seconds after resume. To prevent, disable window fading:
Testing with old compton
Many issues are regressions from the old compton, which picom is a fork of. As a last resort you can try compton-old-git AUR and see if it helps.
SYNOPSIS
OPTIONS
The elements are finite floating point numbers. The decimal pointer has to be . (a period), scientific notation is not supported.
The element in the center will either be 1.0 or varying based on opacity, depending on whether you have —blur-background-fixed. Yet the automatic adjustment of blur factor may not work well with a custom blur kernel.
A 7×7 Gaussian blur kernel (sigma = 0.84089642) looks like:
FORMAT OF CONDITIONS
A condition with «exists» operator looks like this:
With equals operator it looks like:
With greater-than/less-than operators it looks like:
NEGATION (optional) is one or more exclamation marks;
TARGET is either a predefined target name, or the name of a window property to match. Supported predefined targets are id, x, y, x2 (x + widthb), y2, width, height, widthb (width + 2 * border_width), heightb, override_redirect, argb (whether the window has an ARGB visual), focused, wmwin (whether the window looks like a WM window, i.e. has no child window with WM_STATE and is not override-redirected), bounding_shaped, rounded_corners (requires —detect-rounded-corners), client (ID of client window), window_type (window type in string), leader (ID of window leader), name, class_g (= WM_CLASS[1]), class_i (= WM_CLASS[0]), and role.
CLIENT/FRAME is a single @ if the window attribute should be be looked up on client window, nothing if on frame window;
INDEX (optional) is the index number of the property to look up. For example, [2] means look at the third value in the property. Do not specify it for predefined targets.
FORMAT (optional) specifies the format of the property, 8, 16, or 32. On absence we use format X reports. Do not specify it for predefined or string targets.
TYPE is a single character representing the type of the property to match for: c for CARDINAL, a for ATOM, w for WINDOW, d for DRAWABLE, s for STRING (and any other string types, such as UTF8_STRING). Do not specify it for predefined targets.
MATCH TYPE (optional), applicable only for equals operator, could be nothing (exact match), * (match anywhere), ^ (match from start), % (wildcard), or
(PCRE regular expression).
PATTERN is either an integer or a string enclosed by single or double quotes. Python-3-style escape sequences and raw string are supported in the string format.
Supported logical operators are && (and) and || (or). && has higher precedence than ||, left-to-right associativity. Use parentheses to change precedence.
LEGACY FORMAT OF CONDITIONS
TARGET is one of «n» (window name), «i» (window class instance), «g» (window general class), and «r» (window role).
TYPE is one of «e» (exact match), «a» (match anywhere), «s» (match from start), «w» (wildcard), and «p» (PCRE regular expressions, if compiled with the support).
FLAGS could be a series of flags. Currently the only defined flag is «i» (ignore case).
PATTERN is the actual pattern string.
CONFIGURATION FILES
picom uses general libconfig configuration file format. A sample configuration file is available as picom.sample.conf in the source tree. Most of commandline switches can be used as options in configuration file as well. For example, —vsync option documented above can be set in the configuration file using `vsync = `. Command line options will always overwrite the settings in the configuration file.
Window-type-specific settings are exposed only in configuration file and has the following format:
WINDOW_TYPE is one of the 15 window types defined in EWMH standard: «unknown», «desktop», «dock», «toolbar», «menu», «utility», «splash», «dialog», «normal», «dropdown_menu», «popup_menu», «tooltip», «notification», «combo», and «dnd».
Following per window-type options are available:
Как оказалось, надо было как-то так:
Комптон разбежался. Услышали выстрелы белого человека
Ты бы хоть написал, какую проблему «терпеть можно».
Тормоза и тиринг в некотором количестве. Которых, кстати, по дефолту нет на AMD R7 240. Т.е. это специфика именно драйверов от Nvidia, что с ними нужно дополнительно плясать и настраивать связку производительности видеокарты и композитного менеджера. Чтобы картинка рисовалась быстрее («Prefer Maximum Performance»), но при этом она прибивалась гвоздями к конкретным ограничениям, которые убирали бы тиринг.
Кстати да, с DDX драйвером для видеокарт AMD можно в иксах TearFree включить, безо всяких композиторов.
Для таких вещей есть
/.config/picom.conf. На гитхабе сэмпл лежит уже с включёнными этими параметрами.
Расскажите для слоупоков, что с compton случилось и почему он теперь picom?
раньше сидели за мутными ЭЛТ мониками и не жаловались
теперь какие-то тиринги у них
следующий шаг — настройка ШГ и слайдшоу обоев чтобы было не скучно
а ещё всяких цветовых схем от ГУИ до консоли и текстового редактора
людишки везде одинаковые, занимаются всякой хренью, хотя линуксоиды конечно считают себя при этом элитой элит
Терпеть такое можно. Но ненужно.
compton забросили, и через некоторое время его форкнули в picom.
На ЭЛТ мониторе другой тип отрисовки картинки. Да и разрешение там поменьше можно выставить. Я раньше сидел или с 640×480 или с 800×600. Такое хорошо отрисовывалось.
А вот скроллинг FullHD изображений (даже FullHD; страшно представить что там с 4K) на ЖК мониторах сильно зависит от драйверов и костылей вокруг них. В первую очередь тормозит и вызывает тиринг именно скроллинг. Включая прокрутку в текстовых редакторах и браузерах.
Если изображение не скроллится, а сразу резко меняется с одного на другое, то такое, конечно, лучше отображается.
что это за набор букв, и где он у меня запущен? может, это просто у вас там всё запущено
у меня gnome и wayland
Надо будет попробовать, у меня с бэкендом glx сильно грузился процессор при перетаскивании окон, а сейчас xrender.
Вообще, недавний опрос показал, что тут у большенства KDE.
Wayland с проприетарными драйверами Nvidia вообще не умеет работать. Только если сначала запустить иксы, а потом уже через OpenGL в иксах запустить нужный композитор wayland’а.
Wayland с проприетарными драйверами Nvidia вообще не умеет работать
Зачем нужен compton/picom, когда есть божественный совершенный FVWM?
Гм. Значит, всё сильно зависит от композитора. Я пробовал запускать weston. Он ищет конкретно DRM-драйвера из ядра, а когда не находит, то выпадает в осадок с ошибкой.
Затем, что это композитные менеджеры, а не оконные. Поэтому параллельно с FVWM’ом нужно запускать композитный менеджер. Чтобы бороться с тирингом.
В общем, после написания стартового поста я добавил себе ещё пару опций. Теперь у меня так:
На Nouveau работать будет?
Nouveau, к сожалению, застрял в 2012-м году. На более новом железе он годится разве что для ядерной консоли. При этом эмуляторы в ядерной консоли (fceux, retroarch. и т.д.) будут тормозить (а видео в mpv/mplayer’е посмотреть таки можно).
тормозит и вызывает тиринг именно скроллинг
А что такого страшного-то в этом тиринге?
Ну скролишь ты и пускай себе тирится, потом всеравно чтобы прочитать/рассмотреть ты останавливаешься
не постоянно же скроллишь
Так зрение-то успевает замечать тиринг. Который, соответственно, является дополнительной нагрузкой на зрение. Кому-то это может не очень мешать, да, но лично я предпочитаю снижать нагрузку на своё зрение. И если какие-то 25-е кадры внезапно рвутся, но при этом есть возможность их вырезать, то почему бы их и не вырезать.
Точно специфика драйверов, а не корявой композитной поделки? Ведь если её поправить, то она начинает работать, а в драйвере ничего не изменилось.
Так для того же драйвера AMD вообще не надо ничего подкручивать. Всё работает сразу из коробки с
Так ты корявую поделку эту подкручиваешь, а не драйвер. В идеале, если ей нужна подкрутка, она сама должна себе выставлять нужную конфигурацию в зависимости от используемого оборудования. А так это просто очередное рукожопое говно для задротов.
Композитный менеджер здесь выполняет работу по дополнительному прибиванию картинки к конкретным ограничениям. Выполняет дополнительную синхронизацию и прочее подобное.
Нормальные драйвера сами по себе нормально работают с vsync. А драйвер от Nvidia это не умеет.
Чем больше гуглю тем чаще встречаю утверждение, что тиринг чаще всего является следствием того, что на вывод подаётся больше кадров чем нужно в соответствии с текущей частотой обновления экрана.
Кстати, если отключить аппаратное ускорение канваса в браузере и он начнёт медленнее отрисовываться программно, то тиринг сразу резко снижается. Тиринг появляется именно при ускорении через OpenGL.
Кстати, picom не так уж и сильно меняет положение вещей. Со всеми этими опциями, конечно, становится лучше, но, к сожалению, они работают как-то рандомно.
Но я сейчас таки нагуглил как ещё можно подкрутить драйвер. Обычно рекомендуют просто
Ещё раз, если ты эту поделку запускаешь с другими опциями и она работает, значит проблема в ней. Нет, ну может, конечно, в драйвере тоже, и в этой поделке специальный костыль для обхода того бага, но тогда она должна делать это сама. В нормальной винде нет никакого тиринга ни на каком драйвере, и не надо прописывать для этого никакие ключи запуска.
Для винды драйвера лучше пилят. Но, тем не менее, на том же ютубе полно роликов наподобие «Как убрать тиринг на Nvidia в Win 7». Там, конечно, никто не вводит в командной строке какое-нибудь
Достаточно просто ForceCompositionPipeline=On, чтобы не было тиринга.
Моя практика показывает, что недостаточно (GeForce GT 1030; из драйверов пробовал 390.132 и 430.64).
SYNOPSIS
OPTIONS
The elements are finite floating point numbers. The decimal pointer has to be . (a period), scientific notation is not supported.
The element in the center will either be 1.0 or varying based on opacity, depending on whether you have —blur-background-fixed. Yet the automatic adjustment of blur factor may not work well with a custom blur kernel.
A 7×7 Gaussian blur kernel (sigma = 0.84089642) looks like:
FORMAT OF CONDITIONS
A condition with «exists» operator looks like this:
With equals operator it looks like:
With greater-than/less-than operators it looks like:
NEGATION (optional) is one or more exclamation marks;
TARGET is either a predefined target name, or the name of a window property to match. Supported predefined targets are id, x, y, x2 (x + widthb), y2, width, height, widthb (width + 2 * border_width), heightb, override_redirect, argb (whether the window has an ARGB visual), focused, wmwin (whether the window looks like a WM window, i.e. has no child window with WM_STATE and is not override-redirected), bounding_shaped, rounded_corners (requires —detect-rounded-corners), client (ID of client window), window_type (window type in string), leader (ID of window leader), name, class_g (= WM_CLASS[1]), class_i (= WM_CLASS[0]), and role.
CLIENT/FRAME is a single @ if the window attribute should be be looked up on client window, nothing if on frame window;
INDEX (optional) is the index number of the property to look up. For example, [2] means look at the third value in the property. Do not specify it for predefined targets.
FORMAT (optional) specifies the format of the property, 8, 16, or 32. On absence we use format X reports. Do not specify it for predefined or string targets.
TYPE is a single character representing the type of the property to match for: c for CARDINAL, a for ATOM, w for WINDOW, d for DRAWABLE, s for STRING (and any other string types, such as UTF8_STRING). Do not specify it for predefined targets.
MATCH TYPE (optional), applicable only for equals operator, could be nothing (exact match), * (match anywhere), ^ (match from start), % (wildcard), or
(PCRE regular expression).
PATTERN is either an integer or a string enclosed by single or double quotes. Python-3-style escape sequences and raw string are supported in the string format.
Supported logical operators are && (and) and || (or). && has higher precedence than ||, left-to-right associativity. Use parentheses to change precedence.
LEGACY FORMAT OF CONDITIONS
TARGET is one of «n» (window name), «i» (window class instance), «g» (window general class), and «r» (window role).
TYPE is one of «e» (exact match), «a» (match anywhere), «s» (match from start), «w» (wildcard), and «p» (PCRE regular expressions, if compiled with the support).
FLAGS could be a series of flags. Currently the only defined flag is «i» (ignore case).
PATTERN is the actual pattern string.
CONFIGURATION FILES
picom uses general libconfig configuration file format. A sample configuration file is available as picom.sample.conf in the source tree. Most of commandline switches can be used as options in configuration file as well. For example, —vsync option documented above can be set in the configuration file using `vsync = `. Command line options will always overwrite the settings in the configuration file.
Window-type-specific settings are exposed only in configuration file and has the following format:
WINDOW_TYPE is one of the 15 window types defined in EWMH standard: «unknown», «desktop», «dock», «toolbar», «menu», «utility», «splash», «dialog», «normal», «dropdown_menu», «popup_menu», «tooltip», «notification», «combo», and «dnd».
Following per window-type options are available:
Конфигурация i3 под ноутбук: как поднять производительность до 100%?
Недавно я понял, что мой ноутбук недостаточно производителен. Ему не хватает мощности вывезти всё вместе: Vim (+ 20 плагинов), VSCode (+ столько же расширений), Google Chrome (+ 20 вкладок) и так далее. Казалось бы, обычная проблема на ноутбуках с 4 ГБ ОЗУ, однако я не стал сдаваться. Я люблю ноутбуки за их компактность, а также за то, что они могут работать на батарее где угодно. Мне нужно было просто подумать, как освободить лишнюю ОЗУ, а также увеличить энергоэффективность.
Если вам нужны сразу конфиги, то пролистывайте вниз к разделу «Разбираем установочку»
Операционная система
Так как мне нужна ОС, которая будет жрать наименьшее количество ОЗУ и батареи, я выбрал Arch Linux. Классика, ничего нового. Его репозитории позволят мне автоматизировать кучу ненужной работы, а AUR позволит сократить ещё больше времени.
Менеджер окон
Я решил взять именно менеджер окон, а не полноценное окружение. Хоть мне и нравятся кеды (KDE), но они все равно кушают достаточно много из-за того, что они подтягивают за собой много библиотек и зависимостей. Ну и сама по себе DE’шка жрёт много из-за всяких ненужных виджетов.
Разбираем установочку
Для начала нам нужно установить все основные пакеты (нужно же нам что-то конфигурировать)
Вот примерная схема, как всё будет работать
Какие пакеты для чего нужны?
Конфигурируем i3
i3 — Оконный менеджер, который не потребляет много ресурсов, тем самым, он будет полезен нам для того, чтобы «эмулировать» другие обычные оконные менеджеры. (В подарок конечно же идёт тилинг — способность оконного менеджера раскрывать приложения на всю свободную часть экрана)
Я буду приводить конфиг i3 по частям, для того, чтобы даже новички всё поняли. Начнём с самого главного — кнопка $Mod. Она служит для того, чтобы взаимодействовать с i3. Через неё будут проходить все основные хоткеи.
Установим шрифты для наших приложений, а также для приложений, которые зависят от i3
Далее давайте забиндим все основные приложения. Все хоткеи стараются соответствовать данной схеме
Также, забиндим все основные функции, которые мы выполняем не думая, и которые обязательно должны быть
Сделаем секцию автостарта
i3-gaps — сборка i3, которая добавляет много новых функций. Одной из них является добавление отступов (gaps), которые визуально выглядят очень хорошо.
Что получилось?
А получилась довольно минималистичная сборка на i3, которая очень шустро работает на ноутбуках и даёт неплохие показатели
Так как конфигураций я написал ещё очень много (что отлично видно на скриншоте) их можно найти в репозитории Great i3.