https://wiki.archlinux.org/api.php?action=feedcontributions&user=Archerus&feedformat=atomArchWiki - User contributions [en]2024-03-29T05:58:54ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=NVIDIA&diff=709623NVIDIA2022-01-11T17:33:36Z<p>Archerus: /* Custom kernel */ add important details that driver version is important for custom kernels, too; add a note that DKMS by default doesn't sign modules and no nvidia module will load without that or without disabling Kernel Lockdown kernel config option</p>
<hr />
<div>[[Category:Graphics]]<br />
[[Category:X server]]<br />
[[de:Nvidia]]<br />
[[fa:اِنویدیا]]<br />
[[fr:NVIDIA]]<br />
[[it:NVIDIA]]<br />
[[ja:NVIDIA]]<br />
[[ru:NVIDIA]]<br />
[[zh-hans:NVIDIA]]<br />
{{Related articles start}}<br />
{{Related|NVIDIA/Tips and tricks}}<br />
{{Related|NVIDIA/Troubleshooting}}<br />
{{Related|Nouveau}}<br />
{{Related|NVIDIA Optimus}}<br />
{{Related|PRIME}}<br />
{{Related|Bumblebee}}<br />
{{Related|nvidia-xrun}}<br />
{{Related|Xorg}}<br />
{{Related|Vulkan}}<br />
{{Related articles end}}<br />
<br />
This article covers the proprietary [https://www.nvidia.com NVIDIA] graphics card driver. For the open-source driver, see [[Nouveau]]. If you have a laptop with hybrid Intel/NVIDIA graphics, see [[NVIDIA Optimus]] instead.<br />
<br />
== Installation ==<br />
<br />
{{Warning|Avoid installing the NVIDIA driver through the package provided from the NVIDIA website. Installation through [[pacman]] allows upgrading the driver together with the rest of the system.}}<br />
<br />
These instructions are for those using the stock {{Pkg|linux}} or {{Pkg|linux-lts}} packages. For custom kernel setup, skip to the [[#Custom kernel|next]] subsection.<br />
<br />
1. If you do not know what graphics card you have, find out by issuing:<br />
:{{bc|$ lspci -k {{!}} grep -A 2 -E "(VGA{{!}}3D)"}}<br />
<br />
2. Determine the necessary driver version for your card by:<br />
:* Finding the code name (e.g. NV50, NVC0, etc.) on [https://nouveau.freedesktop.org/wiki/CodeNames/ Nouveau wiki's code names page] or [https://gitlab.freedesktop.org/nouveau/wiki/-/blob/master/sources/CodeNames.mdwn].<br />
:* Looking up the name in NVIDIA's [https://www.nvidia.com/object/IO_32667.html legacy card list]: if your card is not there you can use the latest driver.<br />
:* Visiting NVIDIA's [https://www.nvidia.com/Download/index.aspx driver download site].<br />
<br />
3. Install the appropriate driver for your card:<br />
:* For the Maxwell (NV110) series and newer, including: GeForce 930~, 10-20, Quadro/Tesla/Tegra cards and newer (for a detailed list, see [https://download.nvidia.com/XFree86/Linux-x86_64/495.44/README/supportedchips.html Official Readme]), [[install]] the {{Pkg|nvidia}} package (for use with the {{Pkg|linux}} kernel) or {{Pkg|nvidia-lts}} (for use with the {{Pkg|linux-lts}} kernel) package.<br />
::* If these packages do not work, {{AUR|nvidia-beta}} may have a newer driver version that offers support.<br />
:* For the Kepler (NVE0) series (including GeForce 630-920) from around 2013-2014, [[install]] the {{AUR|nvidia-470xx-dkms}} package.<br />
:* For GeForce 400/500/600 series cards [NVCx and NVDx] from around 2010-2011, [[install]] the {{AUR|nvidia-390xx-dkms}} package.<br />
:* For even older cards (released in 2010 or earlier), have a look at [[#Unsupported drivers]].<br />
<br />
4. For 32-bit application support, also install the corresponding ''lib32'' nvidia package from the [[multilib]] repository (e.g. {{Pkg|lib32-nvidia-utils}}).<br />
<br />
5. Reboot. The {{Pkg|nvidia}} package contains a file which blacklists the {{ic|nouveau}} module, so rebooting is necessary.<br />
<br />
Once the driver has been installed, continue to [[#Xorg configuration]] or [[#Wayland]].<br />
<br />
=== Unsupported drivers ===<br />
<br />
If you have a GeForce 300 series card or older (released in 2010 or earlier), Nvidia no longer supports drivers for your card. This means that these drivers [https://nvidia.custhelp.com/app/answers/detail/a_id/3142/ do not support the current Xorg version]. It thus might be easier if you use the [[Nouveau]] driver, which supports the old cards with the current Xorg.<br />
<br />
However, Nvidia's legacy drivers are still available and might provide better 3D performance/stability.<br />
<br />
* For GeForce 8/9, ION and 100-300 series cards [NV5x, NV8x, NV9x and NVAx], [[install]] the {{AUR|nvidia-340xx-dkms}} package.<br />
* GeForce 7 series cards and older [NV6x, NV4x and lower] do not have a driver packaged for Arch Linux.<br />
<br />
=== Custom kernel ===<br />
<br />
If you are using a custom kernel, compilation of the Nvidia kernel modules can be automated with [[DKMS]].<br />
<br />
Install the {{Pkg|nvidia-dkms}} package (or a specific branch). The Nvidia module will be rebuilt after every Nvidia or kernel update thanks to the DKMS [[pacman hook]]. Note: you must still select appropriate driver version for your card, as per section above (i.e. use nvidia-470xx-dkms for Kepler (NVE0) series cards).<br />
<br />
Also note that if your custom kernel configuration option "Kernel Lockdown" is enabled then you must: either sign your DKMS modules (https://wiki.archlinux.org/title/Signed_kernel_modules) or disable Kernel Lockdown option. Otherwise, you will not be able to load any DKMS nvidia modules.<br />
<br />
=== DRM kernel mode setting ===<br />
<br />
To enable DRM ([[Wikipedia:Direct Rendering Manager|Direct Rendering Manager]]) [[kernel mode setting]], add the {{ic|1=nvidia-drm.modeset=1}} [[kernel parameter]].<br />
<br />
{{Note|1=<nowiki/><br />
* The NVIDIA driver does '''not''' provide an {{ic|fbdev}} driver for the high-resolution console for the kernel compiled-in {{ic|vesafb}} module. However, the kernel compiled-in {{ic|efifb}} module supports a high-resolution console on EFI systems. This method requires GRUB or rEFInd and is described in [[NVIDIA/Tips and tricks#Fixing terminal resolution]].[https://forums.fedoraforum.org/showthread.php?t=306271][https://www.reddit.com/r/archlinux/comments/4gwukx/nvidia_drivers_and_high_resolution_tty_possible/][https://www.reddit.com/r/archlinux/comments/86lqc5/tty_resolution_nvidia_psaish/].<br />
* Nvidia drivers prior to version 470 (e.g. {{AUR|nvidia-390xx-dkms}}) do not support hardware accelerated XWayland, causing non-Wayland-native applications to suffer from poor performance in Wayland sessions.<br />
}}<br />
<br />
==== Early loading ====<br />
<br />
For basic functionality, just adding the kernel parameter should suffice. If you want to ensure it is loaded at the earliest possible occasion, or are noticing startup issues (such as the {{ic|nvidia}} kernel module being loaded after the [[display manager]]) you can add {{ic|nvidia}}, {{ic|nvidia_modeset}}, {{ic|nvidia_uvm}} and {{ic|nvidia_drm}} to the initramfs.<br />
<br />
===== mkinitcpio =====<br />
<br />
If you use [[mkinitcpio]] initramfs, follow [[mkinitcpio#MODULES]] to add modules.<br />
<br />
If added to the initramfs, do not forget to run [[mkinitcpio]] every time there is a {{Pkg|nvidia}} driver update. See [[#pacman hook]] to automate these steps.<br />
<br />
===== Booster =====<br />
<br />
If you use [[Booster]], follow [[Booster#Early module loading]].<br />
<br />
===== pacman hook =====<br />
<br />
To avoid the possibility of forgetting to update [[initramfs]] after an NVIDIA driver upgrade, you may want to use a [[pacman hook]]:<br />
<br />
{{hc|/etc/pacman.d/hooks/nvidia.hook|2=<br />
[Trigger]<br />
Operation=Install<br />
Operation=Upgrade<br />
Operation=Remove<br />
Type=Package<br />
Target=nvidia<br />
Target=linux<br />
# Change the linux part above and in the Exec line if a different kernel is used<br />
<br />
[Action]<br />
Description=Update Nvidia module in initcpio<br />
Depends=mkinitcpio<br />
When=PostTransaction<br />
NeedsTargets<br />
Exec=/bin/sh -c 'while read -r trg; do case $trg in linux) exit 0; esac; done; /usr/bin/mkinitcpio -P'<br />
}}<br />
<br />
Make sure the {{ic|Target}} package set in this hook is the one you have installed in steps above (e.g. {{ic|nvidia}}, {{ic|nvidia-dkms}}, {{ic|nvidia-lts}} or {{ic|nvidia-ck-''something''}}).<br />
<br />
{{Note|The complication in the {{ic|Exec}} line above is in order to avoid running ''mkinitcpio'' multiple times if both {{ic|nvidia}} and {{ic|linux}} get updated. In case this does not bother you, the {{ic|1=Target=linux}} and {{ic|NeedsTargets}} lines may be dropped, and the {{ic|Exec}} line may be reduced to simply {{ic|1=Exec=/usr/bin/mkinitcpio -P}}.}}<br />
<br />
=== Hardware accelerated video decoding ===<br />
<br />
Accelerated video decoding with VDPAU is supported on GeForce 8 series cards and newer. Accelerated video decoding with NVDEC is supported on Fermi (~400 series) cards and newer. See [[Hardware video acceleration]] for details.<br />
<br />
=== Hardware accelerated video encoding with NVENC ===<br />
<br />
NVENC requires the {{ic|nvidia_uvm}} module and the creation of related device nodes under {{ic|/dev}}. Manually loading the {{ic|nvidia_uvm}} module will not create the device nodes, but invoking the {{ic|nvidia-modprobe}} utility will. Create {{ic|/etc/udev/rules.d/70-nvidia.rules}}:<br />
<br />
{{hc|/etc/udev/rules.d/70-nvidia.rules|2=<br />
ACTION=="add", DEVPATH=="/bus/pci/drivers/nvidia", RUN+="/usr/bin/nvidia-modprobe -c0 -u"<br />
}}<br />
<br />
== Xorg configuration ==<br />
<br />
The proprietary NVIDIA graphics card driver does not need any Xorg server configuration file. You can [[Xorg#Running|start X]] to see if the Xorg server will function correctly without a configuration file. However, it may be required to create a configuration file (prefer {{ic|/etc/X11/xorg.conf.d/20-nvidia.conf}} over {{ic|/etc/X11/xorg.conf}}) in order to adjust various settings. This configuration can be generated by the NVIDIA Xorg configuration tool, or it can be created manually. If created manually, it can be a minimal configuration (in the sense that it will only pass the basic options to the [[Xorg]] server), or it can include a number of settings that can bypass Xorg's auto-discovered or pre-configured options.<br />
<br />
{{Tip|For more configuration options, see [[NVIDIA/Troubleshooting]].}}<br />
<br />
=== Automatic configuration ===<br />
<br />
The NVIDIA package includes an automatic configuration tool to create an Xorg server configuration file ({{ic|xorg.conf}}) and can be run by:<br />
<br />
# nvidia-xconfig<br />
<br />
This command will auto-detect and create (or edit, if already present) the {{ic|/etc/X11/xorg.conf}} configuration according to present hardware.<br />
<br />
If there are instances of DRI, ensure they are commented out:<br />
<br />
# Load "dri"<br />
<br />
Double check your {{ic|/etc/X11/xorg.conf}} to make sure your default depth, horizontal sync, vertical refresh, and resolutions are acceptable.<br />
<br />
=== nvidia-settings ===<br />
<br />
The {{Pkg|nvidia-settings}} tool lets you configure many options using either CLI or GUI. Running {{ic|nvidia-settings}} without any options launches the GUI, for CLI options see {{man|1|nvidia-settings}}.<br />
<br />
You can run the CLI/GUI as a non-root user and save the settings to {{ic|~/.nvidia-settings-rc}} or save it as [[Xorg#Using_xorg.conf|xorg.conf]] by using the option ''Save to X configuration File'' for a multi-user environment.<br />
<br />
To load the {{ic|~/.nvidia-settings-rc}} for the current user:<br />
<br />
$ nvidia-settings --load-config-only<br />
<br />
See [[Autostarting]] to start this command on every boot.<br />
<br />
{{Note|[[Xorg]] may not start or crash on startup after saving {{ic|nvidia-settings}} changes. Adjusting or deleting the generated {{ic|~/.nvidia-settings-rc}} and/or [[Xorg]] file(s) should recover normal startup.}}<br />
<br />
{{Note|[[Cinnamon]] desktop can override changes made through {{ic|nvidia-settings}}. You can [[Cinnamon#Cinnamon_overrides_settings_in_xorg.conf|adjust the Cinnamon startup behavior to prevent that]].}}<br />
<br />
=== Manual configuration ===<br />
<br />
Several tweaks (which cannot be enabled [[#Automatic configuration|automatically]] or with [[#nvidia-settings|nvidia-settings]]) can be performed by editing your configuration file. The Xorg server will need to be restarted before any changes are applied.<br />
<br />
See [https://download.nvidia.com/XFree86/Linux-x86_64/470.63.01/README/ NVIDIA Accelerated Linux Graphics Driver README and Installation Guide] for additional details and options.<br />
<br />
==== Minimal configuration ====<br />
<br />
A basic configuration block in {{ic|20-nvidia.conf}} (or deprecated in {{ic|xorg.conf}}) would look like this:<br />
<br />
{{hc|/etc/X11/xorg.conf.d/20-nvidia.conf|<br />
Section "Device"<br />
Identifier "Nvidia Card"<br />
Driver "nvidia"<br />
VendorName "NVIDIA Corporation"<br />
BoardName "GeForce GTX 1050 Ti"<br />
EndSection<br />
}}<br />
<br />
==== Disabling the logo on startup ====<br />
<br />
Add the {{ic|"NoLogo"}} option under section {{ic|Device}}:<br />
<br />
Option "NoLogo" "1"<br />
<br />
==== Overriding monitor detection ====<br />
<br />
The {{ic|"ConnectedMonitor"}} option under section {{ic|Device}} allows to override monitor detection when X server starts, which may save a significant amount of time at start up. The available options are: {{ic|"CRT"}} for analog connections, {{ic|"DFP"}} for digital monitors and {{ic|"TV"}} for televisions.<br />
<br />
The following statement forces the NVIDIA driver to bypass startup checks and recognize the monitor as DFP:<br />
<br />
Option "ConnectedMonitor" "DFP"<br />
<br />
{{Note|Use "CRT" for all analog 15 pin VGA connections, even if the display is a flat panel. "DFP" is intended for DVI, HDMI, or DisplayPort digital connections only.}}<br />
<br />
==== Enabling brightness control ====<br />
<br />
{{Out of date|Potentially obsolete[https://lists.archlinux.org/pipermail/aur-requests/2021-April/051047.html], upstream package also seems to be ancient.}}<br />
<br />
Add to kernel paremeters:<br />
<br />
nvidia.NVreg_RegistryDwords=EnableBrightnessControl=1<br />
<br />
Alternatively, add the following under section {{ic|Device}}:<br />
<br />
Option "RegistryDwords" "EnableBrightnessControl=1"<br />
<br />
If brightness control still does not work with this option, try installing {{AUR|nvidia-bl-dkms}}.<br />
<br />
{{Note|Installing {{AUR|nvidia-bl-dkms}} will provide a {{ic|/sys/class/backlight/nvidia_backlight/}} interface to backlight brightness control, but your system may continue to issue backlight control changes on {{ic|/sys/class/backlight/acpi_video0/}}. One solution in this case is to watch for changes on, e.g. {{ic|acpi_video0/brightness}} with ''inotifywait'' and to translate and write to {{ic|nvidia_backlight/brightness}} accordingly. See [[Backlight#sysfs modified but no brightness change]].}}<br />
<br />
==== Enabling SLI ====<br />
<br />
{{Warning|Since the GTX 10xx Series (1080, 1070, 1060, etc) only 2-way SLI is supported. 3-way and 4-way SLI may work for CUDA/OpenCL applications, but will most likely break all OpenGL applications.}}<br />
<br />
Taken from the NVIDIA driver's [ftp://download.nvidia.com/XFree86/Linux-x86/355.11/README/xconfigoptions.html README] Appendix B: ''This option controls the configuration of SLI rendering in supported configurations.'' A "supported configuration" is a computer equipped with an SLI-Certified Motherboard and 2 or 3 SLI-Certified GeForce GPUs.<br />
<br />
Find the first GPU's PCI Bus ID using {{ic|lspci}}:<br />
<br />
{{hc|# lspci {{!}} grep "VGA{{!}}3D controller"|<br />
00:02.0 VGA compatible controller: Intel Corporation Xeon E3-1200 v2/3rd Gen Core processor Graphics Controller (rev 09)<br />
03:00.0 VGA compatible controller: NVIDIA Corporation GK107 [GeForce GTX 650] (rev a1)<br />
04:00.0 VGA compatible controller: NVIDIA Corporation GK107 [GeForce GTX 650] (rev a1)<br />
08:00.0 3D controller: NVIDIA Corporation GM108GLM [Quadro K620M / Quadro M500M] (rev a2)<br />
}}<br />
<br />
Add the BusID (3 in the previous example) under section {{ic|Device}}:<br />
<br />
BusID "PCI:3:0:0"<br />
<br />
{{Note|The format is important. The BusID value must be specified as {{ic|"PCI:<BusID>:0:0"}}}}<br />
<br />
Add the desired SLI rendering mode value under section {{ic|Screen}}:<br />
<br />
Option "SLI" "AA"<br />
<br />
The following table presents the available rendering modes.<br />
<br />
{| class="wikitable"<br />
! Value !! Behavior<br />
|-<br />
| 0, no, off, false, Single || Use only a single GPU when rendering.<br />
|-<br />
| 1, yes, on, true, Auto || Enable SLI and allow the driver to automatically select the appropriate rendering mode.<br />
|-<br />
| AFR || Enable SLI and use the alternate frame rendering mode.<br />
|-<br />
| SFR || Enable SLI and use the split frame rendering mode.<br />
|-<br />
| AA || Enable SLI and use SLI antialiasing. Use this in conjunction with full scene antialiasing to improve visual quality.<br />
|}<br />
<br />
Alternatively, you can use the ''nvidia-xconfig'' utility to insert these changes into {{ic|xorg.conf}} with a single command:<br />
<br />
# nvidia-xconfig --busid=PCI:3:0:0 --sli=AA<br />
<br />
To verify that SLI mode is enabled from a shell:<br />
<br />
{{hc|$ nvidia-settings -q all {{!}} grep SLIMode|<br />
Attribute 'SLIMode' (arch:0.0): AA <br />
'SLIMode' is a string attribute.<br />
'SLIMode' is a read-only attribute.<br />
'SLIMode' can use the following target types: X Screen.<br />
}}<br />
<br />
{{Warning|After enabling SLI, your system may become frozen/non-responsive upon starting xorg. It is advisable that you disable your display manager before restarting.}}<br />
<br />
If this configuration does not work, you may need to use the PCI Bus ID provided by {{ic|nvidia-settings}},<br />
<br />
{{hc|$ nvidia-settings -q all {{!}} grep -i pcibus|<br />
Attribute 'PCIBus' (host:0[gpu:0]): 101.<br />
'PCIBus' is an integer attribute.<br />
'PCIBus' is a read-only attribute.<br />
'PCIBus' can use the following target types: GPU, SDI Input Device.<br />
Attribute 'PCIBus' (host:0[gpu:1]): 23.<br />
'PCIBus' is an integer attribute.<br />
'PCIBus' is a read-only attribute.<br />
'PCIBus' can use the following target types: GPU, SDI Input Device.<br />
}}<br />
<br />
and comment out the PrimaryGPU option in your xorg.d configuration,<br />
<br />
{{hc|/usr/share/X11/xorg.conf.d/10-nvidia-drm-outputclass.conf|<br />
...<br />
<br />
Section "OutputClass"<br />
...<br />
# Option "PrimaryGPU" "yes"<br />
...<br />
}}<br />
<br />
Using this configuration may also solve any graphical boot issues.<br />
<br />
=== Multiple monitors ===<br />
<br />
See [[Multihead]] for more general information.<br />
<br />
==== Using nvidia-settings ====<br />
<br />
The [[#nvidia-settings|nvidia-settings]] tool can configure multiple monitors.<br />
<br />
For CLI configuration, first get the {{ic|CurrentMetaMode}} by running:<br />
<br />
{{hc|$ nvidia-settings -q CurrentMetaMode|2=<br />
Attribute 'CurrentMetaMode' (hostnmae:0.0): id=50, switchable=no, source=nv-control :: DPY-1: 2880x1620 @2880x1620 +0+0 {ViewPortIn=2880x1620, ViewPortOut=2880x1620+0+0}<br />
}}<br />
<br />
Save everything after the {{ic|::}} to the end of the attribute (in this case: {{ic|1=DPY-1: 2880x1620 @2880x1620 +0+0 {ViewPortIn=2880x1620, ViewPortOut=2880x1620+0+0}<nowiki/>}}) and use to reconfigure your displays with {{ic|1=nvidia-settings --assign "CurrentMetaMode=''your_meta_mode''"}}.<br />
<br />
{{Tip|You can create shell aliases for the different monitor and resolution configurations you use.}}<br />
<br />
==== ConnectedMonitor ====<br />
<br />
If the driver does not properly detect a second monitor, you can force it to do so with ConnectedMonitor. <br />
<br />
{{hc|/etc/X11/xorg.conf|<br />
<br />
Section "Monitor"<br />
Identifier "Monitor1"<br />
VendorName "Panasonic"<br />
ModelName "Panasonic MICRON 2100Ex"<br />
HorizSync 30.0 - 121.0 # this monitor has incorrect EDID, hence Option "UseEDIDFreqs" "false"<br />
VertRefresh 50.0 - 160.0<br />
Option "DPMS"<br />
EndSection<br />
<br />
Section "Monitor"<br />
Identifier "Monitor2"<br />
VendorName "Gateway"<br />
ModelName "GatewayVX1120"<br />
HorizSync 30.0 - 121.0<br />
VertRefresh 50.0 - 160.0<br />
Option "DPMS"<br />
EndSection<br />
<br />
Section "Device"<br />
Identifier "Device1"<br />
Driver "nvidia"<br />
Option "NoLogo"<br />
Option "UseEDIDFreqs" "false"<br />
Option "ConnectedMonitor" "CRT,CRT"<br />
VendorName "NVIDIA Corporation"<br />
BoardName "GeForce 6200 LE"<br />
BusID "PCI:3:0:0"<br />
Screen 0<br />
EndSection<br />
<br />
Section "Device"<br />
Identifier "Device2"<br />
Driver "nvidia"<br />
Option "NoLogo"<br />
Option "UseEDIDFreqs" "false"<br />
Option "ConnectedMonitor" "CRT,CRT"<br />
VendorName "NVIDIA Corporation"<br />
BoardName "GeForce 6200 LE"<br />
BusID "PCI:3:0:0"<br />
Screen 1<br />
EndSection<br />
<br />
}}<br />
<br />
The duplicated device with {{ic|Screen}} is how you get X to use two monitors on one card without {{ic|TwinView}}. Note that {{ic|nvidia-settings}} will strip out any {{ic|ConnectedMonitor}} options you have added.<br />
<br />
==== TwinView ====<br />
<br />
You want only one big screen instead of two. Set the {{ic|TwinView}} argument to {{ic|1}}. This option should be used if you desire compositing. TwinView only works on a per card basis, when all participating monitors are connected to the same card.<br />
<br />
Option "TwinView" "1"<br />
<br />
Example configuration:<br />
<br />
{{hc|/etc/X11/xorg.conf.d/10-monitor.conf|<br />
Section "ServerLayout"<br />
Identifier "TwinLayout"<br />
Screen 0 "metaScreen" 0 0<br />
EndSection<br />
<br />
Section "Monitor"<br />
Identifier "Monitor0"<br />
Option "Enable" "true"<br />
EndSection<br />
<br />
Section "Monitor"<br />
Identifier "Monitor1"<br />
Option "Enable" "true"<br />
EndSection<br />
<br />
Section "Device"<br />
Identifier "Card0"<br />
Driver "nvidia"<br />
VendorName "NVIDIA Corporation"<br />
<br />
#refer to the link below for more information on each of the following options.<br />
Option "HorizSync" "DFP-0: 28-33; DFP-1: 28-33"<br />
Option "VertRefresh" "DFP-0: 43-73; DFP-1: 43-73"<br />
Option "MetaModes" "1920x1080, 1920x1080"<br />
Option "ConnectedMonitor" "DFP-0, DFP-1"<br />
Option "MetaModeOrientation" "DFP-1 LeftOf DFP-0"<br />
EndSection<br />
<br />
Section "Screen"<br />
Identifier "metaScreen"<br />
Device "Card0"<br />
Monitor "Monitor0"<br />
DefaultDepth 24<br />
Option "TwinView" "True"<br />
SubSection "Display"<br />
Modes "1920x1080"<br />
EndSubSection<br />
EndSection<br />
}}<br />
<br />
[https://download.nvidia.com/XFree86/Linux-x86_64/440.31/README/configtwinview.html Device option information].<br />
<br />
If you have multiple cards that are SLI capable, it is possible to run more than one monitor attached to separate cards (for example: two cards in SLI with one monitor attached to each). The "MetaModes" option in conjunction with SLI Mosaic mode enables this. Below is a configuration which works for the aforementioned example and runs [[GNOME]] flawlessly.<br />
<br />
{{hc|/etc/X11/xorg.conf.d/10-monitor.conf|<br />
Section "Device"<br />
Identifier "Card A"<br />
Driver "nvidia"<br />
BusID "PCI:1:00:0"<br />
EndSection<br />
<br />
Section "Device"<br />
Identifier "Card B"<br />
Driver "nvidia"<br />
BusID "PCI:2:00:0"<br />
EndSection<br />
<br />
Section "Monitor"<br />
Identifier "Right Monitor"<br />
EndSection<br />
<br />
Section "Monitor"<br />
Identifier "Left Monitor"<br />
EndSection<br />
<br />
Section "Screen"<br />
Identifier "Right Screen"<br />
Device "Card A"<br />
Monitor "Right Monitor"<br />
DefaultDepth 24<br />
Option "SLI" "Mosaic"<br />
Option "Stereo" "0"<br />
Option "BaseMosaic" "True"<br />
Option "MetaModes" "GPU-0.DFP-0: 1920x1200+4480+0, GPU-1.DFP-0:1920x1200+0+0"<br />
SubSection "Display"<br />
Depth 24<br />
EndSubSection<br />
EndSection<br />
<br />
Section "Screen"<br />
Identifier "Left Screen"<br />
Device "Card B"<br />
Monitor "Left Monitor"<br />
DefaultDepth 24<br />
Option "SLI" "Mosaic"<br />
Option "Stereo" "0"<br />
Option "BaseMosaic" "True"<br />
Option "MetaModes" "GPU-0.DFP-0: 1920x1200+4480+0, GPU-1.DFP-0:1920x1200+0+0"<br />
SubSection "Display"<br />
Depth 24<br />
EndSubSection<br />
EndSection<br />
<br />
Section "ServerLayout"<br />
Identifier "Default"<br />
Screen 0 "Right Screen" 0 0<br />
Option "Xinerama" "0"<br />
EndSection<br />
}}<br />
<br />
===== Vertical sync using TwinView =====<br />
<br />
If you are using TwinView and vertical sync (the "Sync to VBlank" option in '''nvidia-settings'''), you will notice that only one screen is being properly synced, unless you have two identical monitors. Although '''nvidia-settings''' does offer an option to change which screen is being synced (the "Sync to this display device" option), this does not always work. A solution is to add the following environment variables at startup, for example append in {{ic|/etc/profile}}:<br />
<br />
export __GL_SYNC_TO_VBLANK=1<br />
export __GL_SYNC_DISPLAY_DEVICE=DFP-0<br />
export VDPAU_NVIDIA_SYNC_DISPLAY_DEVICE=DFP-0<br />
<br />
You can change {{ic|DFP-0}} with your preferred screen ({{ic|DFP-0}} is the DVI port and {{ic|CRT-0}} is the VGA port). You can find the identifier for your display from '''nvidia-settings''' in the "X Server XVideoSettings" section.<br />
<br />
===== Gaming using TwinView =====<br />
<br />
In case you want to play fullscreen games when using TwinView, you will notice that games recognize the two screens as being one big screen. While this is technically correct (the virtual X screen really is the size of your screens combined), you probably do not want to play on both screens at the same time. <br />
<br />
To correct this behavior for SDL, try:<br />
<br />
export SDL_VIDEO_FULLSCREEN_HEAD=1<br />
<br />
For OpenGL, add the appropriate Metamodes to your xorg.conf in section {{ic|Device}} and restart X:<br />
<br />
Option "Metamodes" "1680x1050,1680x1050; 1280x1024,1280x1024; 1680x1050,NULL; 1280x1024,NULL;"<br />
<br />
Another method that may either work alone or in conjunction with those mentioned above is [[Gaming#Starting_games_in_a_separate_X_server|starting games in a separate X server]].<br />
<br />
==== Mosaic mode ====<br />
<br />
Mosaic mode is the only way to use more than 2 monitors across multiple graphics cards with compositing. Your window manager may or may not recognize the distinction between each monitor. Mosaic mode requires a valid SLI configuration. Even if using Base mode without SLI, the GPUs must still be SLI capable/compatible.<br />
<br />
===== Base Mosaic =====<br />
<br />
Base Mosaic mode works on any set of Geforce 8000 series or higher GPUs. It cannot be enabled from within the nvidia-setting GUI. You must either use the ''nvidia-xconfig'' command line program or edit {{ic|xorg.conf}} by hand. Metamodes must be specified. The following is an example for four DFPs in a 2x2 configuration, each running at 1920x1024, with two DFPs connected to two cards:<br />
<br />
$ nvidia-xconfig --base-mosaic --metamodes="GPU-0.DFP-0: 1920x1024+0+0, GPU-0.DFP-1: 1920x1024+1920+0, GPU-1.DFP-0: 1920x1024+0+1024, GPU-1.DFP-1: 1920x1024+1920+1024"<br />
<br />
{{Note|While the documentation lists a 2x2 configuration of monitors, [https://devtalk.nvidia.com/default/topic/579449/linux/basemosaic-v295-vs-v310-vs-v325-only-up-to-three-screens-/post/3954733/#3954733 GeForce cards are artificially limited to 3 monitors] in Base Mosaic mode. Quadro cards support more than 3 monitors. As of September 2014, the Windows driver has dropped this artificial restriction, but it remains in the Linux driver.}}<br />
<br />
===== SLI Mosaic =====<br />
<br />
If you have an SLI configuration and each GPU is a Quadro FX 5800, Quadro Fermi or newer then you can use SLI Mosaic mode. It can be enabled from within the nvidia-settings GUI or from the command line with:<br />
<br />
$ nvidia-xconfig --sli=Mosaic --metamodes="GPU-0.DFP-0: 1920x1024+0+0, GPU-0.DFP-1: 1920x1024+1920+0, GPU-1.DFP-0: 1920x1024+0+1024, GPU-1.DFP-1: 1920x1024+1920+1024"<br />
<br />
== Wayland ==<br />
<br />
See [[Wayland#Requirements]] for more information.<br />
<br />
For further configuration options, take a look at the wiki pages or documentation of the respective compositor.<br />
<br />
Regarding XWayland take a look at [[Wayland#XWayland]].<br />
<br />
== Tips and tricks ==<br />
<br />
See [[NVIDIA/Tips and tricks]].<br />
<br />
== Troubleshooting ==<br />
<br />
See [[NVIDIA/Troubleshooting]].<br />
<br />
== See also ==<br />
<br />
* [https://forums.developer.nvidia.com/t/current-graphics-driver-releases/28500 Current graphics driver releases in official Nvidia Forum]<br />
* [https://forums.developer.nvidia.com/c/gpu-unix-graphics/linux/148 NVIDIA Developers Forum - Linux Subforum]</div>Archerushttps://wiki.archlinux.org/index.php?title=Backlight_(%D0%A0%D1%83%D1%81%D1%81%D0%BA%D0%B8%D0%B9)&diff=466400Backlight (Русский)2017-01-23T13:22:20Z<p>Archerus: </p>
<hr />
<div>[[Category:Laptops (Русский)]]<br />
[[Category:Power management (Русский)]]<br />
[[Category:Русский]]<br />
[[en:Backlight]]<br />
[[ja:バックライト]]<br />
{{Unmaintained (Русский)}}<br />
{{Translateme (Русский)|Эта статья нуждается в переводе}}<br />
Иногда возникают проблемы с яркостью. На многих машинах уже нет физического переключателя, а вместо него используются программные решения, которые не всегда работают как положено. Найдите работающий способ для вашего оборудования! Слишком яркие экраны могут привести к потере зрения!<br />
<br />
Существует много способов регулировать яркость подсветки монитора, ноутбука или встроенной экранной панели (как в iMac) с помощью программного обеспечения, но в зависимости от оборудования и модели иногда доступны только некоторые варианты. Целью этой статьи является подытоживание всех возможных путей регулирования яркости подсветки экрана.<br />
<br />
== Обзор ==<br />
<br />
Существует несколько способов контролировать яркость. В соответствии с этим обуждением [https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-intel/+bug/397617] и этой wiki страницей [https://wiki.ubuntu.com/Kernel/Debugging/Backlight], способы контроля делятся на следующие категории:<br />
* яркость управляется горячей клавишей, определённой производителем и нет интерфейса для того, чтобы ОС могла настраивать яркость<br />
* яркость управляется операционной системой:<br />
** яркость можно контролировать через ACPI<br />
** яркость можно контролировать через графический драйвер<br />
Все методы доступны пользователю через {{ic|/sys/class/backlight}} и xrandr/xbacklight может выбрать один способ контролировать яркость. Пока еще не совсем понятно, который из способов xbacklight предпочитает по умолчанию.<br />
''Смотрите {{Bug|27677}} для xbacklight, если вам выдает "No outputs have backlight property."'' Есть временное решение, в случае если xrandr/xbacklight не выбирает нужную папку в {{ic|/sys/class/backlight}}: Вы можете указать ту, которая вам нужна в xorg.conf, внеся имя той папки в поле "Backlight" секции Device (смотрите https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=651741 внизу страницы для более подробной информации).<br />
* яркость контролируется регистром HW с помощью setpci<br />
<br />
== ACPI ==<br />
Яркость подсветки экрана регулируется установлением уровня питания светодиодов или катодов. Уровень питания может часто контролироваться с помощью ACPI модуля ядра для видео. Интерфейс к этому модулю доступен через папку sysfs в {{ic|/sys/class/backlight}}.<br />
<br />
Имя папки зависит от модели видеокарты.<br />
{{hc|# ls /sys/class/backlight/|<br />
intel_backlight<br />
}}<br />
<br />
Именно эта подсветка - управляется видеокартой Intel. В видеокарте ATI она называется {{ic|acpi_video0}}. В следующем примере используется acpi_video0.<br />
<br />
Папка содержит следующие файлы и папки::<br />
<br />
actual_brightness brightness max_brightness subsystem/ uevent <br />
bl_power device/ power/ type<br />
<br />
Максимальную яркость можно прочитать в {{ic|max_brightness}}, которая обычно равна 15.<br />
<br />
{{hc|/sys/class/backlight/acpi_video0/max_brightness|<br />
15<br />
}}<br />
<br />
Яркость может быть изменена, написав число в {{ic|brightness}}. Здесь невозможно использовать число выше максимальной яркости. <br />
<br />
# tee /sys/class/backlight/acpi_video0/brightness <<< 5<br />
<br />
=== Kernel command-line options ===<br />
<br />
Sometimes, ACPI does not work well due to different motherboard implementations and ACPI quirks. This includes some laptops with dual graphics (e.g. Nvidia/Radeon dedicated GPU with Intel/AMD integrated GPU). On Nvidia Optimus laptops, the kernel parameter nomodeset can interfere with the ability to adjust the backlight. Additionally, ACPI sometimes register its own {{ic|acpi_video0}} backlight even if one already exists (such as {{ic|intel_backlight}}), which results in non working backlight keys. You can try adding the following kernel parameters in your [[bootloader]] to stop ACPI from registering its own backlight interface if one already exists:<br />
<br />
video.use_native_backlight=1<br />
<br />
This is the default as of {{pkg|linux}} 3.16. If that does not work, you can try to adjust the list of supported OS interfaces:<br />
<br />
acpi_osi="!Windows 2012"<br />
<br />
{{Tip|1=<br />
On an Asus notebooks you might also need to do:<br />
<br />
{{bc|# modprobe asus-nb-wmi}}<br />
}}<br />
<br />
{{Note|Disabling legacy boot on Dell XPS13 breaks backlight support.}}<br />
<br />
=== Udev rule ===<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 />
The systemd-backlight service restores the previous backlight brightness level at boot, whereas this rule sets it to a fixed value. If you want to use this rule, it is necessary to mask the system-backlight service, as explained in [[#systemd-backlight service]].<br />
<br />
== Switching off the backlight ==<br />
<br />
Switching off the backlight (for example when one locks the notebook) can be useful to conserve battery energy. Ideally the following command inside of a graphical session should work:<br />
sleep 1 && xset dpms force off<br />
The backlight should switch on again on mouse movement or keyboard input. If the previous command does not work, there is a chance that {{ic|vbetool}} works. Note, however, that in this case the backlight must be manually activated again. The command is as follows:<br />
vbetool dpms off<br />
To activate the backlight again:<br />
vbetool dpms on<br />
<br />
For example, this can be put to use when closing the notebook lid as outlined in the entry for [[Acpid#Laptop_Monitor_Power_Off|Acipd]]{{Broken section link}}.<br />
<br />
== systemd-backlight service ==<br />
The [[systemd]] package includes the service 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 [[Backlight#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 mask the service systemd-backlight@.service.<br />
<br />
== Backlight utilities ==<br />
<br />
=== xbacklight ===<br />
<br />
You can adjust the backlight through the xorg-server command {{ic|xbacklight}}. The utility is provided by the {{Pkg|xorg-xbacklight}} package in [extra].<br />
<br />
A useful demonstration was posted by [http://www.youtube.com/watch?v=_pi3iKMAJcY gotbletu on YouTube]. He suggests the following commands to adjust the backlight:<br />
<br />
* brighten up:<br />
xbacklight -inc 40<br />
<br />
* dim down:<br />
xbacklight -dec 40<br />
<br />
{{Tip|These commands can be bound to keyboard keys as described in [[Extra keyboard keys in Xorg]].}}<br />
<br />
=== xcalib ===<br />
<br />
The package {{AUR|xcalib}} ([http://xcalib.sourceforge.net/ upstream url]) is available in the [[AUR]] and can be used to dim the screen. Again, the user gotbletu posted a demonstration on [http://www.youtube.com/watch?v=A9xsvntT6i4 Youtube]. This program can correct gamma, invert colors and reduce contrast, the latter of which we use in this case:<br />
<br />
* dim down:<br />
xcalib -co 40 -a<br />
<br />
This program uses ICC technology to interact with X11 and while the screen is dimmed, you may find that the mouse cursor is just as bright as before.<br />
<br />
=== redshift ===<br />
<br />
The program [[Redshift (Русский)|Redshift]] in the official repositories uses {{ic|randr}} to adjust the screen brightness depending on the time of day and your geographic position. It can also do RGB gamma corrections and set color temperatures. As with {{ic|xcalib}}, this is very much a software solution and the look of the mouse cursor is unaffected. To execute a single quick adjustment of the brightness, try something like this:<br />
<br />
redshift -o -l 0:0 -b 0.8 -t 6500:6500<br />
<br />
{{Tip|If your longitude is west or your latitude is south, you should input it as negative.<br />
Example for Berkeley, CA: <br />
redshift-gtk -l 37.8717:-122.2728 <br />
}}<br />
<br />
=== relight ===<br />
<br />
[http://xyne.archlinux.ca/projects/relight relight] is available in [http://xyne.archlinux.ca/repos Xyne's repos] and as package {{AUR|relight}} in the [[AUR]]. The package provides {{ic|relight.service}}, a [[systemd]] service to automatically restore previous backlight settings during reboot along using the ACPI method explained above, and ''relight-menu'', a dialog-based menu for selecting and configuring backlights for different screens.<br />
<br />
=== setpci (use with great care) ===<br />
<br />
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 />
=== Calise ===<br />
<br />
The software [http://calise.sourceforge.net/wordpress/ calise] can be found in AUR.<br />
* Stable version: {{AUR|calise}}<br />
* Development version: {{AUR|calise-git}} <br />
<br />
It basically computes ambient brightness, and set screen's correct backlight, simply making captures from the webcam, for laptop without light sensor.<br />
For more information, calise has its own wiki: [http://calise.sourceforge.net/mediawiki/index.php/Main_Page Calise wiki].<br />
<br />
The main features of this program are that it is very precise, very light on resource usage, and with the daemon version (.service file for systemd users available too), it has practically no impact on battery life.<br />
<br />
=== brightd ===<br />
<br />
Macbook-inspired {{AUR|brightd}} automatically dims (but does not put to standby) the screen when there is no user input for some time. A good companion of [[Display Power Management Signaling]] so that the screen does not blank out in a sudden.<br />
<br />
== KDE ==<br />
<br />
[[KDE]] users can adjust the backlight via ''System Settings > Power Management > Energy Saving''.<br />
If you want to set backlight before kdm just put in /usr/share/config/kdm/Xsetup :<br />
<br />
xbacklight -inc 10<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 />
== Backlight PWM modulation frequency (Intel i915 only) ==<br />
<br />
Laptops with LED backlight are known to have screen flicker sometimes. The reason for this, is that it is hard enough to dim LEDs by limiting direct current flowing through. It is easier to control brightness by switching LEDs on and off fast enough.<br />
<br />
However, frequency of the switching (so-called PWM modulation frequency) is not high enough actually, and some people may notice flicker either explicitly or by feeling headache and eyestrain.<br />
<br />
If you have an Intel i915 GPU, then it may be possible to adjust PWM modulation frequency to eliminate flicker.<br />
<br />
Install {{Pkg|intel-gpu-tools}} from the official repositories. Get value of the register, that determines PWM modulation frequency<br />
<br />
{{hc|# intel_reg_read 0xC8254|<br />
0xC8254 : 0x12281228<br />
}}<br />
<br />
The value returned represents period of PWM modulation. So to increase PWM modulation frequency, value of the register has to be reduced. For example, to double frequency from the previous listing, execute:<br />
<br />
# intel_reg_write 0xC8254 0x09140914<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 />
Refer to dedicated topic for details https://bbs.archlinux.org/viewtopic.php?pid=1245913<br />
<br />
If you are using the Intel GM45 chipset use address 0x61254 instead of 0xC8254.</div>Archerushttps://wiki.archlinux.org/index.php?title=Backlight_(%D0%A0%D1%83%D1%81%D1%81%D0%BA%D0%B8%D0%B9)&diff=466399Backlight (Русский)2017-01-23T13:21:25Z<p>Archerus: </p>
<hr />
<div>[[Category:Laptops (Русский)]]<br />
[[Category:Power management (Русский)]]<br />
[[Category:Русский]]<br />
[[en:Backlight]]<br />
[[ja:バックライト]]<br />
{{Unmaintained (Русский)}}<br />
{{Translateme (Русский)|Эта статья нуждается в переводе}}<br />
Иногда возникают проблемы с яркостью. На многих машинах уже нет физического переключателя, а вместо него используются программные решения, которые не всегда работают как положено. Найдите работающий способ для вашего оборудования! Слишком яркие экраны могут привести к потере зрения!<br />
<br />
Существует много способов регулировать яркость подсветки монитора, ноутбука или встроенной экранной панели (как в iMac) с помощью программного обеспечения, но в зависимости от оборудования и модели иногда доступны только некоторые варианты. Целью этой статьи является подытоживание всех возможных путей регулирования яркости подсветки экрана.<br />
<br />
== Обзор ==<br />
<br />
Существует несколько способов контролировать яркость. В соответствии с этим обуждением [https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-intel/+bug/397617] и этой wiki страницей [https://wiki.ubuntu.com/Kernel/Debugging/Backlight], способы контроля делятся на следующие категории:<br />
* яркость управляется горячей клавишей, определённой производителем и нет интерфейса для того, чтобы ОС могла настраивать яркость<br />
* яркость управляется операционной системой:<br />
** яркость можно контролировать через ACPI<br />
** яркость можно контролировать через графический драйвер<br />
Все методы доступны пользователю через {{ic|/sys/class/backlight}} и xrandr/xbacklight может выбрать один способ контролировать яркость. Пока еще не совсем понятно, который из способов xbacklight предпочитает по умолчанию.<br />
''Смотрите {{Bug|27677}} для xbacklight, если вам выдает "No outputs have backlight property."'' Есть временное решение, в случае если xrandr/xbacklight не выбирает нужную папку в {{ic|/sys/class/backlight}}: Вы можете указать ту, которая вам нужна в xorg.conf, внеся имя той папки в поле "Backlight" секции Device (смотрите https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=651741 внизу страницы для более подробной информации).<br />
* яркость контролируется регистром HW с помощью setpci<br />
<br />
== ACPI ==<br />
Яркость подсветки экрана регулируется установлением уровня питания светодиодов или катодов. Уровень питания может часто контролироваться с помощью ACPI модуля ядра для видео. Интерфейс к этому модулю доступен через папку sysfs в {{ic|/sys/class/backlight}}.<br />
<br />
Имя папки зависит от модели видеокарты.<br />
{{hc|# ls /sys/class/backlight/|<br />
intel_backlight<br />
}}<br />
<br />
Именно эта подсветка - управляется видеокартой Intel. В видеокарте ATI она называется {{ic|acpi_video0}}. В следующем примере используется acpi_video0.<br />
<br />
Папка содержит следующие файлы и папки::<br />
<br />
actual_brightness brightness max_brightness subsystem/ uevent <br />
bl_power device/ power/ type<br />
<br />
Максимальную яркость можно прочитать в {{ic|max_brightness}}, которая обычно равна 15.<br />
<br />
{{hc|/sys/class/backlight/acpi_video0/max_brightness|<br />
15<br />
}}<br />
<br />
Яркость может быть изменена, написав число в {{ic|brightness}}. Здесь невозможно использовать число вышемаксимальной яркости. <br />
<br />
# tee /sys/class/backlight/acpi_video0/brightness <<< 5<br />
<br />
=== Kernel command-line options ===<br />
<br />
Sometimes, ACPI does not work well due to different motherboard implementations and ACPI quirks. This includes some laptops with dual graphics (e.g. Nvidia/Radeon dedicated GPU with Intel/AMD integrated GPU). On Nvidia Optimus laptops, the kernel parameter nomodeset can interfere with the ability to adjust the backlight. Additionally, ACPI sometimes register its own {{ic|acpi_video0}} backlight even if one already exists (such as {{ic|intel_backlight}}), which results in non working backlight keys. You can try adding the following kernel parameters in your [[bootloader]] to stop ACPI from registering its own backlight interface if one already exists:<br />
<br />
video.use_native_backlight=1<br />
<br />
This is the default as of {{pkg|linux}} 3.16. If that does not work, you can try to adjust the list of supported OS interfaces:<br />
<br />
acpi_osi="!Windows 2012"<br />
<br />
{{Tip|1=<br />
On an Asus notebooks you might also need to do:<br />
<br />
{{bc|# modprobe asus-nb-wmi}}<br />
}}<br />
<br />
{{Note|Disabling legacy boot on Dell XPS13 breaks backlight support.}}<br />
<br />
=== Udev rule ===<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 />
The systemd-backlight service restores the previous backlight brightness level at boot, whereas this rule sets it to a fixed value. If you want to use this rule, it is necessary to mask the system-backlight service, as explained in [[#systemd-backlight service]].<br />
<br />
== Switching off the backlight ==<br />
<br />
Switching off the backlight (for example when one locks the notebook) can be useful to conserve battery energy. Ideally the following command inside of a graphical session should work:<br />
sleep 1 && xset dpms force off<br />
The backlight should switch on again on mouse movement or keyboard input. If the previous command does not work, there is a chance that {{ic|vbetool}} works. Note, however, that in this case the backlight must be manually activated again. The command is as follows:<br />
vbetool dpms off<br />
To activate the backlight again:<br />
vbetool dpms on<br />
<br />
For example, this can be put to use when closing the notebook lid as outlined in the entry for [[Acpid#Laptop_Monitor_Power_Off|Acipd]]{{Broken section link}}.<br />
<br />
== systemd-backlight service ==<br />
The [[systemd]] package includes the service 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 [[Backlight#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 mask the service systemd-backlight@.service.<br />
<br />
== Backlight utilities ==<br />
<br />
=== xbacklight ===<br />
<br />
You can adjust the backlight through the xorg-server command {{ic|xbacklight}}. The utility is provided by the {{Pkg|xorg-xbacklight}} package in [extra].<br />
<br />
A useful demonstration was posted by [http://www.youtube.com/watch?v=_pi3iKMAJcY gotbletu on YouTube]. He suggests the following commands to adjust the backlight:<br />
<br />
* brighten up:<br />
xbacklight -inc 40<br />
<br />
* dim down:<br />
xbacklight -dec 40<br />
<br />
{{Tip|These commands can be bound to keyboard keys as described in [[Extra keyboard keys in Xorg]].}}<br />
<br />
=== xcalib ===<br />
<br />
The package {{AUR|xcalib}} ([http://xcalib.sourceforge.net/ upstream url]) is available in the [[AUR]] and can be used to dim the screen. Again, the user gotbletu posted a demonstration on [http://www.youtube.com/watch?v=A9xsvntT6i4 Youtube]. This program can correct gamma, invert colors and reduce contrast, the latter of which we use in this case:<br />
<br />
* dim down:<br />
xcalib -co 40 -a<br />
<br />
This program uses ICC technology to interact with X11 and while the screen is dimmed, you may find that the mouse cursor is just as bright as before.<br />
<br />
=== redshift ===<br />
<br />
The program [[Redshift (Русский)|Redshift]] in the official repositories uses {{ic|randr}} to adjust the screen brightness depending on the time of day and your geographic position. It can also do RGB gamma corrections and set color temperatures. As with {{ic|xcalib}}, this is very much a software solution and the look of the mouse cursor is unaffected. To execute a single quick adjustment of the brightness, try something like this:<br />
<br />
redshift -o -l 0:0 -b 0.8 -t 6500:6500<br />
<br />
{{Tip|If your longitude is west or your latitude is south, you should input it as negative.<br />
Example for Berkeley, CA: <br />
redshift-gtk -l 37.8717:-122.2728 <br />
}}<br />
<br />
=== relight ===<br />
<br />
[http://xyne.archlinux.ca/projects/relight relight] is available in [http://xyne.archlinux.ca/repos Xyne's repos] and as package {{AUR|relight}} in the [[AUR]]. The package provides {{ic|relight.service}}, a [[systemd]] service to automatically restore previous backlight settings during reboot along using the ACPI method explained above, and ''relight-menu'', a dialog-based menu for selecting and configuring backlights for different screens.<br />
<br />
=== setpci (use with great care) ===<br />
<br />
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 />
=== Calise ===<br />
<br />
The software [http://calise.sourceforge.net/wordpress/ calise] can be found in AUR.<br />
* Stable version: {{AUR|calise}}<br />
* Development version: {{AUR|calise-git}} <br />
<br />
It basically computes ambient brightness, and set screen's correct backlight, simply making captures from the webcam, for laptop without light sensor.<br />
For more information, calise has its own wiki: [http://calise.sourceforge.net/mediawiki/index.php/Main_Page Calise wiki].<br />
<br />
The main features of this program are that it is very precise, very light on resource usage, and with the daemon version (.service file for systemd users available too), it has practically no impact on battery life.<br />
<br />
=== brightd ===<br />
<br />
Macbook-inspired {{AUR|brightd}} automatically dims (but does not put to standby) the screen when there is no user input for some time. A good companion of [[Display Power Management Signaling]] so that the screen does not blank out in a sudden.<br />
<br />
== KDE ==<br />
<br />
[[KDE]] users can adjust the backlight via ''System Settings > Power Management > Energy Saving''.<br />
If you want to set backlight before kdm just put in /usr/share/config/kdm/Xsetup :<br />
<br />
xbacklight -inc 10<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 />
== Backlight PWM modulation frequency (Intel i915 only) ==<br />
<br />
Laptops with LED backlight are known to have screen flicker sometimes. The reason for this, is that it is hard enough to dim LEDs by limiting direct current flowing through. It is easier to control brightness by switching LEDs on and off fast enough.<br />
<br />
However, frequency of the switching (so-called PWM modulation frequency) is not high enough actually, and some people may notice flicker either explicitly or by feeling headache and eyestrain.<br />
<br />
If you have an Intel i915 GPU, then it may be possible to adjust PWM modulation frequency to eliminate flicker.<br />
<br />
Install {{Pkg|intel-gpu-tools}} from the official repositories. Get value of the register, that determines PWM modulation frequency<br />
<br />
{{hc|# intel_reg_read 0xC8254|<br />
0xC8254 : 0x12281228<br />
}}<br />
<br />
The value returned represents period of PWM modulation. So to increase PWM modulation frequency, value of the register has to be reduced. For example, to double frequency from the previous listing, execute:<br />
<br />
# intel_reg_write 0xC8254 0x09140914<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 />
Refer to dedicated topic for details https://bbs.archlinux.org/viewtopic.php?pid=1245913<br />
<br />
If you are using the Intel GM45 chipset use address 0x61254 instead of 0xC8254.</div>Archerushttps://wiki.archlinux.org/index.php?title=Backlight_(%D0%A0%D1%83%D1%81%D1%81%D0%BA%D0%B8%D0%B9)&diff=466398Backlight (Русский)2017-01-23T13:09:17Z<p>Archerus: </p>
<hr />
<div>[[Category:Laptops (Русский)]]<br />
[[Category:Power management (Русский)]]<br />
[[Category:Русский]]<br />
[[en:Backlight]]<br />
[[ja:バックライト]]<br />
{{Unmaintained (Русский)}}<br />
{{Translateme (Русский)|Эта статья нуждается в переводе}}<br />
Иногда возникают проблемы с яркостью. На многих машинах уже нет физического переключателя, а вместо него используются программные решения, которые не всегда работают как положено. Найдите работающий способ для вашего оборудования! Слишком яркие экраны могут привести к потере зрения!<br />
<br />
Существует много способов регулировать яркость подсветки монитора, ноутбука или встроенной экранной панели (как в iMac) с помощью программного обеспечения, но в зависимости от оборудования и модели иногда доступны только некоторые варианты. Целью этой статьи является подытоживание всех возможных путей регулирования яркости подсветки экрана.<br />
<br />
== Обзор ==<br />
<br />
Существует несколько способов контролировать яркость. В соответствии с этим обуждением [https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-intel/+bug/397617] и этой wiki страницей [https://wiki.ubuntu.com/Kernel/Debugging/Backlight], способы контроля делятся на следующие категории:<br />
* яркость управляется горячей клавишей, определённой производителем и нет интерфейса для того, чтобы ОС могла настраивать яркость<br />
* яркость управляется операционной системой:<br />
** яркость можно контролировать через ACPI<br />
** яркость можно контролировать через графический драйвер<br />
Все методы доступны пользователю через {{ic|/sys/class/backlight}} и xrandr/xbacklight может выбрать один способ контролировать яркость. Пока еще не совсем понятно, который из способов xbacklight предпочитает по умолчанию.<br />
''Смотрите {{Bug|27677}} для xbacklight, если вам выдает "No outputs have backlight property."'' Есть временное решение, в случае если xrandr/xbacklight не выбирает нужную папку в {{ic|/sys/class/backlight}}: Вы можете указать ту, которая вам нужна в xorg.conf, внеся имя той папки в поле "Backlight" секции Device (смотрите https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=651741 внизу страницы для более подробной информации).<br />
* яркость контролируется регистром HW с помощью setpci<br />
<br />
== ACPI ==<br />
Яркость подсветки экрана регулируется установлением уровня питания светодиодов или катодов. Уровень питания может часто контролироваться с помощью ACPI модуля ядра для видео. Интерфейс к этому модулю доступен через папку sysfs в {{ic|/sys/class/backlight}}.<br />
<br />
Имя папки зависит от модели видеокарты.<br />
{{hc|# ls /sys/class/backlight/|<br />
intel_backlight<br />
}}<br />
<br />
This particular backlight is managed by an Intel graphics card. It is called {{ic|acpi_video0}} on an ATI card. In the following example, acpi_video0 is used.<br />
<br />
The directory contains the following files and folders:<br />
<br />
actual_brightness brightness max_brightness subsystem/ uevent <br />
bl_power device/ power/ type<br />
<br />
The maximum brightness can be found by reading from {{ic|max_brightness}}, which is often 15.<br />
<br />
{{hc|/sys/class/backlight/acpi_video0/max_brightness|<br />
15<br />
}}<br />
<br />
The brightness can be set by writing a number to {{ic|brightness}}. It is not possible to go any higher than the maximum brightness. <br />
<br />
# tee /sys/class/backlight/acpi_video0/brightness <<< 5<br />
<br />
=== Kernel command-line options ===<br />
<br />
Sometimes, ACPI does not work well due to different motherboard implementations and ACPI quirks. This includes some laptops with dual graphics (e.g. Nvidia/Radeon dedicated GPU with Intel/AMD integrated GPU). On Nvidia Optimus laptops, the kernel parameter nomodeset can interfere with the ability to adjust the backlight. Additionally, ACPI sometimes register its own {{ic|acpi_video0}} backlight even if one already exists (such as {{ic|intel_backlight}}), which results in non working backlight keys. You can try adding the following kernel parameters in your [[bootloader]] to stop ACPI from registering its own backlight interface if one already exists:<br />
<br />
video.use_native_backlight=1<br />
<br />
This is the default as of {{pkg|linux}} 3.16. If that does not work, you can try to adjust the list of supported OS interfaces:<br />
<br />
acpi_osi="!Windows 2012"<br />
<br />
{{Tip|1=<br />
On an Asus notebooks you might also need to do:<br />
<br />
{{bc|# modprobe asus-nb-wmi}}<br />
}}<br />
<br />
{{Note|Disabling legacy boot on Dell XPS13 breaks backlight support.}}<br />
<br />
=== Udev rule ===<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 />
The systemd-backlight service restores the previous backlight brightness level at boot, whereas this rule sets it to a fixed value. If you want to use this rule, it is necessary to mask the system-backlight service, as explained in [[#systemd-backlight service]].<br />
<br />
== Switching off the backlight ==<br />
<br />
Switching off the backlight (for example when one locks the notebook) can be useful to conserve battery energy. Ideally the following command inside of a graphical session should work:<br />
sleep 1 && xset dpms force off<br />
The backlight should switch on again on mouse movement or keyboard input. If the previous command does not work, there is a chance that {{ic|vbetool}} works. Note, however, that in this case the backlight must be manually activated again. The command is as follows:<br />
vbetool dpms off<br />
To activate the backlight again:<br />
vbetool dpms on<br />
<br />
For example, this can be put to use when closing the notebook lid as outlined in the entry for [[Acpid#Laptop_Monitor_Power_Off|Acipd]]{{Broken section link}}.<br />
<br />
== systemd-backlight service ==<br />
The [[systemd]] package includes the service 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 [[Backlight#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 mask the service systemd-backlight@.service.<br />
<br />
== Backlight utilities ==<br />
<br />
=== xbacklight ===<br />
<br />
You can adjust the backlight through the xorg-server command {{ic|xbacklight}}. The utility is provided by the {{Pkg|xorg-xbacklight}} package in [extra].<br />
<br />
A useful demonstration was posted by [http://www.youtube.com/watch?v=_pi3iKMAJcY gotbletu on YouTube]. He suggests the following commands to adjust the backlight:<br />
<br />
* brighten up:<br />
xbacklight -inc 40<br />
<br />
* dim down:<br />
xbacklight -dec 40<br />
<br />
{{Tip|These commands can be bound to keyboard keys as described in [[Extra keyboard keys in Xorg]].}}<br />
<br />
=== xcalib ===<br />
<br />
The package {{AUR|xcalib}} ([http://xcalib.sourceforge.net/ upstream url]) is available in the [[AUR]] and can be used to dim the screen. Again, the user gotbletu posted a demonstration on [http://www.youtube.com/watch?v=A9xsvntT6i4 Youtube]. This program can correct gamma, invert colors and reduce contrast, the latter of which we use in this case:<br />
<br />
* dim down:<br />
xcalib -co 40 -a<br />
<br />
This program uses ICC technology to interact with X11 and while the screen is dimmed, you may find that the mouse cursor is just as bright as before.<br />
<br />
=== redshift ===<br />
<br />
The program [[Redshift (Русский)|Redshift]] in the official repositories uses {{ic|randr}} to adjust the screen brightness depending on the time of day and your geographic position. It can also do RGB gamma corrections and set color temperatures. As with {{ic|xcalib}}, this is very much a software solution and the look of the mouse cursor is unaffected. To execute a single quick adjustment of the brightness, try something like this:<br />
<br />
redshift -o -l 0:0 -b 0.8 -t 6500:6500<br />
<br />
{{Tip|If your longitude is west or your latitude is south, you should input it as negative.<br />
Example for Berkeley, CA: <br />
redshift-gtk -l 37.8717:-122.2728 <br />
}}<br />
<br />
=== relight ===<br />
<br />
[http://xyne.archlinux.ca/projects/relight relight] is available in [http://xyne.archlinux.ca/repos Xyne's repos] and as package {{AUR|relight}} in the [[AUR]]. The package provides {{ic|relight.service}}, a [[systemd]] service to automatically restore previous backlight settings during reboot along using the ACPI method explained above, and ''relight-menu'', a dialog-based menu for selecting and configuring backlights for different screens.<br />
<br />
=== setpci (use with great care) ===<br />
<br />
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 />
=== Calise ===<br />
<br />
The software [http://calise.sourceforge.net/wordpress/ calise] can be found in AUR.<br />
* Stable version: {{AUR|calise}}<br />
* Development version: {{AUR|calise-git}} <br />
<br />
It basically computes ambient brightness, and set screen's correct backlight, simply making captures from the webcam, for laptop without light sensor.<br />
For more information, calise has its own wiki: [http://calise.sourceforge.net/mediawiki/index.php/Main_Page Calise wiki].<br />
<br />
The main features of this program are that it is very precise, very light on resource usage, and with the daemon version (.service file for systemd users available too), it has practically no impact on battery life.<br />
<br />
=== brightd ===<br />
<br />
Macbook-inspired {{AUR|brightd}} automatically dims (but does not put to standby) the screen when there is no user input for some time. A good companion of [[Display Power Management Signaling]] so that the screen does not blank out in a sudden.<br />
<br />
== KDE ==<br />
<br />
[[KDE]] users can adjust the backlight via ''System Settings > Power Management > Energy Saving''.<br />
If you want to set backlight before kdm just put in /usr/share/config/kdm/Xsetup :<br />
<br />
xbacklight -inc 10<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 />
== Backlight PWM modulation frequency (Intel i915 only) ==<br />
<br />
Laptops with LED backlight are known to have screen flicker sometimes. The reason for this, is that it is hard enough to dim LEDs by limiting direct current flowing through. It is easier to control brightness by switching LEDs on and off fast enough.<br />
<br />
However, frequency of the switching (so-called PWM modulation frequency) is not high enough actually, and some people may notice flicker either explicitly or by feeling headache and eyestrain.<br />
<br />
If you have an Intel i915 GPU, then it may be possible to adjust PWM modulation frequency to eliminate flicker.<br />
<br />
Install {{Pkg|intel-gpu-tools}} from the official repositories. Get value of the register, that determines PWM modulation frequency<br />
<br />
{{hc|# intel_reg_read 0xC8254|<br />
0xC8254 : 0x12281228<br />
}}<br />
<br />
The value returned represents period of PWM modulation. So to increase PWM modulation frequency, value of the register has to be reduced. For example, to double frequency from the previous listing, execute:<br />
<br />
# intel_reg_write 0xC8254 0x09140914<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 />
Refer to dedicated topic for details https://bbs.archlinux.org/viewtopic.php?pid=1245913<br />
<br />
If you are using the Intel GM45 chipset use address 0x61254 instead of 0xC8254.</div>Archerus