Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Radeon HD 4670, Power management
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
Massimo B.
Veteran
Veteran


Joined: 09 Feb 2005
Posts: 1556
Location: Germany

PostPosted: Mon Oct 30, 2017 8:11 am    Post subject: Radeon HD 4670, Power management Reply with quote

Hi,

this is an Allinone PC Acer Z5610 with a mobile graphics hardware. There are some known issues with that machine switching off occasionally due to heat issues with that graphics board. I tried getting some Nvidia working, it must be a MXM 3.0 A, not much choice, however with nvidia, the fan control wasn't compatible. Anyway, using this machine for office only I try to put the graphics to a lower power consumption and wonder what Power Management is possible with the radeon module.
What lowest power mode could be possible in general? Maybe better switching to the alternative radeonhd or the proprietary driver? The latter may have benefits for 3D, but maybe also as for some power management features? Better turn off acceleration?
Code:
# lspci |grep VGA
01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] RV730/M96-XT [Mobility Radeon HD 4670]


Links:
https://wiki.ubuntuusers.de/Grafikkarten/AMD/radeon/#Kernel-Modul-Optionen Best overview so far but alas in German
https://www.x.org/wiki/RadeonFeature/
https://www.x.org/wiki/radeon/

I got the machine stable at least without further crashes with this:
Code:
# cat /etc/local.d/sys.start
#!/usr/bin/env bash
echo battery    > /sys/class/drm/card0/device/power_dpm_state
echo low        >  /sys/class/drm/card0/device/power_dpm_force_performance_level


Some generic overview:
Code:
# for file in /sys/class/drm/card0/device/*;do [[ -f $file ]] && printf "%-75s: %s\n" "${file}" "$(cat "$file")";done
/sys/class/drm/card0/device/boot_vga                                       : 1
/sys/class/drm/card0/device/broken_parity_status                           : 0
/sys/class/drm/card0/device/class                                          : 0x030000
-bash: warning: command substitution: ignored null byte in input
/sys/class/drm/card0/device/config                                         : ��
@�                                                                             � � %fP%fX��   
      ��
/sys/class/drm/card0/device/consistent_dma_mask_bits                       : 40
/sys/class/drm/card0/device/current_link_speed                             : 2.5 GT/s
/sys/class/drm/card0/device/current_link_width                             : 16
/sys/class/drm/card0/device/d3cold_allowed                                 : 1
/sys/class/drm/card0/device/device                                         : 0x9488
/sys/class/drm/card0/device/dma_mask_bits                                  : 40
/sys/class/drm/card0/device/driver_override                                : (null)
/sys/class/drm/card0/device/enable                                         : 1
/sys/class/drm/card0/device/irq                                            : 16
/sys/class/drm/card0/device/local_cpulist                                  : 0-3
/sys/class/drm/card0/device/local_cpus                                     : f
/sys/class/drm/card0/device/max_link_speed                                 : 5 GT/s
/sys/class/drm/card0/device/max_link_width                                 : 16
/sys/class/drm/card0/device/modalias                                       : pci:v00001002d00009488sv00001025sd00000266bc03sc00i00
/sys/class/drm/card0/device/msi_bus                                        : 1
/sys/class/drm/card0/device/power_dpm_force_performance_level              : low
/sys/class/drm/card0/device/power_dpm_state                                : battery
/sys/class/drm/card0/device/power_method                                   : dpm
/sys/class/drm/card0/device/power_profile                                  : default
cat: /sys/class/drm/card0/device/remove: Permission denied
/sys/class/drm/card0/device/remove                                         :
cat: /sys/class/drm/card0/device/rescan: Permission denied
/sys/class/drm/card0/device/rescan                                         :
cat: /sys/class/drm/card0/device/reset: Permission denied
/sys/class/drm/card0/device/reset                                          :
/sys/class/drm/card0/device/resource                                       : 0x00000000e0000000 0x00000000efffffff 0x000000000014220c
0x0000000000000000 0x0000000000000000 0x0000000000000000
0x00000000fc200000 0x00000000fc20ffff 0x0000000000140204
0x0000000000000000 0x0000000000000000 0x0000000000000000
0x0000000000002000 0x00000000000020ff 0x0000000000040101
0x0000000000000000 0x0000000000000000 0x0000000000000000
0x00000000000c0000 0x00000000000dffff 0x0000000000000212
cat: /sys/class/drm/card0/device/resource0: Input/output error
/sys/class/drm/card0/device/resource0                                      :
cat: /sys/class/drm/card0/device/resource0_wc: Input/output error
/sys/class/drm/card0/device/resource0_wc                                   :
cat: /sys/class/drm/card0/device/resource2: Input/output error
/sys/class/drm/card0/device/resource2                                      :
cat: /sys/class/drm/card0/device/resource4: Invalid argument
/sys/class/drm/card0/device/resource4                                      :
/sys/class/drm/card0/device/revision                                       : 0x00
cat: /sys/class/drm/card0/device/rom: Invalid argument
/sys/class/drm/card0/device/rom                                            :
/sys/class/drm/card0/device/subsystem_device                               : 0x0266
/sys/class/drm/card0/device/subsystem_vendor                               : 0x1025
/sys/class/drm/card0/device/uevent                                         : DRIVER=radeon
PCI_CLASS=30000
PCI_ID=1002:9488
PCI_SUBSYS_ID=1025:0266
PCI_SLOT_NAME=0000:01:00.0
MODALIAS=pci:v00001002d00009488sv00001025sd00000266bc03sc00i00
/sys/class/drm/card0/device/vendor                                         : 0x1002


What about the kernel module options: https://wiki.ubuntuusers.de/Grafikkarten/AMD/radeon/#Kernel-Modul-Optionen
I also found those variables in the /sys fs:
Code:
# for file in /sys/module/radeon/parameters/*;do [[ -f $file ]] && printf "%-45s: %s\n" "${file}" "$(cat "$file")";done
/sys/module/radeon/parameters/agpmode        : 0
/sys/module/radeon/parameters/aspm           : -1
/sys/module/radeon/parameters/audio          : -1
/sys/module/radeon/parameters/auxch          : -1
/sys/module/radeon/parameters/backlight      : -1
/sys/module/radeon/parameters/bapm           : -1
/sys/module/radeon/parameters/benchmark      : 0
/sys/module/radeon/parameters/cik_support    : 1
/sys/module/radeon/parameters/connector_table: 0
/sys/module/radeon/parameters/deep_color     : 0
/sys/module/radeon/parameters/disp_priority  : 0
/sys/module/radeon/parameters/dpm            : -1
/sys/module/radeon/parameters/dynclks        : -1
/sys/module/radeon/parameters/fastfb         : 0
/sys/module/radeon/parameters/gartsize       : 1024
/sys/module/radeon/parameters/hard_reset     : 0
/sys/module/radeon/parameters/hw_i2c         : 0
/sys/module/radeon/parameters/lockup_timeout : 10000
/sys/module/radeon/parameters/modeset        : 1
/sys/module/radeon/parameters/msi            : -1
/sys/module/radeon/parameters/mst            : 0
/sys/module/radeon/parameters/no_wb          : 0
/sys/module/radeon/parameters/pcie_gen2      : -1
/sys/module/radeon/parameters/r4xx_atom      : 0
/sys/module/radeon/parameters/runpm          : -1
/sys/module/radeon/parameters/si_support     : 1
/sys/module/radeon/parameters/test           : 0
/sys/module/radeon/parameters/tv             : 1
/sys/module/radeon/parameters/use_pflipirq   : 2
/sys/module/radeon/parameters/uvd            : 1
/sys/module/radeon/parameters/vce            : 1
/sys/module/radeon/parameters/vm_block_size  : 12
/sys/module/radeon/parameters/vm_size        : 8
/sys/module/radeon/parameters/vramlimit      : 0

But I was not able to set any of those:
Code:
# echo 1 > /sys/module/radeon/parameters/dpm
-bash: /sys/module/radeon/parameters/dpm: Permission denied
# echo 1 > /sys/module/radeon/parameters/dynclks
-bash: /sys/module/radeon/parameters/dynclks: Permission denied

Are these only possible at boot time? I currently have radeon built into the kernel as I was needing it early at boot for better resolution.

Why are some power management related options in /sys/class/drm/card0/device and others in /sys/module/radeon/parameters?
How are the Xorg.conf (https://wiki.ubuntuusers.de/Grafikkarten/AMD/radeon/#Xorg-Treiber-Optionen) options related?
_________________
ppc:PowerBook5,8 15"(1440)-G4/1.67,2G|amd64:HP EliteBook 8560w,i7-2620M,16G|Acer Z5610 (Core2QuadQ8200),8G|amd64-prefix:OpenSuse|HP EliteDesk 800G1 i7-4790|HP Compaq Pro 6300 i7-3770
Lila-Theme
Back to top
View user's profile Send private message
Massimo B.
Veteran
Veteran


Joined: 09 Feb 2005
Posts: 1556
Location: Germany

PostPosted: Tue Oct 31, 2017 1:40 pm    Post subject: Reply with quote

As for dpm that seems to be the best method on modern HD chipsets. While needing the radeon module built into the kernel for early framebuffer I only got dpm working by CMDLINE radeon.dpm=1.
Code:
# cat /sys/module/radeon/parameters/dpm
1

Massimo B. wrote:
I got the machine stable at least without further crashes with this:
Code:
# cat /etc/local.d/sys.start
#!/usr/bin/env bash
echo battery    > /sys/class/drm/card0/device/power_dpm_state
echo low        >  /sys/class/drm/card0/device/power_dpm_force_performance_level
As I had another crash meanwhile, I wonder if those had any effect without enabling dpm at boot time.

Does disabling Acceleration have any benefit on power consumption and heat on the chip?
Code:
# cat /etc/X11/xorg.conf.d/30radeon.conf
Section "Device"
    Identifier "card0"
    Driver "radeon"
    Option "Accel" "false"
EndSection

_________________
ppc:PowerBook5,8 15"(1440)-G4/1.67,2G|amd64:HP EliteBook 8560w,i7-2620M,16G|Acer Z5610 (Core2QuadQ8200),8G|amd64-prefix:OpenSuse|HP EliteDesk 800G1 i7-4790|HP Compaq Pro 6300 i7-3770
Lila-Theme
Back to top
View user's profile Send private message
Massimo B.
Veteran
Veteran


Joined: 09 Feb 2005
Posts: 1556
Location: Germany

PostPosted: Sun Nov 05, 2017 5:19 pm    Post subject: Reply with quote

Alternative and risky way to reduce temperature on the chip would be do lower frequency or voltage:

https://github.com/kobalicek/amdtweak
https://github.com/matszpk/amdcovc
https://github.com/OhGodACompany/OhGodATool

I was not going that way yet, but I got the machine quite stable with Option "Accel" "false" in xorg.conf.d, don't know exactly why. Only drawback that I don't understand: Switching back to CTRL+ALT+F1 Terminal seems to freeze the machine, no way back to F7, or even rebooting doesn't work.

I tried to build that amdcovc which sounds promising. I got this dependency emerged:
Code:
x11-libs/amd-adl-sdk-10.2::nashedelo
But trying to install
Code:
dev-libs/amdgpu-pro-opencl-17.30.465504::hnaparst
I failed at
Code:
 * Fetch failed for 'dev-libs/amdgpu-pro-opencl-17.30.465504', Log file:
 *  '/var/log/portage/dev-libs:amdgpu-pro-opencl-17.30.465504:20171105-171703.log.gz'
 * Please download the AMDGPU-Pro Driver 17.30 for Ubuntu from
 *     https://support.amd.com/en-us/kb-articles/Pages/AMDGPU-PRO-Driver-for-Linux-Release-Notes.aspx
 * The archive should then be placed into /var/cache/portage/distfiles.
..which I could not find around the net, there is currently only a 17.40 package available...
Code:
# pwd
/root/src/other/amdcovc

# make
g++ -Wall -O3 -std=c++11  -o amdcovc amdcovc.o -ldl -lpci -lm -lOpenCL -pthread
/usr/lib/gcc/x86_64-pc-linux-gnu/6.4.0/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lOpenCL
collect2: error: ld returned 1 exit status
make: *** [Makefile:23: amdcovc] Error 1

_________________
ppc:PowerBook5,8 15"(1440)-G4/1.67,2G|amd64:HP EliteBook 8560w,i7-2620M,16G|Acer Z5610 (Core2QuadQ8200),8G|amd64-prefix:OpenSuse|HP EliteDesk 800G1 i7-4790|HP Compaq Pro 6300 i7-3770
Lila-Theme
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum