Comments (4)
Absolutely no apologies necessary. This was exceptionally helpful, and I'll work out the rest. Again, many many thanks for this work.
from undervolt.
Out of curiosity, how did you come by the logic to do this? This stuff obviously isn't documented super well, and I'm trying to follow along in unpack_offset() and unconvert_rounded_offset(), and there's deep mojo there I don't understand, particularly:
in unpack_offset():
plane_index = int(msr_response / (1 << 40))
return unconvert_offset(msr_response ^ (plane_index << 40))
I haven't looked super hard, but I've yet to run into a situation where plane_index is anything other than 0 for any call of read_offset(). In your sample code, you unpack a value of "0x40000000000", so maybe your CPUs are just returning something in those 40:36 bits that mine aren't? No matter what plane I write to the MSR mailbox and then read, those bits are zeroed for me, even though the read will return the correct offset. (I'm testing on i7-8650U)
and in unconvert_rounded_offset():
return x if x <= 1024 else - (2048 - x)
I'm not sure I understand why this is necessary.
At any rate, there's so little information on this available, your code is astonishingly helpful to everyone looking. Thank you so much for all your work!
from undervolt.
@davidr Most of the information was gathered from this repo, which in turn collected information from this thread.
re: unpack_offset
- it was reported in #9 that CPUs earlier than Gen 5 include the plane index in the returned value, so it must be stripped before converting back to voltage. I confirmed this on older machine, although on a modern machine I see the same results as you.
re: unconvert_rounded_offset
- I forget why this is necessary. If you change this to just return y >> 21
, tests will fail like so:
File "/home/grw/src/undervolt/undervolt.py", line 90, in undervolt.unconvert_offset
Failed example:
unconvert_offset(0xf0000000)
Expected:
-125.0
Got:
1875.0
So it seems to be because the return value is in the domain [0-2048], but we want [-1024, 1024]. Sorry I can't explain more!
from undervolt.
from undervolt.
Related Issues (20)
- Any chance for turbo ratio configuration support? HOT 1
- PermissionError: [Errno 13] Permission denied: '/dev/cpu/0/msr' HOT 4
- Works on Acer Aspire 5 A515-51G-5072
- Does not work with thinkpad x1/p1 gen4 HOT 4
- Cannot use 'undervolt' after upgrading to Fedora 35 HOT 1
- Does this work with KVM/QEMU? HOT 2
- Undervolt service failed HOT 2
- PermissionError: [Errno 13] Permission denied: '/dev/cpu/0/msr' HOT 9
- MSI GS65
- Not working on mint 20 - command not found HOT 4
- Confirmed working on Dell G15 5510 (i5 10200H)
- Macbook air mid 2013 | Failed to apply core HOT 1
- No package metadata was found for undervolt HOT 1
- Turbo boost not working
- Confirmed Lenovo Thinkpad T490, Intel i5-8265U HOT 1
- sudo: undervolt: command not found HOT 4
- Power limit is not permanent HOT 1
- ERROR:root:Failed to apply - undervolt settings on Intel Celeron N5100 and Clear Linux HOT 2
- How do ThrottleStop's FIVR Control names map to those of undervolt? HOT 1
- trying to set cpu and cache to -100, gives ERROR:root:Failed to apply core: set -99.609375, read 0.0 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from undervolt.