Skip to contentSkip to conversation

SOLVED: I2C and lm-sensors : gentoo-sources 2.4.25 and your patches

DISCUSSION Manfred Knick 2 participants 5 messages May 19, 2005

lore
Share & tools
lore
#0 lore raw

RECALL - SOLVED

It seems that

	-->  media-video/mgavideo  <--

(which it seems I do not need, fortunately ;-))
did not properly uninstall:
after

	emerge --unmerge  mgavideo

there were still modules left hanging around in
/lib/modules/kernel/drivers.

After removing these manually,
/sbin/depmod was happy :-))

I could reboot to the patched kernel,
install I2C and lm-sensors,
and sensors-detect just worked fine!

Thank you again for your work!

- Manfred

P.S.:
I'm sure you know that some people really depend upon 2.4 kernel series and can not easily switch to 2.6 where compatibility is gained again ?

E.g. for my G400
(which i still like for engineering - no fan, dual-head, ...), Matrox neither released a HAL module for 2.6
nor is willing to publicate the HAL source openly
so that users could do the maintenance themselves ...

So I really appreciate the intention mentioned by Jean Delvare at the bottom of his helpfol tutorial [ http://khali.linux-fr.org/devel/i2c/ ] :
"We only make these patches available to the users to fill the gap between i2c-2.8.0 being released and compatibility being brought back."
( I hope this is not meant to be understood as threatening with extinction ;-)

---------- Weitergeleitete Nachricht ----------

Subject: I2C and lm-sensors : gentoo-sources 2.4.25 and your patches
Date: Monday 03 May 2004 03:19
From: Manfred Knick <[email protected]>
To: [email protected]

Kind regards from Munich. Germany !

Using Gentoo, I tried to follow Jean Delvare's instructions:

emerged a fresh clean actual production kernel (gentoo-sources-2.4.25-r2) and renamed the tree to gentoo-sources-2.4.25-r2-sensors -

modifying Makefile -> EXTRAVERSION = -gentoo-r2-sensors accordingly.

Then I applied the provided patch for 2.4.25.

But unfortunately, after quite hopeful compilation efforts, depmod fails:

if [ -r System.map ]; then /sbin/depmod -ae -F System.map 2.4.25-gentoo-r2-sensors; fi

with
*** Unresolved symbols
in
/lib/modules/kernel/drivers/mgavideo/ks0127.o /lib/modules/kernel/drivers/mgavideo/mga_core.o /lib/modules/kernel/drivers/mgavideo/maven.o /lib/modules/kernel/drivers/mgavideo/msp3400.o /lib/modules/kernel/drivers/mgavideo/tuner.o

missing
i2c_add_adapter
i2c_del_adapter
i2c_add_driver
i2c_del_driver
i2c_attach_client
i2c_detach_client
i2c_get_client
i2c_master_send
i2c_master_recv
i2c_transfer
i2c_probe

_all_ of these being defined via EXPORT_SYMBOL in

linux/drivers/i2c/i2c-core.c

But :
> grep I2C .config

results in :

# I2C support
CONFIG_I2C=m
CONFIG_I2C_ALGOBIT=m
# CONFIG_I2C_PHILIPSPAR is not set
# CONFIG_I2C_ELV is not set
# CONFIG_I2C_VELLEMAN is not set
# CONFIG_SCx200_I2C is not set
# CONFIG_I2C_ALGOPCF is not set
CONFIG_I2C_CHARDEV=m
CONFIG_I2C_PROC=m
CONFIG_FB_MATROX_I2C=m

And:

	> find /lib/modules/2.4.25-gentoo-r2-sensors/ -name i2c*.o -print

results in :

/lib/modules/2.4.25-gentoo-r2-sensors/kernel/drivers/i2c/i2c-core.o /lib/modules/2.4.25-gentoo-r2-sensors/kernel/drivers/i2c/i2c-algo-bit.o /lib/modules/2.4.25-gentoo-r2-sensors/kernel/drivers/i2c/i2c-proc.o /lib/modules/2.4.25-gentoo-r2-sensors/kernel/drivers/i2c/i2c-dev.o /lib/modules/2.4.25-gentoo-r2-sensors/kernel/drivers/video/matrox/i2c-matroxf b.o

so it seems "i2c-core" _has_ been built.

Applying "emerge --ask /usr/portage/sys-apps/lm-sensors/i2c-2.8.4.ebuild" and trying it again led to identical results.

??? Do I have tomatoes on my eyes ???
(Yes, I do realize it's 03:16 early in the morning over here ;-)

??? Can you help me and spot it ???

Greetings and thanks in advance

- Manfred

-------------------------------------------------------

Signature · 12 lines
Manfred Knick  (Dipl.-Math.)
Alramstr. 31, D-81371 M?nchen
Telefon  +49 (89) 76704-300
Telefax  +49 (89) 76704-453
Mobil    +49 (171) 4180 358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: signature
Url : http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20040503/5633f3ac/attachment.bin
#1 lore raw

SOLVED: I2C and lm-sensors : gentoo-sources 2.4.25 and your

Quoted 6 lines

Running

  # sensors -s
I get
  w83781d-i2c-0-2d: Can't access procfs/sysfs file for writing;
  Run as root?

Just one stupid question: were you root?

Quoted 2 lines
# uname -a
Linux jumbo 2.4.25-gentoo-r2-sensors #15 SMP ... 

I think this is the problem, see below.

Quoted 1 line
# ll /proc/sys/fs

ll /proc/sys/dev/sensors/w83781d-i2c-0-2d would be more interesting. But I guess that the files are there, you can most likely read them and write to those of them which are intended to be. If I'm right, then the explanation and solution are right below.

Quoted 6 lines

I checked lm_sensors-2.8.6/doc/lm_sensors-FAQ.html Section 4.20 regarding Linux 2.4.

Looks like
- for 2.4, lm-sensors-2.8.4 is expected,
- for 2.6, lm-sensors-2.8.6 is expected ???

Not at all. 2.8.6 if fine for both Linux 2.4 and 2.6. Does our FAQ really state the contrary?

So, as mentionned below, I suspect that the Gentoo kernel is the problem. I think I remember that there are additional patches in them (grsec and acl among others) which are preventing libsensors from working. We never could understand why, and since these patches are not into the mainline we are not particularly motivated on investigating. If someone provides a solution, we'll gladly consider implementing it however.

So I suggest that you try the same operation with a vanilla kernel instead of a Gentoo-patched one and see if it helps.

Signature · 2 lines
Jean Delvare
http://khali.linux-fr.org/
#2 lore raw

SOLVED: I2C and lm-sensors : gentoo-sources 2.4.25 and your

In reply to Manfred Knick

Hi Manfred,

Quoted 11 lines

P.S.:
I'm sure you know that some people really depend upon 2.4 kernel series and can not easily switch to 2.6 where compatibility is gained again ?

E.g. for my G400
(which i still like for engineering - no fan, dual-head, ...), Matrox neither released a HAL module for 2.6
nor is willing to publicate the HAL source openly
so that users could do the maintenance themselves ...

Quoted 6 lines

So I really appreciate the intention mentioned by Jean Delvare at the bottom of his helpfol tutorial [ http://khali.linux-fr.org/devel/i2c/
] :"We only make these patches available to the users to fill the gap between i2c-2.8.0 being released and compatibility being brought back."( I hope this is not meant to be understood as threatening with extinction ;-)

The original plan was to get the new i2c stuff into Linux 2.4 main line, but Marcello let us understand that this was not going to happen. So I'll be direct: there is no more plan to bring compatibility back at the moment.

So the correct thing to do now would be to revert the changes we made so that it is compatible with the 2.4 kernel again. Unfortunately, I have neither the skills nor the time to do it. If anyone wants to help, please let us know.

Sorry.

Signature · 2 lines
Jean Delvare
http://khali.linux-fr.org/
#3 lore raw

SOLVED: I2C and lm-sensors : gentoo-sources 2.4.25 and your

In reply to Manfred Knick

Hi, Jean,

thank you for your answer - you're quick!

And: Once again: Thank you so much for your really helpful page I cited the mail before! The cooking recipee worked out.

Only point with due respect (simply out of date, I guess) was that I tried to really combine 2.4.25-r2 with i2c-2.8.4 and lm-sensors-2.8.4, instead of lm-sensors-2.8.6, as stated on the lm-sensors home page; perhaps you would like to update this detail on your estimable condensed compilation.

Am Monday 03 May 2004 21:58 schrieb Jean Delvare:

Quoted 4 lines

The original plan was to get the new i2c stuff into Linux 2.4 main line, but Marcello let us understand that this was not going to happen. So I'll be direct: there is no more plan to bring compatibility back at the moment.

		hmm ... o.k. ...
Quoted 3 lines

So the correct thing to do now would be to revert the changes we made so that it is compatible with the 2.4 kernel again. Unfortunately, I have neither the skills nor the time to do it.

And if you did it, you may run into the danger to be thrown upon with insults
that now - after people had undergone the labour of patching - perhaps a small detail of gained functionality does not work any more ... Due to experiences in 20 years of large-scale projects, this sounds to me like shutting the stable door when the horse has bolted ;-) Perhaps it's the right attitude to save that enegry for other purposes, now ... just learn the lesson for next time ... if anybody wants to listen, next time ;-((

Guess I have to spend myself a good new working-horse again when AMD has stabilized it's Athlon 64-bit line (esp. memory controller limitations), and childhood deseases of the MoBo have drained a bit more ... As a pure app/file server, the G400 in the old one won't have to do dual-head graphics any more ;-) so I have to survive approx. one year with 2.4.xx, I guess.

[ P.S.: The only problem I observe, is the lack of graphics card alternatives with good open source drivers! All those lemmings are voting with their wallets for pure pixel clock speeds regardless of fan weight - and not for _access_ to the desired functionality. ]

Quoted 3 lines

If anyone wants to help, please let us know.

Sorry.

You did / do a very good job !

Kind regards from Munich

Manfred
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: signature
Url : http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20040503/764e0c02/attachment.bin

#4 lore raw

SOLVED: I2C and lm-sensors : gentoo-sources 2.4.25 and your

In reply to Manfred Knick

Hi, Jean,

one (hopefully last) question to you:

Running

		# sensors -s
I get
		w83781d-i2c-0-2d: Can't access procfs/sysfs file for writing;
		Run as root?
Info:
	# uname -a
	Linux jumbo 2.4.25-gentoo-r2-sensors #15 SMP ... 
	i686 Pentium III (Coppermine) GenuineIntel 
	GNU/Linux
Info:
	# grep PROC /usr/src/linux/.config

CONFIG_I2O_PROC=m
CONFIG_I2C_PROC=m
CONFIG_VIDEO_PROC_FS=y

CONFIG_PROC_FS=y

CONFIG_PROC_CONFIG=m
CONFIG_FB_MATROX_PROC=y
Info:

	# grep SYS /usr/src/linux/.config

CONFIG_SYSVIPC=y
CONFIG_SYSCTL=y
CONFIG_ACPI_SYSTEM=y
# CONFIG_SCSI_ADVANSYS is not set
# CONFIG_SYSV_FS is not set
Info:

	# ll /proc/sys/fs
	total 0
	dr-xr-xr-x    2 root     root            0 May  4 00:29 binfmt_misc
	-r--r--r--    1 root     root            0 May  4 00:29 dentry-state
	-rw-r--r--    1 root     root            0 May  4 00:29 dir-notify-enable
	-rw-r--r--    1 root     root            0 May  4 00:29 file-max
	-r--r--r--    1 root     root            0 May  4 00:29 file-nr
	-r--r--r--    1 root     root            0 May  4 00:29 inode-nr
	-r--r--r--    1 root     root            0 May  4 00:29 inode-state
	-rw-r--r--    1 root     root            0 May  4 00:29 lease-break-time
	-rw-r--r--    1 root     root            0 May  4 00:29 leases-enable
	-rw-r--r--    1 root     root            0 May  4 00:29 overflowgid
	-rw-r--r--    1 root     root            0 May  4 00:29 overflowuid
Info:
	# lsmod
	Module                  Size  Used by    Not tainted
	...
	eeprom                  4020   0  (unused)
	w83781d                21204   0  (unused)
	i2c-proc                6804   0  [ddcmon eeprom w83781d]
	i2c-dev                 4640   0
	i2c-matroxfb            2772   0
	i2c-algo-bit            7624   0  [i2c-matroxfb]
	i2c-piix4               4182   0
	dmi_scan                1636   0  [i2c-piix4]
	i2c-core               15972   0  
	[ddcmon eeprom w83781d i2c-proc i2c-dev 	i2c-algo-bit i2c-piix4]	
	...

I checked lm_sensors-2.8.6/doc/lm_sensors-FAQ.html Section 4.20 regarding Linux 2.4.

Looks like
- for 2.4, lm-sensors-2.8.4 is expected,
- for 2.6, lm-sensors-2.8.6 is expected ???

But with lm-sensors-2.8.4, I did not get the whole thing to work ... grrr... and I thought I were through, at least for the time being ...

- Manfred