Announcement

Collapse
No announcement yet.

Sapphire DUAL-X R9 270X not running at full clock speeds (AMDGPU and radeon)

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Sapphire DUAL-X R9 270X not running at full clock speeds (AMDGPU and radeon)

    hello, I've been using linux gentoo as my daily driver and only OS for almost 2 years

    I've never noticed this before because even though I game a lot, I rarely play games that are GPU intensive enough to drop below 60fps, but I recently noticed that my gpu appears to be running well below its default clocks (should be 1070 MHz core, 1400 MHz memory) although the voltage appears to be correct:

    Code:
    # echo high > /sys/class/drm/card0/device/power_dpm_force_performance_level 
    # cat /sys/kernel/debug/dri/0/amdgpu_pm_info 
    uvd    vclk: 0 dclk: 0
    power level 3    sclk: 85000 mclk: 90000 vddc: 1238 vddci: 1025 pcie gen: 3
    I already tried running unigine to make sure that it wasn't somehow downclocking even with power_dpm_force_performance_level, but no dice.

    I also tried using overdrive/powerplay, but it appears to be locked at zero:
    Code:
    # cat /sys/class/drm/card0/device/pp_sclk_od 
    0
    # echo 5 > /sys/class/drm/card0/device/pp_sclk_od
    # cat /sys/class/drm/card0/device/pp_sclk_od 
    0
    I've recently upgraded to amdgpu (non-pro), but I had the same exact issue with radeon before.

    as a sanity check, I tested unigine heaven on a throwaway windows 7 install with the latest latest radeon crimson drivers, ran it in OpenGL mode and got about double the framerate that I got on linux on average. the fans on the card also seem to work harder on windows, so I'm pretty sure it's actually running at those low clocks on linux.

    I also installed a fresh copy of ubuntu 16.04 on another drive and tested amdgpu-pro 16.6 and got the same results: same clocks, overdrive not working and around the same framerate (slightly higher probably because of better optimization on the amdgpu-pro driver, but not much).

    any idea on how to fix this? also whose bug tracker do I go to if I were to report this as a bug? kernel? mesa? I honestly don't know what's at fault here, but my guess is that the kernel is recognizing my chip incorrectly somehow.

    my gpu is part of the Southern Islands family and it's a PITCAIRN (Sapphire DUAL-X R9 270X).

    I'm running gentoo kernel 4.10.1 on a i7-4790k. my motherboard is a z97x-ud3h

    here's some info about my package versions:
    Code:
    # equery list 'mesa'
     * Searching for mesa ...
    [I-O] [  ] media-libs/mesa-9999:0 <- this is Mesa 17.1.0-devel
    
    # equery list 'xorg-server'
     * Searching for xorg-server ...
    [IP-] [  ] x11-base/xorg-server-1.19.2:0/1.19.2
    
    # equery list 'libdrm'
     * Searching for libdrm ...
    [IP-] [  ] x11-libs/libdrm-2.4.75:0
    
    # equery list 'llvm'
     * Searching for llvm ...
    [IP-] [  ] sys-devel/llvm-3.9.1-r1:0/3.9.1
    glxinfo: https://gist.github.com/Francesco149...28336553f1087c

    Code:
    $ dmesg | grep -i amd
    [    0.561457] [drm] amdgpu kernel modesetting enabled.
    [    0.561669] amdgpu 0000:01:00.0: VRAM: 2048M 0x0000000000000000 - 0x000000007FFFFFFF (2048M used)
    [    0.561672] amdgpu 0000:01:00.0: GTT: 2048M 0x0000000080000000 - 0x00000000FFFFFFFF
    [    0.561712] [drm] amdgpu: 2048M of VRAM memory ready
    [    0.561714] [drm] amdgpu: 2048M of GTT memory ready.
    [    0.582042] amdgpu 0000:01:00.0: PCIE GART of 2048M enabled (table at 0x0000000000040000).
    [    0.582077] amdgpu 0000:01:00.0: amdgpu: using MSI.
    [    0.582089] [drm] amdgpu: irq initialized.
    [    0.582116] [drm] amdgpu: dpm initialized
    [    0.582209] [drm] AMDGPU Display Connectors
    [    0.582292] amdgpu 0000:01:00.0: fence driver on ring 0 use gpu addr 0x0000000080000010, cpu addr 0xffff88040b0fb010
    [    0.582317] amdgpu 0000:01:00.0: fence driver on ring 1 use gpu addr 0x0000000080000020, cpu addr 0xffff88040b0fb020
    [    0.582335] amdgpu 0000:01:00.0: fence driver on ring 2 use gpu addr 0x0000000080000030, cpu addr 0xffff88040b0fb030
    [    0.582356] amdgpu 0000:01:00.0: fence driver on ring 3 use gpu addr 0x0000000080000040, cpu addr 0xffff88040b0fb040
    [    0.582374] amdgpu 0000:01:00.0: fence driver on ring 4 use gpu addr 0x0000000080000050, cpu addr 0xffff88040b0fb050
    [    0.846895] fbcon: amdgpudrmfb (fb0) is primary device
    [    1.133261] amdgpu 0000:01:00.0: fb0: amdgpudrmfb frame buffer device
    [    1.407508] [drm] Initialized amdgpu 3.9.0 20150101 for 0000:01:00.0 on minor 0
    Code:
     $ dmesg | grep -i drm
    [    0.561448] [drm] Initialized
    [    0.561457] [drm] amdgpu kernel modesetting enabled.
    [    0.561533] [drm] initializing kernel modesetting (PITCAIRN 0x1002:0x6810 0x174B:0xE271 0x00).
    [    0.561539] [drm] register mmio base: 0xF7E00000
    [    0.561540] [drm] register mmio size: 262144
    [    0.561589] [drm] GPU post is not needed
    [    0.561675] [drm] Detected VRAM RAM=2048M, BAR=256M
    [    0.561677] [drm] RAM width 256bits GDDR5
    [    0.561712] [drm] amdgpu: 2048M of VRAM memory ready
    [    0.561714] [drm] amdgpu: 2048M of GTT memory ready.
    [    0.561722] [drm] GART: num cpu pages 524288, num gpu pages 524288
    [    0.582062] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
    [    0.582063] [drm] Driver supports precise vblank timestamp query.
    [    0.582089] [drm] amdgpu: irq initialized.
    [    0.582094] [drm] probing gen 2 caps for device 8086:c01 = 261ad03/e
    [    0.582108] [drm] Internal thermal controller with fan control
    [    0.582116] [drm] amdgpu: dpm initialized
    [    0.582209] [drm] AMDGPU Display Connectors
    [    0.582212] [drm] Connector 0:
    [    0.582213] [drm]   DP-1
    [    0.582214] [drm]   HPD4
    [    0.582216] [drm]   DDC: 0x194c 0x194c 0x194d 0x194d 0x194e 0x194e 0x194f 0x194f
    [    0.582218] [drm]   Encoders:
    [    0.582219] [drm]     DFP1: INTERNAL_UNIPHY2
    [    0.582220] [drm] Connector 1:
    [    0.582221] [drm]   HDMI-A-1
    [    0.582223] [drm]   HPD5
    [    0.582224] [drm]   DDC: 0x1954 0x1954 0x1955 0x1955 0x1956 0x1956 0x1957 0x1957
    [    0.582226] [drm]   Encoders:
    [    0.582227] [drm]     DFP2: INTERNAL_UNIPHY2
    [    0.582228] [drm] Connector 2:
    [    0.582229] [drm]   DVI-I-1
    [    0.582230] [drm]   HPD6
    [    0.582231] [drm]   DDC: 0x1960 0x1960 0x1961 0x1961 0x1962 0x1962 0x1963 0x1963
    [    0.582233] [drm]   Encoders:
    [    0.582234] [drm]     DFP3: INTERNAL_UNIPHY
    [    0.582236] [drm]     CRT1: INTERNAL_KLDSCP_DAC1
    [    0.582237] [drm] Connector 3:
    [    0.582238] [drm]   DVI-D-1
    [    0.582239] [drm]   HPD1
    [    0.582240] [drm]   DDC: 0x195c 0x195c 0x195d 0x195d 0x195e 0x195e 0x195f 0x195f
    [    0.582242] [drm]   Encoders:
    [    0.582243] [drm]     DFP4: INTERNAL_UNIPHY1
    [    0.582585] [drm] probing gen 2 caps for device 8086:c01 = 261ad03/e
    [    0.582588] [drm] PCIE gen 3 link speeds already enabled
    [    0.733287] [drm] ring test on 0 succeeded in 9 usecs
    [    0.735294] [drm] ring test on 1 succeeded in 1 usecs
    [    0.735300] [drm] ring test on 2 succeeded in 2 usecs
    [    0.735306] [drm] ring test on 3 succeeded in 3 usecs
    [    0.735312] [drm] ring test on 4 succeeded in 3 usecs
    [    0.846843] [drm] fb mappable at 0xE0443000
    [    0.846847] [drm] vram apper at 0xE0000000
    [    0.846848] [drm] size 8294400
    [    0.846849] [drm] fb depth is 24
    [    0.846850] [drm]    pitch is 7680
    [    0.846895] fbcon: amdgpudrmfb (fb0) is primary device
    [    1.133261] amdgpu 0000:01:00.0: fb0: amdgpudrmfb frame buffer device
    [    1.145785] [drm] ib test on ring 0 succeeded
    [    1.145826] [drm] ib test on ring 1 succeeded
    [    1.145870] [drm] ib test on ring 2 succeeded
    [    1.145914] [drm] ib test on ring 3 succeeded
    [    1.145956] [drm] ib test on ring 4 succeeded
    [    1.407508] [drm] Initialized amdgpu 3.9.0 20150101 for 0000:01:00.0 on minor 0
    [    1.730324] ata1.00: supports DRM functions and may not be fully accessible
    [    1.732063] ata1.00: supports DRM functions and may not be fully accessible
    gpu info from lspci -vv
    Code:
    01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Curacao XT [Radeon R7 370 / R9 270X/370 OEM] (prog-if 00 [VGA controller])
            Subsystem: PC Partner Limited / Sapphire Technology Curacao XT [Radeon R7 370 / R9 270X/370 OEM]
            Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+
            Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
            Latency: 0, Cache Line Size: 64 bytes
            Interrupt: pin A routed to IRQ 25
            Region 0: Memory at e0000000 (64-bit, prefetchable) [size=256M]
            Region 2: Memory at f7e00000 (64-bit, non-prefetchable) [size=256K]
            Region 4: 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
                    Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=0mA PME(D0-,D1+,D2+,D3hot+,D3cold-)
                    Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
            Capabilities: [58] Express (v2) Legacy Endpoint, MSI 00
                    DevCap: MaxPayload 256 bytes, PhantFunc 0, Latency L0s <4us, L1 unlimited
                            ExtTag+ AttnBtn- AttnInd- PwrInd- RBE+ FLReset-
                    DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
                            RlxdOrd- ExtTag+ PhantFunc- AuxPwr- NoSnoop+
                            MaxPayload 256 bytes, MaxReadReq 512 bytes
                    DevSta: CorrErr+ UncorrErr- FatalErr- UnsuppReq+ AuxPwr- TransPend-
                    LnkCap: Port #0, Speed 8GT/s, Width x16, ASPM L0s L1, Exit Latency L0s <64ns, L1 <1us
                            ClockPM- Surprise- LLActRep- BwNot- ASPMOptComp+
                    LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- CommClk+
                            ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
                    LnkSta: Speed 8GT/s, Width x16, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
                    DevCap2: Completion Timeout: Not Supported, TimeoutDis-, LTR-, OBFF Not Supported
                    DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-, LTR-, OBFF Disabled
                    LnkCtl2: Target Link Speed: 8GT/s, EnterCompliance- SpeedDis-
                             Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS-
                             Compliance De-emphasis: -6dB
                    LnkSta2: Current De-emphasis Level: -3.5dB, EqualizationComplete+, EqualizationPhase1+
                             EqualizationPhase2-, EqualizationPhase3-, LinkEqualizationRequest-
            Capabilities: [a0] MSI: Enable+ Count=1/1 Maskable- 64bit+
                    Address: 00000000feeff00c  Data: 41a1
            Capabilities: [100 v1] Vendor Specific Information: ID=0001 Rev=1 Len=010 <?>
            Capabilities: [150 v2] Advanced Error Reporting
                    UESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
                    UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
                    UESvrt: DLP+ SDES+ TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
                    CESta:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+
                    CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+
                    AERCap: First Error Pointer: 00, GenCap+ CGenEn- ChkCap+ ChkEn-
            Capabilities: [270 v1] #19
            Capabilities: [2b0 v1] Address Translation Service (ATS)
                    ATSCap: Invalidate Queue Depth: 00
                    ATSCtl: Enable-, Smallest Translation Unit: 00
            Capabilities: [2c0 v1] Page Request Interface (PRI)
                    PRICtl: Enable- Reset-
                    PRISta: RF- UPRGI- Stopped+
                    Page Request Capacity: 00000020, Page Request Allocation: 00000000
            Capabilities: [2d0 v1] Process Address Space ID (PASID)
                    PASIDCap: Exec+ Priv+, Max PASID Width: 10
                    PASIDCtl: Enable- Exec- Priv-
            Kernel driver in use: amdgpu

  • #2
    There are quirks for various cards with dpm stability problems, see this in si_dpm code:

    Code:
    /* cards with dpm stability problems */
    static struct si_dpm_quirk si_dpm_quirk_list[] = {
        /* PITCAIRN - https://bugs.freedesktop.org/show_bug.cgi?id=76490 */
        { PCI_VENDOR_ID_ATI, 0x6810, 0x1462, 0x3036, 0, 120000 },
        { PCI_VENDOR_ID_ATI, 0x6811, 0x174b, 0xe271, 0, 120000 },
        { PCI_VENDOR_ID_ATI, 0x6811, 0x174b, 0x2015, 0, 120000 },
    { PCI_VENDOR_ID_ATI, 0x6810, 0x174b, 0xe271, 85000, 90000 },
        { PCI_VENDOR_ID_ATI, 0x6811, 0x1462, 0x2015, 0, 120000 },
        { PCI_VENDOR_ID_ATI, 0x6811, 0x1043, 0x2015, 0, 120000 },
        { PCI_VENDOR_ID_ATI, 0x6811, 0x148c, 0x2015, 0, 120000 },
        { PCI_VENDOR_ID_ATI, 0x6810, 0x1682, 0x9275, 0, 120000 },
        { 0, 0, 0, 0 },
    };
    https://git.kernel.org/pub/scm/linux...s/tags/v4.10.1

    You might wanna remove that line to see what happens and comment in that bug mentioned if it is fine for you
    Last edited by dungeon; 03-11-2017, 02:51 PM.

    Comment


    • #3
      Originally posted by dungeon View Post
      There are quirks for various cards with dpm stability problems, see this in si_dpm code:

      Code:
      /* cards with dpm stability problems */
      static struct si_dpm_quirk si_dpm_quirk_list[] = {
      /* PITCAIRN - https://bugs.freedesktop.org/show_bug.cgi?id=76490 */
      { PCI_VENDOR_ID_ATI, 0x6810, 0x1462, 0x3036, 0, 120000 },
      { PCI_VENDOR_ID_ATI, 0x6811, 0x174b, 0xe271, 0, 120000 },
      { PCI_VENDOR_ID_ATI, 0x6811, 0x174b, 0x2015, 0, 120000 },
      { PCI_VENDOR_ID_ATI, 0x6810, 0x174b, 0xe271, 85000, 90000 },
      { PCI_VENDOR_ID_ATI, 0x6811, 0x1462, 0x2015, 0, 120000 },
      { PCI_VENDOR_ID_ATI, 0x6811, 0x1043, 0x2015, 0, 120000 },
      { PCI_VENDOR_ID_ATI, 0x6811, 0x148c, 0x2015, 0, 120000 },
      { PCI_VENDOR_ID_ATI, 0x6810, 0x1682, 0x9275, 0, 120000 },
      { 0, 0, 0, 0 },
      };
      https://git.kernel.org/pub/scm/linux...s/tags/v4.10.1

      You might wanna remove that line to see what happens and comment in that bug mentioned if it is fine for you
      wow, that actually fixed it! thank you, now I'm running at full speed. I'm gonna do some testing and report on that bug

      Comment


      • #4
        UPDATE: I also edited this piece of code to let my memory clock hit 1400 MHz which is stock speed for this card, and I'm still running rock solid:

        Code:
            /* limit all SI kickers */
            if (rdev->family == CHIP_PITCAIRN) {
                if ((rdev->pdev->revision == 0x81) ||
                    (rdev->pdev->device == 0x6810) ||
                    (rdev->pdev->device == 0x6811) ||
                    (rdev->pdev->device == 0x6816) ||
                    (rdev->pdev->device == 0x6817) ||
                    (rdev->pdev->device == 0x6806))
                    max_mclk = 145000;
            } else if (rdev->family == CHIP_VERDE) {
        ...
        both of these tweaks also work on the amdgpu-pro proprietary driver by editing the same stuff in /usr/src/amdgpu-pro-* and rebuilding the dkms module

        Comment

        Working...
        X