https://wiki.archlinux.org/api.php?action=feedcontributions&user=0xe4524ffe&feedformat=atomArchWiki - User contributions [en]2024-03-28T21:08:31ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=Hardware_video_acceleration&diff=590360Hardware video acceleration2019-11-27T13:12:02Z<p>0xe4524ffe: Updated information about libva-vdpau-driver to make it clear that vp9 8-bit decoding is supported, but not implemented.</p>
<hr />
<div>[[Category:Graphics]]<br />
[[Category:X server]]<br />
[[ja:ハードウェアビデオアクセラレーション]]<br />
[[ru:Hardware video acceleration]]<br />
[[zh-hans:Hardware video acceleration]]<br />
[[Wikipedia:Graphics processing unit#GPU accelerated video decoding|Hardware video acceleration]] makes it possible for the video card to decode/encode video, thus offloading the CPU and saving power.<br />
<br />
There are several ways to achieve this on Linux:<br />
<br />
* [https://www.freedesktop.org/wiki/Software/vaapi/ Video Acceleration API] (VA-API) is a specification and open source library to provide both hardware accelerated video encoding and decoding, developed by Intel.<br />
* [https://www.freedesktop.org/wiki/Software/VDPAU/ Video Decode and Presentation API for Unix] (VDPAU) is an open source library and API to offload portions of the video decoding process and video post-processing to the GPU video-hardware, developed by NVIDIA.<br />
* [https://developer.nvidia.com/nvidia-video-codec-sdk NVDECODE/NVENCODE] - proprietary APIs for hardware video acceleration used by NVIDIA Fermi, Kepler, Maxwell and Pascal generation GPUs.<br />
<br />
For pre-2007 video cards see [[XvMC]]. For comprehensive overview of driver and application support see [[#Comparison tables]].<br />
<br />
== Installation ==<br />
<br />
=== Intel ===<br />
<br />
[[Intel graphics]] open-source drivers support VA-API:<br />
<br />
* HD Graphics series starting from [https://github.com/intel/media-driver/#supported-platforms Broadwell] [[wikipedia:Template:Intel_processor_roadmap|(~2015)]] and newer are supported by {{Pkg|intel-media-driver}}.<br />
* GMA 4500 [https://01.org/linuxmedia/vaapi series] and newer GPUs up to [[wikipedia:Coffee_Lake|Coffee Lake]] are supported by {{Pkg|libva-intel-driver}}.<br />
* GMA 4500 H.264 decoding is supported by {{AUR|libva-intel-driver-g45-h264}}, see [[Intel#Hardware accelerated H.264 decoding on GMA 4500]].<br />
* Broadwell to Skylake VP9 decoding and Haswell to Skylake hybrid VP8 encoding is supported by {{AUR|intel-hybrid-codec-driver}}. [https://github.com/intel/intel-hybrid-driver/issues/21 VP9 decoding on Haswell crashes].<br />
<br />
=== NVIDIA ===<br />
<br />
[[Nouveau]] open-source driver supports both VA-API and VDPAU:<br />
<br />
* GeForce 8 series and newer GPUs up until GeForce GTX 750 are supported by {{Pkg|libva-mesa-driver}} and {{Pkg|mesa-vdpau}}.<br />
* [https://nouveau.freedesktop.org/wiki/VideoAcceleration/#firmware Requires] {{AUR|nouveau-fw}} firmware package, presently extracted from the NVIDIA binary driver.<br />
<br />
[[NVIDIA]] proprietary driver supports via {{Pkg|nvidia-utils}}:<br />
<br />
* VDPAU on [[Wikipedia:GeForce 8 series|GeForce 8 series]] and newer GPUs;<br />
* NVDECODE on [[Wikipedia:Fermi_(microarchitecture)|Fermi]] and newer GPUs [https://developer.download.nvidia.com/assets/cuda/files/NVIDIA_Video_Decoder.pdf];<br />
* NVENCODE on [[Wikipedia:Kepler_(microarchitecture)|Kepler]] and newer GPUs.<br />
<br />
=== ATI/AMD ===<br />
<br />
[[ATI]] and [[AMDGPU]] open-source drivers support both VA-API and VDPAU:<br />
<br />
* VA-API on Radeon HD 2000 and newer GPUs is supported by {{Pkg|libva-mesa-driver}}.<br />
* VDPAU on Radeon R300 and newer GPUs is supported by {{Pkg|mesa-vdpau}}.<br />
<br />
[[AMDGPU PRO]] proprietary driver is built on top of AMDGPU driver and supports both VA-API and VDPAU.<br />
<br />
=== Translation layers ===<br />
<br />
To get VA-API support when device driver provides none:<br />
<br />
* {{Pkg|libva-vdpau-driver}} – VDPAU backend for VA-API.<br />
* {{AUR|libva-vdpau-driver-chromium}} – VDPAU backend for VA-API, patched to work with [[Chromium]].<br />
* [[AMD Catalyst#Video acceleration|XvBA]] backend for VA-API is provided by proprietary [[AMD Catalyst]] driver.<br />
<br />
To get VDPAU support when device driver provides none:<br />
<br />
* {{Pkg|libvdpau-va-gl}} – VA-API backend for VDPAU, [https://github.com/i-rinat/libvdpau-va-gl/issues/67#issuecomment-318470175 only H.264 support].<br />
<br />
== Verification ==<br />
<br />
Your system may work perfectly out-of-the-box without needing any configuration. Therefore it is a good idea to start with this section to see that it is the case.<br />
<br />
{{Tip|[[mpv#Hardware video acceleration|mpv]] is great for testing hardware acceleration in practice.}}<br />
<br />
=== Verifying VA-API ===<br />
<br />
Verify the settings for VA-API by running {{ic|vainfo}}, which is provided by {{Pkg|libva-utils}}:<br />
<br />
{{hc|$ vainfo|<nowiki><br />
libva info: VA-API version 0.39.4<br />
libva info: va_getDriverName() returns 0<br />
libva info: Trying to open /usr/lib/dri/i965_drv_video.so<br />
libva info: Found init function __vaDriverInit_0_39<br />
libva info: va_openDriver() returns 0<br />
vainfo: VA-API version: 0.39 (libva 1.7.3)<br />
vainfo: Driver version: Intel i965 driver for Intel(R) Skylake - 1.7.3<br />
vainfo: Supported profile and entrypoints<br />
VAProfileMPEG2Simple : VAEntrypointVLD<br />
VAProfileMPEG2Simple : VAEntrypointEncSlice<br />
VAProfileMPEG2Main : VAEntrypointVLD<br />
VAProfileMPEG2Main : VAEntrypointEncSlice<br />
VAProfileH264ConstrainedBaseline: VAEntrypointVLD<br />
VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice<br />
VAProfileH264ConstrainedBaseline: VAEntrypointEncSliceLP<br />
VAProfileH264Main : VAEntrypointVLD<br />
VAProfileH264Main : VAEntrypointEncSlice<br />
VAProfileH264Main : VAEntrypointEncSliceLP<br />
VAProfileH264High : VAEntrypointVLD<br />
VAProfileH264High : VAEntrypointEncSlice<br />
VAProfileH264High : VAEntrypointEncSliceLP<br />
VAProfileH264MultiviewHigh : VAEntrypointVLD<br />
VAProfileH264MultiviewHigh : VAEntrypointEncSlice<br />
VAProfileH264StereoHigh : VAEntrypointVLD<br />
VAProfileH264StereoHigh : VAEntrypointEncSlice<br />
VAProfileVC1Simple : VAEntrypointVLD<br />
VAProfileVC1Main : VAEntrypointVLD<br />
VAProfileVC1Advanced : VAEntrypointVLD<br />
VAProfileNone : VAEntrypointVideoProc<br />
VAProfileJPEGBaseline : VAEntrypointVLD<br />
VAProfileJPEGBaseline : VAEntrypointEncPicture<br />
VAProfileVP8Version0_3 : VAEntrypointVLD<br />
VAProfileVP8Version0_3 : VAEntrypointEncSlice<br />
VAProfileHEVCMain : VAEntrypointVLD<br />
VAProfileHEVCMain : VAEntrypointEncSlice<br />
</nowiki>}}<br />
<br />
{{ic|VAEntrypointVLD}} means that your card is capable to decode this format, {{ic|VAEntrypointEncSlice}} means that you can encode to this format.<br />
<br />
In this example the {{ic|i965}} driver is used, as you can see in this line:<br />
<br />
libva info: Trying to open /usr/lib/dri/'''i965'''_drv_video.so<br />
<br />
If the following error is displayed when running {{ic|vainfo}}:<br />
<br />
libva info: va_openDriver() returns -1<br />
vaInitialize failed with error code -1 (unknown libva error),exit<br />
<br />
You need to configure the correct driver, see [[#Configuring VA-API]].<br />
<br />
=== Verifying VDPAU ===<br />
<br />
Install {{pkg|vdpauinfo}} to verify if the VDPAU driver is loaded correctly and retrieve a full report of the configuration:<br />
<br />
{{hc|$ vdpauinfo|<br />
display: :0 screen: 0<br />
API version: 1<br />
Information string: G3DVL VDPAU Driver Shared Library version 1.0<br />
<br />
Video surface:<br />
<br />
name width height types<br />
-------------------------------------------<br />
420 16384 16384 NV12 YV12 <br />
422 16384 16384 UYVY YUYV <br />
444 16384 16384 Y8U8V8A8 V8U8Y8A8 <br />
<br />
Decoder capabilities:<br />
<br />
name level macbs width height<br />
----------------------------------------------------<br />
MPEG1 --- not supported ---<br />
MPEG2_SIMPLE 3 9216 2048 1152<br />
MPEG2_MAIN 3 9216 2048 1152<br />
H264_BASELINE 41 9216 2048 1152<br />
H264_MAIN 41 9216 2048 1152<br />
H264_HIGH 41 9216 2048 1152<br />
VC1_SIMPLE 1 9216 2048 1152<br />
VC1_MAIN 2 9216 2048 1152<br />
VC1_ADVANCED 4 9216 2048 1152<br />
<br />
..<br />
}}<br />
<br />
== Configuration ==<br />
<br />
Although the video driver should automatically enable hardware video acceleration support for both VA-API and VDPAU, it may be needed to configure VA-API/VDPAU manually. Only continue to this section if you went through [[#Verification]].<br />
<br />
The default driver names, used if there is no other configuration present, are guess by the system. However, they are often hacked together and may not work. You can see the guessed values by running:<br />
<br />
{{hc|$ grep -iE 'vdpau {{!}} dri driver' /var/log/Xorg.0.log|<br />
(II) RADEON(0): [DRI2] DRI driver: radeonsi<br />
(II) RADEON(0): [DRI2] VDPAU driver: radeonsi<br />
}}<br />
<br />
In this case {{ic|radeonsi}} is the default for both VA-API and VDPAU.<br />
<br />
{{Note|If you use [[GDM]], run {{ic|journalctl -b {{!}} grep -iE 'vdpau {{!}} dri driver'}} instead.}}<br />
<br />
This does not represent the ''configuration'' however. The values above will not change even if you override them.<br />
<br />
=== Configuring VA-API ===<br />
<br />
You can override the [https://www.freedesktop.org/wiki/Software/vaapi/#driversback-endsthatimplementva-api driver] for VA-API by using the {{ic|LIBVA_DRIVER_NAME}} [[environment variable]]:<br />
<br />
* [[Intel graphics]]:<br />
** For {{Pkg|libva-intel-driver}} use {{ic|i965}}.<br />
** For {{Pkg|intel-media-driver}} use {{ic|iHD}}.<br />
* NVIDIA:<br />
** For [[Nouveau]] use {{ic|nouveau}}. <br />
** For [[NVIDIA]] use {{ic|vdpau}}.<br />
* ATI/AMD:<br />
** For [[AMDGPU]] driver use {{ic|radeonsi}}.<br />
** For [[AMD Catalyst]] use {{ic|fglrx}}.<br />
<br />
{{Note|<br />
* You can find the installed drivers in {{ic|/usr/lib/dri/}}. They are used as {{ic|/usr/lib/dri/'''${LIBVA_DRIVER_NAME}'''_drv_video.so}}.<br />
* Some drivers are installed several times under different names for compatibility reasons. You can see which by running {{ic|sha1sum /usr/lib/dri/*}}.<br />
* {{ic|LIBVA_DRIVERS_PATH}} can be used to overrule the VA-API drivers location.<br />
* Since version 12.0.1 {{Pkg|libva-mesa-driver}} provides {{ic|radeonsi}} instead of {{ic|gallium}}.<br />
}}<br />
<br />
=== Configuring VDPAU ===<br />
<br />
You can override the driver for VDPAU by using the {{ic|VDPAU_DRIVER}} [[environment variable]].<br />
<br />
The correct driver name depends on your setup:<br />
<br />
* For Intel Graphics or AMD Catalyst you [[#Failed to open VDPAU backend|need]] to set it to {{ic|va_gl}}.<br />
* For the open source AMD/ATI driver set it to the proper driver version depending on your GPU, see [[#Verification]].<br />
* For the open source Nouveau driver set it to {{ic|nouveau}}.<br />
* For NVIDIA's proprietary version set it to {{ic|nvidia}}.<br />
<br />
{{Note|<br />
* You can find the installed drivers in {{ic|/usr/lib/vdpau/}}. They are used as {{ic|/usr/lib/vdpau/libvdpau_'''${VDPAU_DRIVER}'''.so}}.<br />
* Some drivers are installed several times under different names for compatibility reasons. You can see which by running {{ic|sha1sum /usr/lib/vdpau/*}}.<br />
* For hybrid setups (both NVIDIA and AMD), it may be necessary to [[environment variable|set]] {{ic|1=DRI_PRIME=1}}. For more information see [[PRIME]].<br />
}}<br />
<br />
== Troubleshooting ==<br />
<br />
=== Failed to open VDPAU backend ===<br />
<br />
You need to set {{ic|VDPAU_DRIVER}} variable to point to correct driver. See [[#Configuring VDPAU]].<br />
<br />
=== VAAPI init failed ===<br />
<br />
An error along the lines of {{ic|libva: /usr/lib/dri/i965_drv_video.so init failed}} is encountered. This can happen because of improper detection of Wayland. One solution is to unset {{ic|$DISPLAY}} so that mpv, MPlayer, VLC, etc. do not assume it is X11. Another mpv-specific solution is to add the parameter {{ic|1=--opengl-backend=wayland}}.<br />
<br />
== Comparison tables ==<br />
<br />
=== VA-API drivers ===<br />
<br />
{| class="wikitable" style="text-align:center;"<br />
! Codec<br />
! {{pkg|libva-intel-driver}} [https://github.com/01org/intel-vaapi-driver/blob/master/README]<br />
! {{pkg|intel-media-driver}} [https://github.com/intel/media-driver/blob/master/README.md]<br />
! {{pkg|libva-mesa-driver}} [https://www.x.org/wiki/RadeonFeature/] [https://nouveau.freedesktop.org/wiki/VideoAcceleration/]<br />
! [[AMD Catalyst#Video acceleration|AMD Catalyst]] <br> (XvBA adapter)<br />
! {{pkg|libva-vdpau-driver}} <br> (VDPAU adapter)<br />
|-<br />
! colspan=6 | Decoding<br />
|-<br />
! MPEG-2<br />
| {{G|GMA 4500 and newer}}<br />
| {{G|Broadwell and newer}}<br />
| {{G|Radeon HD 6000 and newer<br>GeForce 8 and newer<sup>1</sup>}}<br />
| {{G|Radeon HD 4000 and newer}}<br />
| rowspan=6 | See [[#VDPAU drivers]]<br />
|-<br />
! MPEG-4<sup>4</sup><br />
| {{No}}<br />
| {{No}}<br />
| {{G|Radeon HD 6000 and newer}}<br />
| {{G|Radeon HD 6000 and newer}}<br />
|-<br />
! VC-1<br />
| {{G|Sandy Bridge and newer}}<br />
| rowspan=2 {{G|Broadwell and newer}}<br />
| {{G|Radeon HD 2000 and newer<br>GeForce 9300 and newer<sup>1</sup>}}<br />
| {{G|Radeon HD 4000 and newer}}<br />
|-<br />
! H.264/MPEG-4 AVC<br />
| {{G|GMA 4500<sup>2</sup>, Ironlake and newer}}<br />
| {{G|Radeon HD 2000 and newer<br>GeForce 8 and newer<sup>1</sup>}}<br />
| {{G|Radeon HD 4000 and newer}}<br />
|-<br />
! H.265/HEVC 8bit<br />
| {{G|Cherryview/Braswell and newer}}<br />
| {{G|Skylake and newer}}<br />
| {{G|Radeon R9 Fury and newer}}<br />
| rowspan=5 {{No}}<br />
|-<br />
! H.265/HEVC 10bit<br />
| {{G|Broxton and newer}}<br />
| {{G|Broxton/Apollo Lake and newer}}<br />
| {{G|Radeon 400 and newer}}<br />
|-<br />
! VP8<br />
| {{G|Broadwell and newer}}<br />
| {{G|Broadwell and newer}}<br />
| {{No}}<br />
| {{No}}<br />
|-<br />
! VP9 8bit<br />
| {{G|Broxton and newer <br> Hybrid: Broadwell to Skylake<sup>3</sup>}}<br />
| {{G|Broxton/Apollo Lake and newer}}<br />
| rowspan=2 {{G|Raven Ridge and newer}}<br />
| {{No}}<sup>5</sup><br />
|-<br />
! VP9 10bit<br />
| {{G|Kaby Lake and newer}}<br />
| {{G|Kaby Lake and newer}}<br />
| {{No}}<br />
|-<br />
! colspan=6 | Encoding<br />
|-<br />
! MPEG-2<br />
| {{G|Ivy Bridge and newer}}<br />
| {{G|Broadwell and newer<br>except Broxton/Apollo Lake}}<br />
| {{No}}<br />
| rowspan=7 {{No}}<br />
| rowspan=7 {{No}}<br />
|-<br />
! H.264/MPEG-4 AVC<br />
| {{G|Sandy Bridge and newer}}<br />
| {{G|Broadwell and newer}}<br />
| {{G|Radeon HD 7000 and newer}}<br />
|-<br />
! H.265/HEVC 8bit<br />
| {{G|Skylake and newer}}<br />
| {{G|Skylake and newer}}<br />
| {{G|Radeon 400 and newer}}<br />
|-<br />
! H.265/HEVC 10bit<br />
| {{G|Kaby Lake and newer}}<br />
| rowspan=2 {{G|Kaby Lake and newer}}<br />
| {{G|Raven Ridge and newer}}<br />
|-<br />
! VP8<br />
| {{G|Cherryview/Braswell and newer <br> Hybrid: Haswell to Skylake<sup>3</sup>}}<br />
| rowspan=3 {{No}}<br />
|-<br />
! VP9 8bit<br />
| {{G|Kaby Lake and newer}}<br />
| rowspan=2 {{G|Icelake and newer}}<br />
|-<br />
! VP9 10bit<br />
| {{No}}<br />
|}<br />
<br />
* <sup>1</sup> Up until GeForce GTX 750.<br />
* <sup>2</sup> Supported by {{aur|libva-intel-driver-g45-h264}} instead.<br />
* <sup>3</sup> Hybrid VP8 encoder and VP9 decoder supported by {{AUR|intel-hybrid-codec-driver}}. [https://github.com/intel/intel-hybrid-driver/issues/21 VP9 decoding on Haswell crashes].<br />
* <sup>4</sup> MPEG-4 is disabled by default due to VAAPI limitations. Set the [[environment variable]] {{ic|1=VAAPI_MPEG4_ENABLED=true}} to try to use it anyway.<br />
* <sup>5</sup> Not implemented in {{pkg|libva-vdpau-driver}}, since it is not maintained by anyone upstream. See [[#VDPAU drivers]].<br />
<br />
=== VDPAU drivers ===<br />
<br />
{| class="wikitable" style="text-align:center;"<br />
! Codec<br />
! {{pkg|mesa-vdpau}} [https://www.x.org/wiki/RadeonFeature/] [https://nouveau.freedesktop.org/wiki/VideoAcceleration/]<br />
! {{pkg|nvidia-utils}} [https://www.nvidia.com/page/purevideo_support.html]<br />
! {{pkg|libvdpau-va-gl}}<br>(VA-API adapter)<br />
|-<br />
! colspan=5 | Decoding<br />
|-<br />
! MPEG-2<br />
| {{G|Radeon R300 and newer <br> GeForce 8 and newer<sup>1</sup>}}<br />
| {{G|GeForce 8 and newer}}<br />
| rowspan=3 {{R|No}}<br />
|-<br />
! MPEG-4<br />
| {{G|Radeon HD 6000 and newer <br> GeForce 200 and newer<sup>1</sup>}}<br />
| {{G|GeForce 200 and newer}}<br />
|-<br />
! VC-1<br />
| {{G|Radeon HD 2000 and newer <br> GeForce 9300 and newer<sup>1</sup>}}<br />
| {{G|GeForce 8 and newer<sup>2</sup>}}<br />
|-<br />
! H.264/MPEG-4 AVC<br />
| {{G|Radeon HD 2000 and newer <br> GeForce 8 and newer<sup>1</sup>}}<br />
| {{G|GeForce 8 and newer}}<br />
| See [[#VA-API drivers]]<br />
|-<br />
! H.265/HEVC 8bit<br />
| {{G|Radeon R9 Fury and newer}}<br />
| {{G|GeForce 900 and newer<sup>3</sup>}}<br />
| rowspan=4 {{No}}<br />
|-<br />
! H.265/HEVC 10bit<br />
| {{G|Radeon 400 and newer}}<br />
| {{No}}<sup>4</sup><br />
|-<br />
! VP9 8bit<br />
| {{No}}<br />
| {{G|GeForce 900 and newer<sup>3</sup>}}<br />
|-<br />
! VP9 10bit<br />
| {{No}}<br />
| {{No}}<sup>4</sup><br />
|}<br />
<br />
* <sup>1</sup> Up until GeForce GTX 750.<br />
* <sup>2</sup> [[Wikipedia:Nvidia PureVideo|Except]] GeForce 8800 Ultra, 8800 GTX, 8800 GTS (320/640 MB).<br />
* <sup>3</sup> Except GeForce GTX 970 and GTX 980.<br />
* <sup>4</sup> NVIDIA implementation is limited to 8-bit streams [https://devtalk.nvidia.com/default/topic/940228/vdpau-expose-hevc-main10-support-where-available-on-die/] [https://us.download.nvidia.com/XFree86/Linux-x86_64/410.57/README/vdpausupport.html#vdpau-implementation-limits].<br />
<br />
=== NVIDIA driver only ===<br />
<br />
{| class="wikitable" style="text-align:center;"<br />
! rowspan=2 | Codec<br />
! colspan=2 | {{Pkg|nvidia-utils}} [https://developer.nvidia.com/nvidia-video-codec-sdk]<br />
|-<br />
! NVDECODE<br />
! NVENCODE<br />
|-<br />
! MPEG-2<br />
| rowspan=3 {{G|Fermi and newer<sup>1</sup>}}<br />
| rowspan=2 {{No}}<br />
|-<br />
! VC-1<br />
|-<br />
! H.264/MPEG-4 AVC<br />
| {{G|Kepler and newer<sup>2</sup>}}<br />
|-<br />
! H.265/HEVC 8bit<br />
| rowspan=2 {{G|Maxwell (GM206) and newer}}<br />
| {{G|Maxwell (2nd Gen) and newer}}<br />
|-<br />
! H.265/HEVC 10bit<br />
| {{G|Pascal and newer}}<br />
|-<br />
! VP8<br />
| {{G|Maxwell (2nd Gen) and newer}}<br />
| rowspan=3 {{No}}<br />
|-<br />
! VP9 8bit<br />
| {{G|Maxwell (GM206) and newer}}<br />
|-<br />
! VP9 10bit<br />
| {{G|Pascal and newer}}<br />
|}<br />
<br />
* <sup>1</sup> Except GM108 (not supported)<br />
* <sup>2</sup> Except GM108 and GP108 (not supported)<br />
<br />
=== Application support ===<br />
<br />
{| class="wikitable"<br />
! rowspan=2 | Application<br />
! colspan=3 | Decoding<br />
! colspan=2 | Encoding<br />
! rowspan=2 | Documentation<br />
|-<br />
! VA-API<br />
! VDPAU<br />
! NVDECODE<br />
! VA-API<br />
! NVENCODE<br />
|-<br />
! [[FFmpeg]]<br />
| {{Yes}}<br />
| {{Yes}}<br />
| {{Yes}}<br />
| {{Yes}}<br />
| {{Yes}}<br />
| [[FFmpeg#Hardware video acceleration]]<br />
|-<br />
! [[GStreamer]]<br />
| {{Yes}}<sup>1</sup><br />
| {{Yes}}<br />
| {{Yes}}<sup>2</sup><br />
| {{Yes}}<sup>1</sup><br />
| {{Yes}}<sup>2</sup><br />
| [[GStreamer#Hardware video acceleration]]<br />
|-<br />
! [[Kodi]]<br />
| {{Yes}}<br />
| {{Yes}}<br />
| {{Yes}}<br />
| {{-}}<br />
| {{-}}<br />
| [[Kodi#Hardware video acceleration]]<br />
|-<br />
! [[mpv]]<br />
| {{Yes}}<br />
| {{Yes}}<br />
| {{Yes}}<br />
| {{-}}<br />
| {{-}}<br />
| [[mpv#Hardware video acceleration]]<br />
|-<br />
! [[VLC media player]]<br />
| {{Yes}}<br />
| {{Yes}}<br />
| {{No}}<br />
| {{-}}<br />
| {{-}}<br />
| [[VLC media player#Hardware video acceleration]]<br />
|-<br />
! [[MPlayer]]<br />
| {{Yes}}<sup>3</sup><br />
| {{Yes}}<br />
| {{No}}<br />
| {{-}}<br />
| {{-}}<br />
| [[MPlayer#Hardware video acceleration]]<br />
|-<br />
! [[Flash]]<br />
| {{No}}<sup>4</sup><br />
| {{Yes}}<sup>4</sup><br />
| {{No}}<br />
| {{-}}<br />
| {{-}}<br />
| [[Browser plugins#Adobe Flash Player]]<br />
|-<br />
! [[Chromium]]<br />
| {{Yes}}<sup>3</sup><br />
| {{No}}<br />
| {{No}}<br />
| {{-}}<br />
| {{-}}<br />
| [[Chromium#Hardware video acceleration]]<br />
|-<br />
! [[Firefox]]<br />
| {{No}}<br />
| {{No}}<br />
| {{No}}<br />
| {{-}}<br />
| {{-}}<br />
| [https://bugzilla.mozilla.org/show_bug.cgi?id=1210726 Bug report]<br />
|}<br />
<br />
* <sup>1</sup> GStreamer [https://blogs.igalia.com/vjaquez/2018/03/28/gstreamer-va-api-troubleshooting/ uses a whitelist] of VA-API drivers. To use other drivers like {{Pkg|intel-media-driver}}, set [[environment variable]] {{ic|1=GST_VAAPI_ALL_DRIVERS=1}}.<br />
* <sup>2</sup> NVDECODE/NVENCODE is [https://git.archlinux.org/svntogit/packages.git/tree/trunk/PKGBUILD?h=packages/gst-plugins-bad#n45 disabled in the Arch package].<br />
* <sup>3</sup> Not supported officially by developers, alternative packages available.<br />
* <sup>4</sup> VDPAU is supported only by NPAPI plugin. PPAPI plugin to NPAPI browser experimental adapter is available that provides partial VA-API and VDPAU acceleration.<br />
<br />
{{Tip|To reduce CPU usage while watching YouTube where VP8/VP9 hardware decoding is not available use the h264ify extension (available for [https://addons.mozilla.org/firefox/addon/h264ify/ Firefox] and [https://chrome.google.com/webstore/detail/h264ify/aleakchihdccplidncghkekgioiakgal Chromium]) or the enhanced-h264ify extension (available for [https://addons.mozilla.org/firefox/addon/enhanced-h264ify/ Firefox] and [https://chrome.google.com/webstore/detail/enhanced-h264ify/omkfmpieigblcllmkgbflkikinpkodlk Chromium]).}}</div>0xe4524ffehttps://wiki.archlinux.org/index.php?title=NVIDIA&diff=430683NVIDIA2016-04-10T03:46:54Z<p>0xe4524ffe: Added section about how to enable DRM KMS in nvidia beta drivers.</p>
<hr />
<div>[[Category:Graphics]]<br />
[[Category:X server]]<br />
[[cs:NVIDIA]]<br />
[[de:Nvidia]]<br />
[[es:NVIDIA]]<br />
[[fa:اِنویدیا]]<br />
[[fr:Nvidia]]<br />
[[it:NVIDIA]]<br />
[[ja:NVIDIA]]<br />
[[nl:NVIDIA]]<br />
[[ru:NVIDIA]]<br />
[[tr:Nvidia]]<br />
[[zh-CN:NVIDIA]]<br />
{{Related articles start}}<br />
{{Related|NVIDIA/Tips and tricks}}<br />
{{Related|NVIDIA/Troubleshooting}}<br />
{{Related|Nouveau}}<br />
{{Related|Bumblebee}}<br />
{{Related|NVIDIA Optimus}}<br />
{{Related|Xorg}}<br />
{{Related articles end}}<br />
<br />
This article covers installing and configuring [http://www.nvidia.com NVIDIA]'s ''proprietary'' graphic card driver. For information about the open-source drivers, 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 [[#Alternate install: custom kernel|next]] subsection.<br />
<br />
1. If you do not know what graphics card you have, find out by issuing:<br />
:{{bc|<nowiki>$ lspci -k | grep -A 2 -E "(VGA|3D)"</nowiki>}}<br />
<br />
2. Determine the necessary driver version for your card by:<br />
:* finding the code name (e.g. NV50, NVC0, etc.) on [http://nouveau.freedesktop.org/wiki/CodeNames nouveau wiki's code names page]<br />
:* looking up the name in NVIDIA's [http://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 [http://www.nvidia.com/Download/index.aspx driver download site]<br />
<br />
3. Install the appropriate driver for your card:<br />
:* For GeForce 400 series cards and newer [NVCx and newer], [[install]] the {{Pkg|nvidia}} or {{Pkg|nvidia-lts}} package along with {{Pkg|nvidia-libgl}}. (The very latest GPU models, may require the {{AUR|nvidia-beta}} package, as stable drivers may not support the newly introduced features).<br />
:* For GeForce 8000/9000, ION and 100-300 series cards [NV5x, NV8x, NV9x and NVAx] from around 2006-2010, [[install]] the {{Pkg|nvidia-340xx}} or {{Pkg|nvidia-340xx-lts}} package along with {{Pkg|nvidia-340xx-libgl}}.<br />
:* For GeForce 6000/7000 series cards [NV4x and NV6x] from around 2004-2006, [[install]] the {{Pkg|nvidia-304xx}} or {{Pkg|nvidia-304xx-lts}} package along with {{Pkg|nvidia-304xx-libgl}}.<br />
<br />
:* For even older cards, have a look at [[#Unsupported drivers]].<br />
<br />
4. If you are on 64-bit and also need 32-bit OpenGL support, you must also install the equivalent ''lib32'' package from the [[multilib]] repository (e.g. {{Pkg|lib32-nvidia-libgl}}, {{Pkg|lib32-nvidia-340xx-libgl}} or {{Pkg|lib32-nvidia-304xx-libgl}}).<br />
<br />
5. Reboot. The {{Pkg|nvidia}} package contains a file which blacklists the ''nouveau'' module, so rebooting is necessary.<br />
<br />
Once the driver has been installed, continue to [[#Configuration]].<br />
<br />
=== Unsupported drivers ===<br />
<br />
If you have a GeForce 5 FX series card or older, Nvidia no longer supports drivers for your card. This means that these drivers [http://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 if you are willing to downgrade Xorg:<br />
<br />
* For GeForce 5 FX series cards [NV30-NV36], install the {{AUR|nvidia-173xx-dkms}} package. Last supported Xorg version is 1.15.<br />
* For GeForce 2/3/4 MX/Ti series cards [NV11, NV17-NV28], install the {{AUR|nvidia-96xx-dkms}} package. Last supported Xorg version is 1.12.<br />
<br />
{{Tip|The legacy nvidia-96xx-dkms and nvidia-173xx-dkms drivers can also be installed from the unofficial [http://pkgbuild.com/~bgyorgy/city.html <nowiki>[city] repository</nowiki>]. (It is strongly advised that you do not skip any dependencies restriction when installing from here)}}<br />
<br />
=== Alternate install: custom kernel ===<br />
<br />
{{Tip|You must build a custom {{Pkg|nvidia}} package to use it with a custom kernel, so it is a good idea to be familiar with the following topics:<br />
<br />
* [[ABS]]<br />
* [[makepkg]]<br />
* [[Creating packages]]}}<br />
<br />
Follow the [[ABS#How to use ABS|How to use ABS]] instructions to create a build directory for the {{ic|nvidia}} package. Then, before building with [[makepkg]], you must edit {{ic|nvidia.install}} and {{ic|PKGBUILD}} so that they contain the right kernel version variables.<br />
<br />
While running the custom kernel, get the appropriate kernel and local version names:<br />
$ uname -r<br />
and make sure the corresponding kernel header package, which was built during kernel compilation, is installed as well. Next: <br />
<br />
# In nvidia.install, replace the {{ic|EXTRAMODULES<nowiki>=</nowiki>'extramodules-3.4-ARCH'}} variable with the custom kernel version, such as {{ic|EXTRAMODULES<nowiki>=</nowiki>'extramodules-3.4.4'}} or {{ic|EXTRAMODULES<nowiki>=</nowiki>'extramodules-3.4.4-custom'}} depending on what the kernel's version is and the local version's text/numbers. Do this for all instances of the version number within this file.<br />
# In PKGBUILD, change the {{ic|_extramodules<nowiki>=</nowiki>extramodules-3.4-ARCH}} variable to match the appropriate version, as above.<br />
# If there are multiple kernels installed in parallel (such as a custom kernel alongside the default -ARCH kernel), change the {{ic|pkgname<nowiki>=</nowiki>nvidia}} variable in the PKGBUILD to a unique identifier, such as nvidia-344 or nvidia-custom. This will allow both kernels to use the nvidia module, since the custom nvidia module has a different package name and will not overwrite the original. You will also need to comment the line in {{ic|package()}} that blacklists the nouveau module in {{ic|/usr/lib/modprobe.d/nvidia.conf}} (no need to do it again).<br />
<br />
Then build and install the package as usual.<br />
<br />
==== Automatic re-compilation of the NVIDIA module with kernel update ====<br />
<br />
This is possible with [[DKMS]]. Install the {{Pkg|nvidia-dkms}} package (or a specific branch such as {{Pkg|nvidia-340xx-dkms}}). The {{Pkg|dkms}} package doesn't use [[Systemd]] anymore, it uses pacman/alpm hooks. See [[Pacman#Hooks]] for more information.<br />
See [[Dynamic Kernel Module Support#Usage]] for more information on how to use [[DKMS]].<br />
<br />
=== Pure Video HD (VDPAU/VAAPI) ===<br />
<br />
At least a video card with second generation [[wikipedia:Nvidia PureVideo#Table of GPUs containing a PureVideo SIP block|PureVideo HD]] is required to use [[VDPAU]] and [[VA-API]].<br />
<br />
=== NVIDIA DRM KMS ===<br />
<br />
{{Pkg|nvidia-beta}} adds support for DRM KMS. To enable this feature, you can add {{ic|nvidia-drm.modeset<nowiki>=</nowiki>1}} [[kernel parameter]], and add nvidia, nvidia_modeset, nvidia_uvm and nvidia_drm modules to [[initramfs]].<br />
<br />
{{Warning| Do not forget to run mkinitcpio every time you update driver.}}<br />
<br />
=== Hardware accelerated video decoding with XvMC ===<br />
<br />
Accelerated decoding of MPEG-1 and MPEG-2 videos via [[XvMC]] are supported on GeForce4, GeForce 5 FX, GeForce 6 and GeForce 7 series cards. See [[XvMC]] for detail.<br />
<br />
== Configuration ==<br />
<br />
{{Out of date|nvidia-xconfig should be avoided in 2016, and manual configuration isn't needed in most cases}}<br />
<br />
It is possible that after installing the driver it may not be needed to create an Xorg server configuration file. You can run [[Xorg#Running|a test]] 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 />
{{Note|Since 1.8.x Xorg uses separate configuration files in {{ic|/etc/X11/xorg.conf.d/}} - check out [[#Advanced: 20-nvidia.conf|advanced configuration]] section.}}<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 />
Option "NoLogo" "true"<br />
#Option "UseEDID" "false"<br />
#Option "ConnectedMonitor" "DFP"<br />
# ...<br />
EndSection<br />
}}<br />
<br />
{{Tip|If upgrading from nouveau make sure to remove {{ic|nouveau}} from {{ic|/etc/mkinitcpio.conf}}. See [[#Switching between NVIDIA and nouveau drivers|Switching between NVIDIA and nouveau drivers]], if switching between the open and proprietary drivers often.}}<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 />
# 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 />
# Load "dri"<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 />
{{Warning|That may still not work properly with Xorg-server 1.8 }}<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 {{ic|nvidia-settings(1)}}.<br />
<br />
You can run the GUI as a normal user and save the settings to {{ic|~/.nvidia-settings-rc}}. Then you can load the settings using {{ic|$ nvidia-settings --load-config-only}} (for example in your [[xinitrc]]). Alternatively, run {{ic|nvidia-settings}} as root, and then save the configuration to {{ic|/etc/X11/xorg.conf.d/}} as usual.<br />
<br />
{{Tip|If your X server is crashing on startup, it may be because the GUI-generated settings are corrupt. Try deleting the generated file and starting from scratch.}}<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&#125;}}) 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 />
Option "TwinView" "1"<br />
<br />
Example configuration:<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 />
[ftp://download.nvidia.com/XFree86/Linux-x86/355.11/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 />
{{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 />
===== Manual CLI configuration with xrandr =====<br />
{{Accuracy|Do these commands set up the monitors in ''TwinView'' mode?}}<br />
<br />
If the latest solutions do not work for you, you can use your window manager's ''autostart'' implementation with {{Pkg|xorg-xrandr}}.<br />
<br />
Some {{ic|xrandr}} examples could be:<br />
<br />
xrandr --output DVI-I-0 --auto --primary --left-of DVI-I-1<br />
<br />
or:<br />
<br />
xrandr --output DVI-I-1 --pos 1440x0 --mode 1440x900 --rate 75.0<br />
<br />
When:<br />
<br />
* {{ic|--output}} is used to indicate the "monitor" to which the options are set.<br />
* {{ic|DVI-I-1}} is the name of the second monitor.<br />
* {{ic|--pos}} is the position of the second monitor relative to the first.<br />
* {{ic|--mode}} is the resolution of the second monitor.<br />
* {{ic|--rate}} is the refresh rate (in Hz).<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 />
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 />
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.<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 {{ic|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 />
$ 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, Nvidia has reduced that ability to just 3 monitors in Base Mosaic mode as of driver version 304. More monitors are available with a Quadro card, but with standard consumer cards, it is limited to three. The explanation given for this reduction is "Feature parity with the Windows driver". As of September 2014, Windows has no restriction on the number of monitors, even on the same driver version. This is not a bug, this is entirely by design.}}<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 />
$ 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 />
=== Driver persistence ===<br />
<br />
Since version 319, Nvidia has changed the way driver persistence works, it now has a daemon that is to be run at boot. See the [http://docs.nvidia.com/deploy/driver-persistence/index.html Driver Persistence] section of the Nvidia documentation for more details.<br />
<br />
To start the persistence daemon at boot, [[enable]] the {{ic|nvidia-persistenced.service}}. For manual usage see the [http://docs.nvidia.com/deploy/driver-persistence/index.html#usage upstream documentation].<br />
<br />
== See also ==<br />
<br />
* [https://forums.geforce.com/ NVIDIA User forums]<br />
* [ftp://download.nvidia.com/XFree86/Linux-x86/355.11/README/README.txt Official README for NVIDIA drivers, all on one text page. Most Recent Driver Version as of September 7, 2015: 355.11.]<br />
* [ftp://download.nvidia.com/XFree86/Linux-x86/355.11/README/xconfigoptions.html README Appendix B. X Config Options, 355.11 (direct link)]</div>0xe4524ffe