1<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Chapter 5. Modes of Use</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="Linux GPU Driver Developer's Guide"><link rel="up" href="vga_switcheroo.html" title="Part III. vga_switcheroo"><link rel="prev" href="vga_switcheroo.html" title="Part III. vga_switcheroo"><link rel="next" href="ch05s02.html" title="Driver power control"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 5. Modes of Use</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="vga_switcheroo.html">Prev</a> </td><th width="60%" align="center">Part III. vga_switcheroo</th><td width="20%" align="right"> <a accesskey="n" href="ch05s02.html">Next</a></td></tr></table><hr></div><div class="chapter"><div class="titlepage"><div><div><h2 class="title"><a name="modes_of_use"></a>Chapter 5. Modes of Use</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl class="toc"><dt><span class="sect1"><a href="modes_of_use.html#id-1.5.3.2">Manual switching and manual power control</a></span></dt><dt><span class="sect1"><a href="ch05s02.html">Driver power control</a></span></dt></dl></div><div class="sect1"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id-1.5.3.2"></a>Manual switching and manual power control</h2></div></div></div><p>
2   </p><p>
3   In this mode of use, the file /sys/kernel/debug/vgaswitcheroo/switch
4   can be read to retrieve the current vga_switcheroo state and commands
5   can be written to it to change the state. The file appears as soon as
6   two GPU drivers and one handler have registered with vga_switcheroo.
7   The following commands are understood:
8   </p><p>
9   * OFF: Power off the device not in use.
10   * ON: Power on the device not in use.
11   * IGD: Switch to the integrated graphics device.
12   Power on the integrated GPU if necessary, power off the discrete GPU.
13   Prerequisite is that no user space processes (e.g. Xorg, alsactl)
14   have opened device files of the GPUs or the audio client. If the
15   switch fails, the user may invoke lsof(8) or fuser(1) on /dev/dri/
16   and /dev/snd/controlC1 to identify processes blocking the switch.
17   * DIS: Switch to the discrete graphics device.
18   * DIGD: Delayed switch to the integrated graphics device.
19   This will perform the switch once the last user space process has
20   closed the device files of the GPUs and the audio client.
21   * DDIS: Delayed switch to the discrete graphics device.
22   * MIGD: Mux-only switch to the integrated graphics device.
23   Does not remap console or change the power state of either gpu.
24   If the integrated GPU is currently off, the screen will turn black.
25   If it is on, the screen will show whatever happens to be in VRAM.
26   Either way, the user has to blindly enter the command to switch back.
27   * MDIS: Mux-only switch to the discrete graphics device.
28   </p><p>
29   For GPUs whose power state is controlled by the driver's runtime pm,
30   the ON and OFF commands are a no-op (see next section).
31   </p><p>
32   For muxless machines, the IGD/DIS, DIGD/DDIS and MIGD/MDIS commands
33   should not be used.
34</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="vga_switcheroo.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="vga_switcheroo.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ch05s02.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Part III. vga_switcheroo </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Driver power control</td></tr></table></div></body></html>
35