Bug 13170 - Macbook 5,2 only boots with acpi=off, or nosmp, or maxcpus=1
Summary: Macbook 5,2 only boots with acpi=off, or nosmp, or maxcpus=1
Status: CLOSED OBSOLETE
Alias: None
Product: Drivers
Classification: Unclassified
Component: Video(DRI - non Intel) (show other bugs)
Hardware: All Linux
: P1 blocking
Assignee: drivers_video-dri
URL:
Keywords:
Depends on:
Blocks: 56331
  Show dependency tree
 
Reported: 2009-04-25 18:01 UTC by Mike Arthur
Modified: 2021-04-16 16:54 UTC (History)
21 users (show)

See Also:
Kernel Version: 2.6.29
Subsystem:
Regression: No
Bisected commit-id:


Attachments
acpidump output (115.80 KB, application/octet-stream)
2009-04-25 18:01 UTC, Mike Arthur
Details
acpi=off dmesg (33.97 KB, application/octet-stream)
2009-04-27 19:22 UTC, Mike Arthur
Details
acpi=ht failure screen (before blanking) (79.43 KB, image/jpeg)
2009-04-27 19:32 UTC, Mike Arthur
Details
acpi=ht failure video (before blanking) (41 bytes, text/plain)
2009-04-27 19:35 UTC, Mike Arthur
Details
dmesg nosmp (44.21 KB, application/octet-stream)
2009-04-27 21:06 UTC, Mike Arthur
Details
dmesg maxcpus=1 (45.84 KB, text/plain)
2009-04-27 21:11 UTC, Mike Arthur
Details
2.6.30-rc5 failure screen (before blanking) (72.79 KB, image/jpeg)
2009-05-11 22:10 UTC, Mike Arthur
Details
initcall_debug failure screen (before blanking) (95.75 KB, image/jpeg)
2009-05-12 07:39 UTC, Mike Arthur
Details

Description Mike Arthur 2009-04-25 18:01:40 UTC
Created attachment 21118 [details]
acpidump output

My new white Macbook 5,2 will only boot into Linux with acpi=off.

The kernel partially loads and then the screen is blanked and the system stops booting. This occurs before netconsole can load and the Macbook doesn't have a serial port.

I've tried booting 2.6.26 and 2.6.30-rc2 both of which produce the same results.

I've tried booting with acpi=ht which produces the same results.

I've attached the dumped ACPI tables. Interestingly iasl seems to be unable to extract the DSDT.

Let me know what I can do to help further debug this.

Thanks for reading!
Comment 1 ykzhao 2009-04-27 01:07:32 UTC
Will you please try the following boot options and see whether the issue still exists?
   a. idle=poll
   b. processor.max_cstate=1 (The processor should be compiled as built-in kernel).
   c. nolapic_timer

   thanks.
Comment 2 ykzhao 2009-04-27 01:16:49 UTC
Hi, Mike
    Do you mean that the box still hangs even when adding the boot option of "acpi=ht"? 
    In fact when the boot option of "acpi=ht" is added, the box is also booted with ACPI disabled. 
    Will you please capture the screenshot when it hangs with the "acpi=ht"?
    Will you please attach the output of dmesg with the boot option of "acpi=off"?
   Thanks.
Comment 3 Zhang Rui 2009-04-27 01:29:57 UTC
can you attach the screenshot when linux hangs?
Comment 4 Mike Arthur 2009-04-27 08:31:27 UTC
Hey guys, thanks!

I'll try the other options tonight when I get home.

When I add "acpi=ht" it produces exactly the same behaviour as without any extra boot options (i.e. blanked screen, stops booting).

I can't capture a screenshot as the screen blanks but I'll try and take lots of photos in quick succession and try and capture the last one with acpi=ht.

I'll also post the output of dmesg tonight.
Comment 5 Mike Arthur 2009-04-27 18:57:58 UTC
ykzhao: None of those three options made a difference unfortunately. I'm not sure what you meant by "..processor should be compiled as built-in.." though. Which kernel flag you mean? CONFIG_ACPI_PROCESSOR?

Attachment of the "acpi=ht" image and "acpi=off" dmesg is to follow.
Comment 6 Mike Arthur 2009-04-27 19:22:29 UTC
Created attachment 21140 [details]
acpi=off dmesg
Comment 7 Mike Arthur 2009-04-27 19:32:18 UTC
Created attachment 21141 [details]
acpi=ht failure screen (before blanking)
Comment 8 Mike Arthur 2009-04-27 19:35:32 UTC
Created attachment 21142 [details]
acpi=ht failure video (before blanking)
Comment 9 Mike Arthur 2009-04-27 20:58:29 UTC
Was playing around and turns out the system will boot fine and acpi work with nosmp or maxcpus=1 in the boot flags. Attaching the dmesg for those two boots.
Comment 10 Mike Arthur 2009-04-27 21:06:44 UTC
Created attachment 21144 [details]
dmesg nosmp
Comment 11 Mike Arthur 2009-04-27 21:11:57 UTC
Created attachment 21145 [details]
dmesg maxcpus=1
Comment 12 Mike Arthur 2009-05-06 23:42:03 UTC
Any news on this or anything else I can do to help? Apologies if someone is already working on it.
Comment 13 Zhang Rui 2009-05-07 01:05:58 UTC
the screenshot in comment #7 shows an IO APIC allocation error, and there are a couple of changes between 2.6.30-rc2 and 2.6.30-rc4.
so my suggestion is that, try 2.6.30-rc4 kernel, WITHOUT "acpi=ht" parameter this time, and attach the screenshot here.
Comment 14 Mike Arthur 2009-05-11 22:10:51 UTC
Created attachment 21308 [details]
2.6.30-rc5 failure screen (before blanking)

With 2.6.30-rc5 the problem persists. See the attached screenshot.
Comment 15 Zhang Rui 2009-05-12 02:18:03 UTC
please add the boot parameter "initcall_debug" so that we can see what initcall we are executing when system hangs.
Comment 16 Mike Arthur 2009-05-12 07:39:20 UTC
Created attachment 21312 [details]
initcall_debug failure screen (before blanking)

Doesn't look overly helpful but here's the last screen with initcall_debug.
Comment 17 Silvio Sisto 2009-05-26 18:28:44 UTC
What info is needed?
Comment 18 Shaohua 2009-07-01 03:57:15 UTC
how about boot option "acpi=ht noapic"?
Comment 19 Damocles 2009-07-03 11:15:22 UTC
I am using Gentoo with 2.6.30 and
"acpi=ht noapic" hangs the macbook (5,2)
while booting the kernel. It happens a
few seconds after boot and before the
ramfs disk is loaded.

As an extra the keyboard is dead even with
acpi=off. Seems like more users have this
problem http://wiki.debian.org/MacBook#InstallDebian
(see comments in the TROUBLESHOOTING section)
Comment 20 ykzhao 2009-07-20 13:22:48 UTC
Will you please try the boot option of "pci=noacpi pci=nomsi" and see whether the box can be booted?
Thanks.
Comment 21 David 2009-08-11 08:25:39 UTC
I have tried booting with 2.6.28 both pci=noacpi and pci=nosmi and neither of them seem to work
Comment 22 Len Brown 2009-08-13 04:12:17 UTC
David,
that should be "pci=nomsi", not pci=nosmi

did anybody try booting with just "noapic"?
Comment 23 David 2009-08-20 15:58:04 UTC
Sorry, that must have been a typo. I've just tried noacpi (which is what I assume you meant in your last comment) on it's own and it doesn't work.
Comment 24 Mike Arthur 2009-08-20 16:02:11 UTC
noapic was not a typo.

APIC is different to ACPI.
Comment 25 David 2009-08-20 16:30:15 UTC
Sorry about that. I've just tried noapic on it's own and that doesn't work either.
Comment 26 Zhang Rui 2009-08-21 03:29:52 UTC
please try the patch at http://patchwork.kernel.org/patch/38246/ and see if it
helps.
Comment 27 David 2009-08-21 08:46:44 UTC
I'm sorry but I'm afraid I'm currently using a liveCD to test for these problems, and I don't know of any way to apply a patch to a liveCD. If anyone can explain the steps I can take to test this without installing a distro I will happily test though.
Comment 28 Alejandro Valenzuela 2009-08-21 21:34:24 UTC
The latest snapshot (2.6.31-RC6-git7) seems to have the patch applied already; I'll try it.
Comment 29 Alejandro Valenzuela 2009-08-21 22:41:32 UTC
Nope, unfortunately the bug is still there. Same blanking process with almost no explanation.. :( Anything I might help with?
Comment 30 Patrick 2009-08-27 05:45:47 UTC
Same problem with my Macbook 5,2. Let me know if I can help. I'm not a linux guru, but I do have basic knowledge of the command line and have installed linux numerous times before. I'd really love to get linux installed on my Macbook.
Comment 31 Zhang Rui 2009-09-03 06:50:01 UTC
what if you blacklist the ahci driver?
or enter the BIOS setup manual, and set the SATA controller mode to legacy or combined, if there is any.
Comment 32 David 2009-09-03 08:05:50 UTC
IIRC macs don't have a BIOS at all, they use something called EFI which I don't know much about.

If someone could tell be how to blacklist the ahci driver I will happily do so and see if it works.
Comment 33 Silvio Sisto 2009-09-28 05:59:31 UTC
I think you have to edit the /etc/modprobe.d/blacklist.conf file and add this line:

blacklist ahci
Comment 34 danny.piccirillo 2009-10-14 05:27:24 UTC
I ran into this installing Ubuntu on a friend's machine (the newer MacBook 5,2 http://en.wikipedia.org/wiki/MacBook#Model_specifications released May 27, 2009). 

Potentially helpful information: 

Someone found that /proc/cpuinfo reports the CPU as being single core, even though it is actually dual core. From https://bugs.launchpad.net/ubuntu/+source/linux/+bug/341230

When booting without any of the options as a workaround for this bug, the screen goes blank and for a brief moment i see "[5.162415] Not responding" before the screen goes blank once again. I uploaded a video of this to http://www.archive.org/details/FuckingMacs but it is temporary and will disappear after a few days. Anybody know a better place to host? 

How can i help? What other info is needed for this bug?
Comment 35 ste 2009-10-17 21:51:10 UTC
hi everybody.

I am able to boot ubuntu 9.04 on my Macbook White 5.2 using acpi (battery status, two cpu cores, etc..) booting from
rEFIt + grub-efi (compiled in ubuntu and installend in my OSX partition under the /EFI folder) with kernel option acpi=force,
instead of rEFIT + grub 2 standard (for which I need acpi=off in order to boot).

I don't know if it could help to locate the problem.

here some more info about how i made: http://ubuntuforums.org/showthread.php?p=8121161#post8121161

so this may not be a problem of acpi itself.

i hope i could help in some way..

ste
Comment 36 David 2009-11-15 12:09:42 UTC
I've just tried blacklisting ahci and booting without macpus=1 and it doesn't work. I'm running linux 2.6.32.4.4
Comment 37 Zhang Rui 2010-01-28 02:00:11 UTC
what if you boot with "noapic"
Comment 38 David 2010-01-31 12:22:35 UTC
Booting with "noapic" doesn't work; there's a flashing cursor for a couple of seconds an then just a blank screen
Comment 39 Zhang Rui 2010-02-21 06:25:10 UTC
seems we don't have any new thoughts, bug blocked...
Comment 41 Alejandro Valenzuela 2010-02-21 10:27:55 UTC
I tried the options acpi=noirq pnpacpi=off with kernel 2.6.32.7 , no progress. It still hangs..
Comment 42 Alejandro Valenzuela 2010-02-22 10:02:58 UTC
Since I reinstalled nearly everything from scratch a few days ago, I decided to try ste's solution again, and this time it worked for me. Impressively the only thing not working on my laptop now is the backlight control (dbus seems to report only 2 possible levels, according to pommed) and whenever I switch to a text terminal (CTRL+ALT+F1) the screen becomes blank. Any extra details I might provide?
Comment 43 ste 2010-02-22 11:12:28 UTC
> --- Comment #42 from Alejandro Valenzuela <lanjoe9@mexinetica.com> 
> 2010-02-22 10:02:58 ---
> Since I reinstalled nearly everything from scratch a few days ago, I decided
> to
> try ste's solution again, and this time it worked for me. Impressively the
> only
> thing not working on my laptop now is the backlight control (dbus seems to
> report only 2 possible levels, according to pommed) and whenever I switch to
> a
> text terminal (CTRL+ALT+F1) the screen becomes blank. Any extra details I
> might
> provide?
>

this is the same thing that happens to me:
1) no backlight control
2) cannot switch to text terminal (CTRL+ALT+F1) -  but this is
something related to Nvidia driver, because if you disable it and use
the standard one, you can switch to text terminal and come back
without any problem - but backlight control still don't work for me.

@Alejandro, which distro did you installed? Can you use i-sight? does
audio work properly?

@Alex Murray: like Alejandro, I can't boot whit acpi=noirq pnpacpi=off
- i'm using linux kernel 2.6.28-18 (ubuntu generic)

ste
Comment 44 Alejandro Valenzuela 2010-02-23 01:59:51 UTC
@Ste: I also suspect the Nvidia driver is to blame for not being able to switch to a text terminal, it's happened before (toshiba laptops 1-2 years ago or so..). 

The backlight control: it seems to me that it boots with whatever backlight setting it had last using OSX which is not too bad.

I'm using Debian i386 (i.e. 32 bits) with a mixture of Lenny and Squeeze packages; with a custom kernel 2.6.32.7 (disabled everything I didn't need).

I have no problems with the audio (once configured). I used to be able to use the iSight; right now the system is not "noticing" it in spite of having the firmware properly loaded and the uvc video drivers. I don't think it's because of booting via EFI because I've tried it while booting "normally" (maxcpus=1 and normal, non-efi grub; in this case I've tried also a previous kernel and a debian generic 2.6.26, in both which I used to be able to get iSight up and running but for some reason it won't anymore. I suspect the udev update broke something :S)

Ah, and last but not least.. by using the efi-grub I'm able to boot without the need of any kernel command line option (though of course video=efifb is necessary in case of problems while booting, otherwise nothing is visible :P)
Comment 45 Alejandro Valenzuela 2010-02-23 02:26:21 UTC
Update: by manually using ift-load -f /lib/firmware/isight.fw I was able to get the iSight up and running.. 

Also I just noticed an extremely odd thing. It seems to me that doing a reboot from OSX causes the iSight to appear as device 05ac:8501 in lsusb, while shutting down and then booting causes it to appear as 05ac:8300 (though the driver still mentions 05ac:8501 when the camera is finally attached). I'll test if ift-load also works when the iSight appears as 05ac:8501 in lsusb.
Comment 46 Zhang Rui 2010-02-23 07:34:43 UTC
so the original problem reported in this bug has been fixed.

and there are two problems left that sounds to be kernel related:
1. no backlight control
2. can not switch to text console.
right?

As there is no ACPI backlight control on this laptop, I'll re-assign this to the VGA category as there is nothing we can do from ACPI point of view.
Comment 47 Alejandro Valenzuela 2010-02-23 09:17:25 UTC
Well, it would seem so, but the problem still keeps on being, that the system does _not_ boot without either command line options (for example, the way it would be booted from a liveCD) or a "special" efi grub (which must be installed after the installation from a liveCD has been completed). I would regard booting via efi grub as a workaround, not as much of a solution..
Comment 48 ste 2010-02-23 11:18:48 UTC
http://bugzilla.kernel.org/show_bug.cgi?id=13170


>
> --- Comment #44 from Alejandro Valenzuela <lanjoe9@mexinetica.com> 
> 2010-02-23 01:59:51 ---
> [..]
> The backlight control: it seems to me that it boots with whatever backlight
> setting it had last using OSX which is not too bad.
>

I can confirm this.


@Zhang Rui
I think the bug has not been fixed yet: in order to boot, you have to
build and install in the /EFI partition your own efi-grub..
I think this is just a workaround, not a solution.
Otherwise one could also boot with the standard grub/grub2 disabling
acpi (1 core, no battery level, etc..) - another workaround, not a
solution

@Alejandro Valenzuela
I'll try a more recent kernel/system to fix properly the audio and the
i-sight issues..
Comment 49 Zhang Rui 2010-02-24 02:38:53 UTC
(In reply to comment #48)
> 
> @Zhang Rui
> I think the bug has not been fixed yet: in order to boot, you have to
> build and install in the /EFI partition your own efi-grub..
> I think this is just a workaround, not a solution.

I agree.
But as this doesn't seem like a kernel issue that we can cover here, raising this issue to Debian/ubuntu would be more helpful.
Comment 50 Alejandro Valenzuela 2010-02-24 08:01:43 UTC
And gentoo, and every other linux that does not include an efi-grub bootloader in their liveCD? Supposing booting from CD does not automatically set bios emulation mode.. 

Also, both ubuntu ( https://bugs.launchpad.net/ubuntu/+source/linux/+bug/341230 ) and debian ( http://wiki.debian.org/MacBook#WhatisaMacBook ) are aware of the bug. But since it's a kernel bug affecting all distros (the problem occurs even before the initramfs is loaded), it was raised here, in the kernel.org bugzilla.

Or maybe I'm just not understanding what you suggest we do. Could you please clarify?
Comment 51 David 2010-04-26 15:23:40 UTC
As Alejanrdo says above, it's been raised in both debian and ubuntu for some time now, and nothing seems to be happening there.
Comment 52 Carlos Le Mare 2010-05-10 22:16:49 UTC
I see that the problem is assigned to drivers_video-dri@kernel-bugs.osdl.org, however, the problem is the same is I use Restricted Drivers from NVidia or the open one. I have a MacBook5,2... using Ubuntu 10.04 32 bits (64 bits won't boot from the CD).
Comment 53 David 2010-05-11 16:44:22 UTC
This seems to be fixed for me now that I've switched to the open source driver.
Comment 54 David 2010-05-17 15:19:13 UTC
Sorry, getting confused between this and a screen brightness bug. This is definitely not fixed
Comment 55 David 2010-07-22 15:43:42 UTC
This is still a problem when booting from 2.6.35
Comment 56 Martinez 2010-10-02 20:28:46 UTC
=====================================================================

Here some informations about booting my hardware with the 2.6.18-194.11.1.el5 (CentOS5) kernel. 
This kernel have for sure some backports of newer kernels (looking into the src rpm shows 111 patchfiles 
matching apic and acpi pattern).


=====================================================================
Boot list with arguments:
--------------------------------------------------------------------------------------

label linux0
    kernel linux
    append initrd=initrd.img root=/dev/sda3 acpi=force

label linux1
    kernel linux
    append initrd=initrd.img root=/dev/sda3 maxcpus=1

label linux2
    kernel linux
    append initrd=initrd.img root=/dev/sda3 acpi=noirq pnpacpi=off

label linux3
    kernel linux
    append initrd=initrd.img root=/dev/sda3 noapic irqpoll acpi=force

label linux4
    kernel linux
    append initrd=initrd.img root=/dev/sda3 acpi=off

label linux5
    kernel linux
    append initrd=initrd.img root=/dev/sda3 nosmp

label linux6
    kernel linux
    append initrd=initrd.img root=/dev/sda3 pci=noacpi pci=nomsi

label linux7
    kernel linux
    append initrd=initrd.img root=/dev/sda3 noapic
 
--------------------------------------------------------------------------------------
Kernel (linux0) with acpi=force doesn't boot, all others (linux1-7) do.

=====================================================================



=====================================================================
linux1 
--------------------------------------------------------------------------------------

cat /proc/cmdline /proc/acpi/processor/CPU*/info /proc/interrupts /proc/cpuinfo
initrd=initrd.img root=/dev/sda3 maxcpus=1 BOOT_IMAGE=linux 
processor id:            0
acpi id:                 0
bus mastering control:   no
power management:        yes
throttling control:      yes
limit interface:         yes
processor id:            1
acpi id:                 1
bus mastering control:   no
power management:        yes
throttling control:      yes
limit interface:         yes
           CPU0       
  0:      79729    IO-APIC-edge  timer
  8:          1    IO-APIC-edge  rtc
  9:        193   IO-APIC-level  acpi
 58:       4963         PCI-MSI  ahci
 74:          6         PCI-MSI  eth0
169:        158   IO-APIC-level  HDA Intel
209:        554   IO-APIC-level  ehci_hcd:usb1
217:          2   IO-APIC-level  ehci_hcd:usb2
225:         73   IO-APIC-level  ohci_hcd:usb3
233:        198   IO-APIC-level  ohci_hcd:usb4
NMI:         77 
LOC:      79616 
ERR:          0
MIS:          0
processor	: 0
vendor_id	: GenuineIntel
cpu family	: 6
model		: 23
model name	: Intel(R) Core(TM)2 Duo CPU     P7350  @ 2.00GHz
stepping	: 10
cpu MHz		: 1596.000
cache size	: 3072 KB
physical id	: 0
siblings	: 1
core id		: 0
cpu cores	: 1
apicid		: 0
fpu		: yes
fpu_exception	: yes
cpuid level	: 13
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx
fxsr sse sse2 ss ht tm syscall nx lm constant_tsc up pni monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr sse4_1 lahf_lm
bogomips	: 3980.00
clflush size	: 64
cache_alignment	: 64
address sizes	: 36 bits physical, 48 bits virtual
power management:








=====================================================================
linux2
--------------------------------------------------------------------------------------


cat /proc/cmdline /proc/acpi/processor/CPU*/info /proc/interrupts /proc/cpuinfo
initrd=initrd.img root=/dev/sda3 acpi=noirq pnpacpi=off BOOT_IMAGE=linux 
processor id:            0
acpi id:                 0
bus mastering control:   no
power management:        yes
throttling control:      yes
limit interface:         yes
processor id:            1
acpi id:                 1
bus mastering control:   no
power management:        yes
throttling control:      yes
limit interface:         yes
           CPU0       
  0:      88982          XT-PIC  timer
  2:          0          XT-PIC  cascade
  5:          2          XT-PIC  ehci_hcd:usb2
  7:        215          XT-PIC  ohci_hcd:usb4
  8:          1          XT-PIC  rtc
  9:        166          XT-PIC  acpi
 10:        539          XT-PIC  ehci_hcd:usb1
 11:         73          XT-PIC  ohci_hcd:usb3
 15:        158          XT-PIC  HDA Intel
 81:       4704         PCI-MSI  ahci
 89:          6         PCI-MSI  eth0
NMI:         85 
LOC:      88881 
ERR:          0
MIS:          0
processor	: 0
vendor_id	: GenuineIntel
cpu family	: 6
model		: 23
model name	: Intel(R) Core(TM)2 Duo CPU     P7350  @ 2.00GHz
stepping	: 10
cpu MHz		: 1596.000
cache size	: 3072 KB
physical id	: 0
siblings	: 1
core id		: 0
cpu cores	: 1
apicid		: 0
fpu		: yes
fpu_exception	: yes
cpuid level	: 13
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx
fxsr sse sse2 ss ht tm syscall nx lm constant_tsc up pni monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr sse4_1 lahf_lm
bogomips	: 3980.00
clflush size	: 64
cache_alignment	: 64
address sizes	: 36 bits physical, 48 bits virtual
power management:






=====================================================================
linux3
--------------------------------------------------------------------------------------

cat /proc/cmdline /proc/acpi/processor/CPU*/info /proc/interrupts /proc/cpuinfo
initrd=initrd.img root=/dev/sda3 noapic irqpoll acpi=force BOOT_IMAGE=linux 
processor id:            0
acpi id:                 0
bus mastering control:   no
power management:        yes
throttling control:      yes
limit interface:         yes
processor id:            1
acpi id:                 1
bus mastering control:   no
power management:        yes
throttling control:      yes
limit interface:         yes
           CPU0       
  0:      94891          XT-PIC  timer
  2:          0          XT-PIC  cascade
  5:          2          XT-PIC  ehci_hcd:usb2
  7:        254          XT-PIC  ohci_hcd:usb4
  8:          1          XT-PIC  rtc
  9:        189          XT-PIC  acpi
 10:        477          XT-PIC  ehci_hcd:usb1
 11:         73          XT-PIC  ohci_hcd:usb3
 15:        157          XT-PIC  HDA Intel
 81:       4928         PCI-MSI  ahci
 89:          7         PCI-MSI  eth0
NMI:         87 
LOC:      94699 
ERR:          4
MIS:          0
processor	: 0
vendor_id	: GenuineIntel
cpu family	: 6
model		: 23
model name	: Intel(R) Core(TM)2 Duo CPU     P7350  @ 2.00GHz
stepping	: 10
cpu MHz		: 1596.000
cache size	: 3072 KB
physical id	: 0
siblings	: 1
core id		: 0
cpu cores	: 1
apicid		: 0
fpu		: yes
fpu_exception	: yes
cpuid level	: 13
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx
fxsr sse sse2 ss ht tm syscall nx lm constant_tsc up pni monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr sse4_1 lahf_lm
bogomips	: 3997.27
clflush size	: 64
cache_alignment	: 64
address sizes	: 36 bits physical, 48 bits virtual
power management:




=====================================================================
linux4
--------------------------------------------------------------------------------------
cat /proc/cmdline /proc/interrupts /proc/cpuinfo
initrd=initrd.img root=/dev/sda3 acpi=off BOOT_IMAGE=linux 
           CPU0       
  0:     109289          XT-PIC  timer
  2:          0          XT-PIC  cascade
  5:          2          XT-PIC  ehci_hcd:usb2
  7:       7733          XT-PIC  ohci_hcd:usb4
  8:          0          XT-PIC  rtc
 10:        593          XT-PIC  ehci_hcd:usb1
 11:         77          XT-PIC  ohci_hcd:usb3
 15:        158          XT-PIC  HDA Intel
 81:       5158         PCI-MSI  ahci
 89:          6         PCI-MSI  eth0
NMI:         86 
LOC:     109177 
ERR:          0
MIS:          0
processor	: 0
vendor_id	: GenuineIntel
cpu family	: 6
model		: 23
model name	: Intel(R) Core(TM)2 Duo CPU     P7350  @ 2.00GHz
stepping	: 10
cpu MHz		: 1990.019
cache size	: 3072 KB
physical id	: 0
siblings	: 1
core id		: 0
cpu cores	: 1
apicid		: 0
fpu		: yes
fpu_exception	: yes
cpuid level	: 13
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx
fxsr sse sse2 ss ht tm syscall nx lm constant_tsc up pni monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr sse4_1 lahf_lm
bogomips	: 3980.03
clflush size	: 64
cache_alignment	: 64
address sizes	: 36 bits physical, 48 bits virtual
power management:




=====================================================================
linux5
--------------------------------------------------------------------------------------

cat /proc/cmdline /proc/acpi/processor/CPU*/info /proc/interrupts /proc/cpuinfo
initrd=initrd.img root=/dev/sda3 nosmp BOOT_IMAGE=linux 
processor id:            0
acpi id:                 0
bus mastering control:   no
power management:        yes
throttling control:      yes
limit interface:         yes
processor id:            1
acpi id:                 1
bus mastering control:   no
power management:        yes
throttling control:      yes
limit interface:         yes
           CPU0       
  0:     184531          XT-PIC  timer
  2:          0          XT-PIC  cascade
  5:          2          XT-PIC  ehci_hcd:usb2
  7:      22519          XT-PIC  ohci_hcd:usb4
  8:          1          XT-PIC  rtc
  9:        194          XT-PIC  acpi
 10:        798          XT-PIC  ehci_hcd:usb1
 11:         77          XT-PIC  ohci_hcd:usb3
 15:        158          XT-PIC  HDA Intel
 81:       5686         PCI-MSI  ahci
 89:          8         PCI-MSI  eth0
NMI:         89 
LOC:     184430 
ERR:          0
MIS:          0
processor	: 0
vendor_id	: GenuineIntel
cpu family	: 6
model		: 23
model name	: Intel(R) Core(TM)2 Duo CPU     P7350  @ 2.00GHz
stepping	: 10
cpu MHz		: 1596.000
cache size	: 3072 KB
physical id	: 0
siblings	: 1
core id		: 0
cpu cores	: 1
apicid		: 0
fpu		: yes
fpu_exception	: yes
cpuid level	: 13
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx
fxsr sse sse2 ss ht tm syscall nx lm constant_tsc up pni monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr sse4_1 lahf_lm
bogomips	: 3980.00
clflush size	: 64
cache_alignment	: 64
address sizes	: 36 bits physical, 48 bits virtual
power management:







=====================================================================
linux6
--------------------------------------------------------------------------------------


cat /proc/cmdline /proc/acpi/processor/CPU*/info /proc/interrupts /proc/cpuinfo
initrd=initrd.img root=/dev/sda3 pci=noacpi pci=nomsi BOOT_IMAGE=linux 
processor id:            0
acpi id:                 0
bus mastering control:   no
power management:        yes
throttling control:      yes
limit interface:         yes
processor id:            1
acpi id:                 1
bus mastering control:   no
power management:        yes
throttling control:      yes
limit interface:         yes
           CPU0       
  0:      89609          XT-PIC  timer
  2:          0          XT-PIC  cascade
  5:          2          XT-PIC  ehci_hcd:usb2
  7:        217          XT-PIC  ohci_hcd:usb4
  8:          1          XT-PIC  rtc
  9:        192          XT-PIC  acpi
 10:        564          XT-PIC  ehci_hcd:usb1
 11:       4840          XT-PIC  ohci_hcd:usb3, ahci
 14:          7          XT-PIC  eth0
 15:        157          XT-PIC  HDA Intel
NMI:         84 
LOC:      89505 
ERR:          0
MIS:          0
processor	: 0
vendor_id	: GenuineIntel
cpu family	: 6
model		: 23
model name	: Intel(R) Core(TM)2 Duo CPU     P7350  @ 2.00GHz
stepping	: 10
cpu MHz		: 1596.000
cache size	: 3072 KB
physical id	: 0
siblings	: 1
core id		: 0
cpu cores	: 1
apicid		: 0
fpu		: yes
fpu_exception	: yes
cpuid level	: 13
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx
fxsr sse sse2 ss ht tm syscall nx lm constant_tsc up pni monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr sse4_1 lahf_lm
bogomips	: 3980.00
clflush size	: 64
cache_alignment	: 64
address sizes	: 36 bits physical, 48 bits virtual
power management:




=====================================================================
linux7
--------------------------------------------------------------------------------------
cat /proc/cmdline /proc/acpi/processor/CPU*/info /proc/interrupts /proc/cpuinfo
initrd=initrd.img root=/dev/sda3 noapic BOOT_IMAGE=linux 
processor id:            0
acpi id:                 0
bus mastering control:   no
power management:        yes
throttling control:      yes
limit interface:         yes
processor id:            1
acpi id:                 1
bus mastering control:   no
power management:        yes
throttling control:      yes
limit interface:         yes
           CPU0       
  0:     112635          XT-PIC  timer
  2:          0          XT-PIC  cascade
  5:          2          XT-PIC  ehci_hcd:usb2
  7:       8043          XT-PIC  ohci_hcd:usb4
  8:          1          XT-PIC  rtc
  9:        193          XT-PIC  acpi
 10:        545          XT-PIC  ehci_hcd:usb1
 11:        662          XT-PIC  ohci_hcd:usb3
 15:        159          XT-PIC  HDA Intel
 81:       7288         PCI-MSI  ahci
 89:          7         PCI-MSI  eth0
NMI:         91 
LOC:     112532 
ERR:          0
MIS:          0
processor	: 0
vendor_id	: GenuineIntel
cpu family	: 6
model		: 23
model name	: Intel(R) Core(TM)2 Duo CPU     P7350  @ 2.00GHz
stepping	: 10
cpu MHz		: 1596.000
cache size	: 3072 KB
physical id	: 0
siblings	: 1
core id		: 0
cpu cores	: 1
apicid		: 0
fpu		: yes
fpu_exception	: yes
cpuid level	: 13
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx
fxsr sse sse2 ss ht tm syscall nx lm constant_tsc up pni monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr sse4_1 lahf_lm
bogomips	: 3980.00
clflush size	: 64
cache_alignment	: 64
address sizes	: 36 bits physical, 48 bits virtual
power management:







=====================================================================

If requested, i can provide dmesg output.

=====================================================================
Comment 57 David 2010-10-28 14:29:29 UTC
Still an issue on 2.6.36-1
Comment 58 David 2010-12-17 18:03:45 UTC
New comment downstream saying:

"I've got Ubuntu 10.10 (2.6.35-23-generic #41-Ubuntu SMP) booting using
my old grub 1.97 (that was booting Ubuntu 9.04) compiled as so:

./configure --with-platform=efi --target=x86_64
make
./grub-mkimage -d . -o grub.efi acpi boot chain configfile ext2 fat hfsplus normal part_gpt sh

Then my grub.cfg has

menuentry "linux latest" {
 root=(hd0,3)
 fakebios
 linux /vmlinuz root=/dev/sda3 video=efifb agp=off acpi=force
 initrd /initrd.img
}

I've got 2 CPUs, ACPI (sleep, reboot, poweroff, battery/power) - my next
step will be to try a newer version of grub2."
Comment 59 Carlos Le Mare 2011-01-16 22:35:04 UTC
@David:

I tried to use video=efifb agp=off acpi=force with grub 1.98 that comes with Ubuntu installation without luck.

I would like to try grub 1.97 however I don't know How to install it. I compiled the program with those options, then did the grub-mkimage thing and then I did a make install but when I reboot I got grub 1.98 menu (!?). If someone enlighten me on how to install grub 1.97 :-)

clemare
Comment 60 Gregory Bellier 2011-02-19 15:58:42 UTC
I also have a MacBook 5,2 (early 2009) and I experience the same errors than you do. This has been tested on Ubuntu 10.10

I managed to build a grub2 1.99rc1 x86_64-efi.
I had to do some tweaks to make some progress. I'm hacking directly in grub.cfg but from now, I don't care, I just want to test. So here is my entry :
menuentry 'Ubuntu, with Linux 2.6.35-25-generic' --class ubuntu --class gnu-linux --class gnu --class os {
        insmod part_gpt
        insmod ext2
        set debug=video
        insmod efi_gop
        set root='(hd0,gpt3)'
        search --no-floppy --fs-uuid --set=root d5175c18-7da2-49a9-a3af-844bad27c91d
        linux   /boot/vmlinuz-2.6.35-25-generic root=UUID=d5175c18-7da2-49a9-a3af-844bad27c91d ro
        initrd  /boot/initrd.img-2.6.35-25-generic
}

The options are pretty much the same than the ones from my working grub (with maxcpus=1).

At my first boot, I got "error: no argument specified". From what I've seen on the internet, it's because the syntax is different between Grub 1.98 and 1.99rc1. In 1.98 it's --set d5175c18... while --set=root is needed for 1.99rc1. However, this error wasn't a real problem because we're asked to press a key and then the boot continues.

It continues until the second error: "error: no suitable mode found". I've resolved this error by putting "set debug=video" and  "insmod efi_gop" in my grub entry.

From this point, I can see that the kernel starts booting until the error I now have which I haven't solved yet : "fb: conflicting fb hw usage nouveaufb vs EFI VGA - removing generic driver".

I hope this post will help some of you to make some progress until the point I've reached.

I also tried what comment #58 detailed but I have the very same error : conflicting fb...
Comment 61 Gregory Bellier 2011-03-09 17:08:26 UTC
Hi !

After some digging, I'm now able to boot on Linux using a Macbook 5.2 and with two cores.

refit + grub-pc with maxcpus = 1 => ok but only one core
refit + grub1.99-rc1 (efi and x86_64) => ok with two cores.

As I previously said, I managed to boot on the kernel but faced an error (or should I say a new one) : "fb: conflicting fb hw usage nouveaufb vs EFI
VGA - removing generic driver".

This is due to a bug which I presume is in Nouveau. I reported it here: https://bugs.freedesktop.org/show_bug.cgi?id=34508

To sum up, grub2 built for efi and x86_64 placed in the EFI partition. Within the grub.cfg :
menuentry 'Linux without bios dump' {
        insmod efi_gop
        search --no-floppy --fs-uuid --set=root d5175c18-7da2-49a9-a3af-844bad27c91d
        linux   /vmlinuz root=UUID=d5175c18-7da2-49a9-a3af-844bad27c91d ro
        initrd  /initrd.img
}
AND the final piece, NVidia driver then you'll be able to boot directly from EFI to have the 2 cores.

There are several problems here.
Comment 62 Gregory Bellier 2011-04-06 12:55:00 UTC
I now have newer informations.

I've been able to boot on Ubuntu 10.10 64 bits with Grub-EFI and Nouveau involved but it needs a 2.6.38.2 (at least, it's the one I have tested). I couldn't make it work with the 2.6.35.

I now have 2 cores.

If you want to stick with the 2.6.35, I've been able to have the 2 cores but with the Nvidia Binary. And with this latter, to change the brightness is a pain.

To sum up :

refit + grub-pc + nouveau => works if maxcpus=1 as a grub option.
refit + grub-efi + nouveau => doesn't work. Can't fully boot.
refit + grub-efi + nvidia binary => works and you have 2 cores, 3D and compiz effect but it's a real pain to change the brightness plus it's a blob.
refit + grub-efi + nouveau WITH a kernel at least 2.6.38 => works like a charm : 2 cores, 2D and you can change easily the brightness

I hope this can help some of you.
Comment 63 Francisco 2011-08-17 00:51:30 UTC
Hi, I've been following this bug for a while since I've a macbook 5,2. I've been able to use linux (ubuntu) with refit+grub-efi+nvidia driver for a while. Last week I reinstalled everything, Snow Leopard, Win7 and Ubuntu natty, everything works PERFECT using the same approach.

Today, I've upgraded the RAM, from 2 to 4 Gigs (removed 2x1Gb and put 2x2Gb). Linux doesn't boot anymore with refit+grub-efi, only using maxcpus=1 or acpi=off (still with Nvidia). The ram is OK, passes memtest86+, and win and snow leopard work without any problem. If I remove ANY one of the memory chips (1x2Gb 800Mhz) linux can boot again with grub-efi.

I guess this is probably a problem of grub-efi, but as it is related I wanted to post it here, sorry if it's the wrong place.

Here you can see the boot error from grub-efi when booting with 4Gb.
http://picturepush.com/public/6333905

Please let me know if you want me to test anything in particular.
I have Natty with Nvidia 270.41.06, with uname -r: 2.6.38-10-generic

Sadly now I have to give up one CORE for 2gb of extra RAM :(

Thanks!
Francisco
Comment 64 pezcurrel 2011-08-19 11:08:25 UTC
Hi,
I boot with 2 cpus, acpi and everything working on ubuntu 10.04 using grub 1.99 compiled following these instructions:
https://help.ubuntu.com/community/UEFIBooting
and with this grub.cfg:

-----
insmod efi_gop
menuentry "Ubuntu Linux Lucid 2.6.32-33-generic" {
	set root='(hd0,3)'
	linux /boot/vmlinuz-2.6.32-33-generic root=/dev/sda3 video=efifb ro splash
	initrd /boot/initrd.img-2.6.32-33-generic
}
-----

But there's still a problem with this method (tried with various versions of grub-efi): although it may seem the cpus do frequency switching allright, they actually always work at their minimum speed. See:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/669865
Comment 65 Francisco 2011-08-19 22:16:52 UTC
Thanks for the link dentament!, I followed step by step the instructions from your first link to compile grub-efi 1.99 (using bzr), with architecture x86_64. I put this new grub efi, with the following grub.cfg entry, into my /efi/grub folder under the MacOs partition (using rEfit to boot).

======================================================
set debug=video
insmod efi_gop
menuentry "Linux (2 cores) - without bios dump)" {
  search --file --no-floppy --set=root /vmlinuz
  fakebios
  linux /vmlinuz root=/dev/sda4 video=efifb
  initrd /initrd.img
}
======================================================

My macbook 5,2 is booting with both kernels, acpi, and the 4Gb
of RAM. Suspend and restart work. I am using Ubuntu Natty, 
default shell, 3d effects, "32 bits" kernel 2.6.38-11 and nvidia drivers (suggested by ubuntu - 270.41.06). I installed this Linux from the 
standard 32 bits Desktop CD. 

Screen brightness doesn't work now, but I remember some time ago that 
it took me a while to get it working but it can be done.

The bug that you mention about the CPU throttling is not happening
here, I can change the speed and it gets reflected in the
right place (based on what the bug explains):
$ sudo cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq 
2128000
$ sudo cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq 
2128000

As one can always ask for more..., this is the output of free:
             total       used       free     shared    buffers     cached
Mem:       2829980     929848    1900132          0      78112     351680
-/+ buffers/cache:     500056    2329924
So it's not 4Gb (as far as I can see) but I am sure they are somewhere down there...

I am glad to help to anyone giving more info about my system.

Thanks!,
Francisco
Comment 66 pezcurrel 2011-08-20 12:30:02 UTC
I've found out the cpu frequency scaling bug I mentioned in my comment is not a bug (well, not a linux bug): it's a macbook "hardware feature" (or flaw?: I can't understand why it's set up this way) to lock the 2 cpu cores to minimum speed (1.60ghz) if the battery is not present, as in my case (I removed it since I mostly use the laptop as a desktop and wanted to preserve it).
With the battery mounted, the frequency scaling behaves normally.
Comment 67 Mikel Pr 2012-03-04 06:37:02 UTC
Something happened in 3.2.0-17 or below that now lets these MacBooks boot with both cores+ACPI (mine didn't before).

Whatever it was, please, don't reverse or modify it!!
Comment 68 Mikel Pr 2012-03-05 06:07:53 UTC
MY apologies. While it does boot now without acpi=off or nosmp/maxcpus=1, only one core is reported in /proc/cpuinfo and in Ubuntu's system-report option in 12.04.
Comment 69 garegin 2012-03-24 14:46:04 UTC
the "bug" you mentioned has been a normal feature in cpus for a long time. under regular load the cpu is underclocked from its native frequency. there is also turboboost which does the opposite (overclock under high load).

Note You need to log in before you can comment on or make changes to this bug.