netbsd-bugs@netbsd.org
[Top] [All Lists]

[demelier.david@xxxxxxxxx: Re: kern/43508: fan are shut down in any case

Subject: : Re: kern/43508: fan are shut down in any case if running on battery]
From: David Holland
Date: Thu, 1 Jul 2010 20:00:06 +0000 UTC
The following reply was made to PR kern/43508; it has been noted by GNATS.

From: David Holland <dholland-bugs@xxxxxxxxxx>
To: gnats-bugs@xxxxxxxxxx
Cc: 
Subject: [demelier.david@xxxxxxxxx: Re: kern/43508: fan are shut down in
        any case if running on battery]
Date: Thu, 1 Jul 2010 19:57:16 +0000

 These didn't get sent to gnats. (Best approach is to send all PR mail
 to gnats-bugs; it resends elsewhere.)
 
    ------
 
 From: David DEMELIER <demelier.david@xxxxxxxxx>
 To: kern-bug-people@xxxxxxxxxx, gnats-admin@xxxxxxxxxx,
        netbsd-bugs@xxxxxxxxxx, demelier.david@xxxxxxxxx
 Subject: Re: kern/43508: fan are shut down in any case if running on battery
 Date: Thu, 1 Jul 2010 10:27:28 +0200
 
 I think we have catch the problem, take a look at the dmesg.txt there
 is a lot of :
 
 acpi_power-0447 [4294967256] power_set             : failed to set
 power state to D0 for FAN7: AE_NOT_FOUND
 
 Since HP does not provide any fans control capability, NetBSD can not
 manage it. So the solution would be removing any fans control if
 AE_NOT_FOUND ?
 
 -- 
 Demelier David
 
 
 From: Jukka Ruohonen <jruohonen@xxxxxx>
 To: David DEMELIER <demelier.david@xxxxxxxxx>
 Cc: kern-bug-people@xxxxxxxxxx, gnats-admin@xxxxxxxxxx,
        netbsd-bugs@xxxxxxxxxx
 Subject: Re: kern/43508: fan are shut down in any case if running on battery
 Date: Thu, 1 Jul 2010 11:46:23 +0300
 Mail-Followup-To: David DEMELIER <demelier.david@xxxxxxxxx>,
        kern-bug-people@xxxxxxxxxx, gnats-admin@xxxxxxxxxx,
        netbsd-bugs@xxxxxxxxxx
 
 On Thu, Jul 01, 2010 at 10:27:28AM +0200, David DEMELIER wrote:
 > I think we have catch the problem, take a look at the dmesg.txt there
 > is a lot of :
 > 
 > acpi_power-0447 [4294967256] power_set             : failed to set
 > power state to D0 for FAN7: AE_NOT_FOUND
 
 Thanks. That might indeed be the problem. This also indicates that the
 problem might be in the NetBSD implementation.
 
 > Since HP does not provide any fans control capability, NetBSD can not
 
 No, this laptop provides fan controls. Something like the following should
 appear in your laptop:
 
 $ sysctl hw.acpi.power
 ...
 hw.acpi.power.FAN6 = D0
 hw.acpi.power.FAN7 = D3
 ...
 
 where D0 is "on" and D3 is "off".
 
 > So the solution would be removing any fans control if AE_NOT_FOUND?
 
 I am still trying to understand the DSDT of this laptop. But in the
 meanwhile, can you try the following patch? It tries to address a case where
 it might be unreliable to get the power state of a device (e.g. fan) but it
 is still possible to set the power state.
 
 Index: acpi_power.c
 ===================================================================
 RCS file: /cvsroot/src/sys/dev/acpi/acpi_power.c,v
 retrieving revision 1.20
 diff -u -p -r1.20 acpi_power.c
 --- acpi_power.c       8 Jun 2010 21:47:26 -0000       1.20
 +++ acpi_power.c       1 Jul 2010 08:41:22 -0000
 @@ -358,7 +358,6 @@ acpi_power_set(ACPI_HANDLE hdl, int stat
        struct acpi_devnode *ad = acpi_get_node(hdl);
        ACPI_STATUS rv;
        char path[5];
 -      int old;
  
        if (ad == NULL)
                return false;
 @@ -373,19 +372,6 @@ acpi_power_set(ACPI_HANDLE hdl, int stat
                goto fail;
        }
  
 -      if (acpi_power_get(ad, &old) != true) {
 -              rv = AE_NOT_FOUND;
 -              goto fail;
 -      }
 -
 -      KASSERT(ad->ad_state == old);
 -      KASSERT(ad->ad_state != ACPI_STATE_ERROR);
 -
 -      if (ad->ad_state == state) {
 -              rv = AE_ALREADY_EXISTS;
 -              goto fail;
 -      }
 -
        /*
         * It is only possible to go to D0 ("on") from D3 ("off").
         */
 @@ -434,7 +420,7 @@ acpi_power_set(ACPI_HANDLE hdl, int stat
        (void)AcpiEvaluateObject(ad->ad_handle, path, NULL, NULL);
  
        ACPI_DEBUG_PRINT((ACPI_DB_INFO, "%s turned from "
 -              "D%d to D%d\n", ad->ad_name, old, state));
 +              "D%d to D%d\n", ad->ad_name, ad->ad_state, state));
  
        ad->ad_state = state;
  
 @@ -499,7 +485,7 @@ acpi_power_res(ACPI_HANDLE hdl, ACPI_HAN
        res = acpi_power_res_get(hdl);
  
        if (res == NULL)
 -              return AE_NOT_FOUND;
 +              return AE_NOT_EXIST;
  
        /*
         * (De)reference the resource.
 
 
 From: Jukka Ruohonen <jruohonen@xxxxxx>
 To: David DEMELIER <demelier.david@xxxxxxxxx>
 Cc: kern-bug-people@xxxxxxxxxx, gnats-admin@xxxxxxxxxx,
        netbsd-bugs@xxxxxxxxxx
 Subject: Re: kern/43508: fan are shut down in any case if running on battery
 Date: Thu, 1 Jul 2010 12:34:15 +0300
 Mail-Followup-To: David DEMELIER <demelier.david@xxxxxxxxx>,
        kern-bug-people@xxxxxxxxxx, gnats-admin@xxxxxxxxxx,
        netbsd-bugs@xxxxxxxxxx
 
 On Thu, Jul 01, 2010 at 10:27:28AM +0200, David DEMELIER wrote:
 > I think we have catch the problem, take a look at the dmesg.txt there
 > is a lot of :
 > 
 > acpi_power-0447 [4294967256] power_set             : failed to set
 > power state to D0 for FAN7: AE_NOT_FOUND
 > 
 > Since HP does not provide any fans control capability, NetBSD can not
 > manage it. So the solution would be removing any fans control if
 > AE_NOT_FOUND ?
 
 Actually try the revision 1.21 of acpi_power.c before anything else.
 
 That fixed an embarrassing bug I managed to introduce some time ago.
 

<Prev in Thread] Current Thread [Next in Thread>
  • [demelier.david@xxxxxxxxx: Re: kern/43508: fan are shut down in any case if running on battery], David Holland <=