ECTweaker
ECTweaker Library for python allows users to read/write and control the EC of laptops, specially MSI!
INSTALLATION
- pip install ectweaker
- If the above method doesn't work please install in a virtual environment and call it in scripts from the virtual environments only!
Preparing the EC to be read/write friendly
- Disable secure boot
- To check one of the example to use this code properly, visit https://github.com/YoCodingMonster/OpenFreezeCenter-Lite/tree/main and check
OpenFreezeCenter-Lite.pyfile
Updating
- pip install ECTweaker --upgrade
Functions
check()
- This prepare the OS for EC read/write functionality and reboots the system for the first time only.
Return Type- intReturns1if EC read/write is enabled.0if EC read/write is not enabled.
- Example
import os CHECK = ECT.check() if CHECK == 1: # your_script_here else: os.system("shutdown -r +1") print("Rebooting system within 1 min!\nPlease save all work before it happens!")
write(BYTE ADDRESS, VALUE)
- This will allow you to write any INTEGER value to BYTE ADDRESS.
ParametersBYTE ADDRESS- Hex address of the memory where VALUE needs to be written.VALUE- content which needs to be written at BYTE ADDRESS.
- Example
import ECTweaker as ECT ECT.write(0xd4, 121)
read(BYTE ADDRESS, SIZE)
- This will allow you to read INTEGER value from BYTE ADDRESS.
Return Type- intReturns- VALUE stored at BYTE ADDRESS fo memory provided.ParametersBYTE ADDRESS- Hex address of the first memory from where VALUE is retrived.SIZE- How many adjacent BYTE ADDRESS stores the complete VALUE.
- Example
import ECTweaker as ECT VALUE = ECT.read(0xd4, 1)
fan_profile(PROFILE, VALUES)
- This allows for MSI laptops with intel CPU to set Fan profiles.
-
ParametersPROFILE- Fan profile which needs to be, considered values are as follows.auto,advanced,cooler booster
ONOFF- This is a list of address and values which needs to be set in order to change the fan profile.- [[ADDRESS, VALUE ON],[COOLER BOOSTER ADDRESS, VALUE OFF]]
ADDRESS- This is the list of addresses for CPU and GPU fan speeds as [[CPU1, CPU2, CPU3, CPU4, CPU5, CPU6, CPU7], [GPU1, GPU2, GPU3, GPU4, GPU5, GPU6, GPU7]]SPEED- This is the list of speed percentages for CPU and GPU fans at set temps as [[CPU1, CPU2, CPU3, CPU4, CPU5, CPU6, CPU7], [GPU1, GPU2, GPU3, GPU4, GPU5, GPU6, GPU7]]
-
Example - Auto is turned on on MSI laptop with 11th gen processor and (Cooler Booster is being turned off as precaution)
import ECTweaker as ECT ECT.fan_profile("auto", ONOFF = [[0xd4, 141], [0x98, 2]], ADDRESS, SPEED)- Example - Cooler booster is being turned on
import ECTweaker as ECT ECT.fan_profile("auto", ONOFF = [0x98, 130]) -
speed_writer(ADDRESS, SPEED)
- Internal function used by
fan_profile(PROFILE, VALUES)function to set the fan speed curve.ParametersADDRESS- This is the list of addresses for CPU and GPU fan speeds as [[CPU1, CPU2, CPU3, CPU4, CPU5, CPU6, CPU7], [GPU1, GPU2, GPU3, GPU4, GPU5, GPU6, GPU7]]SPEED- This is the list of speed percentages for CPU and GPU fans at set temps as [[CPU1, CPU2, CPU3, CPU4, CPU5, CPU6, CPU7], [GPU1, GPU2, GPU3, GPU4, GPU5, GPU6, GPU7]]
Metadata
Release files for ECTweaker 2.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| ECTweaker-2.3.tar.gz | 4.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ECTweaker-2.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.0 kB
Release files / ECTweaker-2.3.tar.gz
| Download URL | ECTweaker-2.3.tar.gz |
|---|---|
| Size | 4.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
34de5015a24eb605a8d4edb1c65649597fa9c60df8f2cbb2907f7e40937eb24e
|
|
BLAKE2b-256 checksum How to use checksums |
da58df57c7add04f1c751961bc99f0d2eabe7a110209caeba86a47634fb9c5db
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.12
|
Release files / ECTweaker-2.3-py3-none-any.whl
| Download URL | ECTweaker-2.3-py3-none-any.whl |
|---|---|
| Size | 4.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c5554b8f69f6f0464ea24668aeea2e8042741070960670809a05065b50cd781f
|
|
BLAKE2b-256 checksum How to use checksums |
0c3540f0e7c1113f323bf59bff060dba096d526437148f5cabd86f8ea5850d80
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.12
|