StarLabsLtd / firmware

73 stars 5 forks source link

[StarBook MkVI - AMD] State of EC pin unknown #126

Closed indeedhat closed 9 months ago

indeedhat commented 1 year ago

I updated my StarBook last night to the latest firmware (ami 1.8) and it is having a really bad time.

The biggest issue is that it no longer charges. I only have a usbc charger so i don't know if it will charge from the barel jack but it no longer charges via usb c. I have tried 2 seperate starlabs chargers, 3 different usb cables and a switch charger (don't know if the switch one worked before or not) no combination will charge the laptop.

EDIT: When i plug in a charger the blue power LED comes on for about a second then goes off, the orange charging LED never comes on and it doesn't actually charge.

I didn't realise that charging was broken until i was down to about 15% so the laptop is basically useless at this point.

When i still had charge to be playing with linux failed about 10 or so start up checks, not sure what they all were but one of them was starting the audio service, this was not a problem until the firmware update. I did run a full system update in case but this didn't fix the issue.

Lastly (or the last thing i noticed before running out of power) is that the machine is running very slowly. Its not to the point of being completely unusable but basically felt like using a laptop with a spinning hard drive in. Boot time went from maybe 20 seconds to just over 3 minutes (not sure on the pre issue time but i timed the post issue boot time). The system in general is pretty unresponsive.

Im not sure what if anything i can do with my machine without charge but if there is any chance of this effecting other machines then i suggest that the update be pulled until the issue is investigated.

Sean-StarLabs commented 11 months ago

I just attempted the update myself but the 1.13 update no longer seems to be in the repos

"repos" is GitHub or LVFS? Nothings changed - it was only ever in Git, didn't push it to the LVFS

indeedhat commented 11 months ago

ah right, i was checking lvfs, i didn't realise. in light of @dthuerck's issues ill stick with 1.7 for now

Sean-StarLabs commented 11 months ago

3 days of testing 1.14.0, seems to fix all know bugs with any kernel. FYI - if you update with type-c connected, you'll need to do an EC reset afterwards to get the PD working

To pre-empt anyone pointing it out, they can't charge if USB-C is connected in S5

dthuerck commented 11 months ago

Thanks @Sean-StarLabs , really appreciate your commitment to the community and the product!

Just installed 1.14.0 and will test it extensively over the next week - work-related travel coming up. Running kernel 6.5 (Ubuntu 23.10) now and so far the problems mentioned here seem fixed.

For the others: had some problems with Turbo Boost in the past (if under load, at some point the USB-C would stop working for external displays). Deactivating Turbo Boost certainly helps, but isn't great for working with the machine. After some more experimentation, I've used ryzenadj to throttle the TDWs a bit: ryzenadj --tctl-temp=85 --fast-limit=25000 --slow-limit=20000 --stapm-limit=12500. That limits the boost a little. So far, it feels great - quick responses, no more waiting time and no sudden fan bursts.

Thanks to this and the latest updates, my Starbook is now a great working machine! Thanks, guys!

rmsthebest commented 11 months ago

I just performed the update from 1.7 -> 1.14 with dc jack power connected. I now have the same problem described here. No power through usb-c, no display through usb-c, other peripherals like keyboard do work. Popping sounds if I start computer with usb-c connected.

After it didn't work I tried to do the EC-reset (hold power button when powering on until the lights blink). Nothing changed.

cat /sys/class/dmi/id/bios_version
1.14.0
cat /sys/class/dmi/id/ec_firmware_release
2.6
indeedhat commented 11 months ago

I updated with dc power connected, i still had to do a EC reset to get usb-c charging to work again but everything seems to be working properly for the last 24 hours so its looking good on my end.

Thanks for all your work on this :)

tsmithe commented 11 months ago

I have found that, if I suspend the laptop by closing the lid (on battery), it seems to wake itself up immediately. But I have also been playing with ASPM, following the idea here that it may help extend the battery life. Maybe this is the problem... (I have also noticed the keyboard dropping keystrokes when touch typing; maybe again this is related..)

Otherwise, everything seems well! And I haven't encountered #75 again (though I haven't done an exhaustive test).

indeedhat commented 11 months ago

when i got home from work today i had to do another EC reset to get it charging, no other issues so far though.

indeedhat commented 11 months ago

Charging has been fine since but i am now getting brief disconnects of usb devices connected via a usbc dock, monitors seem fine but mouse, keyboard and DAC are all having periodic cut outs for a second or so.

dthuerck commented 11 months ago

So, I've been test-driving 1.14.0 all week extensively. When I use it on battery, these are the problems I encountered:

  1. Same as @tsmithe, I noticed that the keyboard frequently drops keypresses (which is a problem for coders...).
  2. On 3 separate occasions, I was unable to charge the laptop without doing an EC reset. While in operation, it also ddn't show the "plugged in" symbol neither was it charging. When turned off, sticking the USB-C charging cable in leads to a a popping sound that repeats every 2nd second.
  3. On 2 separate occasions, power consumption (reported through powertop) went up from ~6-9 watts to 19 watts even though no heavy computation was going on.
  4. I still get the popping sound with or without the charger when I press the "on" key for less than ~ 2 secs to turn the machine on. After the popping sound, it won't boot.
lil0r commented 11 months ago

had the same problems as @dthuerck as well and consequently downgraded to 1.7.0. however ec is still on 2.6.

lil0r commented 11 months ago

had to revert to EC 2.1 since I had to do an EC reset on every second USB-C charge. 1.14.0 was not really usable due to the missed key strikes - actually attributed it to the flimsy keyboard until I saw this thread. Is there any hope that eventually coreboot will be available and fix these?

Sean-StarLabs commented 11 months ago

coreboot available, yes but it won't fix anything - the bootloader is a tiny slither of the BIOS and unrelated to anything above or the other issue

dthuerck commented 11 months ago

@lil0r since I have the same thing - essentially have to do an EC reset before every charge - could you write down the instructions for reverting EC back to 2.1 here? All I can find is an ec.bin file in the repo. Thank you :)

Sean-StarLabs commented 11 months ago

This will be a specific solution for this firmware, so please don't try it in the future.

If you download these two: https://github.com/StarLabsLtd/firmware/raw/master/StarBook/MkVI-AMD/misc/ec.bin https://github.com/StarLabsLtd/firmware/raw/master/binaries/ifu.efi

  1. Copy the files to a FAT32 USB drive
  2. Connect the DC Jack (if the charging light isn't lit, this will fail spectacularly)
  3. Boot to the EFI Shell (similar to https://support.starlabs.systems/kb/firmware/efi-shell)
  4. Type in:
fs0:
ifu.efi ec.bin 128

After that, it'll be good.

Hoping to have a new update the start of next week to fix "easily"

They are here, but just pushed 1.16 - it'll likely need the defaults loading in the BIOS and/or EC reset - still testing all the various kernels, but USB-Cs happy.

lil0r commented 11 months ago

@dthuerck - did the procedure that sean was discribing. @Sean-StarLabs what is the recommended bios/ec combination & version? I am slightly confused which version has which quirks and which to choose? Also you mentioned coreboot is available for AMD, where could I find that? Didnt see it on LVFS.

Sean-StarLabs commented 11 months ago

what is the recommended bios/ec combination & version? I Either 1.7.0 and 2.00 or 1.16.0 and 2.07

? Also you mentioned coreboot is available for AMD, where could I find that?

No I didn't?

lil0r commented 11 months ago

coreboot available, yes but it won't fix anything - the bootloader is a tiny slither of the BIOS and unrelated to anything above or the other issue

sounded lke... but maybe just wishful thinking.

updated to 1.16.0, ec 2.7, ec reset performed - hopefully that addresses the issues above, will report.

lil0r commented 11 months ago

10min usage 1.16.0 ec 2.7:

probably return to 1.7, let me know if you need some data or tests.

Sean-StarLabs commented 11 months ago

Which one were you on before?

lil0r commented 11 months ago

Which one were you on before? 1.7/2.01 which I returned to from 1.14.0/2.6 due to keypress issue and no usb-c charging without EC reset.

Sean-StarLabs commented 11 months ago

Did you load defaults?

lil0r commented 11 months ago

Did you load defaults?

nope - only did EC reset. May have missed that part of the instructions. what are the steps I should follow now?

just to be sure we are on the same page

Sean-StarLabs commented 11 months ago

load bios defaults

Yup

EC reset (ctrl+alt+net and power until it turns off)

Start with the laptop turned off and the charger connected.

Next, press and hold Ctrl + Alt + Del + Power until the charge LED on the left hand-edge of the laptop flashes briefly once; this may take up to 30 seconds, during which you will see the machine power on and off.

lil0r commented 11 months ago

load bios defaults

Yup

EC reset (ctrl+alt+net and power until it turns off)

Start with the laptop turned off and the charger connected.

Next, press and hold Ctrl + Alt + Del + Power until the charge LED on the left hand-edge of the laptop flashes briefly once; this may take up to 30 seconds, during which you will see the machine power on and off.

USB-C or DC-jack? Does it matter?

Sean-StarLabs commented 11 months ago

Doesn't matter

tsmithe commented 11 months ago

And the rest of us(?) should just upgrade as normal? Oh, and reset BIOS settings?

I have family members on the stable release who may find it a bit intimidating to reset the BIOS; will they just be able to upgrade from userspace?

Sean-StarLabs commented 11 months ago

And the rest of us(?) should just upgrade as normal? Oh, and reset BIOS settings?

Rest of you (people in this thread/on testing), you might need EC reset/load default (too many variables to say if they need to be done for sure, if in doubt, it wont do any harm).

I have family members on the stable release who may find it a bit intimidating to reset the BIOS; will they just be able to upgrade from userspace?

stable -> stable wont need anything special

dthuerck commented 11 months ago

Upgraded to 1.16.0, loaded the defaults in the BIOS and did an EC reset.

(base) dthuerck@outerheaven:~$ cat /sys/class/dmi/id/bios_version 
1.16.0
(base) dthuerck@outerheaven:~$ cat /sys/class/dmi/id/ec_firmware_release 
2.7

First look - the charging issue is gone. USB-C charging works reliably, no problems with suspend (takes 10 secs to suspend after closing the lid, but then waked up realiably). Only experiencing 2 left for me now:

Thanks for the help, @Sean-StarLabs !

Sean-StarLabs commented 11 months ago

Tempo limit?

lil0r commented 11 months ago

Upgraded to 1.16.0, loaded the defaults in the BIOS and did an EC reset.

(base) dthuerck@outerheaven:~$ cat /sys/class/dmi/id/bios_version 
1.16.0
(base) dthuerck@outerheaven:~$ cat /sys/class/dmi/id/ec_firmware_release 
2.7

First look - the charging issue is gone. USB-C charging works reliably, no problems with suspend (takes 10 secs to suspend after closing the lid, but then waked up realiably). Only experiencing 2 left for me now:

  • The keyboard - like @lil0r , I get a lot of missed keypresses with the internal keyboard. External keyboard works fine. This is clearly the most nerve-racking one for us coders ;)
  • Fan - during boot (set it to "Normal", "Quiet" sounds like an airplane during boot) it cycles up until I am in the DE where my tempo limit kicks in.

Thanks for the help, @Sean-StarLabs !

just returned to confirm - a lot of missed keystrokes. So far only observed on battery.

Sean-StarLabs commented 11 months ago

So far only observed on battery.

Good spot!

lil0r commented 11 months ago

USB-C charging does not work for me. Will need return to 1.7/EC 2.1 in the morning.

lil0r commented 11 months ago

USB-C charging does not work for me. Will need return to 1.7/EC 2.1 in the morning.

reverted back to 1.7 & EC 2.1. loaded bios defaults & ec reset. The AMD starbook transistor noise seems to get progressively worse and becomes more audibly noticeable. Anything I could do against that?

pingu10k commented 10 months ago

Another data point on 1.16.0 / 2.7: did the update via EFI Shell method, EC reset, load bios defaults. Coming from 1.14.0 / 2.6. To no avail: no usb-c charging, no usb-c video (the latter is rather annoying since I can't use my usb-c dock because of it).

I had no issues on 1.12.0 btw. But I'm hesitant to downgrade since last time I did that, it bricked my laptop... (and I got to learn external eeprom reprogramming). Would reverting just the EC (using the bin file upthread), while leaving the bios at 1.16.0 work?

-- update Tried just updating / reverting the EC with the ec.bin from upthread. No change, still no usb-c charging or video out. I did notice that if I power off, then plug in the usb-c dock, then boot, everything does work. Laptop charges from the dock and sees the hdmi display attached to the dock just fine. A subsequent reboot will undo things however and go back to the non-working state (no usb-c pd / video).

Tried downgrading to 1.7.0 after that, but no luck: the EFI Shell won't let me.

-- update 2 Downgrade to 1.7.0 / 2.07 via fwupd worked. But after load defaults + EC reset: still no usb-c pd or video... :-( Some further experimenting turned up the following "magic incantation" that appears to work so far:

After that, my two Starbooks appear to have a working usb-c again, regardless if booted with DC jack / usb-c connected or not. One has bios 1.7.0 w/ EC 2.(0)6, the other has bios 1.7.0 w/ EC 2.(0)7. Not sure how much of the above ritual is actually needed (I assume it's the "to the EC reset while on usb-c power" is the key thing here). Could do some further experimenting tonight if needed.

Sean-StarLabs commented 10 months ago

Pushed 1.16.0 with the mirror flag disabled (so you can use that with any EC). That's a relatively simple improvement over 1.7.0, and can be used with the 2.0.0 EC.

Need to adjust the IRQs to stop the keyboards waiting whilst on battery which will take some time - so I'm planning to push the above to stable before that.

tsmithe commented 10 months ago

Could you say how long "some time" might be? I can't tell if the keyboard waiting will be worse on 1.16.0, but I would quite like USB PD to be working (I'm on 1.14.0 FWIW)... Still, I would prefer to wait for USB PD than for the keyboard use on battery to deteriorate!

Sean-StarLabs commented 10 months ago

Could you say how long "some time" might be?

Realistically, a couple of weeks.

I would prefer to wait for USB PD than for the keyboard use on battery to deteriorate!

1.16.0 won't touch the ANX, so if the PD is working before, it'll still work after

tsmithe commented 10 months ago

Thanks. PD is not currently working for me on 1.14, so I suppose that wouldn't change, then. (If it is possible to get it working, that would be good to know!) But in any case, would the keyboard waiting be worse on 1.16.0?

Edit: maybe I will try pingu10k's magic incantation..!

pingu10k commented 10 months ago

@tsmithe I went from 1.14.0 / EC 2.6 and non-working PD to 1.14.0 / EC 2.7, to 1.7.0 / EC 2.6 / 2.7, to finally 1.16.0 / EC 2.7 and working PD. The thing that appears to have finally fixed PD for me, was to do an EC reset while connected to usb-c power. No idea why, but same result on both my Starbooks. I can't tell you what the keyboard is like though, since I have an external keyboard connected > 90% of the time.

tsmithe commented 10 months ago

I can confirm that doing an EC reset while connected to USB-C power (not barrel) has fixed the PD issue. Hopefully this confirmation is helpful for Sean et al. Thanks @pingu10k !

pingu10k commented 10 months ago

An additional data point that might help: this morning, I found one of my Starbooks with a dead (i.e. fully depleted) battery (forgot to plug it in / hibernate it last evening). USB-C power didn't work. I had to first use the barrel jack to get some charge in, so I could boot it and shut it down properly. Then, I needed to do the "plug usb c power, reset EC" dance again. After which usb c pd / video did work again (as before).

lil0r commented 10 months ago

another feature I discovered is that the keyboard backlight stops working after waking up. sometimes after 10 to 15 min an USB reset occurs and it works again.

[So Dez 10 18:05:06 2023] usb 3-4: reset full-speed USB device number 3 using xhci_hcd
[So Dez 10 18:05:07 2023] usb 3-4: reset full-speed USB device number 3 using xhci_hcd

Sometimes only EC reset gets it working again. No USB connect & barrel charger. nothing mayor but another inconvenience...

evansimo commented 10 months ago

Good shout. I've had the same issue with the keyboard backlight ever since I can remember tbh. I'm on 1.7.0 & Fedora.

tsmithe commented 9 months ago

I upgraded to 1.16.0 a few days ago and am pleased to say that most of my issues are resolved (though I can't speak to the backlight as I do not use it much, or the battery-drain-disables-USB-PD issue reported by pingu10k).

My only remaining complaint is that still sometimes the keyboard doesn't report keypresses while on battery. Perhaps I type too fast, but I don't have any problem when plugged in. (Fortunately, this happens less often than before, so it's almost fine!)

evansimo commented 9 months ago

@Sean-StarLabs Thanks for sorting everything out. Is it possible to upload the latest 1.16.0 in ami-flashrom (rom, nsh, efi) as well please?

I'm on Fedora 39, the update showed up via LVFS, tried both through Gnome Software and via terminal, but upon restart, the device gets stuck on the initial Starlabs logo doing nothing (any idea why this might be btw? perhaps copr://starlabs/fwupd needs to be updated for Fedora 39?). This happened last time too - updating via EFI worked fine.

Sean-StarLabs commented 9 months ago

It's already there, but you just want to remove the version from the copr - that for Fedora 37

evansimo commented 9 months ago

Do you mean this folder? https://github.com/StarLabsLtd/firmware/tree/master/StarBook/MkVI-AMD/ami-flashrom/1.16.0

I can see this has been there for a week, whereas the latest version in the ami folder was updated yesterday. Are they the same? If yes, I'll proceed with flashing via EFI.

Sean-StarLabs commented 9 months ago

Do you mean this folder?

Yes

Are they the same?

Yes

evansimo commented 9 months ago

Thanks. I eventually managed to update via Gnome software (stock Fedora 39) simply by plugging in the barrel jack. Updating via USB-C kept getting stuck on the boot screen - not sure if this is expected behaviour, I feel like it shouldn't be, but hope it helps.