Ok. For a while i2c+sensors for me would freeze my box. Lately though
it has been slowing it down to a crawl. And by slow I mean I can see
the framebuffer console scroll block by block and be able to see
individual lines half-scrolled and suchlike things. All is fine with
the kernel until it hits the i2c and sensors code. Then it slows to
a crawl. By the look at the HD usage indicator it seems that it pauses
a second at a time (ie approx seconds pause, burst of activity, seconds
pause etc). This also happened before AS was merged into the kernel.
--
"How can I not love the Americans? They helped me with a flat tire the
other day," he said.
- http://www.toledoblade.com/apps/pbcs.dll/artikkel?SearchID=73139162287496&Avis=TO&Dato=20030624&Kategori=NEWS28&Lopenr=106240111&Ref=AR
On Tue, Jul 15, 2003 at 07:07:27PM +1000, CaT wrote:
> Ok. For a while i2c+sensors for me would freeze my box. Lately though
> it has been slowing it down to a crawl. And by slow I mean I can see
> the framebuffer console scroll block by block and be able to see
> individual lines half-scrolled and suchlike things. All is fine with
> the kernel until it hits the i2c and sensors code. Then it slows to
> a crawl. By the look at the HD usage indicator it seems that it pauses
> a second at a time (ie approx seconds pause, burst of activity, seconds
> pause etc). This also happened before AS was merged into the kernel.
So, if you don't have any i2c code loaded, everything works? How about
just loading the i2c driver and not the sensor driver?
Oh, how about enabiling debugging in the i2c driver that you are using?
Any interesting info in the kernel log would be appreciated.
thanks,
greg k-h
On Tue, Jul 15, 2003 at 09:11:27AM -0700, Greg KH wrote:
> On Tue, Jul 15, 2003 at 07:07:27PM +1000, CaT wrote:
> So, if you don't have any i2c code loaded, everything works? How about
Yes.
> just loading the i2c driver and not the sensor driver?
All's fine.
> Oh, how about enabiling debugging in the i2c driver that you are using?
Well this is what I did:
11 [15:53:38] root@theirongiant:/usr/src/linux/drivers/i2c>> grep 'define DEBUG' . -r
./i2c-core.c:#define DEBUG 1 /* needed to pick up the dev_dbg() calls */
./scx200_acb.c:#define DEBUG 0
./i2c-sensor.c:#define DEBUG 1
./i2c-algo-bit.c:/* #define DEBUG 1 */
./i2c-dev.c:#define DEBUG 1
./i2c-algo-pcf.c:/* #define DEBUG 1 */ /* to pick up dev_dbg calls */
./busses/i2c-amd756.c:/* #define DEBUG 1 */
./busses/i2c-ali15x3.c:/* #define DEBUG 1 */
./busses/i2c-i801.c:/* #define DEBUG 1 */
./busses/i2c-piix4.c:#define DEBUG 1
./busses/i2c-sis96x.c:/* #define DEBUG */
./busses/i2c-ali1535.c:/* #define DEBUG 1 */
./chips/adm1021.c:#define DEBUG 1
./chips/lm75.c:/* #define DEBUG 1 */
Did I do the right thing?
> Any interesting info in the kernel log would be appreciated.
Unfortunately I didn't get anything special:
serio: i8042 KBD port at 0x60,0x64 irq 1
i2c /dev entries driver module version 2.7.0 (20021208)
i2c-piix4 version 2.7.0 (20021208)
piix4-smbus 0000:00:07.3: Found Intel Corp. 82371AB/EB/MB PIIX4 device
registering 0-004d
Advanced Linux Sound Architecture Driver Version 0.9.4 (Mon Jun 09 12:01:18 2003 UTC).
PCI: Enabling device 0000:00:0c.0 (0000 -> 0003)
I let it boot, thinking I might try using it but I must've pressed
ctrl-alt-del because when I woke up an hour later (ahm - it got REALLY
boring watching the laptop boot :) it was midway through a reboot. What's
more is that I believe the problem survived the reboot because my default
kernel the hasn't any i2c code in it got as far as:
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
PIIX4: IDE controller at PCI slot 0000:00:07.1
PIIX4: chipset revision 1
PIIX4: not 100% native mode: will probe irqs later
ide0: BM-DMA at 0x1040-0x1047, BIOS settings: hda:DMA, hdb:pio
ide1: BM-DMA at 0x1048-0x104f, BIOS settings: hdc:DMA, hdd:pio
hda: IC25N020ATCS04-0, ATA DISK drive
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
hdc: DV-28E, ATAPI CD/DVD-ROM drive
ide1 at 0x170-0x177,0x376 on irq 15
By the time I woke up and it was't getting anywhere fast. I got impatient
then though and just power-cycled my laptop and all was well.
Anything else I can do? I've got a null-modem cable now so I can do
anything where that might come in handy.
--
"How can I not love the Americans? They helped me with a flat tire the
other day," he said.
- http://www.toledoblade.com/apps/pbcs.dll/artikkel?SearchID=73139162287496&Avis=TO&Dato=20030624&Kategori=NEWS28&Lopenr=106240111&Ref=AR
On Wed, Jul 16, 2003 at 04:04:43PM +1000, CaT wrote:
> On Tue, Jul 15, 2003 at 09:11:27AM -0700, Greg KH wrote:
> > On Tue, Jul 15, 2003 at 07:07:27PM +1000, CaT wrote:
> > So, if you don't have any i2c code loaded, everything works? How about
>
> Yes.
>
> > just loading the i2c driver and not the sensor driver?
>
> All's fine.
>
> > Oh, how about enabiling debugging in the i2c driver that you are using?
>
> Well this is what I did:
>
> 11 [15:53:38] root@theirongiant:/usr/src/linux/drivers/i2c>> grep 'define DEBUG' . -r
> ./i2c-core.c:#define DEBUG 1 /* needed to pick up the dev_dbg() calls */
> ./scx200_acb.c:#define DEBUG 0
> ./i2c-sensor.c:#define DEBUG 1
> ./i2c-algo-bit.c:/* #define DEBUG 1 */
> ./i2c-dev.c:#define DEBUG 1
> ./i2c-algo-pcf.c:/* #define DEBUG 1 */ /* to pick up dev_dbg calls */
> ./busses/i2c-amd756.c:/* #define DEBUG 1 */
> ./busses/i2c-ali15x3.c:/* #define DEBUG 1 */
> ./busses/i2c-i801.c:/* #define DEBUG 1 */
> ./busses/i2c-piix4.c:#define DEBUG 1
> ./busses/i2c-sis96x.c:/* #define DEBUG */
> ./busses/i2c-ali1535.c:/* #define DEBUG 1 */
> ./chips/adm1021.c:#define DEBUG 1
> ./chips/lm75.c:/* #define DEBUG 1 */
>
> Did I do the right thing?
Looks good, but are you _really_ building all of those drivers into your
kernel? Make them modules, that way booting will not require a small
nap :)
Then load only the i2c bus driver that you have. See if that causes the
system to slow down, or cause any kernel log messages?
Only then try loading a i2c client driver, for your hardware.
Exactly what i2c hardware do you have anyway?
thanks,
greg k-h
On Tue, Jul 15, 2003 at 11:10:09PM -0700, Greg KH wrote:
> On Wed, Jul 16, 2003 at 04:04:43PM +1000, CaT wrote:
> > On Tue, Jul 15, 2003 at 09:11:27AM -0700, Greg KH wrote:
> > Did I do the right thing?
>
> Looks good, but are you _really_ building all of those drivers into your
> kernel? Make them modules, that way booting will not require a small
No. Just i2c-dev, i2c-core, i2c-sensor, i2c-piix4 and adm1021. Sorry
for not weeding out the useless stuff above. I was still waking up. :)
> nap :)
:)
> Then load only the i2c bus driver that you have. See if that causes the
> system to slow down, or cause any kernel log messages?
i2c alone does not.
> Only then try loading a i2c client driver, for your hardware.
I can go through this again. Do you want me to insert any further
debugging stuff?
> Exactly what i2c hardware do you have anyway?
PIIX4 and ADM1021.
.config has the following:
CONFIG_SENSORS_ADM1021=y
CONFIG_I2C=y
CONFIG_I2C_CHARDEV=y
CONFIG_I2C_PIIX4=y
CONFIG_I2C_SENSOR=y
--
"How can I not love the Americans? They helped me with a flat tire the
other day," he said.
- http://www.toledoblade.com/apps/pbcs.dll/artikkel?SearchID=73139162287496&Avis=TO&Dato=20030624&Kategori=NEWS28&Lopenr=106240111&Ref=AR
On Wed, Jul 16, 2003 at 04:29:22PM +1000, CaT wrote:
> On Tue, Jul 15, 2003 at 11:10:09PM -0700, Greg KH wrote:
> > On Wed, Jul 16, 2003 at 04:04:43PM +1000, CaT wrote:
> > > On Tue, Jul 15, 2003 at 09:11:27AM -0700, Greg KH wrote:
> > > Did I do the right thing?
> >
> > Looks good, but are you _really_ building all of those drivers into your
> > kernel? Make them modules, that way booting will not require a small
>
> No. Just i2c-dev, i2c-core, i2c-sensor, i2c-piix4 and adm1021. Sorry
> for not weeding out the useless stuff above. I was still waking up. :)
>
> > nap :)
>
> :)
>
> > Then load only the i2c bus driver that you have. See if that causes the
> > system to slow down, or cause any kernel log messages?
>
> i2c alone does not.
>
> > Only then try loading a i2c client driver, for your hardware.
>
> I can go through this again. Do you want me to insert any further
> debugging stuff?
>
> > Exactly what i2c hardware do you have anyway?
>
> PIIX4 and ADM1021.
>
> .config has the following:
>
> CONFIG_SENSORS_ADM1021=y
> CONFIG_I2C=y
> CONFIG_I2C_CHARDEV=y
> CONFIG_I2C_PIIX4=y
> CONFIG_I2C_SENSOR=y
Please change them to =m so that it's easier to try to debug this.
Then just load the i2c_piix4 module. If things still work just fine,
then try the i2c-adm1021 driver. See what the kernel log says then.
thanks,
greg k-h
On Wed, Jul 16, 2003 at 12:31:35AM -0700, Greg KH wrote:
> Please change them to =m so that it's easier to try to debug this.
Done.
> Then just load the i2c_piix4 module. If things still work just fine,
> then try the i2c-adm1021 driver. See what the kernel log says then.
All went well till the last step of loading the adm1021 driver. Then
things got seriously nap-inducing (I fell asleep waiting for cd to
complete). rmmoding the module did not help in any way. Here's the
dmesg stuff I managed to scrounge of what happened during modprobe
adm1021. Essentially, if I remember right, the system was fine till
about the registering 0-004d line... then time went sloooooooowly
as did everything else and a nap was induced.
i2c_adapter i2c-0: found normal i2c_range entry for adapter 0, addr 0018
i2c_adapter i2c-0: Transaction (pre): CNT=00, CMD=09, ADD=30, DAT0=ff, DAT1=ff
i2c_adapter i2c-0: Error: no response!
i2c_adapter i2c-0: Transaction (post): CNT=00, CMD=09, ADD=30, DAT0=ff, DAT1=ff
i2c_adapter i2c-0: found normal i2c_range entry for adapter 0, addr 0019
i2c_adapter i2c-0: Transaction (pre): CNT=00, CMD=09, ADD=32, DAT0=ff, DAT1=ff
i2c_adapter i2c-0: Error: no response!
i2c_adapter i2c-0: Transaction (post): CNT=00, CMD=09, ADD=32, DAT0=ff, DAT1=ff
i2c_adapter i2c-0: found normal i2c_range entry for adapter 0, addr 001a
i2c_adapter i2c-0: Transaction (pre): CNT=00, CMD=09, ADD=34, DAT0=ff, DAT1=ff
i2c_adapter i2c-0: Error: no response!
i2c_adapter i2c-0: Transaction (post): CNT=00, CMD=09, ADD=34, DAT0=ff, DAT1=ff
i2c_adapter i2c-0: found normal i2c_range entry for adapter 0, addr 0029
i2c_adapter i2c-0: Transaction (pre): CNT=00, CMD=09, ADD=52, DAT0=ff, DAT1=ff
i2c_adapter i2c-0: Error: no response!
i2c_adapter i2c-0: Transaction (post): CNT=00, CMD=09, ADD=52, DAT0=ff, DAT1=ff
i2c_adapter i2c-0: found normal i2c_range entry for adapter 0, addr 002a
i2c_adapter i2c-0: Transaction (pre): CNT=00, CMD=09, ADD=54, DAT0=ff, DAT1=ff
i2c_adapter i2c-0: Error: no response!
i2c_adapter i2c-0: Transaction (post): CNT=00, CMD=09, ADD=54, DAT0=ff, DAT1=ff
i2c_adapter i2c-0: found normal i2c_range entry for adapter 0, addr 002b
i2c_adapter i2c-0: Transaction (pre): CNT=00, CMD=09, ADD=56, DAT0=ff, DAT1=ff
i2c_adapter i2c-0: Error: no response!
i2c_adapter i2c-0: Transaction (post): CNT=00, CMD=09, ADD=56, DAT0=ff, DAT1=ff
i2c_adapter i2c-0: found normal i2c_range entry for adapter 0, addr 004c
i2c_adapter i2c-0: Transaction (pre): CNT=00, CMD=09, ADD=98, DAT0=ff, DAT1=ff
i2c_adapter i2c-0: Error: no response!
i2c_adapter i2c-0: Transaction (post): CNT=00, CMD=09, ADD=98, DAT0=ff, DAT1=ff
i2c_adapter i2c-0: found normal i2c_range entry for adapter 0, addr 004d
i2c_adapter i2c-0: Transaction (pre): CNT=00, CMD=09, ADD=9a, DAT0=ff, DAT1=ff
i2c_adapter i2c-0: Transaction (post): CNT=00, CMD=09, ADD=9a, DAT0=ff, DAT1=ff
i2c_adapter i2c-0: Transaction (pre): CNT=08, CMD=02, ADD=9b, DAT0=ff, DAT1=ff
i2c_adapter i2c-0: Transaction (post): CNT=08, CMD=02, ADD=9b, DAT0=08, DAT1=ff
i2c_adapter i2c-0: Transaction (pre): CNT=08, CMD=fe, ADD=9b, DAT0=08, DAT1=ff
i2c_adapter i2c-0: Transaction (post): CNT=08, CMD=fe, ADD=9b, DAT0=49, DAT1=ff
registering 0-004d
i2c_adapter i2c-0: Transaction (pre): CNT=08, CMD=0b, ADD=9a, DAT0=00, DAT1=ff
i2c_adapter i2c-0: Transaction (post): CNT=04, CMD=02, ADD=19, DAT0=9b, DAT1=ff
i2c_adapter i2c-0: Transaction (pre): CNT=08, CMD=0c, ADD=9a, DAT0=00, DAT1=ff
i2c_adapter i2c-0: Error: no response!
i2c_adapter i2c-0: Transaction (post): CNT=04, CMD=02, ADD=19, DAT0=9b, DAT1=ff
i2c_adapter i2c-0: Transaction (pre): CNT=08, CMD=0d, ADD=9a, DAT0=00, DAT1=ff
i2c_adapter i2c-0: Transaction (post): CNT=04, CMD=02, ADD=19, DAT0=9b, DAT1=ff
i2c_adapter i2c-0: Transaction (pre): CNT=08, CMD=0e, ADD=9a, DAT0=00, DAT1=ff
i2c_adapter i2c-0: Transaction (post): CNT=04, CMD=02, ADD=19, DAT0=9b, DAT1=ff
i2c_adapter i2c-0: Transaction (pre): CNT=08, CMD=09, ADD=9a, DAT0=00, DAT1=ff
i2c_adapter i2c-0: Transaction (post): CNT=04, CMD=02, ADD=19, DAT0=9b, DAT1=ff
i2c_adapter i2c-0: Transaction (pre): CNT=08, CMD=0a, ADD=9a, DAT0=04, DAT1=ff
i2c_adapter i2c-0: Error: no response!
i2c_adapter i2c-0: Transaction (post): CNT=04, CMD=02, ADD=19, DAT0=9b, DAT1=ff
i2c_adapter i2c-0: found normal i2c_range entry for adapter 0, addr 004e
i2c_adapter i2c-0: Transaction (pre): CNT=00, CMD=02, ADD=9c, DAT0=9b, DAT1=ff
i2c_adapter i2c-0: Error: no response!
i2c_adapter i2c-0: Transaction (post): CNT=04, CMD=02, ADD=19, DAT0=9b, DAT1=ff
atkbd.c: Unknown key (set 2, scancode 0x82, on isa0060/serio0) pressed.
--
"How can I not love the Americans? They helped me with a flat tire the
other day," he said.
- http://www.toledoblade.com/apps/pbcs.dll/artikkel?SearchID=73139162287496&Avis=TO&Dato=20030624&Kategori=NEWS28&Lopenr=106240111&Ref=AR
On Thu, Jul 17, 2003 at 08:47:18AM +1000, CaT wrote:
> On Wed, Jul 16, 2003 at 12:31:35AM -0700, Greg KH wrote:
> > Please change them to =m so that it's easier to try to debug this.
>
> Done.
>
> > Then just load the i2c_piix4 module. If things still work just fine,
> > then try the i2c-adm1021 driver. See what the kernel log says then.
>
> All went well till the last step of loading the adm1021 driver.
And you are sure you have this hardware device? Is that what the
sensors package for 2.4 uses? And 2.4 works just fine, right?
If so, I suggest you ask the sensors developers on their mailing list as
this is a driver specific issue, and doesn't sound like a problem due to
the 2.5 port.
> i2c_adapter i2c-0: found normal i2c_range entry for adapter 0, addr 0018
> i2c_adapter i2c-0: Transaction (pre): CNT=00, CMD=09, ADD=30, DAT0=ff, DAT1=ff
> i2c_adapter i2c-0: Error: no response!
It's really looking like the driver is trying to talk to a device that
isn't present, hence the timeouts.
thanks,
greg k-h
On Wed, Jul 16, 2003 at 03:54:52PM -0700, Greg KH wrote:
> On Thu, Jul 17, 2003 at 08:47:18AM +1000, CaT wrote:
> > On Wed, Jul 16, 2003 at 12:31:35AM -0700, Greg KH wrote:
> > > Then just load the i2c_piix4 module. If things still work just fine,
> > > then try the i2c-adm1021 driver. See what the kernel log says then.
> >
> > All went well till the last step of loading the adm1021 driver.
>
> And you are sure you have this hardware device? Is that what the
Yes. I am very definate that this worked in past 2.5 kernels. Remember
how it used to turn my laptop off under load? I was able to read my
temps and stuff though.
> sensors package for 2.4 uses? And 2.4 works just fine, right?
I don't use 2.4. Haven't for ages.
> If so, I suggest you ask the sensors developers on their mailing list as
> this is a driver specific issue, and doesn't sound like a problem due to
> the 2.5 port.
I've added them to To/Cc. (Hey folks :) The full thread is available
here:
http://marc.theaimsgroup.com/?t=105826046600003&r=1&w=2
If you could have a look I'd really appreciate it.
> > i2c_adapter i2c-0: found normal i2c_range entry for adapter 0, addr 0018
> > i2c_adapter i2c-0: Transaction (pre): CNT=00, CMD=09, ADD=30, DAT0=ff, DAT1=ff
> > i2c_adapter i2c-0: Error: no response!
>
> It's really looking like the driver is trying to talk to a device that
> isn't present, hence the timeouts.
I tried the other drivers and they all failed nicely and without hassle. I
looked through my past .config files and this is the driver that appears
the most in use.
--
"How can I not love the Americans? They helped me with a flat tire the
other day," he said.
- http://tinyurl.com/h6fo
On Fri, Jul 18, 2003 at 01:33:48AM +1000, CaT wrote:
> On Wed, Jul 16, 2003 at 03:54:52PM -0700, Greg KH wrote:
> > On Thu, Jul 17, 2003 at 08:47:18AM +1000, CaT wrote:
> > > On Wed, Jul 16, 2003 at 12:31:35AM -0700, Greg KH wrote:
> > > > Then just load the i2c_piix4 module. If things still work just fine,
> > > > then try the i2c-adm1021 driver. See what the kernel log says then.
> > >
> > > All went well till the last step of loading the adm1021 driver.
> >
> > And you are sure you have this hardware device? Is that what the
>
> Yes. I am very definate that this worked in past 2.5 kernels. Remember
> how it used to turn my laptop off under load? I was able to read my
> temps and stuff though.
>
> > sensors package for 2.4 uses? And 2.4 works just fine, right?
>
> I don't use 2.4. Haven't for ages.
I would _really_ encourage you to try this, and run the sensors_detect
program to have the scripts tell you what hardware you really have, and
see if the 2.4 drivers work properly for you.
Without that, I don't know how to debug the 2.5 problem.
Let us know how that works out.
thanks,
greg k-h
On Thu, Jul 17, 2003 at 07:33:51PM -0700, Greg KH wrote:
> On Fri, Jul 18, 2003 at 01:33:48AM +1000, CaT wrote:
> > > sensors package for 2.4 uses? And 2.4 works just fine, right?
> >
> > I don't use 2.4. Haven't for ages.
>
> I would _really_ encourage you to try this, and run the sensors_detect
Good thing you did. :)
> program to have the scripts tell you what hardware you really have, and
> see if the 2.4 drivers work properly for you.
It both does and does not depending on what I do.
> Without that, I don't know how to debug the 2.5 problem.
Well I hope this helps. I can both duplicated and fix the problem under
2.4. To duplicate all I have to do is compile the kernel without ISA
support and, consequently, not use the ISA bus to read the sensors data.
2.4 then displays the exact same symptoms that 2.5 does. If I compile
ISA in and use it for the data then I get my data and kernel works fine.
To test if all was well I compiled 2.5 (for the next test) and constantly
checked the temperature. It went up during the compile nicely and dropped
when it stopped so I'll assume that the sensors stuff works perfectly
fine under 2.4 with ISA.
Next I booted into 2.5. I loaded i2c-core, i2c-dev, i2c-sensor, i2c-isa
and i2c-piix4. All's fine. Loaded adm1021 (which is the correct driver
btw - it's the one the sensors-detect program detected) and boom, kernel
is molasses. Powercycle and try again, this time only doing:
modprobe i2c-isa
modprobe adm1021
Kernel works fine but no sensor data. find returned only empty directories.
I then did:
modprobe i2c-piix4
and boom! molasses again and dmesg was filled with the errors I previously
posted.
I hope this helps. It seems that there's a distinct lack of interaction
between the i2c/sensors code and isa and that is what might be causing
the problem... but that's just what it looks like to me.
Now, if you need any more debugging done, yell. :)
--
"How can I not love the Americans? They helped me with a flat tire the
other day," he said.
- http://tinyurl.com/h6fo
On Mon, Jul 21, 2003 at 05:37:54PM +1000, CaT wrote:
> On Thu, Jul 17, 2003 at 07:33:51PM -0700, Greg KH wrote:
> > On Fri, Jul 18, 2003 at 01:33:48AM +1000, CaT wrote:
> > > > sensors package for 2.4 uses? And 2.4 works just fine, right?
> > >
> > > I don't use 2.4. Haven't for ages.
> >
> > I would _really_ encourage you to try this, and run the sensors_detect
>
> Good thing you did. :)
Gah. Too tired. I used the following:
linux kernel 2.4.22-pre7
lm sensors 2.8.0
i2c 2.8.0
Did not use inbuilt i2c.
--
"How can I not love the Americans? They helped me with a flat tire the
other day," he said.
- http://tinyurl.com/h6fo