brunch icon indicating copy to clipboard operation
brunch copied to clipboard

Battery indicator issues

Open nifsta opened this issue 1 year ago • 12 comments

Sorry in advanced as I'm new to this, took this on as a pet project,

I've installed ChromeOS on my Dell Inspiron 15 7000 laptop (7th Gen i7), when the charger is plugged into the device, the indicator doesn't show that it's charging, even though it is (and the battery life just increases but it doesn't SHOW that it's charging)

Any ideas on how I can fix this?

nifsta avatar Jun 27 '23 02:06 nifsta

I have a reproducible case on 2 different laptops. This started happening several brunche/ChromeOS releases ago (it is working on 107 though).. Latest I tried 113 and 115 (latest stable brunch) release.

Let me know if you need more information or want me to try something?

gena01 avatar Sep 14 '23 01:09 gena01

This has been an issue for a while but unfortunately, it's not getting fixed for some reason. https://github.com/sebanc/brunch/issues/1792 https://github.com/sebanc/brunch/issues/1770

tungmeister avatar Nov 19 '23 07:11 tungmeister

I think the problem is related to the chrome OS power manager 'powerd' but ,I don't know if it can be replaced or if there is a setting that is interfering with the hardware. I'm having the same issue and i'll update you as soon as i have found a soulution.

mrme8895 avatar Dec 16 '23 19:12 mrme8895

I have a reproducible case on 2 different laptops. This started happening several brunche/ChromeOS releases ago (it is working on 107 though).. Latest I tried 113 and 115 (latest stable brunch) release.

Let me know if you need more information or want me to try something?

Is this chromeos 107 or brunch 107 or both

mrme8895 avatar Dec 16 '23 20:12 mrme8895

I first encountered the issue back in January. I'm not certain when the issue arose as I'd not been using chomeos on this laptop for a while. Looking at the releases I'm guessing the problem started for me with R107 as well as earlier in 2022 my battery status was reported correctly.

tungmeister avatar Dec 16 '23 21:12 tungmeister

Try running sudo initctl stop powerd in crtl+alt+f1 logged in as root. Log out by using the exit command then sign out of your user session. Restart and then hit previously mentioned key combo. Enter sudo initctl start powerd and restart your system.

This worked for me.

mrme8895 avatar Dec 17 '23 02:12 mrme8895

Sorry, I'm not following, surely after a restart powerd will already be running from startup?

tungmeister avatar Dec 17 '23 13:12 tungmeister

It wasn't running when I checked with initctl list | grep powerd so I started it it again. If it isn't running start it back before logging in. I also think that powerd may not be compatible with certain hardware even with brunch. You can try to install powertop or tlp as alternatives with the emerge command and setting those as the default but it may break your system so back up your data before trying.(CrOS is based off gentoo)

mrme8895 avatar Dec 17 '23 19:12 mrme8895

#1770 I see here the battery test failed. Use these commands to add chronos to cros_ec-access group. sudo usermod -a -G cros_ec-access chronos and run the battery test again. I'm not sure but it may also fix the battery indicator issues. You may try this before trying the above.

mrme8895 avatar Dec 17 '23 19:12 mrme8895

Just having a look at this again, I've tried all of the above but unfortunately, it's not made any difference. I don't think the battery_test issue is related, I've googled that and it seems to happen on some genuine Chromebooks as well.

tungmeister avatar Feb 03 '24 16:02 tungmeister

Have you tried switching to kernel 5.15 or 5.10. If these kernels have support for your hardware then you can switch to an older version by going into the brunch settings. Do the following to switch kernels:

  1. Hit the key combo ctrl+alt+f2.
  2. Login as root
  3. Type sudo edit-brunch-config
  4. Select the 5.15 or 5.10 kernel
  5. Skip the rest by hitting enter or select any other options you may have previously had.
  6. reboot

mrme8895 avatar Mar 03 '24 18:03 mrme8895

I made a script for auto battery saver on/off when the power supply changed.. dependency tlp

chronos@localhost /mnt/stateful_partition/brunch/bootscripts $ ls
auto_remount_nodiscard.sh  restart_prog.sh  zauto_battery_saver.sh
chronos@localhost /mnt/stateful_partition/brunch/bootscripts $ sudo cat zauto_battery_saver.sh 
#!/bin/bash

# Monitor power supply changes
dbus-monitor --system "type='signal',interface='org.chromium.PowerManager',member='PowerSupplyPoll'" |
while read -r line; do
    state=$(run-on-ac false && echo "1" || echo "0")

    # Set battery saver mode based on power source
    dbus-send --system --dest=org.chromium.PowerManager --type=method_call --print-reply /org/chromium/PowerManager org.chromium.PowerManager.SetBatterySaverModeState array:byte:8,$state
done

biplobsd avatar Jun 15 '24 18:06 biplobsd