Many gaming and workstation laptops are available with both (1) integrated power saving and (2) discrete high performance graphics devices. Unfortunately, 3D intensive application performance may suffer greatly if the best graphics device is not selected. For example, a game may run at 30 Frames Per Second (FPS) on the integrated GPU rather than the 60 FPS the discrete GPU would enable. As a developer you can easily fix this problem by adding only one line to your executable’s source code:
extern "C" { _declspec(dllexport) DWORD AmdPowerXpressRequestHighPerformance = 0x00000001; }
Yes, it’s that easy. This line will ensure that the high-performance graphics device is chosen when running your application.
Requirements
It is worth noting some simple requirements for this method to work:
- The graphics-intensive application should use either DirectX® or OpenGL®
- The laptop should be a legacy PowerXpress or modern Hybrid Graphics laptop with integrated and discrete graphics devices
- Executable should be statically linked. Adding the above piece of code in a dynamically linked library will not work.
Generally, modern PC games meet all of the above requirements with few exceptions for light workloads such as MineSweeper and Solitaire.
However, these instructions do not apply to Vulkan™ or OpenCL™ applications. In short, the AMD Vulkan™ Installable Client Driver (ICD) sorts its devices in descending order by a performance heuristic function. Conversely, the AMD OpenCL™ ICD does not sort its devices.
Radeon Additional Settings
Have you ever noticed higher performance while your laptop was Plugged-In to AC wall power? Surprisingly, this may be due to your Radeon Additional Settings!
Switchable Graphics Global Settings
First, users may assign one of the following Global Application Settings to Battery or Plugged-In Power Sources:
- Force Power-Saving Graphics
- Optimize Power Savings (Battery Default)
- Optimize Performance (Plugged-In Default)
- Maximize Performance
Consequently, these settings have a very large impact on battery life. Thus, I do not recommend changing these settings.
Switchable Graphics Application Settings
Second, users may assign one of the following Graphics Settings to an application:
- High Performance
- Power Saving
- Based on Power Source
- Not Assigned
Conveniently, the graphics driver includes a list of common games and applications — most of which can be changed by the user. Moreover, the user can add applications.
Most noteworthy, the application setting lookup uses only the executable file name, excluding its path. Thus, it is best to avoid generic names or names of other known common applications such as “game.exe”, “player.exe”, or “launcher.exe”.
Thankfully, if the application is “Not Assigned”, then the graphics driver will still test if the executable requested high performance graphics. In practice, the driver searches for “AmdPowerXpressRequestHighPerformance” in the executable’s export table. In fact, you can easily test this yourself using a Microsoft Visual Studio tools command prompt:
dumpbin.exe /exports app.exe | find.exe "AmdPowerXpressRequestHighPerformance"
Switchable Graphics Settings Summary
For simplicity, below is a table for which GPU is selected based global and application settings:
Global Setting | Application Setting | Selected GPU |
Force Power-Saving Graphics | Not Assigned | Power-Saving |
High Performance | Power-Saving | |
Power Saving | Power-Saving | |
Based on Power Source | Power-Saving | |
Optimize Power Savings | Not Assigned | Power-Saving |
High Performance | High Performance | |
Power Saving | Power-Saving | |
Based on Power Source | Power-Saving | |
Optimize Performance | Not Assigned | Power-Saving |
High Performance | High Performance | |
Power Saving | Power-Saving | |
Based on Power Source | High Performance | |
Maximize Performance | Not Assigned | High Performance |
High Performance | High Performance | |
Power Saving | Power-Saving | |
Based on Power Source | High Performance |
Finally, I have observed applications whose performance increased by 80% simply by adding AmdPowerXpressRequestHighPerformance. Thus, I highly recommend this solution.