You are not logged in.

#1 2010-07-30 18:09:31

rwd
Member
Registered: 2009-02-08
Posts: 664

[SOLVED] SATA not working on Macbook Pro 7.1, (kernel bug 15923)

I ran into this bug while trying to install Arch as a single-os install on my new  13'' Macbook Pro 7.1:

  https://bugzilla.kernel.org/show_bug.cgi?id=15923

It appears there is a problem with the current kernel and the MCP89 chipset so SATA is not recognized. There is a patch out but it still leaves ahci disabled and therefore NCQ causing slow performing harddisks.

I am wondering what to do. I've never done any kernel patching.

- use an SSD instead of  a harddisk because of the lack of NCQ?
- and somehow create a net install with a patched current kernel (and  how)?
- or wait for the patch to reach the next version of the Arch install image (How long would that take)?
- perform the install on my other notebook? Would that interfere with EFI partition already on it?

questions questions...

Last edited by rwd (2010-09-06 10:33:47)

Offline

#2 2010-07-30 18:18:47

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] SATA not working on Macbook Pro 7.1, (kernel bug 15923)

- use an SSD instead of  a harddisk because of the lack of NCQ?
Kinda expensive solution ... but then again you're using a new MacBook Pro so maybe you have more ca$h ;-)

- or wait for the patch to reach the next version of the Arch install image (How long would that take)?
You get 'releases' once in a blue moon so that may take a while, let's say 6 months.


Have you tried using an older iso with an older kernel?

Offline

#3 2010-07-30 19:40:52

rwd
Member
Registered: 2009-02-08
Posts: 664

Re: [SOLVED] SATA not working on Macbook Pro 7.1, (kernel bug 15923)

karol wrote:

- use an SSD instead of  a harddisk because of the lack of NCQ?
Kinda expensive solution ... but then again you're using a new MacBook Pro so maybe you have more ca$h ;-)

Well I was thinking of something like an Intel Postville 40Gig one, they  are around $100 now. It would only solve the lack of NCQ, not the getting Arch installed on it. Still I would prefer keeping my current drive if possible.

karol wrote:

Have you tried using an older iso with an older kernel?

With the archlinux-2009.08-netinstall-x86_64.img (2.6.30 kernel) I see the same result result.

Last edited by rwd (2010-07-30 19:50:05)

Offline

#4 2010-07-30 22:50:11

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: [SOLVED] SATA not working on Macbook Pro 7.1, (kernel bug 15923)

Did you give this [1] a try?

[1] https://bbs.archlinux.org/viewtopic.php?id=101116


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#5 2010-07-31 09:02:56

rwd
Member
Registered: 2009-02-08
Posts: 664

Re: [SOLVED] SATA not working on Macbook Pro 7.1, (kernel bug 15923)

R00KIE wrote:

Booting with this gives the same non-working SATA. I guess it doesn't have the patch included yet.

Offline

#6 2010-09-06 08:26:31

rwd
Member
Registered: 2009-02-08
Posts: 664

Re: [SOLVED] SATA not working on Macbook Pro 7.1, (kernel bug 15923)

The latest archboot includes the SATA patch so installing works. I'll mark the thread 'solved' even though it is a workaround.

At first booting to the new install with the default 2.6.35  arch kernel failed with a 'unable to determine major/minor number root device /dev/sd..' error, leading me to believe that it was caused by   bug 16606 which has the same error message. However after reinstalling the kernel using these lines in /etc/mkinitcpio.conf booting succeeded. It could be that one or more items in here aren't necessary, but at least it works for me:

(...)
MODULES="sata_sil pata_acpi libata ata_generic ext4"
(...)
HOOKS="base udev keymap pata scsi sata usb usbinput filesystems"
(...)

Last edited by rwd (2010-09-08 10:48:19)

Offline

#7 2010-09-20 12:34:13

atcq
Member
From: Germany
Registered: 2008-09-04
Posts: 28

Re: [SOLVED] SATA not working on Macbook Pro 7.1, (kernel bug 15923)

rwd wrote:

The latest archboot includes the SATA patch so installing works. I'll mark the thread 'solved' even though it is a workaround.]

i just installed arch following your posts, didn't use the workaround with the MODULES section of the mkinitcpio.conf, but chrooted in the new system and updated via pacman.

# chroot /tmp/install
# dhcpcd eth0
# pacman -Syu

it worked, as far as kernel bug 15923 is concerned, but after booting into the newly installed system i don't have a working keyboard. usbinput is set in HOOKS.
any suggestions?

Offline

#8 2010-09-20 18:02:35

jimbok
Member
Registered: 2009-09-17
Posts: 51

Re: [SOLVED] SATA not working on Macbook Pro 7.1, (kernel bug 15923)

atcq, I had that happen to my 7,1 arch install. I didn't choose US keyboard layout.  I think it defaults to something else. 

rwd, I'll have to try the mkinitcpio.conf mod.  I had the same error, but found the fallback images works.


Registered Linux User #402088

Offline

#9 2010-09-20 21:50:56

rwd
Member
Registered: 2009-02-08
Posts: 664

Re: [SOLVED] SATA not working on Macbook Pro 7.1, (kernel bug 15923)

atcq wrote:

it worked, as far as kernel bug 15923 is concerned, but after booting into the newly installed system i don't have a working keyboard. usbinput is set in HOOKS.
any suggestions?

I know very little about kernel and booting stuff, but this is how I made booting work from memory, in case it helps someone:

- I installed using the archboot cd, using the whole harddisk and chose a MBR partition table (not GPT)
- booted from the archboot cd once more but only did the 'prepare harddisk' part where I only chose the mount points, and exited the menu to shell
- edited /tmp/install/etc/mkinitcpio.conf  (on the mounted harddisk) as  described above
- I followed the instructions here http://wiki.archlinux.org/index.php/Kernel_Panics for chrooting:

 mount -t proc none /tmp/install/proc
mount -t sysfs none /tmp/install/sys
mount --bind /dev /tmp/install/dev
chroot  /tmp/install
mkinitcpio -g /boot/kernel26.img
exit
sync
reboot

I also chose ext4 for all my partitions. So possibly with a different filesystem the according kernelmodule  must be used. I tried the same procedure with a OCZ Vertex 2 ssd by the way but that one fails to boot with errors that are very similar to what's in this bug description.

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

Some other Macbook Pro 7.1 related things not mentioned in the wiki:

- Sound:

worked after putting this in /etc/modprobe.d/modprobe.conf:

options snd_hda_intel model=mbp55

and blacklisting OSS related modules in /etc/rc.conf:

 MODULES=(!snd_pcm_oss !snd_mixer_oss !snd_seq_oss  pcspkr  hid_apple libphy tg3 snd-hwdep snd-page-alloc snd-pcm snd-timer snd snd-hda-codec snd-hda-intel soundcore)

- Backlight and keyboard leds:

install nvidia-bl (  mbp-nvidia-blg doesn't seem to work) from the AUR and follow the instructions in the install messages. Manually adjusting is now possible. For example:

# echo  22000 >    /sys/class/backlight/nvidia_backlight/brightness
# echo  44000  >   /sys/class/backlight/nvidia_backlight/brightness

# echo  50 > /sys/class/leds/smc::kbd_backlight/brightness
# echo  255 > /sys/class/leds/smc::kbd_backlight/brightness

I couldn't get the 'pommed' package to work, which is supposed to handle all the media keys. With 'xev' I verified that the keys were active without needing any mapping using  'xmodmap'. But since  they weren't bound to any particular action  I cobbled together a few scripts. They're crude so maybe someone with some actual bash skills can clean these up.

to allow non-root write access  to the  backlight and keyboard led devices I put this in in /etc/rc.local:

chmod go+w /sys/class/backlight/nvidia_backlight/brightness
chmod go+w /sys/class/leds/smc::kbd_backlight/brightness

In my desktopenvironment I bound the corresponding media keys to these scripts with 'up', 'down' or 'mute'  as arguments

mbp_keyboard_led.sh:

#!/bin/bash
LIGHTLEVEL=$(cat /sys/class/leds/smc::kbd_backlight/brightness)
LEVELDIFFERENCE=15
MAXVALUE=255
MINVALUE=0
if [ $LIGHTLEVEL -ge $MINVALUE ] && [ $LIGHTLEVEL -le $MAXVALUE ]
    then
    TOTAL=`expr $MAXVALUE`
    case $1 in
        up)
            TOTAL=`expr $LIGHTLEVEL + $LEVELDIFFERENCE`;;
        down)
            TOTAL=`expr $LIGHTLEVEL - $LEVELDIFFERENCE`;;
    esac
    if [ $TOTAL -ge $MINVALUE ] && [ $TOTAL -le $MAXVALUE ]
        then
        echo $TOTAL > /sys/class/leds/smc::kbd_backlight/brightness
    notify-send -i gtk-dialog-info.png -t 1000 "Keyboard led brightness:" "$TOTAL"
    else
    notify-send -i gtk-dialog-info.png -t 1000 "Keyboard led brightness:" "maximum"
        echo "New value out of range: $TOTAL";
    fi
else
    echo 'System light level out of min/max range (Hardware might not be matching script)';
fi

mbp_lcd_backlight.sh:

#!/bin/bash
LIGHTLEVEL=$(cat /sys/class/backlight/nvidia_backlight/brightness)
LEVELDIFFERENCE=400
MAXVALUE=44000
MINVALUE=0
if [ $LIGHTLEVEL -ge $MINVALUE ] && [ $LIGHTLEVEL -le $MAXVALUE ]
    then
    TOTAL=`expr $MAXVALUE`
    case $1 in
        up)
            TOTAL=`expr $LIGHTLEVEL + $LEVELDIFFERENCE`;;
        down)
            TOTAL=`expr $LIGHTLEVEL - $LEVELDIFFERENCE`;;
    esac
    if [ $TOTAL -ge $MINVALUE ] && [ $TOTAL -le $MAXVALUE ]
        then
        echo $TOTAL > /sys/class/backlight/nvidia_backlight/brightness
    notify-send -i gtk-dialog-info.png -t 1000 "Screen brightness:" "$TOTAL"
    else
    notify-send -i gtk-dialog-info.png -t 1000 "Screen brightness:" "maximum"
        echo "New value out of range: $TOTAL";
    fi
else
    echo 'System light level out of min/max range (Hardware might not be matching script)';
fi

mbp_sound_volume.sh:

#!/bin/bash

SOUNDLEVEL=`amixer get Master | grep dB | sed 's/.*\[\([0-9]\{1,3\}\)\%\].*/\1/'`
MUTED=`amixer get Master | grep dB | sed 's/.*\[\([a-z]\{2,3\}\)\].*/\1/'`
MINVALUE=0
MAXVALUE=96
LEVELDIFFERENCE=5

case $1 in
    up)
        if [ $SOUNDLEVEL -le $MAXVALUE ]
        then
            amixer set Master "$LEVELDIFFERENCE+" unmute
        fi;;
    down)
         if [ $SOUNDLEVEL -ge $MINVALUE ]
         then
            amixer set Master "$LEVELDIFFERENCE-" unmute
         fi;;
    mute)
        if [ "$MUTED" = on ]
        then
            amixer set Master mute
            notify-send -i gtk-dialog-info.png -t 1000 "Master sound volume:" "muted"
            exit 0
        else
            amixer set Master unmute
        fi;;
esac

SOUNDLEVEL=`amixer get Master | grep dB | sed 's/.*\[\([0-9]\{1,3\}\)\%\].*/\1/'`

notify-send -i gtk-dialog-info.png -t 1000 "Master sound volume:" "$SOUNDLEVEL %"

Last edited by rwd (2010-10-08 13:19:10)

Offline

Board footer

Powered by FluxBB