To see which graphis card is installed:
https://www.cyberciti.biz/faq/linux-tell-which-graphics-vga-card-installed/
lspci | grep -i –color ‘vga\|3d\|2d’
01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Venus XTX [Radeon HD 8890M / R9 M275X/M375X] (rev 83)
sudo lspci -v -s 01:00.0 # Note the Device ID from the previous output
01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Venus XTX [Radeon HD 8890M / R9 M275X/M375X] (rev 83) (prog-if 00 [VGA controller])
Subsystem: Dell Venus XTX [Radeon HD 8890M / R9 M275X/M375X]
Flags: fast devsel, IRQ 16
Memory at c0000000 (64-bit, prefetchable) [size=256M]
Memory at dfe00000 (64-bit, non-prefetchable) [size=256K]
I/O ports at e000 [size=256]
Expansion ROM at 000c0000 [disabled] [size=128K]
Capabilities: [48] Vendor Specific Information: Len=08 <?>
Capabilities: [50] Power Management version 3
Capabilities: [58] Express Legacy Endpoint, MSI 00
Capabilities: [a0] MSI: Enable- Count=1/1 Maskable- 64bit+
Capabilities: [100] Vendor Specific Information: ID=0001 Rev=1 Len=010
Capabilities: [150] Advanced Error Reporting
Capabilities: [200] #15
Capabilities: [270] #19
Kernel modules: radeon, amdgpu
I used the early preview AMD driver Amdgpu-pro-18.20-579836. It seems to work fine with my notebook and docking station. The normal version is installed, the pro version seems to give issues.
Run sudo lshw -c video
, and look for the line with “configuration”. The loaded driver is prefixed with “driver=”
And this gives you loads of information on the driver itself.
modinfo $(modprobe --resolve-alias radeon)
lspci -nnk | grep -i vga -A3 | grep 'in use'
also shows which graphics option is being used in the current configuration.
You can blacklist the radeon driver by adding blacklist radeon
to /etc/modprobe.d/blacklist-radeon.conf
and by adding blacklist radeonfb
to /etc/modprobe.d/blacklist-framebuffer.conf
Note that this does NOT stop the card from being turned on at boot, and consuming a lot of power.
Setting driver options:
Follow this page on info of kernel module features and settings.
https://wiki.archlinux.org/index.php/Kernel_module
Driver features can be set by adding specific options to your boot environment in grub /etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash radeon.dpm=1"
sudo update-grub
An alternative is adding files to /etc/modprobe.d/
, that will be read at boot time
/etc/modprobe.d/radeon.conf
# Force the Dynamic Power Management
options radeon dpm=1
resulting settings are made visible with this command:
systool -v -m radeon
More power settings
The Radeon driver supports more power settings. See here:
https://www.x.org/wiki/RadeonFeature/#index3h2
You can see the current selected method, profile and details with:
cat /sys/class/drm/card0/device/power_method
cat /sys/class/drm/card0/device/power_profile
sudo cat /sys/kernel/debug/dri/0/radeon_pm_info
Disabling the Radeon HD8890M to reduce power consumption
Discrete graphics cards have the disadvantage that they consume a lot of power, and are best used with external power connected.
But what if you do not need the extra graphical power, battery time is more important?
You can unload the radeon driver by blacklisting it or using driver feature radeon.modeset=0
. This will make you use the embedded graphics.
In both cases, no driver is loaded, but the card is still switched on and consuming power like it is switched on in full.
An other option is to disable the card in the BIOS/UEFI. On my Dell Precision 7510, this is however not possible.
Then the final option would be to use the power settings in the previous text to reduce the consumption. This seems to work pretty good.
Power some statistics with the different options
- No driver loaded
power drawn from battery with no load: 27W
- Driver loaded, radeon dpm=0,
echo dynpm > /sys/class/drm/card0/device/power_method
power drawn from battery with no load: 34W
sudo cat /sys/kernel/debug/dri/0/radeon_pm_info
default engine clock: 925000 kHz
current engine clock: 924980 kHz
default memory clock: 1125000 kHz
current memory clock: 1125000 kHz
voltage: 1200 mV
PCIE lanes: 16
- Driver loaded, radeon dpm=0,
echo profile > /sys/class/drm/card0/device/power_method
echo default > /sys/class/drm/card0/device/power_profile
power drawn from battery with no load: 34W
sudo cat /sys/kernel/debug/dri/0/radeon_pm_info
default engine clock: 925000 kHz
current engine clock: 924980 kHz
default memory clock: 1125000 kHz
current memory clock: 1125000 kHz
voltage: 1200 mV
PCIE lanes: 16
- Driver loaded, radeon dpm=0,
echo profile > /sys/class/drm/card0/device/power_method
echo low > /sys/class/drm/card0/device/power_profile
power drawn from battery with no load: 19W
sudo cat /sys/kernel/debug/dri/0/radeon_pm_info
default engine clock: 925000 kHz
current engine clock: 299990 kHz
default memory clock: 1125000 kHz
current memory clock: 150000 kHz
voltage: 825 mV
PCIE lanes: 16
- Driver loaded, radeon dpm=1, which uses hardware on the GPU to dynamically change the clocks and voltage based on GPU load. It also enables clock and power gating
cat /sys/class/drm/card0/device/power_method
dpm
cat /sys/class/drm/card0/device/power_profile
default
power drawn from battery with no load: 20W
sudo cat /sys/kernel/debug/dri/0/radeon_pm_info
uvd vclk: 0 dclk: 0
power level 0 sclk: 30000 mclk: 15000 vddc: 900 vddci: 0 pcie gen: 3
Final remarks:
I did not look at vgaswitcheroo only at the driver options.