Distribution: Gentoo Linux (Vanilla Kernel) Hardware Environment: Architecture: X86 Name: Clevo 5600D CPU: Pentium4 2.8 GHz, 533MHz FSB This is a Laptop I bought in December 2002. It was sold under many brands like Sager/Eurocom/Alienware/Promedion 56XX and 888X, Alienware m51, Littlebit 64X) Software Environment: not really relevant here, I think. Problem Description: Somewhere in February/March 2004 I first tried to build a kernel with working ACPI support. The standard kernel, freezed at startup when ACPI was enabled. I then used the acpi-20040211-2.4.25.diff patch and I got a working kernel with ACPI working perfectly. In November/December 2004 I tried first to upgrade to 2.6 (2.6.9 maybe), both unpatched and patched with the newest ACPI patches led to a system freeze during system boot. I also tried the same with a 2.4 kernel which gave me the same results. As I hadn't too much time back then, I just used the old patch again, which still worked on a gentoo-sources-2.4.25 (instead of a vanilla kernel). Now I have some time and I'd like to solve problem finally: The first what I did, was downloading one of the latests vanilla kernels (2.6.11.11) through portage (gentoo package management tool). I still freezed on startup (except if I passed the kernel parameter acpi=off). I changed the kernel config to turn as many options as possible into modules. So I got the modules ac.ko, button.ko, battery.ko, processor.ko and thermal.ko. Booting the system worked fine now, including ACPI support. Then I inserted one module after the other. First ac, then button, then battery and all worked well until here (I tested them all over the /proc interface, they all worked like in my previous kernel, I also found no suspicous lines in the syslog (most useful kernel and all ACPI debugging options were compiled in)) When I inserted the processor.ko module the system freezed instantly (before I could type any further characters on the terminal, but a new shell prompt was there). Steps to reproduce: 1. Boot up system with processor acpi support compiled into a module 2. load processor.ko module 3. System has freezed instantly. As it seems to me. The problem in the acpi cpu code, that makes my laptop freeze, was very likely introduced sometime in 2004. I have good experience in C (and also C++), but none in kernel programming. So I would look at the source if you could give me some hints where the problem most likely could be found (and maybe where I could find some general kernel debugging tips). Thank you for any help.
Created attachment 5192 [details] dmesg -s40000 from kernel 2.6.11.11 immedeately after a system boot
Created attachment 5193 [details] dmidecode created under the same conditions as the attachment before
Created attachment 5194 [details] acpidmp created under the same conditions as the attachment before
Created attachment 5195 [details] lscpi -vv created under the same conditions as the attachment before
I guess it's the bad of CST. Please try load processor module with parameter 'nocst=1'.
I tried it twice. with that parameter: - the first time it freezed immediately (using "modprobe processor nocst=1" (quotes for clarity)) - the second time it freezed about 3-5 seconds after loading the module ( I used insmod here, because I wasn't entirely sure if the first attempt was correct (altough it must have been acording to the manpage)) ("insmod /lib/modules/.../acpi/processor.ko nocst=1" (again quotes for clarity)) Any other ideas?
Ok, how about the parameter 'max_cstate=1'? You can try different value such as 2,3 for the parameter.
max_cstate=1 worked max_cstate=2 worked also (I tested the /proc/acpi/processor interface both times) max_cstate=3 makes my system freeze (after a few seconds) The BIOS has a setting for the C3 state, which I have enabled a long time ago. But my old kernel didn't seem to use it. Do you think this is a hardware problem? Or would it probably be possible to get the C3 state working?
We possibly can't make your C3 work. Did your system work in WinXP (sorry)? It's more likely a BIOS bug to me. C3 is actually sample, it just reads an IO port, and your system hangs when reading the IO port. I think we should blacklist C3 in this system.
I have a W2K partition I can boot into. But I don't know how I could find out if W2K is really using the C3 state. Can you give me advice how I could do that? Do I need a special tool for that? Thanks.
Created attachment 5205 [details] patch to blacklist C3 No, there isn't any tool to do this. If win doesn't hang, we can't make any conclusion. I think it's not worthy digging this out. IIRC, only mobile CPU (Pentium M) has C3 support. P4's C3 might not be a real C3. Blacklist C3 on this system should have no impact. Could you please try the patch? Thanks!
Ok. I've applied the patch, compiled all acpi modules into the kernel image, booted from it and it works. Thank you for your help.
Created attachment 5412 [details] tweaked patch updated patch to re-name no_c2c3() to be set_max_cstate(). applied to-linus
shipped in 2.6.13-rc5 -- closing.