From Fedora Project Wiki
Description
This test case tests that power management of hybrid graphics systems works correctly - i.e., the secondary GPU is kept powered down when not being used.
Setup
- Clean boot the system, with no video-related kernel parameters or custom configuration, and no external displays connected to start with
How to test
- Run
sudo cat /sys/kernel/debug/vgaswitcheroo/switch
- For each external output you have the appropriate cables to connect a display to:
- Connect a display
- Run
sudo cat /sys/kernel/debug/vgaswitcheroo/switch
again - Disconnect the display
- Wait 15 seconds and run
sudo cat /sys/kernel/debug/vgaswitcheroo/switch
again
Expected Results
- When you first check the output, with no external displays connected, the power status for the secondary GPU should be DynOff
- When you connect a display to the secondary GPU and check the output, the power status for the secondary GPU should change to DynPwr
- Unfortunately it's difficult to tell which outputs are connected to which adapters; checking when the power status changes is actually one of the best ways to tell which adapter the output is connected to. It is possible that none of the outputs is connected to the secondary GPU and so the state will never change to DynPwr. If you test all the outputs you can and they all work but the state stays as DynOff throughout, that's OK: this is still a 'pass'.
- If you do find an output connected to the secondary GPU, then after you disconnect the display from it, wait 15 seconds, and check the output again, the power status for the secondary GPU should change back to DynOff