I've read the interesting (and long-running) gentoo AMD64 thread on undervolting, where hopes of a kernel or at least a distributor patch acceptance is expressed. That will probably never happen. Operating out of spec, even if it is a user choice, would place them in a most unwanted liability. Consider for example the powersaving AMDK7 patch that has been floating around since 2002. Len Brown, the ACPI maintainer from Intel, had some final strong words:
[PATCH] amd76x_pm: C3 powersaving for AMD K7
Thread start
http://marc.theaimsgroup.com/?l=linux-a ... 729153&w=2
--quote Len Brown
http://marc.theaimsgroup.com/?l=linux-a ... 522773&w=2 --
[...]
How about if we put it this way...
If the ACPI maintainer were an AMD employee,
and he accepted a patch like this specific to Intel hardware --
a patch that rejects whatever validation Intel, the BIOS
vendor and the board vendor have put into the product --
I'd call for his expulsion for ineptitude.
If somebody from AMD steps forth and says that hey, their hardware
is broken if used in the standard way, but that this "logic around"
is a valid model-specific workaround -- then we have something
that MAYBE we can work with. Otherwise, do whatever works for your
own system, but it would be reckless of us to put stuff like this
in the upstream kernel and then ask distros to support it.
--end quote--
Undervolting has a strong aura of "recklessness" and a userspace tool like CPUPW could well be the only patch-free avenue for the foreseeable future.
Speaking of which, Daniel, when university has eased its grip could you contemplate a runtime switch along the line of "--maxfreq <frequency>"? When trying out voltages my 2200 and 800 MHz speeds posed no problems. The 800 could be had by using your "--laptop" switch and doing an "echo -n '1'>/proc/sys/vm/laptop_mode", but the intermediate speeds 2000 and 1800 really had me stumped for awhile. Experiments caused a lot of "ignoring illegal change in lo freq table-0 to 0x0 -- transition frequency failed" in /var/log/syslog until I finally could clamp the speed AND retain correct voltage by doing:
echo -n "1800000">/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
(using this cpupw.conf)
1
1
304
4
2200000 22 -1 -1
2000000 22 -1 -1
1800000 22 -1 -1
800000 30 -1 -1
1
echo -n "2000000">/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
(using this cpupw.conf)
1
1
304
4
2200000 16 -1 -1
2000000 16 -1 -1
1800000 22 -1 -1
800000 30 -1 -1
1
Not pretty

If we want to find _stable_ voltages, testing each level is a must. And, as it turns out, that requires quite some work. Taking a hint from the other undervolting thread, I downloaded GIMPS (mprime)
http://www.mersenne.org/freesoft.htm and ran the torture test (-t). Heh... my value for 2200 MHz, which was stable in Neverwinter Nights, miscalculated after a mere two minutes. Fixed by upping it another 50 mV. I then ran each speed - deleting local.ini in between - the recommended minimum of six hours without errors.
But, and this really underscores the need for multiple test-tools, entering Neverwinter Nights again I experienced a crash while loading an area. Knowing that this is more disk than CPU bound I guessed that the lower frequencies also needed a little extra juice. Giving both 800 and 1800 speeds another 50 mV and walking around the map for an hour finally convinced me of machine stability.
Examining by "cat /sys/devices/system/cpu/cpu*/cpufreq/stats/trans_table" (cpufreq_stats and freq_table modules loaded or builtin) after the game is another must to verify that you've really exercised all the CPU speeds.
Final cpupw.conf for me, and me only
1
1
304
4
2200000 12 -1 -1
2000000 16 -1 -1
1800000 20 -1 -1
800000 28 -1 -1
1
Ergo:
Code: Select all
FID (decimal) MHz VID (decimal) mV ("mprime -t" and NWN game confirmed)
14 2200 12 1250
12 2000 16 1150
10 1800 20 1050
0 800 28 850
Using these extra 50 mV also seem to have decreased the "out of sync" in /var/log/messages. Coming back from NWN there was only one. Go figure...