Git Product home page Git Product logo

Comments (21)

dasunsrule32 avatar dasunsrule32 commented on May 18, 2024

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

from radeon-scripts.

dasunsrule32 avatar dasunsrule32 commented on May 18, 2024

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

from radeon-scripts.

Enverex avatar Enverex commented on May 18, 2024

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

from radeon-scripts.

dasunsrule32 avatar dasunsrule32 commented on May 18, 2024

@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

from radeon-scripts.

Enverex avatar Enverex commented on May 18, 2024

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)

from radeon-scripts.

dasunsrule32 avatar dasunsrule32 commented on May 18, 2024

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]

from radeon-scripts.

Enverex avatar Enverex commented on May 18, 2024

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.

from radeon-scripts.

dasunsrule32 avatar dasunsrule32 commented on May 18, 2024

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

from radeon-scripts.

Enverex avatar Enverex commented on May 18, 2024

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

from radeon-scripts.

dasunsrule32 avatar dasunsrule32 commented on May 18, 2024

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.

from radeon-scripts.

Enverex avatar Enverex commented on May 18, 2024

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

from radeon-scripts.

dasunsrule32 avatar dasunsrule32 commented on May 18, 2024

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.

from radeon-scripts.

dasunsrule32 avatar dasunsrule32 commented on May 18, 2024

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

from radeon-scripts.

Enverex avatar Enverex commented on May 18, 2024

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

from radeon-scripts.

dasunsrule32 avatar dasunsrule32 commented on May 18, 2024

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

from radeon-scripts.

Enverex avatar Enverex commented on May 18, 2024

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).

from radeon-scripts.

dasunsrule32 avatar dasunsrule32 commented on May 18, 2024

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

from radeon-scripts.

dasunsrule32 avatar dasunsrule32 commented on May 18, 2024

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

from radeon-scripts.

dasunsrule32 avatar dasunsrule32 commented on May 18, 2024

@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

from radeon-scripts.

Enverex avatar Enverex commented on May 18, 2024

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.

from radeon-scripts.

dasunsrule32 avatar dasunsrule32 commented on May 18, 2024

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

from radeon-scripts.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.