Re: Lenovo T500 hang - down to DRM

2016-06-10 Thread Stephen Borrill

On Fri, 10 Jun 2016, Stephen Borrill wrote:

On Sun, 5 Jun 2016, Michael van Elst wrote:

On Sat, Jun 04, 2016 at 04:15:15PM +0100, Stephen Borrill wrote:


Under Windows it is cool and I get 6-hour battery life...


Does it have an ATI graphics card and also Intel graphics?


Yes. And that's the root of the hanging problem.

If Integrated graphics (Intel) or Discrete graphics (ATI) are selected in the 
BIOS, the machine boots.


With Intel, DRM attaches very early on:
pci0 at mainbus0 bus 0: configuration mode 1
pci0: i/o space, memory space enabled, rd/line, rd/mult, wr/inv ok
pchb0 at pci0 dev 0 function 0: vendor 0x8086 product 0x2a40 (rev. 0x07)
agp0 at pchb0: G4X-family chipset
agp0: detected 32252k stolen memory
agp0: aperture at 0xd000, size 0x1000
i915drmkms0 at pci0 dev 2 function 0: vendor 0x8086 product 0x2a42 (rev. 
0x07)

drm: Memory usable by graphics device = 512M
drm: Supports vblank timestamp caching Rev 2 (21.10.2013).
drm: Driver supports precise vblank timestamp query.
i915drmkms0: interrupting at ioapic0 pin 16 (i915)
intelfb0 at i915drmkms0
i915drmkms0: info: registered panic notifier

With ATI, DRM attaches much, much later on:
pad0: outputs: 44100Hz, 16-bit, stereo
audio1 at pad0: half duplex, playback, capture
boot device: wd0
root on wd0a dumps on wd0b
root file system type: ffs
drm: initializing kernel modesetting (RV635 0x1002:0x9591 0x17AA:0x2117).
drm: register mmio base: 0xcfff
drm: register mmio size: 65536
drm kern info: ATOM BIOS: M86M
radeon0: info: VRAM: 256M 0x - 0x0FFF (256M used)
radeon0: info: GTT: 512M 0x1000 - 0x2FFF

Note that this is around the point where the machine hangs. If Switchable 
graphics is enabled in the BIOS (which is the default it likes to keep 
resetting back to), the hang occurs. My theory is that i915drmkms0 attaches 
early and then the later probe for radeon0 (and perhaps even trying to double 
up on DRM?) is causing the hang. When the device is hidden or disabled by the 
BIOS, it is OK.


Between RC2 (OK) and RC3 (hang) there were a number of changes to the radeon 
and i915 drm code. Not had chance to test which yet.


dmesgs here:
http://dmesgd.nycbug.org/index.cgi?do=view&id=2980
http://dmesgd.nycbug.org/index.cgi?do=view&id=2981

--
Stephen



Re: Lenovo T500 hang - down to DRM

2016-06-10 Thread Stephen Borrill

On Sun, 5 Jun 2016, Michael van Elst wrote:

On Sat, Jun 04, 2016 at 04:15:15PM +0100, Stephen Borrill wrote:


Under Windows it is cool and I get 6-hour battery life...


Does it have an ATI graphics card and also Intel graphics?


Yes. And that's the root of the hanging problem.

If Integrated graphics (Intel) or Discrete graphics (ATI) are selected in 
the BIOS, the machine boots.


With Intel, DRM attaches very early on:
pci0 at mainbus0 bus 0: configuration mode 1
pci0: i/o space, memory space enabled, rd/line, rd/mult, wr/inv ok
pchb0 at pci0 dev 0 function 0: vendor 0x8086 product 0x2a40 (rev. 0x07)
agp0 at pchb0: G4X-family chipset
agp0: detected 32252k stolen memory
agp0: aperture at 0xd000, size 0x1000
i915drmkms0 at pci0 dev 2 function 0: vendor 0x8086 product 0x2a42 (rev. 
0x07)

drm: Memory usable by graphics device = 512M
drm: Supports vblank timestamp caching Rev 2 (21.10.2013).
drm: Driver supports precise vblank timestamp query.
i915drmkms0: interrupting at ioapic0 pin 16 (i915)
intelfb0 at i915drmkms0
i915drmkms0: info: registered panic notifier

With ATI, DRM attaches much, much later on:
pad0: outputs: 44100Hz, 16-bit, stereo
audio1 at pad0: half duplex, playback, capture
boot device: wd0
root on wd0a dumps on wd0b
root file system type: ffs
drm: initializing kernel modesetting (RV635 0x1002:0x9591 0x17AA:0x2117).
drm: register mmio base: 0xcfff
drm: register mmio size: 65536
drm kern info: ATOM BIOS: M86M
radeon0: info: VRAM: 256M 0x - 0x0FFF (256M 
used)

radeon0: info: GTT: 512M 0x1000 - 0x2FFF

Note that this is around the point where the machine hangs. If Switchable 
graphics is enabled in the BIOS (which is the default it likes to keep 
resetting back to), the hang occurs. My theory is that i915drmkms0 
attaches early and then the later probe for radeon0 (and perhaps even 
trying to double up on DRM?) is causing the hang. When the device is 
hidden or disabled by the BIOS, it is OK.


Between RC2 (OK) and RC3 (hang) there were a number of changes to the 
radeon and i915 drm code. Not had chance to test which yet.


--
Stephen




Re: Lenovo T500 hang

2016-06-06 Thread Roy Marples
On 04/06/2016 16:15, Stephen Borrill wrote:
> On Fri, 3 Jun 2016, Michael van Elst wrote:
>> net...@precedence.co.uk (Stephen Borrill) writes:
>>
>>> Does it run at a sensible temperature? Mine runs very hot and runs the
>>> battery down very quickly.
>>
>> Probably needs some cleaning and/or there is a problem with the
>> fan and heat-pipes.
> 
> Under Windows it is cool and I get 6-hour battery life...

Even when mine was brand new, working on the train it would just about
make the almost 2 hour journey using Windows 7.
But then I did have a SQL server under a reasonable load while hacking
front end stuff for it.

Roy


Re: Lenovo T500 hang

2016-06-05 Thread Michael van Elst
On Sat, Jun 04, 2016 at 04:15:15PM +0100, Stephen Borrill wrote:

> Under Windows it is cool and I get 6-hour battery life...

Does it have an ATI graphics card and also Intel graphics?


Greetings,
-- 
Michael van Elst
Internet: mlel...@serpens.de
"A potential Snark may lurk in every tree."


Re: Lenovo T500 hang

2016-06-04 Thread Stephen Borrill

On Fri, 3 Jun 2016, Michael van Elst wrote:

net...@precedence.co.uk (Stephen Borrill) writes:


Does it run at a sensible temperature? Mine runs very hot and runs the
battery down very quickly.


Probably needs some cleaning and/or there is a problem with the
fan and heat-pipes.


Under Windows it is cool and I get 6-hour battery life...

--
Stephen



Re: Lenovo T500 hang

2016-06-03 Thread Michael van Elst
net...@precedence.co.uk (Stephen Borrill) writes:

>Does it run at a sensible temperature? Mine runs very hot and runs the 
>battery down very quickly.

Probably needs some cleaning and/or there is a problem with the
fan and heat-pipes.


-- 
-- 
Michael van Elst
Internet: mlel...@serpens.de
"A potential Snark may lurk in every tree."


Re: Lenovo T500 hang

2016-06-03 Thread David Brownlee
On 3 June 2016 at 10:11, Stephen Borrill  wrote:
>
> On Thu, 2 Jun 2016, Roy Marples wrote:
>>
>> On 2016-06-01 10:54, Stephen Borrill wrote:
>>>
>>> Somewhere after 7.0_RC2, a problem started where the machine hangs
>>> right at the end of the kernel boot just before it prints the boot
>>> device:
>>>
>>> pad0: outputs: 44100Hz, 16-bit, stereo
>>> audio1 at pad0: half duplex, playback, capture
>>> *** HANGS HERE ***
>>> boot device: wd0
>>> root on wd0a dumps on wd0b
>>>
>>> The only thing to do is to power the machine off. This happens with
>>> all later kernels (including -current).
>>>
>>> I've not had chance to bisect the sources yet as I need to use the
>>> machine for real work (and running NetBSD 7 on it also makes it so hot
>>> it burns my legs).
>>>
>>> I think a few users (and developers) have Lenovo T500 laptops. Does
>>> any recent NetBSD work for them?
>>
>>
>> I have a T500 which is my main NetBSD dev machine.
>
>
> Do you have a dmesg? Perhaps yours is a model without switchable graphics or 
> the 3G modem, etc.
>
>> I haven't updated the kernel in a month or so, but it's been running 
>> -current very well.
>
>
> Does it run at a sensible temperature? Mine runs very hot and runs the 
> battery down very quickly.
>
>> I don't recall if it ever ran anything earlier than a 7.0 release though.
>
>
> I've been using mine since the netbsd-5 and this problem just started.


As a random thought has the machdep.est.frequency settings changed for
it since netbsd-5? - might it possibly be picking a higher default
value? Do you use sysutils/estd (I have a T420s and that definitely
helped with how often my CPU fan maxes out)


Re: Lenovo T500 hang

2016-06-03 Thread Stephen Borrill

On Thu, 2 Jun 2016, Roy Marples wrote:

On 2016-06-01 10:54, Stephen Borrill wrote:

Somewhere after 7.0_RC2, a problem started where the machine hangs
right at the end of the kernel boot just before it prints the boot
device:

pad0: outputs: 44100Hz, 16-bit, stereo
audio1 at pad0: half duplex, playback, capture
*** HANGS HERE ***
boot device: wd0
root on wd0a dumps on wd0b

The only thing to do is to power the machine off. This happens with
all later kernels (including -current).

I've not had chance to bisect the sources yet as I need to use the
machine for real work (and running NetBSD 7 on it also makes it so hot
it burns my legs).

I think a few users (and developers) have Lenovo T500 laptops. Does
any recent NetBSD work for them?


I have a T500 which is my main NetBSD dev machine.


Do you have a dmesg? Perhaps yours is a model without switchable graphics 
or the 3G modem, etc.


I haven't updated the kernel in a month or so, but it's been running -current 
very well.


Does it run at a sensible temperature? Mine runs very hot and runs the 
battery down very quickly.



I don't recall if it ever ran anything earlier than a 7.0 release though.


I've been using mine since the netbsd-5 and this problem just started.

--
Stephen



Re: Lenovo T500 hang

2016-06-02 Thread Roy Marples

On 2016-06-01 10:54, Stephen Borrill wrote:

Somewhere after 7.0_RC2, a problem started where the machine hangs
right at the end of the kernel boot just before it prints the boot
device:

pad0: outputs: 44100Hz, 16-bit, stereo
audio1 at pad0: half duplex, playback, capture
*** HANGS HERE ***
boot device: wd0
root on wd0a dumps on wd0b

The only thing to do is to power the machine off. This happens with
all later kernels (including -current).

I've not had chance to bisect the sources yet as I need to use the
machine for real work (and running NetBSD 7 on it also makes it so hot
it burns my legs).

I think a few users (and developers) have Lenovo T500 laptops. Does
any recent NetBSD work for them?


I have a T500 which is my main NetBSD dev machine.
I haven't updated the kernel in a month or so, but it's been running 
-current very well.
I don't recall if it ever ran anything earlier than a 7.0 release 
though.


Roy