Hi all! Having a lot of fun (and some frustration) turning this thing into a casual to mid gaming machine. Recently I’ve been trying to eek out as much graphics performance as I can out of the 7840U and stumbled on corectrl as a way to monitor the gpu performance and control clock speed.
I noticed without configuration, even under moderate gaming load (FFXIV + Reshade) and the fans running loud (54C) the game would chug a bit and the gpu would stay somewhere around 2.4Ghz rather than reaching the max rated 2.7Ghz boost speed. corectrl lets me force this to the max boost frequency and the performance improves quite a bit (+10 fps), but I was wondering if there was anyway I could make this happen automatically or more intelligently.
I’m currently running Ubuntu 22.04 with Cinnamon 5.2.7 on kernel 6.50. I also have most of the gpu related kernel parameters listed on ArchWiki set. Happy to provide more details and any help would be appreciated!
Hi @axoletl , welcome to the community.
I have only glanced at the corectrl page you linked. I wonder, does it provide logging or verbose command output? and if the application is controllable via command line parameters?
if so, then a script to automatically boost gpu via that app would be possible.
I’m not sure a command output is available (at least documented, no man page is provided) but corectrl definitely seems to at least be able to run when specific applications are open (it’s provided in the gui).
This is acceptable but I was more envisioning being able to detect some kind of graphics load and tuning the clock speed via a specific curve. I’d prefer this because it would mean not needing to manually create an entry via gui for each game or gpu heavy app I need to run, not a huge task but obviously set and forget would be great.
I think maybe you can achieve this with sysfs alone.
Check under “Overclocking” here for manual voltage and clock control. AMDGPU - ArchWiki
From there it would be a simple
case esac statement in a shell script to achieve what you want. I think you can even set up .desktop files to run your script before launching the game or application.
From that archwiki page there is this: GitHub - sibradzic/amdgpu-clocks: Simple script to control power states of amdgpu driven GPUs may save you reinventing the wheel.
I am pretty sure corectl doesn’t currently support phoenix nor rdna3 cards correctly IIRC.
This definitely seems in the right direction (especially the notes on the feature mask which I couldn’t get working on corectrl’s instructions), will look more into this, thanks!
Although I don’t really see how else corectrl would be implementing this feature, so if they don’t support this card it may be the case that you can’t have manual control of these things on linux quite yet. It’s sort of second banana in terms of platform support for AMD