StarLabsLtd / firmware

71 stars 5 forks source link

[StarBook MK VI] Adjust fan curve #62

Closed Sean-StarLabs closed 1 year ago

Sean-StarLabs commented 1 year ago

Multiple users reported that the fan starts too early.

Need to port the fan curve from L4

3lpsy commented 1 year ago

It seems like this may have been fixed recently. It doesn't seem like lm_sensors/fancontrol is supported (no sensors detected via sensors-detect). Can you elaborate on whether there are any utilities for monitoring / controlling fan speed at runtime? Thanks!

cichy1173 commented 1 year ago

It seems like this may have been fixed recently

@3lpsy I can be wrong, but only AMD version received update that changed fan curve.

3lpsy commented 1 year ago

@cichy1173 Explains why the issue isn't closed. But yeah, I am using the AMD variant.

garybowers commented 1 year ago

I've noticed since updating to 1.2.0 with the new fan curves, the system under heavy load doesn't ramp the fans up so throttles a lot. Under heavy load but not 100% e.g. running a VM with just a few cores - the system lags a LOT.

OS: Arch / Gnome tried reinstalling - I may downgrade the bios to test the theory.

cichy1173 commented 1 year ago

I've noticed since updating to 1.2.0 with the new fan curves, the system under heavy load doesn't ramp the fans up so throttles a lot. Under heavy load but not 100% e.g. running a VM with just a few cores - the system lags a LOT.

OS: Arch / Gnome tried reinstalling - I may downgrade the bios to test the theory.

1.3.0 is available. Try new version - maybe it is better :-).

garybowers commented 1 year ago

These guys work too fast :-P going to try that now.

Sean-StarLabs commented 1 year ago

I've noticed since updating to 1.2.0 with the new fan curves, the system under heavy load doesn't ramp the fans up so throttles a lot. Under heavy load but not 100% e.g. running a VM with just a few cores - the system lags a LOT.

OS: Arch / Gnome tried reinstalling - I may downgrade the bios to test the theory.

Nothing in 1.3.0 that'll change the fan, but which curve were you using?

garybowers commented 1 year ago

I set it to agressive but the fans don't seem to ramp up instead it appears thermal throttling kicks in.

Sean-StarLabs commented 1 year ago

Sorry, do you mean at all?

garybowers commented 1 year ago

I've not had the fans ramp up to 1.1.0 levels :) It's REALLY quiet now.

garybowers commented 1 year ago

So I'm also struggling to monitor the fanspeed (it's missing in acpi), I did run a watch on /proc/cpuinfo to try and capture the issue.... When under heavy load the cpu is clocking down to 399mhz and then going up and back again, when the heavy load (BTW Windows 10 clean install with NOTHING happening is considered heavy load) I can see the CPU clocking correctly.

Screenshot from 2023-02-23 18-38-51 Screenshot from 2023-02-23 18-38-54 Screenshot from 2023-02-23 18-39-12 Screenshot from 2023-02-23 18-40-32

Sean-StarLabs commented 1 year ago

I think it's the multiplier not being set correctly on the aggressive profile; I'll adjust that in the next release but normal or quiet might actually be better for now.

garybowers commented 1 year ago

Normal does indeed feel better, I've noticed it still happening but far less.

I use a couple of VM's and it seems to choke the system when just doing basic stuff.

Screenshot from 2023-02-24 09-02-10

evansimo commented 1 year ago

Can also confirm that super simple VM stuff like clicking on a Next button or scrolling through a drop-down list completely choke the system for a few seconds. Plenty of unused RAM both in host & VM, that's not an issue.

Pressing the Super key and trying to open up System Monitor (just to understand what is going on) renders the transition effect in 4 FPS, as if the GPU is struggling too.

Have tried Gnome Boxes, VirtualBox and VMWare Workstation, all with similar behaviour.

Setup: StarBook MK VI AMD, 16GB RAM, Fedora 37, Bios 1.2.0 (Normal Profile)

garybowers commented 1 year ago

Is there any update on this? VM's are basically unusable at the moment on this machine.

Sean-StarLabs commented 1 year ago

Not yet - don't hold me to it, but aiming for fixing #62 #66 #75 by the end of the week.

You can downgrade it via the EFI Shell in the meantime.

garybowers commented 1 year ago

awesome thanks Sean!

garybowers commented 1 year ago

v1.1.0 seems to be missing the .bin file, i see a .cap file - had a look to see if this can be converted but not a bios expert :)

Sean-StarLabs commented 1 year ago

Fixed the zip file

garybowers commented 1 year ago

Yeah that's bricked my laptop :(

cichy1173 commented 1 year ago

Not yet - don't hold me to it, but aiming for fixing #62 #66 #75 by the end of the week.

You can downgrade it via the EFI Shell in the meantime.

Will the update also include changes for Intel-Coreboot?

garybowers commented 1 year ago

Any further updates? I appreciate it's a complicated issue :)

Sean-StarLabs commented 1 year ago

Being tested at the moment

garybowers commented 1 year ago

Any further updates on this? the laptop is unable to be used for anything cpu hungry compiling / docker / vm's all choke the CPU, downgrading was causing the machine to be bricked.

Sean-StarLabs commented 1 year ago

Finally there... stable release tomorrow with just fan changes, or a testing release with all the EC improvements that the Intel ones have had? (I'll try for both but no guarantees)

garybowers commented 1 year ago

Working PERFECTLY in my testing, Agressive v's Normal seems to work really well, both don't show any signs of thermal throttling under heavy load ... Normal hovers around 90degC at full pelt and agressive sits around 80 and the fans ramp up but not too noisy!

Thanks so much.

Sean-StarLabs commented 1 year ago

Huh - I thought you were AMD? I haven't uploaded it yet!

garybowers commented 1 year ago

Yep and I updated the ite firmware published 6hrs ago

On Thu, 6 Apr 2023, 17:36 Sean Rhodes, @.***> wrote:

Huh - I thought you were AMD? I haven't uploaded it yet!

— Reply to this email directly, view it on GitHub https://github.com/StarLabsLtd/firmware/issues/62#issuecomment-1499335653, or unsubscribe https://github.com/notifications/unsubscribe-auth/AE2EGRGLDCD25FSVE7WM2W3W73WH5ANCNFSM6AAAAAAUEJGAFU . You are receiving this because you commented.Message ID: @.***>

Sean-StarLabs commented 1 year ago

Of course (it's been a long week!). Cool

croissong commented 1 year ago

Hey,

I just got my StarBook :) To be honest, it's not clear to me what the current fan curve is supposed to look like on the latest MkVI-Intel coreboot 8.36 firmware. Could you maybe provide some insights whether these values are still valid?

const struct fan_curve code quiet_mode = {
    //              1   2   3   4   5   6   7   8   9   10  11
    /* .start_temp  = */    {   0,  55, 60, 65, 70, 75, 80, 85, 90, 95, 100},
    /* .duty    = */    {   0,  0,  0,  20, 25, 30, 35, 40, 50, 60, 70}
};

I'm asking because for me, on fan_mode = Quiet the fan still regularly starts during light usage, at coretemps < 50C° (from sensors).

EDIT: Nevermind, apparently I'm still on EC 1.01, even though I did use fwupd to update coreboot. Need to dig further :sweat_smile:

├─SuperIO FuSuperioIt89Device:
│     Summary:            Embedded controller
│     Current version:    01.01
Sean-StarLabs commented 1 year ago

Could you maybe provide some insights whether these values are still valid?

They are, but they're not in coreboot. Any EC version later than 1.03 uses them.

sensors will use the Package Temp, which is pretty much just the highest temp of a core. The EC's driver is a weighted average, so it won't match entirely.

Sean-StarLabs commented 1 year ago

Making a solved with EC 1.12 for the Intel variant and EC 2.0.0 for the AMD variant (bundled in AMI 1.7.0)

cichy1173 commented 1 year ago

@Sean-StarLabs Does Coreboot 8.40 bring EC 1.12? Is EC 1.12 stable?

hkdb commented 1 year ago

@cichy1173 EC 1.12 wasn't included in 8.40. Sean will always list it as included in the release notes if it includes an EC update. I too am waiting for the fixed fan curve but I think there is another unrelated issue (#101) and what seems to be charging related optimizations with the EC firmware in testing that's barring it from hitting the stable branch. Judging from the recent release notes along with the open issues on github, I think he's getting pretty close though.

@Sean-StarLabs Depending how much longer 1.12 is going to be good enough for stable, is it possible for you to consider to do a 1.02 release which essentially is just 1.01 with only the fan curve modifications for those of us who want to remain on the stable branch and yet can't stand the fan noise? Seems like that would be the quickest path to stable? Or am I being too naive and not really understanding the complexities? I would be more than happy to help test. Though FWIW, I am on Pop OS 22.04 and not on any of the officially supported distros.

cichy1173 commented 1 year ago

EC 1.12 wasn't included in 8.40. Sean will always list it as included in the release notes if it includes an EC update. I too am waiting for the fixed fan curve

That's what I guessed, but I saw that the issue was closed, so I preferred to ask.

Also, I'm all for releasing EC 1.02 (or under another name) with just the new fan curve. This is the feature I've been waiting for the longest, as the noisy fan is a bit annoying, especially when I'm in public places like a cafeteria or a university.

Sean-StarLabs commented 1 year ago

Does Coreboot 8.40 bring EC 1.12? Is EC 1.12 stable?

8.40 contains EC 1.12 but the mirror flag isn't enabled (it wont auto install). It has the PD update in it so that will only work for people us DC chargers.

We're considering 1.12 stable; we'll soon have a mechanism to push these out via the LVFS, but for now, the EFI Shell is the only option. EC 1.11 is likely also good; the only difference is that EC 1.11 supports a higher charging rate. We had one issue reported with it, but that's assumed to be a problem with the charger. We'll be testing the higher charging rate en-masse soon though.

Or am I being too naive and not really understanding the complexities?

The reason that this took a while is that on Intel platforms, the fan is tied to a bunch of other things. I quickly pushed an update out for the AMD ones, as that's a lot simpler - one temperature reading. With the Intel ones, it's now got a new PECI driver as before; the driver worked similarly to lm-sensors in Linux, where it would report the temperature as the highest that any core is. It now knows the temperature of each individual core, so it will account for scenarios like 1 little core being at 80 degrees. (Also, rewriting it as I go so it'll work with SDCC, so we can published the source code. It's a slow process as SDCC has ... quirks!)

hkdb commented 1 year ago

@Sean-StarLabs Thanks for the clarification and the hard work on the firmware! Off I go to try to update via EFI shell.

@cichy1173 Proves your theory right. Good to ask! :)

hkdb commented 1 year ago

Just wanted to report back to say that the update went through seamlessly. When the fans are spun up from higher loads, there's still a little bit of the high pitch noise but in general, it's a massive improvement. No more sly comments from my co-workers about how "my machine is taking off!". ;) Thanks again @Sean-StarLabs !

hkdb commented 1 year ago

@Sean-StarLabs Hum... I think I spoke too soon. So I closed my laptop to let it go to sleep when I went out for dinner. When I came back, I wrote the above comment while letting one of my VMs update and it all of a sudden froze. So I turned it off by holding the power button and then tried to turn it back on again. Then it sat in the Starlabs logo for much longer than usual and then goes to EFI Shell. I tried flashing 1.01 back on via EFI shell but still the same. So I guess my machine is in a bricked state. Any advice?

Update:

FWIW, I already updated to coreboot 8.40 with LVFS before I updated to ITE 1.12. I assume the reason why it's not booting anymore is because of coreboot not seeing the stardrive? When I press F2 to go to boot manager, all I see is UEFI Shell. No signs of NVMe but if I have a usb stick in, coreboot will see that. Once I boot into Pop OS live environment, I can see the 2TB stardrive in disks but it shows as one big unknown volume. (Yes, LUKS is enabled)

Sean-StarLabs commented 1 year ago

That's not related to the EC update (the EC doesn't even know what a file system is).

I assume the reason why it's not booting anymore is because of coreboot not seeing the stardrive?

edk2 will just search any known filesystems for EFI loaders, usually, that's a FAT32 partition with grubx64.efi. If there's a problem with the data on the drive, it won't be able to find anything.

LUKS is enabled

LUKS is only a factor for installing EC updates, the tool that performs the update can't decrypt a LUKS Volume so can't perform an update.

hkdb commented 1 year ago

But it seems weird that boot manager doesn't see the stardrive as a boot option at all doesn't it?

hkdb commented 1 year ago

I am thinking to use live usb of the starlabs provided ubuntu to downgrade coreboot to see if that helps.

Sean-StarLabs commented 1 year ago

But it seems weird that boot manager doesn't see the stardrive as a boot option at all doesn't it?

No, if there's no FAT32 partition (you said it was one big unknown volume), it wont. Different versions of coreboot, or even AMI, wont change that (they work in exactly the same way).

hkdb commented 1 year ago

Hum... then I am not sure what happened cause everything was working fine all along.... Hope it's not that the stardrive is dying or something along the lines of that? Should we maybe switch to support to take a deeper look into this? Thx!

Sean-StarLabs commented 1 year ago

Usually, when SSDs fail, they disappear - if it's still seeing a partition, it sounds software related. If you want to recover it, testdisk will likely be the best bet. Feel free to ping support if you want though

hkdb commented 1 year ago

@Sean-StarLabs ,

Well, I just booted with the starlabs provided Ubuntu iso on usb and the drive is not showing there. In dmesg, it shows the following error:

nvme nvme0: Device not ready; aborting initialisation, CSTS=0x0

Does that sound like something you are familiar with? Again, I am happy to move this conversation to support instead if more appropriate. I already left a message with support.

Thanks!

hkdb commented 1 year ago

btw, the stardrive shows up once in a while in boot manager. However, if I select to boot with it, it flashes a black screen and goes back to boot manager.