Matrox G400DH + lm_sensors problem
Hi,
there is some kind of bad interaction between i2c-matroxfb in the kernel (2.4.21) patched with lm_sensors 2.6.5. I have everything compiled into the kernel (no modules), and when the Matrox I2C devices are registered at boot time, the machine hangs for over 3 minutes. Also, scanning the Matrox I2C buses (not the motherboard SMBus) with i2cdetect is very slow too.
There is no such hang on boot in the vanilla 2.4.21 kernel (with no lm_sensors patch applied). In both cases, the kernel I2C code is used, and Matrox devices are detected correctly, it's just that it is sooo much faster without the lm_sensors drivers compiled into the kernel.
Hardware: Biostar M6TBA motherboard (W83781D sensor chip), Matrox G400DH 32MB graphics card. (BTW, the supplied TV-out cable has the DDC pins SDA and SCL shorted. Does the kernel I2C code deal correctly such unusable I2C buses?)
Is this a known problem? If there is anything I should check (I'm not brave enough to try the 2.5.x kernels with the latest lm_sensors just yet...), please tell me. Thanks!
Marek
Quoted 3 lines · Mark D. Studebaker
If you have all the chip drivers compiled in,
each one will scan each i2c bus as it is registered.
We do not recommend compiling-in all the chip drivers, keep them as modules.
I have a completely non-modular kernel (CONFIG_MODULES=n) - I find it easier that way (compiling the kernel on the faster box, then copying just a single kernel image file to the slower one). Another advantage of this is that the recent ptrace/kmod exploit didn't work here ;)
Anyway, I don't have all the chip drivers compiled in, just the ones I have in my machines (W83781D and VIA686A), which don't even have to be accessed through I2C (ISA/PCI access works fine). Perhaps there should be a way for an I2C bus driver like i2c-matroxfb to exclude itself from these automatic scans for all possible chips? After all, we know exactly what chips are on the Matrox I2C buses.
The good old G400 does not run very hot - but some of the new hot (literally) graphics cards could really have temp. and fan sensors ;)
Could at least part of this I2C bus scanning be moved to user space in the future? There could be a config file to determine which I2C buses should be scanned for which chips, to avoid conflicts. If auto-probing on kernel startup is disabled, there should be no problem with even all chip drivers compiled in (RAM is cheap...). I imagine that chips could be registered/unregistered with some ioctl calls on an open I2C device file descriptor.
One unrelated question - I have MSI MS-6368L v 5.0 motherboards (with VIA VT82C686B), and the manual (bottom of page 2-17) says:
"CPU Fan supports the fan control. You can install the PC Alert utility that will automatically control the CPU Fan speed according to the actual CPU temperature."
This suggests that the VIA chip has a fan PWM output, but I could find no mention of this in the lm_sensors docs. Do you have any more info on this? Or is this the typical "VIA won't release docs" problem?
Thanks,
Marek
If you have all the chip drivers compiled in,
each one will scan each i2c bus as it is registered.
We do not recommend compiling-in all the chip drivers, keep them as modules.
It may be that the matrox driver timeout values are too long which is exacerbating the problem, you may wish to discuss with the matrox maintainer.
Things should work fine with unconnected busses like DDC. But lots of compiled-in chip drivers and a long bus driver timeout makes for a long wait :)
Quoted 26 lines · Marek Michalkiewicz
Hi,
there is some kind of bad interaction between i2c-matroxfb in the kernel (2.4.21) patched with
lm_sensors2.6.5. I have everything compiled into the kernel (no modules), and when the Matrox I2C devices are registered at boot time, the machine hangs for over 3 minutes. Also, scanning the Matrox I2C buses (not the motherboard SMBus) with i2cdetect is very slow too.There is no such hang on boot in the vanilla 2.4.21 kernel (with no
lm_sensorspatch applied). In both cases, the kernel I2C code is used, and Matrox devices are detected correctly, it's just that it is sooo much faster without thelm_sensorsdrivers compiled into the kernel.Hardware: Biostar M6TBA motherboard (W83781D sensor chip), Matrox G400DH 32MB graphics card. (BTW, the supplied TV-out cable has the DDC pins SDA and SCL shorted. Does the kernel I2C code deal correctly such unusable I2C buses?)
Is this a known problem? If there is anything I should check (I'm not brave enough to try the 2.5.x kernels with the latest
lm_sensorsjust yet...), please tell me. Thanks!Marek
Those are interesting suggestions.
One well-known problem is that you can't easily pass arguments to non-modular drivers. In any case, the arguments for scanning (ignore_range, etc.) are only supported in the lm_sensors drivers using i2c-proc.[ch]. They aren't in the media/video drivers. If you set an ignore parameter at kernel boot
(see doc/chips/MODPARMS for syntax) then all the sensors drivers
should see them, which may be what you want to keep the w83781d module from scanning the matrox bus.
Each driver controls how much of the bus it scans
(through normal_i2c and normal_i2c_range). It looks like
at least some of the media/video driver do set these.
You may wish to see if the drivers you are using are setting these correctly.
I looked at the matrox timeout, it is 100 jiffies (= 1 sec). It could be less.
On the via686 PWM, there's nothing about it in my Via docs. Either it's undocumented, it's a newer version of the chip, it uses GPIO, or there's a separate PWM chip.
Quoted 44 lines · Marek Michalkiewicz
Quoted 3 lines · Mark D. Studebaker
If you have all the chip drivers compiled in,
each one will scan each i2c bus as it is registered.
We do not recommend compiling-in all the chip drivers, keep them as modules.I have a completely non-modular kernel (
CONFIG_MODULES=n) - I find it easier that way (compiling the kernel on the faster box, then copying just a single kernel image file to the slower one). Another advantage of this is that the recent ptrace/kmod exploit didn't work here ;)Anyway, I don't have all the chip drivers compiled in, just the ones I have in my machines (W83781D and VIA686A), which don't even have to be accessed through I2C (ISA/PCI access works fine). Perhaps there should be a way for an I2C bus driver like i2c-matroxfb to exclude itself from these automatic scans for all possible chips? After all, we know exactly what chips are on the Matrox I2C buses.
The good old G400 does not run very hot - but some of the new hot (literally) graphics cards could really have temp. and fan sensors ;)
Could at least part of this I2C bus scanning be moved to user space in the future? There could be a config file to determine which I2C buses should be scanned for which chips, to avoid conflicts. If auto-probing on kernel startup is disabled, there should be no problem with even all chip drivers compiled in (RAM is cheap...). I imagine that chips could be registered/unregistered with some ioctl calls on an open I2C device file descriptor.
One unrelated question - I have MSI MS-6368L v 5.0 motherboards (with VIA VT82C686B), and the manual (bottom of page 2-17) says:
"CPU Fan supports the fan control. You can install the PC Alert utility that will automatically control the CPU Fan speed according to the actual CPU temperature."
This suggests that the VIA chip has a fan PWM output, but I could find no mention of this in the
lm_sensorsdocs. Do you have any more info on this? Or is this the typical "VIA won't release docs" problem?Thanks,
Marek
Quoted 3 lines
I looked at the matrox timeout, it is 100 jiffies (= 1 sec). It could be less.
It reminds me that I once had a similar problem while trying lm_sensors (2.6.x I think) on a system which has an old Matrox Mystique card. Sensors detect took as long as ten minutes (IIRC) to complete, due to a very, very slow scan of the Matrox I2C bus. So there may be something to be fixed there.
Signature · 2 lines
Jean Delvare http://www.ensicaen.ismra.fr/~delvare/