Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Changelog

**GPU profiles**: Settings › GPU control has a Profiles section that saves the setup the card holds under a name — a power limit, or the fan curve with zero RPM, the GFX clocks and the voltage — and loads it again in one click. Loading goes through the same path as changing a value by hand, so every limit is checked against the card in front of you: a profile made on another card, or one whose value this card no longer takes, is still listed and still loads, and the section names the part that was left out (a raised clock or power limit needs Allow overclocking). With Remember on, a loaded profile comes back at launch and after a wake like any other change. Names are trimmed and unique, the row that matches what the card holds now is marked, and deleting asks first. Tested with unit tests only.

**GPU power limit, from the optional GPUSensors.kext**: when the kext is loaded and an administrator has allowed GPU changes, Settings › GPU control and the panel can lower the RX 6800 XT's power limit in 10 W steps down to the card's own minimum (225 W on a card that starts at 240 W). The kext checks every request and goes back to the start-up limit on its own when RyzenStatus quits, stops answering or the Mac sleeps; a switch on the page asks for the same limit again after launch and wake, only while changes are allowed and never with a password. Another switch, Allow changes after restart too, asks for an administrator password once and then allows GPU changes again at every startup, so the remembered limit comes back after a restart too; turning it off asks again and removes that step. With GPUSensors.kext 0.8.0, Close Changes closes them again without a password, and on an RX 6900 XT the page shows the readings only. GPUSensors.kext is not public yet; without it, nothing changes.

**GPU minimum clock, from GPUSensors.kext 0.9.0**: Settings › GPU control has a GFX minimum clock under the maximum. It only raises the minimum, from the card's stock value up to the GFX maximum in force, and keeps the clock up at idle, so the card draws more power and runs warmer; the kext checks every request, watches the temperature while it is held, and goes back to stock in the same cases as the other GPU changes. The section shows only with GPUSensors.kext 0.9.0. The memory clock, fan minimum speed and fan target temperature stay out: on the RX 6800 XT the driver offers no lower memory clock and no fan minimum or target while it offers the fan curve. Tested with unit tests only.
Expand Down
3 changes: 3 additions & 0 deletions Sources/RyzenStatus/Core/DefaultsKey+App.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1114,4 +1114,7 @@ extension DefaultsKey {
/// The "Allow overclocking" switch of Settings > GPU control (off by
/// default).
static let gpuControlOverclock = "gpuControlOverclock"
/// The owner's GPU profiles, one JSON blob with a version number
/// (`GPUControlProfileStore`).
static let gpuControlProfiles = "gpuControlProfiles"
}
19 changes: 15 additions & 4 deletions Sources/RyzenStatus/Core/GPUControlPageStrings.swift
Original file line number Diff line number Diff line change
Expand Up @@ -168,20 +168,31 @@ struct GPUControlPageStrings {

/// What an OD8 hold is, in words: "a fan curve and a GFX maximum of 2300 MHz".
func od8Held(_ want: GPUControlOD8Want) -> String {
guard let text = od8List(want) else { return heldOD8Short }
return String(format: heldOD8Format, text)
}

/// What an OD8 state holds, as a list that starts with a capital: a
/// saved profile's line, where "RyzenStatus is holding" would be wrong.
func od8Items(_ want: GPUControlOD8Want) -> String {
guard let text = od8List(want) else { return heldOD8Short }
return text.prefix(1).uppercased() + text.dropFirst()
}

private func od8List(_ want: GPUControlOD8Want) -> String? {
var items: [String] = []
if want.curve != nil { items.append(fanCurveItem) }
if want.zeroRpmOff { items.append(zeroRpmItem) }
if let mhz = want.gfxMaxMHz { items.append(String(format: gfxItemFormat, mhz)) }
if let mhz = want.gfxMinMHz { items.append(String(format: gfxMinItemFormat, mhz)) }
if let mv = want.voltMV { items.append(String(format: voltItemFormat, mv)) }
// An empty hold would leave "RyzenStatus is holding " with nothing
// after it: say the short form instead.
guard !items.isEmpty else { return heldOD8Short }
// after it: the callers say the short form instead.
guard !items.isEmpty else { return nil }
// One sentence in every language: the last item joins with the
// language's "and".
let text = items.count < 2 ? items.joined()
return items.count < 2 ? items.joined()
: items.dropLast().joined(separator: listSeparator) + listLastSeparator + items[items.count - 1]
return String(format: heldOD8Format, text)
}

/// The translated sentence of one group.
Expand Down
Loading
Loading