1<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Driver power control</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="modes_of_use.html" title="Chapter 5. Modes of Use"><link rel="prev" href="modes_of_use.html" title="Chapter 5. Modes of Use"><link rel="next" href="pubfunctions.html" title="Chapter 6. Public functions"></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">Driver power control</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="modes_of_use.html">Prev</a> </td><th width="60%" align="center">Chapter 5. Modes of Use</th><td width="20%" align="right"> <a accesskey="n" href="pubfunctions.html">Next</a></td></tr></table><hr></div><div class="sect1"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id-1.5.3.3"></a>Driver power control</h2></div></div></div><p> 2 </p><p> 3 In this mode of use, the discrete GPU automatically powers up and down at 4 the discretion of the driver's runtime pm. On muxed machines, the user may 5 still influence the muxer state by way of the debugfs interface, however 6 the ON and OFF commands become a no-op for the discrete GPU. 7 </p><p> 8 This mode is the default on Nvidia HybridPower/Optimus and ATI PowerXpress. 9 Specifying nouveau.runpm=0, radeon.runpm=0 or amdgpu.runpm=0 on the kernel 10 command line disables it. 11 </p><p> 12 When the driver decides to power up or down, it notifies vga_switcheroo 13 thereof so that it can (a) power the audio device on the GPU up or down, 14 and (b) update its internal power state representation for the device. 15 This is achieved by <code class="function"><a class="link" href="API-vga-switcheroo-set-dynamic-switch.html" title="vga_switcheroo_set_dynamic_switch">vga_switcheroo_set_dynamic_switch</a></code>. 16 </p><p> 17 After the GPU has been suspended, the handler needs to be called to cut 18 power to the GPU. Likewise it needs to reinstate power before the GPU 19 can resume. This is achieved by <code class="function"><a class="link" href="API-vga-switcheroo-init-domain-pm-ops.html" title="vga_switcheroo_init_domain_pm_ops">vga_switcheroo_init_domain_pm_ops</a></code>, 20 which augments the GPU's suspend/resume functions by the requisite 21 calls to the handler. 22 </p><p> 23 When the audio device resumes, the GPU needs to be woken. This is achieved 24 by <code class="function"><a class="link" href="API-vga-switcheroo-init-domain-pm-optimus-hdmi-audio.html" title="vga_switcheroo_init_domain_pm_optimus_hdmi_audio">vga_switcheroo_init_domain_pm_optimus_hdmi_audio</a></code>, which augments the 25 audio device's resume function. 26 </p><p> 27 On muxed machines, if the mux is initially switched to the discrete GPU, 28 the user ends up with a black screen when the GPU powers down after boot. 29 As a workaround, the mux is forced to the integrated GPU on runtime suspend, 30 cf. https://bugs.freedesktop.org/show_bug.cgi?id=75917 31</p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="modes_of_use.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="modes_of_use.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="pubfunctions.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 5. Modes of Use </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 6. Public functions</td></tr></table></div></body></html> 32