Display `/proc/acpi/battery/BAT0/info` from the command line

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












On a fresh Debian/stable 9.5 installation on a MacBookPro10,1, I am trying to display acpi info from the command line.



Here is what I see:



$ find /proc/acpi/
/proc/acpi/
/proc/acpi/button
/proc/acpi/button/lid
/proc/acpi/button/lid/LID0
/proc/acpi/button/lid/LID0/state
/proc/acpi/wakeup


But acpi seems to see the battery anyway:



$ acpi -V
Battery 0: Discharging, 46%, 01:17:56 remaining
Battery 0: design capacity 8460 mAh, last full capacity 7415 mAh = 87%
Adapter 0: off-line
Cooling 0: Processor 0 of 17
Cooling 1: Processor 0 of 17
Cooling 2: Processor 0 of 17
Cooling 3: BAT0 no state information available
Cooling 4: Processor 0 of 17
Cooling 5: intel_powerclamp no state information available
Cooling 6: Processor 0 of 17
Cooling 7: Processor 0 of 17
Cooling 8: Processor 0 of 17
Cooling 9: x86_pkg_temp no state information available
Cooling 10: Processor 0 of 17


What am I missing from the installation to get proper battery info from /proc/acpi interface ?










share|improve this question

























    up vote
    0
    down vote

    favorite












    On a fresh Debian/stable 9.5 installation on a MacBookPro10,1, I am trying to display acpi info from the command line.



    Here is what I see:



    $ find /proc/acpi/
    /proc/acpi/
    /proc/acpi/button
    /proc/acpi/button/lid
    /proc/acpi/button/lid/LID0
    /proc/acpi/button/lid/LID0/state
    /proc/acpi/wakeup


    But acpi seems to see the battery anyway:



    $ acpi -V
    Battery 0: Discharging, 46%, 01:17:56 remaining
    Battery 0: design capacity 8460 mAh, last full capacity 7415 mAh = 87%
    Adapter 0: off-line
    Cooling 0: Processor 0 of 17
    Cooling 1: Processor 0 of 17
    Cooling 2: Processor 0 of 17
    Cooling 3: BAT0 no state information available
    Cooling 4: Processor 0 of 17
    Cooling 5: intel_powerclamp no state information available
    Cooling 6: Processor 0 of 17
    Cooling 7: Processor 0 of 17
    Cooling 8: Processor 0 of 17
    Cooling 9: x86_pkg_temp no state information available
    Cooling 10: Processor 0 of 17


    What am I missing from the installation to get proper battery info from /proc/acpi interface ?










    share|improve this question























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      On a fresh Debian/stable 9.5 installation on a MacBookPro10,1, I am trying to display acpi info from the command line.



      Here is what I see:



      $ find /proc/acpi/
      /proc/acpi/
      /proc/acpi/button
      /proc/acpi/button/lid
      /proc/acpi/button/lid/LID0
      /proc/acpi/button/lid/LID0/state
      /proc/acpi/wakeup


      But acpi seems to see the battery anyway:



      $ acpi -V
      Battery 0: Discharging, 46%, 01:17:56 remaining
      Battery 0: design capacity 8460 mAh, last full capacity 7415 mAh = 87%
      Adapter 0: off-line
      Cooling 0: Processor 0 of 17
      Cooling 1: Processor 0 of 17
      Cooling 2: Processor 0 of 17
      Cooling 3: BAT0 no state information available
      Cooling 4: Processor 0 of 17
      Cooling 5: intel_powerclamp no state information available
      Cooling 6: Processor 0 of 17
      Cooling 7: Processor 0 of 17
      Cooling 8: Processor 0 of 17
      Cooling 9: x86_pkg_temp no state information available
      Cooling 10: Processor 0 of 17


      What am I missing from the installation to get proper battery info from /proc/acpi interface ?










      share|improve this question













      On a fresh Debian/stable 9.5 installation on a MacBookPro10,1, I am trying to display acpi info from the command line.



      Here is what I see:



      $ find /proc/acpi/
      /proc/acpi/
      /proc/acpi/button
      /proc/acpi/button/lid
      /proc/acpi/button/lid/LID0
      /proc/acpi/button/lid/LID0/state
      /proc/acpi/wakeup


      But acpi seems to see the battery anyway:



      $ acpi -V
      Battery 0: Discharging, 46%, 01:17:56 remaining
      Battery 0: design capacity 8460 mAh, last full capacity 7415 mAh = 87%
      Adapter 0: off-line
      Cooling 0: Processor 0 of 17
      Cooling 1: Processor 0 of 17
      Cooling 2: Processor 0 of 17
      Cooling 3: BAT0 no state information available
      Cooling 4: Processor 0 of 17
      Cooling 5: intel_powerclamp no state information available
      Cooling 6: Processor 0 of 17
      Cooling 7: Processor 0 of 17
      Cooling 8: Processor 0 of 17
      Cooling 9: x86_pkg_temp no state information available
      Cooling 10: Processor 0 of 17


      What am I missing from the installation to get proper battery info from /proc/acpi interface ?







      linux debian acpi






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Oct 1 at 7:33









      malat

      452622




      452622




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          2
          down vote



          accepted










          Looking through the system calls executed by acpi on my Ubuntu:



          ~ strace -e open,chdir acpi
          open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
          open("/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
          chdir("/sys/class") = 0
          chdir("power_supply") = 0
          open(".", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 3
          open("BAT0/current_now", O_RDONLY) = -1 ENOENT (No such file or directory)
          open("BAT0/power_now", O_RDONLY) = 4
          open("BAT0/charge_now", O_RDONLY) = -1 ENOENT (No such file or directory)
          open("BAT0/energy_now", O_RDONLY) = 4
          open("BAT0/voltage_now", O_RDONLY) = 4
          ...


          So it seems to be reading information from /sys/class/power_supply/*.



          Since the functionality is provided in /sys/class/power_supply/* and since Debian kernel is build without CONFIG_ACPI_PROCFS_POWER:



          $ grep CONFIG_ACPI_PROCFS_POWER /boot/config-$(uname -r)
          # CONFIG_ACPI_PROCFS_POWER is not set


          You will not see anything anymore in /proc/acpi/battery/*






          share|improve this answer






















            Your Answer







            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "106"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            convertImagesToLinks: false,
            noModals: false,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );













             

            draft saved


            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f472516%2fdisplay-proc-acpi-battery-bat0-info-from-the-command-line%23new-answer', 'question_page');

            );

            Post as a guest






























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            2
            down vote



            accepted










            Looking through the system calls executed by acpi on my Ubuntu:



            ~ strace -e open,chdir acpi
            open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
            open("/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
            chdir("/sys/class") = 0
            chdir("power_supply") = 0
            open(".", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 3
            open("BAT0/current_now", O_RDONLY) = -1 ENOENT (No such file or directory)
            open("BAT0/power_now", O_RDONLY) = 4
            open("BAT0/charge_now", O_RDONLY) = -1 ENOENT (No such file or directory)
            open("BAT0/energy_now", O_RDONLY) = 4
            open("BAT0/voltage_now", O_RDONLY) = 4
            ...


            So it seems to be reading information from /sys/class/power_supply/*.



            Since the functionality is provided in /sys/class/power_supply/* and since Debian kernel is build without CONFIG_ACPI_PROCFS_POWER:



            $ grep CONFIG_ACPI_PROCFS_POWER /boot/config-$(uname -r)
            # CONFIG_ACPI_PROCFS_POWER is not set


            You will not see anything anymore in /proc/acpi/battery/*






            share|improve this answer


























              up vote
              2
              down vote



              accepted










              Looking through the system calls executed by acpi on my Ubuntu:



              ~ strace -e open,chdir acpi
              open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
              open("/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
              chdir("/sys/class") = 0
              chdir("power_supply") = 0
              open(".", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 3
              open("BAT0/current_now", O_RDONLY) = -1 ENOENT (No such file or directory)
              open("BAT0/power_now", O_RDONLY) = 4
              open("BAT0/charge_now", O_RDONLY) = -1 ENOENT (No such file or directory)
              open("BAT0/energy_now", O_RDONLY) = 4
              open("BAT0/voltage_now", O_RDONLY) = 4
              ...


              So it seems to be reading information from /sys/class/power_supply/*.



              Since the functionality is provided in /sys/class/power_supply/* and since Debian kernel is build without CONFIG_ACPI_PROCFS_POWER:



              $ grep CONFIG_ACPI_PROCFS_POWER /boot/config-$(uname -r)
              # CONFIG_ACPI_PROCFS_POWER is not set


              You will not see anything anymore in /proc/acpi/battery/*






              share|improve this answer
























                up vote
                2
                down vote



                accepted







                up vote
                2
                down vote



                accepted






                Looking through the system calls executed by acpi on my Ubuntu:



                ~ strace -e open,chdir acpi
                open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
                open("/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
                chdir("/sys/class") = 0
                chdir("power_supply") = 0
                open(".", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 3
                open("BAT0/current_now", O_RDONLY) = -1 ENOENT (No such file or directory)
                open("BAT0/power_now", O_RDONLY) = 4
                open("BAT0/charge_now", O_RDONLY) = -1 ENOENT (No such file or directory)
                open("BAT0/energy_now", O_RDONLY) = 4
                open("BAT0/voltage_now", O_RDONLY) = 4
                ...


                So it seems to be reading information from /sys/class/power_supply/*.



                Since the functionality is provided in /sys/class/power_supply/* and since Debian kernel is build without CONFIG_ACPI_PROCFS_POWER:



                $ grep CONFIG_ACPI_PROCFS_POWER /boot/config-$(uname -r)
                # CONFIG_ACPI_PROCFS_POWER is not set


                You will not see anything anymore in /proc/acpi/battery/*






                share|improve this answer














                Looking through the system calls executed by acpi on my Ubuntu:



                ~ strace -e open,chdir acpi
                open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
                open("/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
                chdir("/sys/class") = 0
                chdir("power_supply") = 0
                open(".", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 3
                open("BAT0/current_now", O_RDONLY) = -1 ENOENT (No such file or directory)
                open("BAT0/power_now", O_RDONLY) = 4
                open("BAT0/charge_now", O_RDONLY) = -1 ENOENT (No such file or directory)
                open("BAT0/energy_now", O_RDONLY) = 4
                open("BAT0/voltage_now", O_RDONLY) = 4
                ...


                So it seems to be reading information from /sys/class/power_supply/*.



                Since the functionality is provided in /sys/class/power_supply/* and since Debian kernel is build without CONFIG_ACPI_PROCFS_POWER:



                $ grep CONFIG_ACPI_PROCFS_POWER /boot/config-$(uname -r)
                # CONFIG_ACPI_PROCFS_POWER is not set


                You will not see anything anymore in /proc/acpi/battery/*







                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited Oct 1 at 15:17









                malat

                452622




                452622










                answered Oct 1 at 7:47









                Olorin

                1,35411




                1,35411



























                     

                    draft saved


                    draft discarded















































                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f472516%2fdisplay-proc-acpi-battery-bat0-info-from-the-command-line%23new-answer', 'question_page');

                    );

                    Post as a guest













































































                    Popular posts from this blog

                    How to check contact read email or not when send email to Individual?

                    Bahrain

                    Postfix configuration issue with fips on centos 7; mailgun relay