Battery indicator in task bar shows weird number

Forum Forums General Hardware Battery indicator in task bar shows weird number

  • This topic has 16 replies, 6 voices, and was last updated May 30-9:47 pm by BobC.
Viewing 15 posts - 1 through 15 (of 17 total)
  • Author
    Posts
  • #60450
    Member
    user0815

      Hi, I am new to antiX and having the latest release 19.4 base running in a virtual machine (virtualbox 6.1.22), host is windows 10 enterprise. All is fine so far, but there is one minor thing that annoys me and I haven´t found any way to solve it. The battery indicator in the task bar show at full charge and connected power “14% – Power” as popup info when hovering mouse over the indicator. When I tried to discharge the battery on host system, the indicator in antiX starts to count backwards to zero and goes into minus. Does anybody have an idea where I can look and solve it? Thank you very much. Attached is a screenshot with fully charged battery.

      • This topic was modified 1 year, 11 months ago by user0815.
      #60457
      Member
      Robin
        Helpful
        Up
        1
        ::

        Hello user0815,
        I can confirm battery is a special kind of beast. No idea why, but my percentage display is quite odd also. See screenshot, which refers to an nearly empty battery. 2147483648 % !? You’re kidding! 🙂 Well, I didn’t care much for this by now, so I can’t tell you how to sort it out. But it is good to collect reports about this bug, so it can get sorted out by developers eventually.
        And maybe some other users might have useful additional hints for you.

        Edit: In your special case the fact that you run antiX on a windows host may play an important role. Just a thought.

        • This reply was modified 1 year, 11 months ago by Robin.
        Attachments:

        Windows is like a submarine. Open a window and serious problems will start.

        #60460
        Moderator
        christophe
          Helpful
          Up
          0
          ::

          Hello user0815,

          As a work-around for your specific situation:
          You could remove the battery indicator from the icewm taskbar (since Windows will tell you the “real” value).

          From the “start menu:”
          settings – preferences – taskbar – taskbarshowapmauto (toggle this feature by clicking).
          settings – preferences – save modifications (this makes the choice remain fixed).
          logout – restart icewm (after restarting icewm window manager, it will take effect).

          Hope this helps 🙂

          • This reply was modified 1 year, 11 months ago by christophe. Reason: clarity

          confirmed antiX frugaler, since 2019

          #60469
          Member
          user0815
            Helpful
            Up
            0
            ::

            Hi Christophe,
            Thanks for your advice. Sure it will help in case of virtual machine to just switch off battery indicator, but it wouldn´t help if I want to use antiX on USB-boot device bar-metal on my laptop. Is this error already reported? Is there any bug-reporting system where I can report in case not yet done?
            BTW, this does not happen with MX Linux on virtualBox with same setup.
            Cheers.

            • This reply was modified 1 year, 11 months ago by user0815.
            #60471
            Moderator
            BobC
              Helpful
              Up
              0
              ::

              user0815, Does the problem also occur if you are booted from the USB instead of Windows running a virtual machine? I’ve never had that problem on any of my laptops booted from USB or hard drive. I like christophe’s solution. If you are booted from Windows, you really don’t need antiX to tell you how much battery is left.

              Robin is comparing the value from the conky which is different.

              There are actually a number of different ways the values are stored and calculated, depending on the hardware involved and what program you are using. Relevant to the discussion is the max amp hours (AH) of the battery and its most recent max storage in AH, which is it’s current capacity. Usually the percentage you see is a percentage of current capacity, not of the original battery capacity. Basically as the battery ages, its current capacity declines. LOL, old batteries are useful for testing low battery warning systems.

              #60549
              Member
              user0815
                Helpful
                Up
                0
                ::

                user0815, Does the problem also occur if you are booted from the USB instead of Windows running a virtual machine? I’ve never had that problem on any of my laptops booted from USB or hard drive. I like christophe’s solution. If you are booted from Windows, you really don’t need antiX to tell you how much battery is left.

                Robin is comparing the value from the conky which is different.

                There are actually a number of different ways the values are stored and calculated, depending on the hardware involved and what program you are using. Relevant to the discussion is the max amp hours (AH) of the battery and its most recent max storage in AH, which is it’s current capacity. Usually the percentage you see is a percentage of current capacity, not of the original battery capacity. Basically as the battery ages, its current capacity declines. LOL, old batteries are useful for testing low battery warning systems.

                The problem does not occur when booting from the Live USB stick, battery indicator is correct. However, it is very strange that it seems to happen only with antiX. I tried the same virtual machine with mxLinux and the battery indicator in mxLinux is correct as in the windows host.

                #60551
                Member
                Xecure
                  Helpful
                  Up
                  0
                  ::

                  Hi.

                  I tried the same virtual machine with mxLinux and the battery indicator in mxLinux is correct as in the windows host.

                  If you install a similar kernel to MX Linux on the antiX Virtual Machine, does the incorrect battery number also occur? If antiX 19.4 is not installed (and you are running from ISO), try instead the antiX 19.4 release with 4.19 kernel:
                  https://sourceforge.net/projects/antix-linux/files/Final/antiX-19/4.19_kernel/

                  antiX Live system enthusiast.
                  General Live Boot Parameters for antiX.

                  #60552
                  Member
                  user0815
                    Helpful
                    Up
                    0
                    ::

                    Hi.
                    If you install a similar kernel to MX Linux on the antiX Virtual Machine, does the incorrect battery number also occur? If antiX 19.4 is not installed (and you are running from ISO), try instead the antiX 19.4 release with 4.19 kernel:
                    https://sourceforge.net/projects/antix-linux/files/Final/antiX-19/4.19_kernel/

                    Hi,

                    guest@antix:~
                    $ uname -r
                    4.9.0-264-antix.1-amd64-smp
                    guest@antix:~
                    $ 
                    
                    mx@mxLinux:~
                    $ uname -r
                    4.19.0-16-amd64
                    mx@mxLinux:~
                    $ 
                    

                    So you are saying the difference btn 9 and 19 could be the reason? I will try and put the result here. Can I somehow upgrade the kernel right from inside the antiX virtual machine?

                    • This reply was modified 1 year, 11 months ago by user0815.
                    #60560
                    Member
                    user0815
                      Helpful
                      Up
                      0
                      ::
                      guest@antix:~
                      $ uname -r
                      4.19.184-antix.1-amd64-smp
                      guest@antix:~
                      $ 
                      

                      antiX kernel version upgraded to 4.19, unfortunately, it does not help.

                      #60562
                      Member
                      Xecure
                        Helpful
                        Up
                        0
                        ::

                        I think both antiX and MX use the same virtualbox-guest-utils, so it shouldn’t be related to this. If you install the debian kernel instead of antiX kernel:
                        sudo apt install linux-headers-4.19.0-16-amd64 linux-image-4.19.0-16-amd64
                        Do you also get the same result after rebooting?

                        PS: Sorry for giving so many tests to perform.

                        • This reply was modified 1 year, 11 months ago by Xecure.

                        antiX Live system enthusiast.
                        General Live Boot Parameters for antiX.

                        #60592
                        Member
                        user0815
                          Helpful
                          Up
                          0
                          ::

                          sudo apt install linux-headers-4.19.0-16-amd64 linux-image-4.19.0-16-amd64

                          Done as you adviced, to no avail.

                          #60593
                          Member
                          Xecure
                            Helpful
                            Up
                            0
                            ::

                            Then I have no idea what the issue may be. Normally, hardware detection and driver assignation is done by the kernel, even on a VM, so if one kernel detects it properly, then it should detect it also on any system. ACPI support is included in antix, and this is what reads out the battery level (and other acpi events).
                            running in the terminal
                            acpi -V
                            Should give what the system detects related to the battery and other acpi energy related devices.

                            At least this seems to be a benign problem, only in the VM.

                            antiX Live system enthusiast.
                            General Live Boot Parameters for antiX.

                            #60594
                            Forum Admin
                            rokytnji
                              Helpful
                              Up
                              1
                              ::

                              I usually install acpi to double check. My green icon says 100% also.

                              harry@biker:~
                              $ acpi -b
                              Battery 0: Full, 100%
                              harry@biker:~
                              $  apt-cache policy acpi
                              acpi:
                                Installed: 1.7-1.1
                                Candidate: 1.7-1.1
                                Version table:
                               *** 1.7-1.1 500
                                      500 http://ftp.us.debian.org/debian buster/main amd64 Packages
                                      100 /var/lib/dpkg/status
                              

                              Sometimes I drive a crooked road to get my mind straight.
                              Not all who Wander are Lost.
                              I'm not outa place. I'm from outer space.

                              Linux Registered User # 475019
                              How to Search for AntiX solutions to your problems

                              #60595
                              Moderator
                              BobC
                                Helpful
                                Up
                                0
                                ::

                                I’m not sure its a battle worth fighting, but if you look in aapm.cc and aapm.h you can see the locations IceWM is getting the values from to identify which aren’t right. The question, of course, is why did it get loaded wrong, there. You might look at how other battery monitor programs such as acpi and xbattbar get the data, as well, but again, I’m not sure this is worth the effort given that its only wrong from inside a virtual machine and the correct value is also easily found.

                                I see it doesn’t like me adding the source for you. Its available from the web or repos if you want to go to the trouble. I have it because I wrote a “Low power alert” script at one point because I had an old laptop with a flakey battery.

                                • This reply was modified 1 year, 11 months ago by BobC.
                                #60597
                                Member
                                user0815
                                  Helpful
                                  Up
                                  0
                                  ::

                                  I don´t have such profound Linux knowledge as you do, so I don´t know how or where to look in aapm.cc. But I think, it is most likely a bug in antiX19. I just downloaded 17.4.1, detached the virtual disk from 19.4, cloned the virtual machine and installed 17.4.1 on that machine with exactly the same setup, and guess what, the battery indicator is correct on 17.4.1.

                                  • This reply was modified 1 year, 11 months ago by user0815.
                                Viewing 15 posts - 1 through 15 (of 17 total)
                                • You must be logged in to reply to this topic.