Re: Re: ACPI bug submission

2014-04-22 Thread Ian Smith
On Mon, 21 Apr 2014 12:07:51 -0700, Kevin Oberman wrote:
 > On Mon, Apr 21, 2014 at 9:05 AM, Matt Grice  wrote:
 > 
 > > Sorry, PEBKAC error, it appears I've been replying off-list.

Ah, I would have left it to Kevin had I known.  However this raises a 
couple of interesting points .. cutting mercilessly ..

 > > hw.acpi.cpu.cx_lowest: C1
 > > Power saving Cx states are NOT enabled.

Which makes the cool temperatures you noted, Kevin, more amazing.

Matt, you might try adding to /etc/rc.conf:
  performance_cx_lowest=C3
  economy_cx_lowest=C3

 > > hw.acpi.thermal.tz0.temperature: 39.0C
 > > Thermal zone 0 is 39C. This is usually the CPU. 39C is VERY cool.

Yes it is, but see below ..

 > > Hopefully it i accurate.
 > > hw.acpi.thermal.tz0.active: -1
 > > ACPI is NOT throttling the CPU to control temperature
 > > hw.acpi.thermal.tz0.passive_cooling: 0
 > > ACPI is not increasing system cooling capability (usually the fan) to
 > > reduce temperature. NOTE: This does not mean non-ACPI controls are not 
 > > used!

Actually, active cooling is the fan/s, and passive cooling is CPU speed 
reduction and/or cycle throttling.

 > > hw.acpi.thermal.tz0.thermal_flags: 0
 > > hw.acpi.thermal.tz0._PSV: 95.0C
 > > At 95C, turn the cooling (fans) to maximum.

It's the passive (throttling) temperature that kicks in at 95C

 > > hw.acpi.thermal.tz0._HOT: -1
 > > hw.acpi.thermal.tz0._CRT: 98.0C
 > > At 98C, throttlethe CPU to reduce temperature

And that's the critical temperature that should cause shutdown.

 > > hw.acpi.thermal.tz0._ACx: -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
 > > hw.acpi.thermal.tz0._TC1: 0
 > > hw.acpi.thermal.tz0._TC2: 50
 > > hw.acpi.thermal.tz0._TSP: 0
 > > hw.acpi.thermal.tz1.temperature: 39.0C
 > > Odd that tz0 and tz1 are both 39C. Seems unlikely. May be different CPU
 > > sensor or something else.

But see below ..

 > > hw.acpi.thermal.tz1.active: -1
 > > hw.acpi.thermal.tz1.passive_cooling: 0
 > > hw.acpi.thermal.tz1.thermal_flags: 0
 > > hw.acpi.thermal.tz1._PSV: -1
 > > hw.acpi.thermal.tz1._HOT: -1
 > > hw.acpi.thermal.tz1._CRT: 98.0C
 > > At 98C, power down (if supported). This is different from the hardware
 > > shutdown on severe overtemp that simply kills power.

Right.  This zone just has _CRT, also 98C, no active or passive cooling.

[..]

 > > acpiconf -i 0
 > >
 > > [root@Raptor] /usr/ports/comms/wspr# acpiconf -i o
 > > Design capacity:   4400 mAh
 > > Last full capacity: 3757 mAh
 > > Battery is getting old and only will charge to 85% of it's design capacity.

It would be nice if it worked even that well, but ..

 > > Technology: secondary (rechargeable)
 > > Design voltage: 11100 mV
 > > Capacity (warn):185 mAh
 > > Capacity (low): 129 mAh
 > > Low/warn granularity:   56 mAh
 > > Warn/full granularity:  3572 mAh
 > > Model number: GRAPE32
 > > Serial number: 27
 > > Type: LION
 > > OEM info:   SANYO
 > > State:  critical
 > > Your battery is dying!
 > > Remaining capacity: 0%
 > > OK. It's dead.

Or just isn't getting charged (though leaving it fully discharged for 
long will kill it in the end anyway).  One of my Thinkpad T23s has a 
broken charging circuit, not unknown on that model; it runs on AC but a) 
won't charge any battery and b) dies on loss of AC power, even with a 
charged battery .. perhaps similar to what's happened to this one?

 > > Remaining time: unknown
 > > Present rate:   0 mA (0 mW)
 > > It's not discharging.

On AC power, present rate usually shows the charging rate until fully 
charged, so it's clearly not charging at all.

 > > Present voltage:7870 mV
 > > It is at 7.9 volts which is too low to run the system.
 > >
 > > Since the system appears to be on AC power, but the battery is not
 > > charging, something is wrong here. I have no idea what.
 > > It appears that either the charging system or the battery has
 > > failed.Neither involved the OS, but indicates a hardware issue with the
 > > device.

We concur.  Matt, you could maybe try this battery in another laptop if 
you have access to one, or an external charger, ie the battery may still 
be at least partially ok and only the charge circuit is broken (bummer!) 
or OTOH the battery may be so stuffed that the charge circuit refuses to 
try to charge it, but isn't broken as such - so a new battery may help.

 > > There are several ACPI variables I don't recognize or am simply not
 > > familiar with, but this will give you some   idea what many of
 > > the important ones are. Remember that ACPI is firmware and may have errors
 > > that result in its lying to the OS. I don't trust some of what I see,
 > > especially the temperature. Most laptops idle at between   50
 > > and 60C. Seeing two zones at 39C is very odd.

I'd have agreed with this before ~10 weeks ago, when my son bought me a 
Thinkpad X200 from an auction site out of the blue - without battery or 
charger, and with a dodgy serial 

Re: Re: ACPI bug submission

2014-04-21 Thread Kevin Oberman
On Mon, Apr 21, 2014 at 9:05 AM, Matt Grice  wrote:

> Sorry, PEBKAC error, it appears I've been replying off-list.
>
> Please find below my response. It appears that the latest problem is
> something to do with X as it crashes out when trying to return to the
> console when pressing Ctrl-Alt-F1 too.
>
> Thanks
>
> Matt Grice
>
>  Original message From: Matt Grice <
> m...@atarian.co.uk> Date:21/04/2014  14:51  (GMT+00:00)
> To: Kevin Oberman  Subject:
> Re: ACPI bug submission 
> Thanks for the help Kevin, I'm quite new to FreeBSD. I noticed the
> sysctl for lid_switch wasn't set, but I just thought it was for information
> only. man 8 sysctl is my friend.
>
> Sleep now works, it just won't wake up. I've debugged this kind of thing
> before with Linux so I'll plough on from here, I expect I'll just have to
> work out which systems are shut down at sleep and which ones are restarted
> afterwards. I've had issues with sound modules doing this kind of thing in
> the past. I think a serial console might be in order.
>
> The battery thing is really odd as it's a virtually new battery, and I
> wasn't aware there were issues before the install. However, the thing won't
> charge when it's switched off, which screams HARDWARE! It's probably one of
> those black swan situations.
>
> Thanks again for taking the time out to help. It's really appreciated.
>
>
> Matt Grice
>
>
>
> On 20/04/2014 16:12, Kevin Oberman wrote:
> On Sun, Apr 20, 2014 at 2:39 AM, Matt Grice  wrote:
> Could you provide the output of:
> sysctl hw.acpi
>
> [root@Raptor] /usr/ports/comms/wspr# sysctl hw.acpi
> hw.acpi.supported_sleep_state: S3 S4 S5
> S3 is suspend to RAM, S4 is suspend to disk, and S5 is shutdown
> hw.acpi.power_button_state: S5
> Power button will do a system shutfown and power off
> hw.acpi.sleep_button_state: S3
> Sleep button will suspend to RAM. Little power use and supported by BIOS
> with minimal OS support. Works on FreeBSD
> hw.acpi.lid_switch_state: NONE
> Closing the lid does nothing in BIOS. Display backlight my turn off, but
> that's it.
> hw.acpi.standby_state: NONE
> If the power management system wants to go to a standby mode, nothing
> happens.
> hw.acpi.suspend_state: S3
> If a suspend is requested by the OS, suspend to RAM is used
> hw.acpi.sleep_delay: 1
> Delay 1 second for OS to do preparation for suspend to RAM
> hw.acpi.s4bios: 0
> BIOS does not support suspend to disk. OS support is required. FreeBSD
> does not have this support.
> hw.acpi.verbose: 1
> hw.acpi.disable_on_reboot: 0
> hw.acpi.handle_reboot: 0
> hw.acpi.reset_video: 0
> hw.acpi.cpu.cx_lowest: C1
> Power saving Cx states are NOT enabled.
> hw.acpi.thermal.min_runtime: 0
> hw.acpi.thermal.polling_rate: 10
> ACPI will update temperature information every 10 seconds
> hw.acpi.thermal.user_override: 0
> hw.acpi.thermal.tz0.temperature: 39.0C
> Thermal zone 0 is 39C. This is usually the CPU. 39C is VERY cool.
> Hopefully it i accurate.
> hw.acpi.thermal.tz0.active: -1
> ACPI is NOT throttling the CPU to control temperature
> hw.acpi.thermal.tz0.passive_cooling: 0
> ACPI is not increasing system cooling capability (usually the fan) to
> reduce temperature. NOTE: This does not mean non-ACPI controls are not used!
> hw.acpi.thermal.tz0.thermal_flags: 0
> hw.acpi.thermal.tz0._PSV: 95.0C
> At 95C, turn the cooling (fans) to maximum.
> hw.acpi.thermal.tz0._HOT: -1
> hw.acpi.thermal.tz0._CRT: 98.0C
> At 98C, throttlethe CPU to reduce temperature
> hw.acpi.thermal.tz0._ACx: -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
> hw.acpi.thermal.tz0._TC1: 0
> hw.acpi.thermal.tz0._TC2: 50
> hw.acpi.thermal.tz0._TSP: 0
> hw.acpi.thermal.tz1.temperature: 39.0C
> Odd that tz0 and tz1 are both 39C. Seems unlikely. May be different CPU
> sensor or something else.
> hw.acpi.thermal.tz1.active: -1
> hw.acpi.thermal.tz1.passive_cooling: 0
> hw.acpi.thermal.tz1.thermal_flags: 0
> hw.acpi.thermal.tz1._PSV: -1
> hw.acpi.thermal.tz1._HOT: -1
> hw.acpi.thermal.tz1._CRT: 98.0C
> At 98C, power down (if supported). This is different from the hardware
> shutdown on severe overtemp that simply kills power.
> hw.acpi.thermal.tz1._ACx: -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
> hw.acpi.thermal.tz1._TC1: -1
> hw.acpi.thermal.tz1._TC2: -1
> hw.acpi.thermal.tz1._TSP: -1
> hw.acpi.battery.life: 0
> hw.acpi.battery.time: -1
> hw.acpi.battery.state: 4
> hw.acpi.battery.units: 1
> hw.acpi.battery.info_expire: 5
> hw.acpi.acline: 1
> hw.acpi.video.crt0.active: 0
> hw.acpi.video.lcd0.active: 1
> hw.acpi.video.lcd0.brightness: 100
> hw.acpi.video.lcd0.fullpower: 100
> hw.acpi.video.lcd0.economy: 60
> hw.acpi.video.lcd0.levels: 100 60 10 20 30 40 50 60 70 80 90 100
>
> If you want the system to suspend when the lid closes, "sysctl
> hw.acpi.lid_switch_state=S3".
>
>
>
>
> acpiconf -i 0
>
> [root@Raptor] /usr/ports/comms/wspr# acpiconf -i o
> Design capacity:   4400 mAh
> Last full capacity: 3757 mAh
> Battery is getting old and only will charge to 85% of it's design capacity.
> Technology: