Can't read DIMM SPD info (DDR2)
Hi,
I'm unable to get decode-dimms to display SPD info from my memory modules. Can someone please advise on finding the problem? The eeprom module is loaded. This is on both my main system (Kubuntu 10.10) - 2.6.35 kernel, i2c-tools 3.0.3-5 - and "latest" (Kubuntu 11.10 daily) - linux 3.0, lm-sensors 3.3.0-4 and i2c-tools 3.0.3-5). The HW is a Fujitsu Esprimo Mobile U9200 laptop (intel GM965). FWIW, the memtest that ships with 'buntu 11.10 (4.20 I think) reads the SPD info successfully.
Cheers and TIA,
MZ
Signature · 1 line
Using Opera's revolutionary email client: http://www.opera.com/mail/
Hi Michal,
Quoted 7 lines · Michal Zatloukal
I'm unable to get decode-dimms to display SPD info from my memory modules. Can someone please advise on finding the problem? The eeprom module is loaded. This is on both my main system (Kubuntu 10.10) - 2.6.35 kernel, i2c-tools 3.0.3-5 - and "latest" (Kubuntu 11.10 daily) - linux 3.0, lm-sensors 3.3.0-4 and i2c-tools 3.0.3-5). The HW is a Fujitsu Esprimo Mobile U9200 laptop (intel GM965). FWIW, the memtest that ships with 'buntu 11.10 (4.20 I think) reads the SPD info successfully.
Preliminary note: the version of lm-sensors doesn't matter, as lm-sensors has nothing to do with reading SPD information.
Second preliminary note: as far as I know, memtest86 reads SPD information using a BIOS call, while decode-dimms gets the information over the SMBus, assuming that SPD EEPROMs are connected to the SMBus and reachable at run time. This difference in access methods can explain why memtest86 can see information and decode-dimms not on the same system.
Third preliminary note: it is very common to not see SPD EEPROMs on the SMBus on laptops (or not all of them). On my Thinkpad T60p, SPD EEPROMs aren't visible on the SMBus at run time, so decode-dimms doesn't work.
First thing to check is if the SMBus on your system is properly found and supported:
# modprobe i2c-dev # i2cdetect -l
On an Intel system you should see an entry like:
i2c-8 smbus SMBus I801 adapter at 0400 SMBus adapter
Then you can check if devices are seen on the bus:
# i2cdetect 8
If you see anything in address range 0x50 to 0x55, this is likely to be SPD EEPROMs. Then you have to make sure that the eeprom module is loaded:
# modprobe eeprom $ decode-dimms
If you do not see anything in address range 0x50 to 0x55, then this means you are in the same situation as me, i.e. SPD EEPROMs not reachable at run time (most likely because they are behind an I2C multiplexer or switch and the bus segment(s) with the SPD EEPROMs are disabled by the BIOS before handing control to the OS. Unfortunately the mux/switch control is not standard, so without detailed documentation from the hardware manufacturer, it's very difficult to restore access to the SPD EEPROMs at run time.
Signature · 1 line
Jean Delvare
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 8 lines · Jean Delvare
Hi Michal,
...
Second preliminary note: as far as I know, memtest86 reads SPD information using a BIOS call, while decode-dimms gets the information over the SMBus, assuming that SPD EEPROMs are connected to the SMBus and reachable at run time. This difference in access methods can explain why memtest86 can see information and decode-dimms not on the same system.
Is there a way to do the BIOS call method in Linux? If it's a sort-of standard way to access SPD info, would it be the one used by CPU-Z to read the SPD info on Windows? (which does work on this HW)
Quoted 9 lines
First thing to check is if the SMBus on your system is properly found and supported:
# modprobe i2c-dev # i2cdetect -lOn an Intel system you should see an entry like:
i2c-8 smbus SMBus I801 adapter at 0400 SMBus adapter
Nope. On 'buntu 10.10, I only got 5 entries (didn't write them down), none of which said smbus. On 11.10, I get:
# i2cdetect -l i2c-0 i2c i915 gmbus disabled I2C adapter i2c-1 i2c i915 gmbus ssc I2C adapter i2c-2 i2c i915 GPIOB I2C adapter i2c-3 i2c i915 gmbus vga I2C adapter i2c-4 i2c i915 GPIOA I2C adapter i2c-5 i2c i915 gmbus panel I2C adapter i2c-6 i2c i915 GPIOC I2C adapter i2c-7 i2c i915 gmbus dpc I2C adapter i2c-8 i2c i915 GPIOD I2C adapter i2c-9 i2c i915 gmbus dpb I2C adapter i2c-10 i2c i915 GPIOE I2C adapter i2c-11 i2c i915 gmbus reserved I2C adapter i2c-12 i2c i915 gmbus dpd I2C adapter i2c-13 i2c i915 GPIOF I2C adapter i2c-14 i2c SDVO DDC proxy I2C adapter
And BTW, this is the same list I get on my "server/router/AP" (Intel D945GSEJT nettop board running 'buntu 11.04) which is also in the same situation (can't read SPD info).
Quoted 7 lines
Then you can check if devices are seen on the bus:
# i2cdetect 8If you see anything in address range
0x50to0x55, this is likely to be SPD EEPROMs. Then you have to make sure that the eeprom module is loaded:
From the above list, buses 3-6 have a value 0x50 at 0x50 like so:
# i2cdetect -y 5
0 1 2 3 4 5 6 7 8 9 a b c d e f
<snip>
50: 50 -- -- -- -- -- -- -- -- -- -- -- -- -- -- --Though that's probably irrelevant, as it's not the SMBus, if I understand correctly.
Signature · 1 line
Using Opera's revolutionary email client: http://www.opera.com/mail/
Quoted 12 lines · Michal Zatloukal
Quoted 8 lines · Jean Delvare
Hi Michal,
...
Second preliminary note: as far as I know, memtest86 reads SPD information using a BIOS call, while decode-dimms gets the information over the SMBus, assuming that SPD EEPROMs are connected to the SMBus and reachable at run time. This difference in access methods can explain why memtest86 can see information and decode-dimms not on the same system.
Quoted 3 lines
Is there a way to do the BIOS call method in Linux? If it's a sort-of standard way to access SPD info, would it be the one used by CPU-Z to read the SPD info on Windows? (which does work on this HW)
I am not so familiar with this. I seem to recall that BIOS calls are not easy/safe to use in protected mode on x86, so it might be difficult or even impossible to do that from user-space. From kernel space, maybe, I don't know.
It is very possible that it's what CPU-Z is doing. However I don't know if the author is willing to share his method. A quick web search did not return anything, but I admit I did not spend too much time on it, and I am also not so sure what I am looking for.
If anyone ever writes a kernel driver exposing SPD data to user-space, I will be very happy to update decode-dimms to take benefit of that.
Quoted 30 lines
Quoted 9 lines
First thing to check is if the SMBus on your system is properly found and supported:
# modprobe i2c-dev # i2cdetect -lOn an Intel system you should see an entry like:
i2c-8 smbus SMBus I801 adapter at 0400 SMBus adapter
Nope. On 'buntu 10.10, I only got 5 entries (didn't write them down), none of which said smbus. On 11.10, I get:
# i2cdetect -l i2c-0 i2c i915 gmbus disabled I2C adapter i2c-1 i2c i915 gmbus ssc I2C adapter i2c-2 i2c i915 GPIOB I2C adapter i2c-3 i2c i915 gmbus vga I2C adapter i2c-4 i2c i915 GPIOA I2C adapter i2c-5 i2c i915 gmbus panel I2C adapter i2c-6 i2c i915 GPIOC I2C adapter i2c-7 i2c i915 gmbus dpc I2C adapter i2c-8 i2c i915 GPIOD I2C adapter i2c-9 i2c i915 gmbus dpb I2C adapter i2c-10 i2c i915 GPIOE I2C adapter i2c-11 i2c i915 gmbus reserved I2C adapter i2c-12 i2c i915 gmbus dpd I2C adapter i2c-13 i2c i915 GPIOF I2C adapter i2c-14 i2c SDVO DDC proxy I2C adapter
Quoted 3 lines
And BTW, this is the same list I get on my "server/router/AP" (Intel D945GSEJT nettop board running 'buntu 11.04) which is also in the same situation (can't read SPD info).
No SMBus I801 adapter. Is the i2c-i801 driver loaded? Do you see any complaints in the kernel log (e.g. ACPI resource conflict) when reloading the i2c-i801 driver?
Quoted 8 lines
Quoted 7 lines
Then you can check if devices are seen on the bus:
# i2cdetect 8If you see anything in address range
0x50to0x55, this is likely to be SPD EEPROMs. Then you have to make sure that the eeprom module is loaded:
Quoted 8 lines
From the above list, buses 3-6 have a value
0x50at0x50like so:# i2cdetect -y 5 0 1 2 3 4 5 6 7 8 9 a b c d e f <snip> 50: 50 -- -- -- -- -- -- -- -- -- -- -- -- -- -- --Though that's probably irrelevant, as it's not the SMBus, if I understand correctly.
Most likely the EDID from your screen, you can decode it with:
# modprobe eeprom $ decode-edid
But that's not what your are looking for.
Signature · 1 line
Jean Delvare
A message that is not in the archive (sent off-list or not yet received): [email protected]
On Sun, 11 Sep 2011 13:08:23 +0200, Jean Delvare <[email protected]> wrote:
<snip>
Quoted 3 lines
No SMBus I801 adapter. Is the i2c-i801 driver loaded? Do you see any complaints in the kernel log (e.g. ACPI resource conflict) when reloading the i2c-i801 driver?
D'oh, that's the whole problem! After loading the i2c-i801 driver, it works perfectly. Laptop and server. :)
There's no problem loading the driver that I can see, it's simply not loaded by default.
Sep 11 13:12:55 johny kernel: [391626.148255] i801_smbus 0000:00:1f.3: PCI
INT B -> GSI 19 (level, low) -> IRQ 19
Sep 11 13:10:23 esprimo kernel: [ 6993.108993] i801_smbus 0000:00:1f.3:
PCI INT C -> GSI 19 (level, low) -> IRQ 19
There are some complaints from drm from when I probed the other buses:
Sep 11 13:10:59 esprimo kernel: [ 7029.730036] [drm] GMBUS timed out, falling back to bit banging on pin 0 [i915 gmbus disabled] Sep 11 13:11:01 esprimo kernel: [ 7031.120065] [drm] GMBUS timed out,
falling back to bit banging on pin 6 [i915 gmbus reserved]
$ decode-dimms # decode-dimms version 5733 (2009-06-09 13:13:41 +0200)
Memory Serial Presence Detect Decoder
By Philip Edelbrock, Christian Zuckschwerdt, Burkart Lingner, Jean Delvare, Trent Piepho and others
Decoding EEPROM: /sys/bus/i2c/drivers/eeprom/15-0050
Guessing DIMM is in bank 1
<snip>
Number of SDRAM DIMMs detected and decoded: 2
Thanks for the help.
Signature · 1 line
Using Opera's revolutionary email client: http://www.opera.com/mail/
Quoted 5 lines · Michal Zatloukal
On Sun, 11 Sep 2011 13:08:23 +0200, Jean Delvare <[email protected]> wrote:
<snip>
Quoted 8 lines
Quoted 3 lines
No SMBus I801 adapter. Is the i2c-i801 driver loaded? Do you see any complaints in the kernel log (e.g. ACPI resource conflict) when reloading the i2c-i801 driver?
D'oh, that's the whole problem! After loading the i2c-i801 driver, it works perfectly. Laptop and server. :)
There's no problem loading the driver that I can see, it's simply not loaded by default.
Ah! Now I remember. Ubuntu? I think they _blacklist_ i2c-i801 for every machine in the world because it caused problems on one single machine years ago. Try:
$ /sbin/modprobe -c | grep i801 and I'm sure you'll find a blacklist statement.
So, either delete the blacklist statement in /etc/modprobe.d/* (but it may come back on system update) or manually load the driver at boot time (no idea how this is done on Ubuntu, sorry).
And (if I am right) please report this as a BUG to Ubuntu maintainers. Blacklisting a perfectly working driver needed by millions of users simply makes no sense. Whatever the problem was, I bet it is solved by now anyway.
Quoted 7 lines
$ decode-dimms # decode-dimms version 5733 (2009-06-09 13:13:41 +0200)Memory Serial Presence Detect Decoder
By Philip Edelbrock, Christian Zuckschwerdt, Burkart Lingner, Jean Delvare, Trent Piepho and others
Quoted 5 lines
Decoding EEPROM:
/sys/bus/i2c/drivers/eeprom/15-0050
Guessing DIMM is in bank 1<snip>
Number of SDRAM DIMMs detected and decoded: 2
Great! Glad I could help :)
Signature · 2 lines
Jean Delvare http://khali.linux-fr.org/wishlist.html