Announcement

Collapse
No announcement yet.

Powerdevil not recognizing that my laptop is plugged in!

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #16
    Re: Powerdevil not recognizing that my laptop is plugged in!

    Originally posted by Nos4ah2
    ...

    Could anyone please explain to me how to add the AC adapter as a module as he proposed? This issue is really killing me.
    He contacted his laptop vendor and asked for a BIOS update. They sent him an ISO from which he was able burn in a BIOS update (burned new, updated code into the BIOS firmware). That new firmware enabled a boot which recognized his AC power adaptor. CAUTION! This is an error prone procedure which, if done incorrectly, could brick your laptop. Consult the vendor about sending in your laptop to have the BIOS firmware updated.

    The problem, it appears, stems from Windows poor compiler, and the OEM's willingness to allow a sloppy compiler pass too many errors, allowing Windows to see the AC power adapter, but not an OS that plays closer to the standards:
    The ACPI Specification defines the requirements for the DSDT (and everything else, for that matter) pretty explicitly. Intel's ASL compiler, iasl, used to compile the DSDT to AML from ASL, will throw errors and warnings if the underlying ASL is buggy. Unfortunately, Microsoft's ASL compiler allows many of these errors and warnings to sneak by. As a result, many OEMs write buggy DSDTs, and it turns out that Windows is very forgiving of bugs in the DSDT that get by Microsoft's compiler (not surprisingly).

    What this means is that a DSDT that does not conform to the ACPI specification will work under Windows, even though it shouldn't. However, when you try to use it in Linux, where the ACPI developers expect that the DSDT is written to comply with the standard (and the Intel ASL compiler), the buggy sections of the DSDT are unsupported. If you have a buggy DSDT, ACPI may not be aware that certain devices exist. Or, if it is aware, it may not support all of their capabilites. If you have either of these symptoms (missing or incompletely supported functionality in /proc/acpi), then the cause may be a buggy DSDT.
    "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
    – John F. Kennedy, February 26, 1962.

    Comment


      #17
      Re: Powerdevil not recognizing that my laptop is plugged in!

      As I wrote above the GNOME battery panel work out of the box in Ubuntu 9.04 although the KDE battery panel failed in kubuntu 9.04. I installed ubuntu on the computer and verified that the /proc/acpi/ac_adapter does not contain any file (it does in kubuntu 8.10 though) and the gnome indicator works anyhow. My conclusion is that the gnome indicator finds the information by other means. In the kernel configuration for ACPI the /proc/acpi is marked deprecated and I suppose GNOME have another solution (my guess, not verified).

      I found the BIOS update and the rewriting of ACPI-codes linked to in posts above a bit to risky and technical for me, and I consider my self very experienced with Linux, software development and programming and willingly to try complicated solutions. I judge it to contain a lot of uncertain things that I probaly will find troublesome if I get started. I agree wight GreyGeek, "don't try this at home", it might as well make severe damage to your computer and cost you expensive professional service :P


      However there is a simple workaround to make life easier for us who are not willingly to change desktop for every annoying bug we stunble on. This is what I did:

      There are 4 states in power-devil configuration (System Settings - > Power Management):
      * When the power adaptor is plugged in
      * When on battery power
      * When battery is on low level
      * When battery is at warning level

      First I made changes to the profiles in "General Settings"->"Settings and Profiles":
      * changed the profile of "When on battery level" to performance (the same as "when power adaptor is plugged in") .
      * changed the profile of "When battery is at low level" to "Powersave" (the same as "when on battery power" default).


      Second I modified the levels in "Advanced Battery Settings":
      * Battery is on low level : 98% (should trigger when i actually use the battery)
      * Battery is at warning level : 25%
      * Battery is at critical level: 5% (unmodified)


      This way the computer will act the same way as power connector is connected until the battery power level reaches 98% wich will happen pretty soon when AC-adaptor is disconnected but not until then.


      This does not solve the problem though it will make the system work pretty well. It is a solution good enough for me while I try to understund how Gnome can mange while KDE still depends on deprecated kernel-APIs.


      For the record, the Kubuntu 8.10 live-CD (where this works) have the kernel 2.6.27-7 installed, ACPID 10.06, hald 0.5.11 and halinfo 20081013. I installed those versions on my gentoo-system though I still got no indicator-file in /proc/acpi/ac_power as there is in Kubuntu 8.10. Perhaps (not yet verified) the ACPI-scrip in /etc/acpi makes the trick in Kubuntu 8.10 and I simply have to copy (whole or parts) that one. This might be something to study further. Or just a last straw to grasp in vain

      And before changing any files in /etc I recommend you to make a backup of the /etc-files:

      %sudo tar cvf etc_backup.tar /etc

      This will create a tar-file as backup of the /etc-files in the current directory and will save you a reinstall when things go out of hands, which they as well might while learning how to manage the files in /etc

      Don't forget that man-pages often exists for files in /etc.
      Eg:
      %man hosts
      Which shows the man page for /etc/hosts
      and:
      %man acpid
      which shows the man-page for ACPID and files in /etc/acpi.


      Comment


        #18
        Re: Powerdevil not recognizing that my laptop is plugged in!

        hi

        I have a little hack for this problem

        Code:
        cat /proc/acpi/ac_adapter/ACAD/state
        this command to force update the status of AC_Adapter correctly, this will be used for the hack.

        Code:
        sudo vim /etc/acpi/events/battery_event
        (copy/paste)
        Code:
        event=battery.*
        action=cat /proc/acpi/ac_adapter/AC/state > /dev/null
        then restarting the daemon acpid or reboot.
        Code:
        service acpid restart
        now plugged in/out should work out correctly.

        Comment


          #19
          Re: Powerdevil not recognizing that my laptop is plugged in!

          In my case there are no files in /proc/acpi/ac_adapter/

          No state to be touched by cat, no nothing.

          Any clues why the ac_adapter is empty?


          Regards,
          Erik


          Comment


            #20
            Re: Powerdevil not recognizing that my laptop is plugged in!

            Hello, I have the same problem in my laptop, the power management daemon doesn't change power profile when I unplug the AC adapter.

            The System seem to recognize when the AC adapter is plugged:
            Code:
            nicola@nicola-laptop:~$ cat /proc/acpi/ac_adapter/AC/state 
            state:          on-line
            nicola@nicola-laptop:~$ cat /proc/acpi/ac_adapter/AC/state 
            state:          off-line
            and the battery widget recognize correctly if the battery is charging/discharging, but this doesn't affect the profile switching.
            I tried gemu's hack but it didn't work.

            This seems to be a KDE issue since the same happens with an OpenSuse livecd.

            Any suggestion?

            Comment


              #21
              Re: Powerdevil not recognizing that my laptop is plugged in!

              Today!
              I finally made it work, not in Kubuntu though.

              I have made a clean install using gentoo and the kernel 2.6.34 and enabled a new version 3 (I think) of the ACPI which I never seen before. And I found that it now recognizes when i plug in the AC and when it is removed.

              I have tried gentoo before with same result as with kubuntu.

              Don't know what kernel there is in kubuntu 10.4, it still didn't work, but I guess that 10.10 will be at kernel 2.6.34 or higher, an hopefully solving this problem. For me at least.

              Regards,
              Erik

              Comment

              Working...
              X