badly-drawn-wizards / vangogh_oc_fix

A linux kernel module to override AMD Van Gogh APU PowerPlay limits for CPU
GNU General Public License v3.0
19 stars 5 forks source link

Not working on SteamOS 3.5 #1

Closed linkstar612 closed 5 months ago

linkstar612 commented 1 year ago

Fix was straightforward and easy to apply on earlier OS builds, but the upcoming SteamOS 3.5 (available on main branch) is incompatible. Since 3.5 is bringing a bunch of performance fixes to games, I would be happy to troubleshoot or provide any logs to get this working ahead of the official release. Thanks again for your work!

badly-drawn-wizards commented 1 year ago

I have made changes on the develop branch that fixes this, but it may be a bit overkill. Previously I mirrored the include files that weren't available through the kernel headers thinking the internel api wouldn't change so easily. Shocked pikachu face when it did.

My solution was to have a script that copies the necessary headers for the linux-kernel and only build against the headers for the kernel you are targeting. These can be checked in (with the necessary LICENSE and COPYING files) so that downstream consumers don't have to do this, but are also easily updated when there are kernel updates.

The problem where I last left it was selecting the correct linux-kernel-source package for the linux-headers source from the steam arch mirror. I also haven't done this header copying process for stable yet.

I also haven't exactly been following best practices developing this I initially just wanted to prove it could be done.

I'll try and see where I last left it and finish the work, but I have gotten it to work on 3.5. If you want to troubleshoot, you can try running from develop and see if it works for you.

badly-drawn-wizards commented 1 year ago

Ultimately if we want to fix this without my janky solution, we could file a bug report to the kernel upsteam to provide a kernel parameter there.

badly-drawn-wizards commented 1 year ago

I have filed a report on Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=217567 EDIT: Filed in wrong place, now here: https://gitlab.freedesktop.org/drm/amd/-/issues/2638

badly-drawn-wizards commented 1 year ago

I'll leave this open for a while to see if you have any issues. I merged develop in master and tagged the old and new version.

linkstar612 commented 1 year ago

Thank you for leaving the issue open. 6.1.21-valve1 worked with SteamOS 3.5 update, but I am having issues getting 6.1.29-valve4 to work. I downloaded and extracted linux-neptune-61-6.1.29.valve4-2.src.tar.gz from /archlinux-mirror/sources/jupiter-main/ and updated the module with 6.1.29-valve4. When trying to run 'make build' I am now greeted with this error.

(deck@steamdeck vangogh_oc_fix-0.0.2)$ make build make -C /lib/modules/6.1.29-valve4-2-neptune-61/build CONFIG_MODULE_AMD_HEADERS_DIR=/home/deck/Downloads/vangogh_oc_fix-0.0.2/module/amd_headers/6.1.29-valve4 CONFIG_GCC_PLUGINS=n M=/home/deck/Downloads/vangogh_oc_fix-0.0.2/module modules scripts/Makefile.build:440: warning: overriding recipe for target '/home/deck/Downloads/vangogh_oc_fix-0.0.2/module/modules.order' /home/deck/Downloads/vangogh_oc_fix-0.0.2/module/amd_headers/6.1.29-valve4/Makefile:1923: warning: ignoring old recipe for target '/home/deck/Downloads/vangogh_oc_fix-0.0.2/module/modules.order' ^Cmake[2]: [/home/deck/Downloads/vangogh_oc_fix-0.0.2/module/amd_headers/6.1.29-valve4/Makefile:2012: /home/deck/Downloads/vangogh_oc_fix-0.0.2/module] Interrupt make[1]: [Makefile:2012: /home/deck/Downloads/vangogh_oc_fix-0.0.2/module] Interrupt make: *** [Makefile:36: module/vangogh_oc_fix.ko] Interrupt

If you find the time, could you look into this error or release a version with kernel 6.1.29-valve4 support? Thank you for your work.

badly-drawn-wizards commented 1 year ago

Thanks. Will try look into it this weekend.

lividhen commented 5 months ago

Fixed unless valve breaks it again.