Nvidia Optimus

Last updated

Nvidia Optimus is a computer GPU switching technology created by Nvidia which, depending on the resource load generated by client software applications, will seamlessly switch between two graphics adapters within a computer system in order to provide either maximum performance or minimum power draw from the system's graphics rendering hardware.

Contents

A typical platform includes both a lower-performance integrated graphics processor, usually by Intel or AMD, and a high-performance one, usually by Nvidia or AMD. Optimus saves battery life by automatically switching the power of the discrete graphics processing unit (GPU) off when it is not needed and switching it on when needed again. The technology mainly targets mobile PCs such as notebooks. [1] [lower-alpha 1] When an application is being launched that is determined to benefit from the performance of the discrete GPU, the discrete GPU is powered up and the application is served by a rendering context via that GPU. Otherwise the application is served by a rendering context that uses the integrated GPU. Switching between the graphics processors is designed to be completely seamless and to happen "behind the scenes".

Official supported operating systems by Nvidia are Microsoft Windows and Linux. A project called Bumblebee [4] is an alternative open source implementation of Optimus support for Linux. [5]

Operation

When a user launches an application, the graphics driver tries to determine whether the application would benefit from the discrete GPU. If so, the GPU is powered up from an idle state and is passed all rendering calls. Even in this case, though, the integrated graphics processor (IGP) is used to output the final image. When less demanding applications are used, the IGP takes sole control, allowing for longer battery life and less fan noise. Under Windows the Nvidia driver also provides the option to manually select the GPU in the right-click menu upon launching an executable.

Within the hardware interface layer of the Nvidia GPU driver, the Optimus Routing Layer provides intelligent graphics management. The Optimus Routing Layer also includes a kernel-level library for recognizing and managing specific classes and objects associated with different graphics devices. This Nvidia innovation performs state and context management, allocating architectural resources as needed for each driver client (i.e., application). In this context-management scheme, each application is not aware of other applications concurrently using the GPU.

By recognizing designated classes, the Optimus Routing Layer can help determine when the GPU can be utilized to improve rendering performance. Specifically, it sends a signal to power-on the GPU when it finds any of the following three call types:

Predefined profiles also assist in determining whether extra graphics power is needed. These can be managed using the Nvidia control panel.

Optimus avoids usage of a hardware multiplexer and prevents glitches associated with changing the display driver from IGP to GPU by transferring the display surface from the GPU frame buffer over the PCI Express bus to the main memory-based framebuffer used by the IGP. The Optimus Copy Engine is a new alternative to traditional DMA transfers between the GPU framebuffer memory and main memory used by the IGP.

Using the IGP to output data from the discrete GPU may become a bottleneck at high framerates. On desktop-replacement or gaming laptops (where performance is prioritized over energy efficiency), Optimus technology has been heavily criticized. Some vendors have provided hardware multiplexer solutions to completely shut off the Optimus architecture. The operation may be hosted in the BIOS, and often require a reboot.

Linux support

In the middle the free and open-source driver stack consisting of Mesa 3D and libDRM in user-space and DRM/KMS driver in the Linux kernel. Nvidia's proprietary kernel blob cannot make uses of DMA-BUF because of license restrictions. The Linux Graphics Stack and glamor.svg
In the middle the free and open-source driver stack consisting of Mesa 3D and libDRM in user-space and DRM/KMS driver in the Linux kernel. Nvidia's proprietary kernel blob cannot make uses of DMA-BUF because of license restrictions.

While historically problematic, the binary Nvidia driver since beta version 435.17 officially supports Optimus render offloading for OpenGL and Vulkan applications under the name "PRIME". [6]

The binary Nvidia driver added partial Optimus support May 3, 2013 in the 319.17. [7] As of May 2013, power management for discrete card is not supported, which means it cannot save battery by turning off Nvidia graphic card completely. [8]

The open-source project Bumblebee tries to provide support for graphics-chip switching. As in the Windows implementation, by default all applications run through the integrated graphics processor. As of 2013 one can only run a program with improved graphical performance on the discrete GPU by explicitly invoking it as such: for example, by using the command line or through specially configured shortcut icon. Automatic detection and switching between graphics processors is not yet available.

Work in progress on a graphical interface - bumblebee-ui - aims to allow more convenient starting of programs for improved graphical performance when necessary.

Steam for Linux can be set up to run games using the discrete GPU (Steam Community: Optimus and Steam for Linux).

The Bumblebee Project continues to evolve as more necessary software changes are made to the graphics architecture of Linux. To make the most use of it, it is best to use a recent Linux distribution. As of 2013, Bumblebee software repositories are available for Arch Linux, Debian, Fedora, Gentoo, Mandriva, OpenSuSE and Ubuntu. The source package can be used for other distributions.

An attempt by Nvidia to support Optimus through DMA-BUF, a Linux kernel-mechanism for sharing buffers across hardware (potentially GPUs), was rebuffed by kernel developers in January 2012 due to license incompatibility between the GPL-licensed kernel-code and the proprietary-licensed Nvidia blob. [9]

When no software mechanism exists for switching between graphics adapters, the system cannot use the Nvidia GPU at all, even if an installed graphics driver would support it. [10]

Modern Optimus Support

Many Linux distributions now support Nvidia offloading, where the Nvidia card does all rendering. For example on a notebook with an integrated Intel graphics device, which is physically connected to the notebook's display, the Nvidia card renders to the display memory of the integrated device. To avoid tearing, the Xorg server has a mechanism called Prime Synchronization to time these buffer updates, similar to vsync; the Nvidia driver must be loaded as a kernel module for this to work. This is not usually activated by default.[ citation needed ]

Unlike Bumblebee, this offloading solution allows multi-monitor graphics. The disadvantage is that toggling the Nvidia card requires a logout.

The leading implementation of this approach is Ubuntu's 'prime-select' package, which has a command line and graphical tool to turn the Nvidia card off. Unlike Windows, this is not done dynamically, and the user must restart the login session for the change to take effect.

Ubuntu's prime-select script is available on Ubuntu derivatives, which in some cases add their own graphical tools. The prime-offload approach has been ported or reimplemented in arch and fedora.

In 2016, Nvidia announced GL Vendor Neutral Dispatch, meaning both Intel and Nvidia drivers can be simultaneously installed. This has greatly simplified the process of switching modes, although it took until 2018 when distributions started taking advantage.

Some older and high-end laptops contain a BIOS setting to manually select the state of the hardware multiplexer to switch output between the two video devices. In this case, a Linux user can place the laptop in hardware configurations where there is only once graphics device. This avoids the complexities of running two graphics drivers but offers no power savings.

Since driver version 435 the proprietary driver supports render offloading of a single window. It creates a virtual display where the dGPU renders to, which will be displayed in the window on the main screen for offloaded application. [11] As of October 2019 this requires usage of the xorg development branch, since needed modifications are not yet released.

See also

Notes

  1. Desktop Optimus was slated to be launched in June of 2011 [2] under the name Synergy, [3] but never made it.

Related Research Articles

<span class="mw-page-title-main">Graphics card</span> Expansion card which generates a feed of output images to a display device

A graphics card is a computer expansion card that generates a feed of graphics output to a display device such as a monitor. Graphics cards are sometimes called discrete or dedicated graphics cards to emphasize their distinction to an integrated graphics processor on the motherboard or the central processing unit (CPU). A graphics processing unit (GPU) that performs the necessary computations is the main component in a graphics card, but the acronym "GPU" is sometimes also used to erroneously refer to the graphics card as a whole.

<span class="mw-page-title-main">GeForce</span> Brand of GPUs by Nvidia

GeForce is a brand of graphics processing units (GPUs) designed by Nvidia and marketed for the performance market. As of the GeForce 40 series, there have been eighteen iterations of the design. The first GeForce products were discrete GPUs designed for add-on graphics boards, intended for the high-margin PC gaming market, and later diversification of the product line covered all tiers of the PC graphics market, ranging from cost-sensitive GPUs integrated on motherboards, to mainstream add-in retail boards. Most recently, GeForce technology has been introduced into Nvidia's line of embedded application processors, designed for electronic handhelds and mobile handsets.

<span class="mw-page-title-main">Windowing system</span> Software that manages separately different parts of display screens

In computing, a windowing system is a software suite that manages separately different parts of display screens. It is a type of graphical user interface (GUI) which implements the WIMP paradigm for a user interface.

<span class="mw-page-title-main">Graphics processing unit</span> Specialized electronic circuit; graphics accelerator

A graphics processing unit (GPU) is a specialized electronic circuit initially designed for digital image processing and to accelerate computer graphics, being present either as a discrete video card or embedded on motherboards, mobile phones, personal computers, workstations, and game consoles. After their initial design, GPUs were found to be useful for non-graphic calculations involving embarrassingly parallel problems due to their parallel structure. Other non-graphical uses include the training of neural networks and cryptocurrency mining.

<span class="mw-page-title-main">Scalable Link Interface</span> Brand name; multi-GPU technology by Nvidia

Scalable Link Interface (SLI) is the brand name for a now discontinued multi-GPU technology developed by Nvidia for linking two or more video cards together to produce a single output. SLI is a parallel processing algorithm for computer graphics, meant to increase the available processing power.

The Direct Rendering Manager (DRM) is a subsystem of the Linux kernel responsible for interfacing with GPUs of modern video cards. DRM exposes an API that user-space programs can use to send commands and data to the GPU and perform operations such as configuring the mode setting of the display. DRM was first developed as the kernel-space component of the X Server Direct Rendering Infrastructure, but since then it has been used by other graphic stack alternatives such as Wayland and standalone applications and libraries such as SDL2 and Kodi.

<span class="mw-page-title-main">Xgl</span> Display server implementation

Xgl is an obsolete display server implementation supporting the X Window System protocol designed to take advantage of modern graphics cards via their OpenGL drivers, layered on top of OpenGL. It supports hardware acceleration of all X, OpenGL and XVideo applications and graphical effects by a compositing window manager such as Compiz or Beryl. The project was started by David Reveman of Novell and first released on January 2, 2006. It was removed from the X.org server in favor of AIGLX on June 12, 2008.

In computing, hardware overlay, a type of video overlay, provides a method of rendering an image to a display screen with a dedicated memory buffer inside computer video hardware. The technique aims to improve the display of a fast-moving video image — such as a computer game, a DVD, or the signal from a TV card. Most video cards manufactured since about 1998 and most media players support hardware overlay.

<span class="mw-page-title-main">Free and open-source graphics device driver</span> Software that controls computer-graphics hardware

A free and open-source graphics device driver is a software stack which controls computer-graphics hardware and supports graphics-rendering application programming interfaces (APIs) and is released under a free and open-source software license. Graphics device drivers are written for specific hardware to work within a specific operating system kernel and to support a range of APIs used by applications to access the graphics hardware. They may also control output to the display if the display driver is part of the graphics hardware. Most free and open-source graphics device drivers are developed by the Mesa project. The driver is made up of a compiler, a rendering API, and software which manages access to the graphics hardware.

The Intel Graphics Media Accelerator (GMA) is a series of integrated graphics processors introduced in 2004 by Intel, replacing the earlier Intel Extreme Graphics series and being succeeded by the Intel HD and Iris Graphics series.

X-Video Motion Compensation (XvMC), is an extension of the X video extension (Xv) for the X Window System. The XvMC API allows video programs to offload portions of the video decoding process to the GPU video-hardware. In theory this process should also reduce bus bandwidth requirements. Currently, the supported portions to be offloaded by XvMC onto the GPU are motion compensation and inverse discrete cosine transform (iDCT) for MPEG-2 video. XvMC also supports offloading decoding of mo comp, iDCT, and VLD for not only MPEG-2 but also MPEG-4 ASP video on VIA Unichrome hardware.

nouveau (software) Open source software driver for Nvidia GPU

nouveau is a free and open-source graphics device driver for Nvidia video cards and the Tegra family of SoCs written by independent software engineers, with minor help from Nvidia employees.

Unified Video Decoder is the name given to AMD's dedicated video decoding ASIC. There are multiple versions implementing a multitude of video codecs, such as H.264 and VC-1.

<span class="mw-page-title-main">AMD Hybrid Graphics</span> Line of discrete and integrated graphics processing units

AMD Hybrid Graphics technology, is a collective brand from AMD for its Radeon line of discrete and integrated GPU, promoting higher performance and productivity while saving energy consumption in GPUs.

<span class="mw-page-title-main">GPU switching</span> Mechanism for computers with multiple graphic controllers

GPU switching is a mechanism used on computers with multiple graphic controllers. This mechanism allows the user to either maximize the graphic performance or prolong battery life by switching between the graphic cards. It is mostly used on gaming laptops which usually have an integrated graphic device and a discrete video card.

<span class="mw-page-title-main">ThinkPad W series</span> Series of mobile workstations by Lenovo

The ThinkPad W series laptops from Lenovo were described by the manufacturer as being "mobile workstations", and suit that description by being physically on the larger side of the laptop spectrum, with screens ranging from 15.6" to 17.3" in size. Most W series laptops offered high-end quad-core Intel Core processors with an integrated GPU as well as an Nvidia Quadro discrete GPU, utilizing Nvidia Optimus to switch between the two GPUs as required. Notable exceptions are the W500, which has ATI Mobility FireGL integrated workstation-class graphics, and the W550s, which is an Ultrabook-specification laptop with only a dual-core processor. The W series laptops offered independent software vendor (ISV) certifications from various vendors such as Adobe Systems and Autodesk for computer-aided design (CAD) and 3D modeling software.

Heterogeneous System Architecture (HSA) is a cross-vendor set of specifications that allow for the integration of central processing units and graphics processors on the same bus, with shared memory and tasks. The HSA is being developed by the HSA Foundation, which includes AMD and ARM. The platform's stated aim is to reduce communication latency between CPUs, GPUs and other compute devices, and make these various devices more compatible from a programmer's perspective, relieving the programmer of the task of planning the moving of data between devices' disjoint memories.

GPU virtualization refers to technologies that allow the use of a GPU to accelerate graphics or GPGPU applications running on a virtual machine. GPU virtualization is used in various applications such as desktop virtualization, cloud gaming and computational science.

<span class="mw-page-title-main">AMD PowerTune</span> Brand name by AMD

AMD PowerTune is a series of dynamic frequency scaling technologies built into some AMD GPUs and APUs that allow the clock speed of the processor to be dynamically changed by software. This allows the processor to meet the instantaneous performance needs of the operation being performed, while minimizing power draw, heat generation and noise avoidance. AMD PowerTune aims to solve thermal design power and performance constraints.

<span class="mw-page-title-main">Radeon 300 series</span> Series of video cards

The Radeon 300 series is a series of graphics processors developed by AMD. All of the GPUs of the series are produced in 28 nm format and use the Graphics Core Next (GCN) micro-architecture.

References

  1. "Optimus Technology". Nvidia. 22 October 2012. Retrieved 10 April 2016.
  2. Lee, Terence (23 April 2011). "NVIDIA To Launch Desktop Optimus / Synergy at COMPUTEX" . Retrieved 10 April 2016.
  3. Pop, Sebastian (26 April 2011). "NVIDIA Optimus Lands on Desktops" . Retrieved 10 April 2016.
  4. "Bumblebee Daemon". GitHub. 22 April 2013. Retrieved 10 April 2016.
  5. "Bumblebee version 3.0 "Tumbleweed" release". 20 January 2012. Retrieved 10 April 2016.
  6. Larabel, Michael (13 August 2019). "NVIDIA 435.17 Linux Beta Driver Adds Vulkan + OpenGL PRIME Render Offload". Phoronix . Retrieved 3 March 2024.
  7. Plattner, Aaron (2 May 2013). "Linux, Solaris, and FreeBSD driver 319.17 (long-lived branch release)". Nvidia . Retrieved 10 April 2016.
  8. "Релиз проприетарного драйвера NVIDIA 319.17 с поддержкой Optimus и RandR 1.4" (in Russian). 2 May 2013. Retrieved 10 April 2016.
  9. "NVIDIA Talks Of Optimus Possibilities For Linux". Phoronix. January 25, 2012.
  10. "On laptops that don't have that hardware mux you currently cannot use the NVIDIA GPU for display.", July 23, 2010, accessed November 27, 2010. Archived July 18, 2011, at the Wayback Machine
  11. "Chapter 35. PRIME Render Offload". download.nvidia.com. Retrieved 2019-10-09.