Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Info] Sapphire Pulse Vega 56 Stock Clocks #6

Open
Enverex opened this issue Dec 10, 2018 · 21 comments
Open

[Info] Sapphire Pulse Vega 56 Stock Clocks #6

Enverex opened this issue Dec 10, 2018 · 21 comments
Assignees
Labels
enhancement New feature or request

Comments

@Enverex
Copy link

Enverex commented Dec 10, 2018

As requested, here are the stock clocks and voltages for the Sapphire Pulse Vega 56 (http://www.sapphiretech.com/productdetial.asp?pid=19E343EE-46D4-45E8-9E3E-1693AB30DF14&lang=eng).

== Core
Mhz	mV
852 	800
991 	900
1138 	950
1269 	1000
1312 	1050
1474 	1100
1538 	1150
1590 	1200

== Memory
Mhz	mV
167 	800
500 	800
700 	900
800 	950
@dasunsrule32 dasunsrule32 self-assigned this Dec 10, 2018
@dasunsrule32 dasunsrule32 added the enhancement New feature or request label Dec 10, 2018
@dasunsrule32
Copy link
Owner

This will be for setting per-card defaults. I'll use this as the baseline for vega56. Thanks for the request.

@dasunsrule32
Copy link
Owner

Hi @Enverex

Can you run the following for me and see what you get? I'm trying to see if there is a good way to detect the cards. Thanks! :)

SYSPATH=$(find /sys/devices -name pp_od_clk_voltage 2>/dev/null | sed 's|/pp_od_clk_voltage||g' |head -n1)
cat $SYSPATH/hwmon/hwmon0/device/class
cat $SYSPATH/hwmon/hwmon0/device/device
cat $SYSPATH/hwmon/hwmon0/device/vendor
cat $SYSPATH/hwmon/hwmon0/device/revision

@Enverex
Copy link
Author

Enverex commented Dec 11, 2018

Sure.

[06:03:50] arcade@arcanite ~ $ cat $SYSPATH/hwmon/hwmon0/device/class
0x030000
[06:03:50] arcade@arcanite ~ $ cat $SYSPATH/hwmon/hwmon0/device/device
0x687f
[06:03:50] arcade@arcanite ~ $ cat $SYSPATH/hwmon/hwmon0/device/vendor
0x1002
[06:03:50] arcade@arcanite ~ $ cat $SYSPATH/hwmon/hwmon0/device/revision
0xc3

@dasunsrule32
Copy link
Owner

dasunsrule32 commented Dec 11, 2018

@Enverex Ok, well, those all match my vega64 card, with the exception of the revision... Those won't work.

Can you try this and see what returns? Thanks for the help!
lspci -knn|grep VGA

@Enverex
Copy link
Author

Enverex commented Dec 11, 2018

Probably exactly what you were expecting unfortunately...

03:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Vega 10 XL/XT [Radeon RX Vega 56/64] [1002:687f] (rev c3)

@dasunsrule32
Copy link
Owner

dasunsrule32 commented Dec 11, 2018

Yes, indeed... I'm going to have to figure out a differentiating way to distinguish the cards on Linux... I'm open to ideas lol

It's the same:

lspci -knn|grep VGA|grep -i amd|awk '{print $15}'
[1002:687f]

@Enverex
Copy link
Author

Enverex commented Dec 11, 2018

I'm not sure anything of use is exposed to Linux to identify different brands to be honest. hwinfo says:

07: PCI 300.0: 0300 VGA compatible controller (VGA)
  [Created at pci.378]
  Unique ID: svHJ.xJHnOs76114
  Parent ID: B35A.yia8BVVjfyD
  SysFS ID: /devices/pci0000:00/0000:00:01.0/0000:01:00.0/0000:02:00.0/0000:03:00.0
  SysFS BusID: 0000:03:00.0
  Hardware Class: graphics card
  Model: "ATI Vega [Radeon RX Vega]"
  Vendor: pci 0x1002 "ATI Technologies Inc"
  Device: pci 0x687f "Vega [Radeon RX Vega]"
  SubVendor: pci 0x1da2
  SubDevice: pci 0xe376
  Revision: 0xc3
  Driver: "amdgpu"
  Driver Modules: "amdgpu"
  Memory Range: 0x2000000000-0x21ffffffff (ro,non-prefetchable)
  Memory Range: 0x2200000000-0x22001fffff (ro,non-prefetchable)
  I/O Ports: 0xe000-0xefff (rw)
  Memory Range: 0xde100000-0xde17ffff (rw,non-prefetchable)
  Memory Range: 0xde180000-0xde19ffff (ro,non-prefetchable,disabled)
  IRQ: 143 (432103 events)
  Module Alias: "pci:v00001002d0000687Fsv00001DA2sd0000E376bc03sc00i00"
  Driver Info #0:
    Driver Status: amdgpu is active
    Driver Activation Cmd: "modprobe amdgpu"
  Config Status: cfg=new, avail=yes, need=no, active=unknown
  Attached to: #12 (PCI bridge)

Primary display adapter: #7

Nothing seems to be specific to this brand as opposed to Vega 56's in general.

@dasunsrule32
Copy link
Owner

dasunsrule32 commented Dec 11, 2018

Can you run the following and paste the output? Thanks again :)
lspci -v -s 03:00.0

I'm getting a line that might be specific to the card I have... I'm betting you return Vega 10 XL under Subsystem: :)

0d:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Vega 10 XL/XT [Radeon RX Vega 56/64] (rev c1) (prog-if 00 [VGA controller])
	Subsystem: Advanced Micro Devices, Inc. [AMD/ATI] Vega 10 XT [Radeon RX Vega 64]
	Flags: bus master, fast devsel, latency 0, IRQ 61
	Memory at e0000000 (64-bit, prefetchable) [size=256M]
	Memory at f0000000 (64-bit, prefetchable) [size=2M]
	I/O ports at d000 [size=256]
	Memory at f7800000 (32-bit, non-prefetchable) [size=512K]
	Expansion ROM at f7880000 [disabled] [size=128K]
	Capabilities: [48] Vendor Specific Information: Len=08 <?>
	Capabilities: [50] Power Management version 3
	Capabilities: [64] 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
	Capabilities: [2a0] Access Control Services
	Capabilities: [2b0] Address Translation Service (ATS)
	Capabilities: [2c0] Page Request Interface (PRI)
	Capabilities: [2d0] Process Address Space ID (PASID)
	Capabilities: [320] Latency Tolerance Reporting
	Kernel driver in use: amdgpu
	Kernel modules: amdgpu

@Enverex
Copy link
Author

Enverex commented Dec 11, 2018

Looks like there is something this time...

[11:50:07] root@arcanite ~ # lspci -v -s 03:00.0
03:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Vega 10 XL/XT [Radeon RX Vega 56/64] (rev c3) (prog-if 00 [VGA controller])
        Subsystem: Sapphire Technology Limited Vega 10 XT [Radeon RX Vega 64]
        Flags: bus master, fast devsel, latency 0, IRQ 143
        [virtual] Memory at 2000000000 (64-bit, prefetchable) [size=8G]
        [virtual] Memory at 2200000000 (64-bit, prefetchable) [size=2M]
        I/O ports at e000 [size=256]
        Memory at de100000 (32-bit, non-prefetchable) [size=512K]
        Expansion ROM at de180000 [disabled] [size=128K]
        Capabilities: [48] Vendor Specific Information: Len=08 <?>
        Capabilities: [50] Power Management version 3
        Capabilities: [64] 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] Resizable BAR <?>
        Capabilities: [270] Secondary PCI Express <?>
        Capabilities: [2a0] Access Control Services
        Capabilities: [2b0] Address Translation Service (ATS)
        Capabilities: [2c0] Page Request Interface (PRI)
        Capabilities: [2d0] Process Address Space ID (PASID)
        Capabilities: [320] Latency Tolerance Reporting
        Kernel driver in use: amdgpu
        Kernel modules: amdgpu

@dasunsrule32
Copy link
Owner

dasunsrule32 commented Dec 11, 2018

This is giving a bit different info, I'm diffing ours to see if there is something viable to look at...

Out of curiosity, have you flashed the Vega64 bios on this card?

One more to run, if you can? lspci -knn and give me the output of 03:00.0. Should be about 4 lines.

@Enverex
Copy link
Author

Enverex commented Dec 12, 2018

Nope, stock card/BIOS, etc. Notice in the previous output it did at least say "Subsystem: Sapphire Technology Limited Vega 10 XT [Radeon RX Vega 64]" so it was identified as a Sapphire branded card (where as yours just says AMD).

Here are the lines from lspci -knn:

03:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Vega 10 XL/XT [Radeon RX Vega 56/64] [1002:687f] (rev c3)
        Subsystem: Sapphire Technology Limited Vega 10 XT [Radeon RX Vega 64] [1da2:e376]
        Kernel driver in use: amdgpu
        Kernel modules: amdgpu
03:00.1 Audio device [0403]: Advanced Micro Devices, Inc. [AMD/ATI] Device [1002:aaf8]
        Subsystem: Advanced Micro Devices, Inc. [AMD/ATI] Device [1002:aaf8]
        Kernel driver in use: snd_hda_intel
        Kernel modules: snd_hda_intel

Conspiracy theory: Maybe the Sapphire 56 is actually a downclocked Vega 64? It's a smaller card than normal, but seems to have no issues overclocking while also undervolting like it has a LOT of headroom spare. Notice how small the card actually is:
image

@dasunsrule32
Copy link
Owner

dasunsrule32 commented Dec 12, 2018

I think we might have something... Look at the 03:00.0 under Subsystem:. Our identifiers are different, see below. I'm trying to get someone else with a vega56 to run that same command and post the results.

0d:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Vega 10 XL/XT [Radeon RX Vega 56/64] [1002:687f] (rev c1)
	Subsystem: Advanced Micro Devices, Inc. [AMD/ATI] Vega 10 XT [Radeon RX Vega 64] [1002:0b36]
	Kernel driver in use: amdgpu
	Kernel modules: amdgpu

Mine is [1002:0b36] and yours is [1da2:e376]. Looks like I might need to start a subsystem ID file and pull that in to an array, if this is the way to do it. Then maybe a case with the various default voltages.

It honestly wouldn't surprise me if it was, I mean they do that with Threadripper and Epyc. Disabling some of the cores/dies.

@dasunsrule32
Copy link
Owner

dasunsrule32 commented Dec 12, 2018

This horrible concoction seems to get that subsystem ID...

for s in $(lspci | grep VGA | awk '{print $1}'); do lspci -knn -v -s $s; done|grep Subsystem|grep AMD|awk '{print $14}'

This is a little simpler and seems to work as well:

lspci -v -knn | grep VGA -A 1|grep AMD|grep Subsystem|awk '{print $14}'

This gives some of the info as well, but might be easier to parse:

dmesg |grep -i vega
[    1.024722] [drm] initializing kernel modesetting (VEGA10 0x1002:0x687F 0x1002:0x0B36 0xC1).
[    1.024737] [drm] add ip block number 2 <vega10_ih>

Can you dump the results of this as well?
xrandr --listproviders

@Enverex
Copy link
Author

Enverex commented Dec 12, 2018

Neither of those two return anything for me. I think it's your "grep AMD" breaking it as my subsystem line doesn't contain AMD.

The dmesg Vega line was:

[Tue Dec 11 23:12:39 2018] [drm] initializing kernel modesetting (VEGA10 0x1002:0x687F 0x1DA2:0xE376 0xC3).
[Tue Dec 11 23:12:39 2018] [drm] add ip block number 2 <vega10_ih>

XRandR gives:

Providers: number : 1
Provider 0: id: 0x59 cap: 0xf, Source Output, Sink Output, Source Offload, Sink Offload crtcs: 6 outputs: 4 associated providers: 0 name:Radeon RX Vega @ pci:0000:03:00.0

@dasunsrule32
Copy link
Owner

dasunsrule32 commented Dec 12, 2018

Thanks for all the help!

Does this one work for you?
lspci -v -knn | grep Vega -A 1|grep AMD|grep Subsystem|awk '{print $14}'
and this one:
dmesg |grep VEGA|awk '{print $9}' gets me 0x1002:0x0B36

It looks like I can use the dmesg line as well, since it includes that unique identifier: 0x1DA2:0xE376

@Enverex
Copy link
Author

Enverex commented Dec 12, 2018

Nope (neither work for me, first gives nothing, second says "modesetting"). Wouldn't be a good idea to use that anyway as "print $14" is incredibly specific and will only work on your string (as it takes the 14th thing on the row, which will be different each time depending on the vendor's name).

This should work universally:

lspci -knn | grep "Subsystem:.* Vega " | awk '{print $NF}'

Does the lspci output, looks for a line with "Subsystem:" on it followed by " Vega " and then prints the last thing on the line (which should always be the Vendor:Device ID pair).

@dasunsrule32
Copy link
Owner

dasunsrule32 commented Dec 12, 2018

Ha, I totally forgot about $NF. Thanks! :) It works fine BTW

@dasunsrule32
Copy link
Owner

So I was looking at the docs, it looks like all the SYSFS api's are the same across all AMD GPU's. So that means it should be fairly trivial to add new devices to the script. :)

DOCS

@dasunsrule32
Copy link
Owner

dasunsrule32 commented Dec 13, 2018

@Enverex I think I might've found a better way to get this, so it will work on all cards, not just Vega's. Can you give me the following?

SYSPATH=$(find /sys/devices -name pp_od_clk_voltage 2>/dev/null | sed 's|/pp_od_clk_voltage||g' |head -n1)
cat $SYSPATH/subsystem_device
cat $SYSPATH/uevent

@Enverex
Copy link
Author

Enverex commented Dec 13, 2018

That gives...

[10:24:51] arcade@arcanite ~ $ cat $SYSPATH/subsystem_device
0xe376
[10:24:51] arcade@arcanite ~ $ cat $SYSPATH/uevent
DRIVER=amdgpu
PCI_CLASS=30000
PCI_ID=1002:687F
PCI_SUBSYS_ID=1DA2:E376
PCI_SLOT_NAME=0000:03:00.0
MODALIAS=pci:v00001002d0000687Fsv00001DA2sd0000E376bc03sc00i00

So it looks like it's subsystem_vendor and subsystem_device that you want.

@dasunsrule32
Copy link
Owner

Yep, that's what I just wanted to verify! Thanks 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants