jlempen / Surface-Go-2-OpenCore

macOS on the Core m3-8100Y Microsoft Surface Go 2 thanks to Acidanthera's OpenCore bootloader
MIT License
27 stars 3 forks source link

Power management/battery life issues #9

Open lazd opened 7 months ago

lazd commented 7 months ago

I find my Surface only gets about 1.5 hours of battery life from a full charge in macOS. I've done the best I can to disable spotlight, turn on low power mode, etc, but it's still sipping quite a bit of juice.

I do have scripts that turn turbo mode on and off, and I believe having turbo on is the thing that uses the most power. I'm wondering if this has to do with CFG lock?

Here are my scripts:

# pass 0 to disable, anything else to enable
function toggleturbo() {
    if [ "$1" -eq "0" ]
        then
            echo Disabling turbo mode
            sudo /Library/Application\ Support/VoltageShift/voltageshift turbo 0
        else
            echo Enabling turbo mode
            sudo /Library/Application\ Support/VoltageShift/voltageshift turbo 1
    fi
}

# pass 0 to disable, anything else to enable
function undervolt() {
    if [ "$1" -eq "0" ]
        then
            # Turbo off
            echo Undervolting with turbo off
            cd /Library/Application\ Support/VoltageShift/
            sudo ./voltageshift buildlaunchd -120 0 0 0 0 0 0 28 18 0.002 60
        else
            # Turbo on
            echo Undervolting with turbo on
            cd /Library/Application\ Support/VoltageShift/
            sudo ./voltageshift buildlaunchd -120 0 0 0 0 0 1 28 18 0.002 60
    fi
}

I generally operate with undervolt 1, which undervolts the CPU and enables turbo mode.

lazd commented 7 months ago

After some reading of other's experiences and a little testing, this seems to work just fine:

sudo ./voltageshift buildlaunchd -120 -50 -80 0 0 0 1 28 18 0.002 60

It seems this is a nice safe way to keep things cool. I'd recommend others try this as well. If we can confirm that it's stable for others, adding it to the README would be nice.

lazd commented 7 months ago

I should also note that I've disabled CFG lock, hoping that would have an impact. I'm not sure if it does yet, but we'll see!

jlempen commented 7 months ago

I've been using the SGO2 with CFG lock disabled for two years or more and get around 2-3 hours of light office/browsing use with both the front and rear cameras, as well as the IR camera and LTE disabled in the UEFI. Both permanently enabling Low Power mode in the macOS settings (which mainly seems to disable SpeedStep) and using voltageshift help a bit. Maybe we could try to further optimize the CPUFriend settings as well. The problem with fine-tuning CPUFriend and enabling Low Power mode is that it renders our already anemic SGO2 almost unusable for basic tasks.

lazd commented 7 months ago

I disabled CFG lock and last night I got almost 3 hours of battery life doing basic web browsing and whatnot, so that's not terrible -- halfway through I undervolted the GPU and CPU cache as well, so that may have extended it. I'll try another battery drain soon and see what it ends up at. In any case, almost 3 hours is a marked improvement from before when I didn't have CFG lock disabled, I definitely got less than 2 hours then.

It would be interesting to see how much CPUFriend tweaking can extend it, I definitely wouldn't want to see it become unusably slow, but more power and less heat wold be great...

lazd commented 7 months ago

With the above undervolt settings, I just ran it from 100% to 0% and got 2:54 of runtime. I was doing web browsing, YouTube, iMessage, Discord, and a little light AI image generation with Adobe Express. For a bit during this, the machine was just idle (I ran caffeinate -d to prevent sleep).

Screenshot 2024-01-23 at 10 46 42 PM

I then let it charge in hibernate for about 28 minutes, and that took it all the way back up to 50% battery.

Unfortunately, when I woke it back up, the touchscreen didn't work... Unrelated, but I've seen this happen a couple times so far, I thought it was related to the stylus but now I'm not sure.

jlempen commented 1 month ago

Hey @lazd I'm currently updating this repo to the latest OpenCore and kexts and cleaning up and improving the README.md, so I'm looking into a few more things to further improve the battery runtime of the SGO2 and adding power saving tips to the README.md.

Could you please help me test ASPM by replacing the Device Properties -> Add in your config.plist file with those in the attached SGO2_ASPM.plist? Does it improve your battery runtime?

Thanks a bunch for your help!

SGO2_ASPM.plist.zip

lazd commented 1 month ago

Howdy! Unfortunately, I don't have my SGO2 here with me to test. I'll report back once I get a hold of it and can test again!