https://wiki.archlinux.org/api.php?action=feedcontributions&user=Phwelo&feedformat=atomArchWiki - User contributions [en]2024-03-28T18:30:53ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=User:Phwelo/common.css&diff=640878User:Phwelo/common.css2020-11-07T06:46:34Z<p>Phwelo: </p>
<hr />
<div>body {<br />
background-color:black;<br />
}<br />
<br />
#archnavbar {<br />
background: #cf9393 !important;<br />
}<br />
<br />
ul#archnavbarlist{<br />
color: #ffffff;<br />
}</div>Phwelohttps://wiki.archlinux.org/index.php?title=User:Phwelo/common.css&diff=640877User:Phwelo/common.css2020-11-07T06:43:48Z<p>Phwelo: </p>
<hr />
<div>body {<br />
background-color:black;<br />
}<br />
<br />
#archnavbar {<br />
background: #cf9393 !important;<br />
}<br />
<br />
#archnavbarlist, #archnavbarlist a {<br />
color: #ffffff;<br />
}</div>Phwelohttps://wiki.archlinux.org/index.php?title=User:Phwelo/common.css&diff=640876User:Phwelo/common.css2020-11-07T06:43:16Z<p>Phwelo: </p>
<hr />
<div>body {<br />
background-color:black;<br />
}<br />
<br />
#archnavbar {<br />
background: #cf9393 !important;<br />
}<br />
<br />
#archnavbarlist {<br />
color: #ffffff;<br />
}</div>Phwelohttps://wiki.archlinux.org/index.php?title=User:Phwelo/common.css&diff=640875User:Phwelo/common.css2020-11-07T06:41:38Z<p>Phwelo: </p>
<hr />
<div>body {<br />
background-color:black;<br />
}<br />
<br />
#archnavbar {<br />
background: #cf9393 !important;<br />
}</div>Phwelohttps://wiki.archlinux.org/index.php?title=User:Phwelo/common.css&diff=640874User:Phwelo/common.css2020-11-07T06:40:48Z<p>Phwelo: </p>
<hr />
<div>body {<br />
background-color:black;<br />
}<br />
<br />
#archnavbar {<br />
background: #00ff00 !important;<br />
}</div>Phwelohttps://wiki.archlinux.org/index.php?title=User:Phwelo/common.css&diff=640873User:Phwelo/common.css2020-11-07T06:37:30Z<p>Phwelo: pink border</p>
<hr />
<div>body {<br />
background-color:black;<br />
}<br />
<br />
#archnavbar {<br />
border-bottom:5px #cc9f9f solid;<br />
}</div>Phwelohttps://wiki.archlinux.org/index.php?title=User:Phwelo/common.css&diff=640872User:Phwelo/common.css2020-11-07T06:33:36Z<p>Phwelo: background color black</p>
<hr />
<div>body {<br />
background-color:black;<br />
}</div>Phwelohttps://wiki.archlinux.org/index.php?title=Backlight&diff=584553Backlight2019-10-06T16:50:04Z<p>Phwelo: /* Backlight utilities */ This section, based on the summary, seems to deal with primarily or solely Wayland. Unfortunately that makes this description of `clight` untrue, since it is missing all color temperature controls on Wayland. Removing this portion of the table makes it true again.</p>
<hr />
<div>[[Category:Laptops]]<br />
[[Category:Power management]]<br />
[[ru:Backlight]]<br />
[[ja:バックライト]]<br />
Screen brightness might be tricky to control. On some machines physical hardware switches are missing and software solutions may not work well. However, it is generally possible to find a functional method for a given hardware. This article aims to summarize all possible ways to adjust the backlight.<br />
<br />
There are many ways to control brightness of a monitor, laptop or integrated panel (such as the iMac). According to [https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-intel/+bug/397617 these] [https://lore.kernel.org/patchwork/patch/528936/#708706 discussions] and this [https://wiki.ubuntu.com/Kernel/Debugging/Backlight wiki page] the control method can be divided into these categories:<br />
<br />
* brightness is controlled by vendor-specified hotkey and there is no interface for the OS to adjust the brightness.<br />
* brightness is controlled by either the [[#ACPI|ACPI]], graphic or platform driver. In this case, backlight control is exposed to the user through {{ic|/sys/class/backlight}} which can be used by user-space [[#Backlight utilities|backlight utilities]].<br />
* brightness is controlled by writing into a graphic card register through [[#setpci|setpci]].<br />
<br />
{{Note|Since OLED screens have no backlight, brightness cannot be controlled by changing backlight power on laptops equipped with an OLED screen. In this case see, perceived screen brightness can only be adjusted via [[#Color correction|software color correction]].}}<br />
<br />
== Hardware interfaces ==<br />
<br />
=== ACPI ===<br />
<br />
The brightness of the screen backlight is adjusted by setting the power level of the backlight LEDs or cathodes. The power level can often be controlled using the ACPI kernel module for video. An interface to this module is provided via a sysfs directory at {{ic|/sys/class/backlight/}}.<br />
<br />
The name of the directory depends on the graphics card model.<br />
<br />
{{hc|$ ls /sys/class/backlight/|<br />
acpi_video0<br />
}}<br />
<br />
In this case, the backlight is managed by an ATI graphics card. In the case of an Intel card, the directory is called {{ic|intel_backlight}}. In the following examples, {{ic|acpi_video0}} is used. If you use an Intel card, simply replace {{ic|acpi_video0}} with {{ic|intel_backlight}} in the examples.<br />
<br />
The directory contains the following files and subdirectories:<br />
<br />
{{hc|$ ls /sys/class/backlight/acpi_video0/|<br />
actual_brightness brightness max_brightness subsystem/ uevent <br />
bl_power device/ power/ type<br />
}}<br />
<br />
The maximum brightness can be displayed by reading from {{ic|max_brightness}}, which is often 15.<br />
<br />
{{hc|$ cat /sys/class/backlight/acpi_video0/max_brightness|<br />
15<br />
}}<br />
<br />
The brightness can be set by writing a number to {{ic|brightness}}. Attempting to set a brightness greater than the maximum results in an error.<br />
<br />
# echo 5 > /sys/class/backlight/acpi_video0/brightness<br />
<br />
By default, only {{ic|root}} can change the brightness by this method. To allow users in the {{ic|video}} group to change the brightness, a [[udev]] rule such as the following can be used:<br />
<br />
{{hc|/etc/udev/rules.d/backlight.rules|<nowiki><br />
ACTION=="add", SUBSYSTEM=="backlight", KERNEL=="acpi_video0", RUN+="/bin/chgrp video /sys/class/backlight/%k/brightness"<br />
ACTION=="add", SUBSYSTEM=="backlight", KERNEL=="acpi_video0", RUN+="/bin/chmod g+w /sys/class/backlight/%k/brightness"<br />
</nowiki>}}<br />
<br />
==== Kernel command-line options ====<br />
<br />
Sometimes ACPI does not work well due to different motherboard implementations and ACPI quirks. This results in, for instance, inaccurate brightness notifications. This includes some laptops with dual graphics (e.g., Nvidia/Radeon dedicated GPU with Intel/AMD integrated GPU). Additionally, ACPI sometimes needs to register its own {{ic|acpi_video0}} backlight even if one already exists (such as {{ic|intel_backlight}}), which can be done by adding one of the following [[kernel parameters]]:<br />
<br />
acpi_backlight=video<br />
acpi_backlight=vendor<br />
acpi_backlight=native<br />
<br />
If you find that changing the {{ic|acpi_video0}} backlight does not actually change the brightness, you may need to use {{ic|1=acpi_backlight=none}}.<br />
<br />
{{Tip|<br />
* On Nvidia Optimus laptops, the kernel parameter {{ic|nomodeset}} can interfere with the ability to adjust the backlight.<br />
* On an Asus notebooks you might also need to load the {{ic|asus-nb-wmi}} [[kernel module]].<br />
* Disabling legacy boot on Dell XPS13 breaks backlight support.<br />
}}<br />
<br />
==== Udev rule ====<br />
<br />
If the ACPI interface is available, the backlight level can be set at boot using a [[udev]] rule:<br />
<br />
{{hc|/etc/udev/rules.d/81-backlight.rules|<nowiki><br />
# Set backlight level to 8<br />
SUBSYSTEM=="backlight", ACTION=="add", KERNEL=="acpi_video0", ATTR{brightness}="8"</nowiki>}}<br />
<br />
{{Note|The systemd-backlight service restores the previous backlight brightness level at boot. To prevent conflicts for the above rules, see [[#Save and restore functionality]].}}<br />
<br />
{{Tip|To set the backlight depending on power state, see [[Power management#Using a script and an udev rule]] and use your favourite [[#Backlight utilities|backlight utility]] in the script.}}<br />
<br />
=== setpci ===<br />
<br />
In some cases (e.g. Intel Mobile 945GME [https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-intel/+bug/397617]), it is possible to set the register of the graphic card to adjust the backlight. It means you adjust the backlight by manipulating the hardware directly, which can be risky and generally is not a good idea. Not all of the graphic cards support this method.<br />
<br />
When using this method, you need to use {{ic|lspci}} first to find out where your graphic card is.<br />
# setpci -s 00:02.0 F4.B=0<br />
<br />
=== External monitors ===<br />
<br />
[[Wikipedia:Display_Data_Channel#DDC.2FCI|DDC/CI]] (Display Data Channel Command Interface) can be used to communicate with external monitors implementing MCCS (Monitor Control Command Set) over I2C. DDC can control brightness, contrast, inputs, etc on supported monitors. Settings available via the OSD (On-Screen Display) panel can usually also be managed via DDC. The [[kernel module]] {{ic|i2c-dev}} may need to be loaded if the {{ic|/dev/i2c-*}} devices do not exist.<br />
<br />
[http://www.ddcutil.com/ ddcutil] can be used to query and set brightness settings:<br />
<br />
{{hc|# ddcutil capabilities {{!}} grep "Feature: 10"|<br />
Feature: 10 (Brightness)<br />
}}<br />
<br />
{{hc|1=# ddcutil getvcp 10|2=<br />
VCP code 0x10 (Brightness ): current value = 60, max value = 100<br />
}}<br />
<br />
# ddcutil setvcp 10 70<br />
<br />
Alternatively, one may use {{AUR|ddcci-driver-linux-dkms}} to expose external monitors in sysfs. Then, after loading the {{ic|ddcci}} [[kernel module]], one can use any [[#Backlight utilities|backlight utility]].<br />
<br />
== Switch off the backlight ==<br />
<br />
{{Merge|DPMS|Same topic.}}<br />
<br />
Switching off the backlight (for example when one locks a notebook) can be useful to conserve battery energy. Ideally the following command should work for any [[Xorg]] graphical session:<br />
<br />
xset dpms force off<br />
<br />
The backlight should switch on again on mouse movement or keyboard input. Alternately {{ic|xset s}} could be used for a similar effect.<br />
<br />
If the previous commands do not work, there is a chance that ''vbetool'' may work. Note, however, that in this case the backlight must be manually activated again. The command is as follows:<br />
<br />
$ vbetool dpms off<br />
<br />
To activate the backlight again:<br />
<br />
$ vbetool dpms on<br />
<br />
For example, this can be put to use when closing the notebook lid using [[Acpid]].<br />
<br />
== Save and restore functionality ==<br />
<br />
The [[systemd]] package includes the service {{ic|systemd-backlight@.service}}, which is enabled by default and "static". It saves the backlight brightness level at shutdown and restores it at boot. The service uses the ACPI method described in [[#ACPI]], generating services for each folder found in {{ic|/sys/class/backlight/}}. For example, if there is a folder named {{ic|acpi_video0}}, it generates a service called {{ic|systemd-backlight@backlight:acpi_video0.service}}. When using other methods of setting the backlight at boot, it is recommended to stop systemd-backlight from restoring the backlight by setting the [[kernel parameters]] parameter {{ic|1=systemd.restore_state=0}}. See {{man|8|systemd-backlight@.service}} for details.<br />
<br />
{{Note|Some laptops have multiple video cards (e.g. Optimus) and the backlight restoration fails. Try [[systemd#Using units|masking]] an instance of the service (e.g. {{ic|systemd-backlight@backlight:acpi_video1}} for {{ic|acpi_video1}}).}}<br />
<br />
The {{AUR|relight}} package provides an alternative systemd-based method of saving and restoring screen brightness.<br />
<br />
Additionally, the {{AUR|brillo}} and {{Pkg|light}} utilities support save and restore functionality. These two may be more useful if one wishes to restore the screen brightness on a per-user basis, however no systemd units are provided to accomplish this.<br />
<br />
== Backlight utilities ==<br />
<br />
The utilities in the following table can be used to control screen brightness. All of them are compatible with Wayland and do not require X. Some (like {{ic|brightnessctl}} or {{ic|light}}) add udev rules to allow members of the {{ic|video}} (or {{ic|input}}) group to modify brightness.<br />
<br />
{| class="wikitable sortable"<br />
! Package name<br />
! Controls keyboard backlights<br />
! Reacts to ambient brightness<br />
! Language<br />
! License<br />
! Notes<br />
|-<br />
| {{Pkg|acpilight}}<br />
| {{Yes}}<br />
| {{No}}<br />
| Python3<br />
| GPL-3.0-or-later<br />
| "xbacklight" compatible<br />
|-<br />
| {{AUR|brightd}}<br />
| {{No}}<br />
| {{No}}<br />
| C<br />
| GPL-2.0<br />
| Dims the screen when there is no user input for some time.<br />
|-<br />
| {{Pkg|brightnessctl}}<br />
| {{Yes}}<br />
| {{No}}<br />
| C<br />
| MIT<br />
| -<br />
|-<br />
| {{AUR|brillo}}<br />
| {{Yes}}<br />
| {{No}}<br />
| C<br />
| GPL-3.0-only<br />
| Supports smooth and relative adjustments.<br />
|-<br />
| {{AUR|calise}}<br />
| {{No}}<br />
| {{Yes}}<br />
| Python2<br />
| GPL-3.0<br />
| -<br />
|-<br />
| {{AUR|clight}}<br />
| {{Yes}}<br />
| {{Yes}}<br />
| C<br />
| GPL-3.0-or-later<br />
| Smoothly dims brightness after a timeout. Turns webcam into an ambient light sensor.<br />
|-<br />
| {{AUR|enlighten-git}}<br />
| {{No}}<br />
| {{No}}<br />
| C<br />
| GPL-3.0-or-later<br />
| -<br />
|-<br />
| {{AUR|illum-git}}<br />
| {{No}}<br />
| {{No}}<br />
| C<br />
| AGPL-3.0<br />
| Reacts to key presses.<br />
|-<br />
| {{Pkg|light}}<br />
| {{Yes}}<br />
| {{No}}<br />
| C<br />
| GPL-3.0-only<br />
| -<br />
|-<br />
| {{AUR|lux}}<br />
| {{No}}<br />
| {{No}}<br />
| Shell<br />
| MIT<br />
| -<br />
|-<br />
| {{AUR|macbook-lighter}}<br />
| {{Yes}}<br />
| {{Yes}}<br />
| Bash,Perl<br />
| GPL<br />
| Macbook screen/keyboard backlight CLI and auto-adjust on ambient light.<br />
|}<br />
<br />
=== xbacklight ===<br />
<br />
Brightness can be set using the {{Pkg|xorg-xbacklight}} package.<br />
<br />
{{Note|1=<nowiki></nowiki><br />
* xbacklight only works with [[Intel]]. Other drivers (e.g. [[Radeon]]) did not add support for the RandR backlight property. <br />
* xbacklight currently does not work with the modesetting driver [https://gitlab.freedesktop.org/xorg/xserver/issues/47].<br />
}}<br />
<br />
To set brightness to 50% of maximum:<br />
<br />
$ xbacklight -set 50<br />
<br />
Increments can be used instead of absolute values, for example to increase or decrease brightness by 10%:<br />
<br />
$ xbacklight -inc 10<br />
$ xbacklight -dec 10<br />
<br />
{{Tip|These commands can be bound to keyboard keys as described in [[Keyboard shortcuts#Xorg]].}}<br />
<br />
If you get the "No outputs have backlight property" error, it is because xrandr/xbacklight does not choose the right directory in {{ic|/sys/class/backlight}}. You can specify the directory by setting the {{ic|Backlight}} option of the device section in {{ic|/etc/X11/xorg.conf.d/20-''video''.conf}}. For instance, if the name of the directory is {{ic|intel_backlight}} and using the [[Intel]] driver, the device section may be configured as follows:<br />
<br />
{{hc|/etc/X11/xorg.conf.d/20-intel.conf|<br />
Section "Device"<br />
Identifier "Intel Graphics" <br />
Driver "intel"<br />
Option "Backlight" "intel_backlight"<br />
EndSection}}<br />
<br />
See {{Bug|27677}} and https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=651741 for details.<br />
<br />
If you have enabled [[Intel graphics#Fastboot|Intel Fastboot]] you might also get the {{ic|No outputs have backlight property}} error. In this case, trying the above method may cause Xorg to crash on start up. You should disable it to fix the issue. It is [https://bugs.freedesktop.org/show_bug.cgi?id=108225 known] to cause issues with brightness control.<br />
<br />
=== Using DBus with Gnome ===<br />
<br />
Brightness can also be adjusted as the gnome controls do. Changes are reflected in the gnome UI using this method.<br />
gdbus call --session --dest org.gnome.SettingsDaemon.Power --object-path /org/gnome/SettingsDaemon/Power --method org.freedesktop.DBus.Properties.Set org.gnome.SettingsDaemon.Power.Screen Brightness "<int32 50>"<br />
<br />
Steps in brightness for keyboard contol can be implemented with this method as well.<br />
gdbus call --session --dest org.gnome.SettingsDaemon.Power --object-path /org/gnome/SettingsDaemon/Power --method org.gnome.SettingsDaemon.Power.Screen.StepUp<br />
gdbus call --session --dest org.gnome.SettingsDaemon.Power --object-path /org/gnome/SettingsDaemon/Power --method org.gnome.SettingsDaemon.Power.Screen.StepDown<br />
<br />
== Color correction ==<br />
<br />
Color correction does not change the backlight power, it just modifies the video LUT table: this means that your battery life will be unaffected by the change. Nevertheless, it could be useful when no backlight control is available (desktop PCs or laptops with OLED screens).<br />
<br />
* {{App|Clight|User daemon utility that aims to fully manage your display. It can manage the screen temperature depending on the current time of the day, just like redshift does. It tries to use {{Pkg|geoclue}} to retrieve the user position if neither latitude or longitude are set in the configuration file. It also supports fixed times for sunrise and sunset.|https://github.com/FedeDP/Clight|{{AUR|clight-git}}}}<br />
* {{App|icc-brightness|Control OLED display brightness by applying ICC color profiles.|https://github.com/udifuchs/icc-brightness}}<br />
* {{App|Monica|Monitor calibration tool. It works as frontend to xgamma to alter the gamma correction.|https://web.archive.org/web/20090815224839/http://www.pcbypaul.com/software/monica.html|{{Pkg|monica}}}}<br />
* {{App|[[Redshift]]|Color temperature adjustment tool. It adjusts the color temperature of your screen according to your surroundings. This may help your eyes hurt less if you are working in front of the screen at night. This program is inspired by [[Wikipedia:f.lux|f.lux]].|http://jonls.dk/redshift/|{{Pkg|redshift}}}}<br />
* {{App|xcalib|Lightweight monitor calibration loader which can load an ICC monitor profile to be shared across desktop applications.|https://github.com/OpenICC/xcalib|{{AUR|xcalib}}}}<br />
* {{App|xgamma|Alter a monitor's gamma correction.|https://xorg.freedesktop.org/|{{Pkg|xorg-xgamma}}}}<br />
<br />
=== NVIDIA settings ===<br />
<br />
Users of [[NVIDIA|NVIDIA's proprietary drivers]] users can change display brightness via the nvidia-settings utility under "X Server Color Correction." However, note that this has absolutely nothing to do with backlight (intensity), it merely adjusts the color output. (Reducing brightness this way is a power-inefficient last resort when all other options fail; increasing brightness spoils your color output completely, in a way similar to overexposed photos.)<br />
<br />
=== Increase brightness above maximum level ===<br />
<br />
You can use [[xrandr]] to increase perceived brightness above its maximum level (the same caveats mentioned above for Nvidia apply):<br />
<br />
$ xrandr --output ''output_name'' --brightness 2<br />
<br />
This should roughly double luma in the image. It will sacrifice color quality for brightness, nevertheless it is particularly suited for situations where the ambient light is very bright (e.g. sunlight).<br />
<br />
== Troubleshooting ==<br />
<br />
=== Backlight PWM modulation frequency (Intel i915 only) ===<br />
<br />
Laptops with LED backlight are known to have screen flicker sometimes. This is because the most efficient way of controlling LED backlight brightness is by turning the LED's on and off very quickly varying the amount of time they are on. <br />
<br />
However, the frequency of the switching, so-called PWM (pulse-width modulation) frequency, may not be high enough for the eye to perceive it as a single brightness and instead see flickering. This causes some people to have symptoms such as headaches and eyestrain.<br />
<br />
If you have an Intel i915 GPU, then it may be possible to adjust PWM frequency to eliminate flicker.<br />
<br />
Period of PWM (inverse to frequency) is stored in 2 higher bytes of {{ic|0xC8254}} register (if you are using the Intel GM45 chipset use address {{ic|0x61254}} instead). To manipulate registers values install {{Pkg|intel-gpu-tools}} from the official repositories.<br />
<br />
To increase the frequency, period must be reduced. For example:<br />
<br />
{{hc|# intel_reg read 0xC8254|<br />
0xC8254 : 0x12281228|<br />
}}<br />
<br />
Then to double PWM frequency divide 2 higher bytes (4 higher hex digits) by 2 and write back resulting value, keeping lower bytes unchanged:<br />
<br />
# intel_reg write 0xC8254 0x09141228<br />
<br />
You can use online calculator to calculate desired value http://devbraindom.blogspot.com/2013/03/eliminate-led-screen-flicker-with-intel.html<br />
<br />
To set new frequency automatically, consider writing an udev rule or install {{AUR|intelpwm-udev}}.<br />
<br />
=== Inverted Brightness (Intel i915 only) ===<br />
<br />
Symptoms:<br />
* after installing {{pkg|xf86-video-intel}} systemd-backlight.service turns off the backlight during boot<br />
** possible solution: mask systemd-backlight.service<br />
* switching from X to another VT turns the backlight off<br />
* the brightness keys are inverted (i.e. turning up the brightness makes the screen darker)<br />
<br />
This problem may be solved by adding {{ic|i915.invert_brightness&#61;1}} to the list of [[kernel parameters]].<br />
<br />
=== Unable to control eDP Panel brightness (Intel i915 only) ===<br />
<br />
Embedded Display Port (eDP) v1.2 introduced a new display panel control protocol for backlight and other controls that works through the AUX channel.[https://www.vesa.org/wp-content/uploads/2010/12/DisplayPort-DevCon-Presentation-eDP-Dec-2010-v3.pdf]<br />
<br />
By default the i915 driver tries to use PWM to control backlight brightness, which might not work.<br />
<br />
To set the backlight through writes to DPCD registers using the AUX channel set {{ic|1=i915.enable_dpcd_backlight}} as [[kernel parameter]] or set in {{ic|/etc/modprobe.d/i915.conf}}:<br />
<br />
{{hc|/etc/modprobe.d/i915.conf|<nowiki><br />
options i915 enable_dpcd_backlight<br />
</nowiki>}}<br />
<br />
=== sysfs modified but no brightness change ===<br />
<br />
{{Note|This behavior and their workarounds have been confirmed on the Dell M6700 with Nvidia K5000m (BIOS version prior to A10) and Clevo P750ZM (Eurocom P5 Pro Extreme) with Nvidia 980m.}}<br />
<br />
On some systems, the brightness hotkeys on your keyboard correctly modify the values of the acpi interface in {{ic|/sys/class/backlight/acpi_video0/actual_brightness}} but the brightness of the screen is not changed. Brightness applets from [[desktop environments]] may also show changes to no effect.<br />
<br />
If you have tested the recommended kernel parameters and only {{ic|xbacklight}} works, then you may be facing an incompatibility between your BIOS and kernel driver.<br />
<br />
In this case the only solution is to wait for a fix either from the BIOS or GPU driver manufacturer.<br />
<br />
A workaround is to use the inotify kernel api to trigger {{ic|xbacklight}} each time the value of {{ic|/sys/class/backlight/acpi_video0/actual_brightness}} changes.<br />
<br />
First [[install]] {{Pkg|inotify-tools}}. Then create a script around inotify that will be launched upon each boot or through [[autostart]].<br />
<br />
{{hc|/usr/local/bin/xbacklightmon|<nowiki><br />
#!/bin/sh<br />
<br />
path=/sys/class/backlight/acpi_video0<br />
<br />
luminance() {<br />
read -r level < "$path"/actual_brightness<br />
factor=$((100 / max))<br />
printf '%d\n' "$((level * factor))"<br />
}<br />
<br />
read -r max < "$path"/max_brightness<br />
<br />
xbacklight -set "$(luminance)"<br />
<br />
inotifywait -me modify --format '' "$path"/actual_brightness | while read; do<br />
xbacklight -set "$(luminance)"<br />
done<br />
</nowiki>}}<br />
=== Backlight not working in MATE ===<br />
<br />
Make sure the {{Pkg|mate-power-manager}} package is [[install]]ed.</div>Phwelo