| View previous topic :: View next topic |
| Author |
Message |
dentifrice_ n00b

Joined: 22 Nov 2011 Posts: 5
|
Posted: Sat Dec 03, 2011 6:48 pm Post subject: |
|
|
| alvinwu wrote: |
Your post is very well organized..
|
Thanks. I'll try to add to it as I go. The lack of a resource compiling things that are scattered across the net is pretty discouraging, and I hope to remedy it a little.
| alvinwu wrote: |
Though I'm using early 2011 mbp8.2; things may varies...
|
So far, I've seen no notable difference with issues other people have had — except for the lack of function keys for backlight control and the rest, but I am still to spend time debugging that.
| alvinwu wrote: |
I suggest you apply the b43 patches, that SHOULD solve the sd-card problem.....
|
Wow. That did the trick. Thanks a bunch, I really wouldn't have thought! the BCM4331 and the SD card reader share the same IRQ (17), and thus the card reader cannot work if b43 hasn't been loaded beforehand. I must admit I'm quite puzzled by this, but as long as I can unload b43 (blacklisting brings IRQ17 shutdowns again), I'll be ok.
| alvinwu wrote: |
Also, kernel-3.2 already have that b43 in-place, and the signal strength code in-place as well.... Try that... |
I tried 3.2rc3, but was unable to get a working intel display (so that's a major setback), although the LVDS dual channel patch did apply. Some people ran into the same issue on ubuntuforums, so it's not just me. Would anyone kernel-savvy and into the i915 driver around here have a clue about the why and how? |
|
| Back to top |
|
 |
francescofavero Tux's lil' helper


Joined: 15 Jul 2005 Posts: 129 Location: Kongens Lyngby
|
Posted: Mon Dec 26, 2011 11:17 pm Post subject: almost all working |
|
|
Cool, thanks for the wonderful thread and also the dentifrice_'s blog.
I've applied the patch set to a 3.1.6 and everything is working but the screen back-lights.
The Keyboard backlight are working out of the box, just have to turn it on with the f5/f6 keys (note on a barebone GNOME 3.2 without any pommed or special settings installed).
There are even the on-screen things for the keyboard lights level. The other "fn" keys are perfect without any configuration (ok the launchpad and the mission control keys are not set...).
SD works out of the box.
Trackpad is too fast..but I've managed to have it acceptable tweaking xorg.conf
I didn't used rEFIT, but I just placed the grub.efi in a folder (in sda1) /EFI/boot/ named as BOOTX64.efi. This way I can boot directly in the grub menu:
at boot just keep pressed the Option key, until the boot menu appears. Select EFI boot and you will have the grub menu.
At the next boot the default will be boot on grub menu..to boot OSX you will have to press option and select OSX disk (it will change OSX back as default also)..and so on...
Only thing I have trouble on suspend my mac... The Bluetooth have serious issue to pair when the b43 modules is loaded (however my magic mouse sometime works sometime not...have to restart Bluetooth service manually or make some voodoo rite...).
I can't wait when I will have both radeon and intel working in the same kernel and able to switch.
I have a 3.2 rc6 with radeon to test Bluetooth/wifi coexistence but nothing changes. otherwise I use Intel (on 3.1.*)
good work!
my cflags:
CFLAGS="-O2 -march=corei7-avx -mtune=corei7-avx -pipe"
ps this laptop with gentoo (ops I have funtoo..however) is a sources eater... compiled webkit-gtk in 15 min vs core2-duo 2.4Ghz 1h and more.. yes I also have 8 cpu here!!!
I can even boot my old HD with my old macbook linux system via USB. (I put the old HD in a USB disk case). This might be useful for those that want to skip the partitionig of the main HD...using an external drive or a big USB stick. _________________ Play old NES on Facebook!! |
|
| Back to top |
|
 |
alvinwu n00b

Joined: 15 Feb 2008 Posts: 36
|
Posted: Tue Jan 24, 2012 5:34 pm Post subject: |
|
|
Read recent updates from the very long thread:
http://ubuntuforums.org/showthread.php?t=1695746&page=80
I'm glad to say running vanilla-sources-3.2.1 fixes most of the needs for a mbp 8,2 machine.
So, I like to sum up the steps so anyone who own these machines enjoys running open sources software with power!
1. apply the i915 reverse patch to enable i915_lvds_channels works:
| Quote: | | https://github.com/fooblahblah/linux-mainline-efi-lvds/blob/master/i915_reverse.patch |
2. apply those patches for apple_bl, apple_gmux, radeon_bioe as usual, to simply patching work, you may download those patches: | Quote: | | www.eternalit.com/~alvin/download/3.2 |
OK, now it's time to make that workable as my best tool.
1. Compile those radeon, i915 drivers as modules
2. Use the kernel command parameter as a reference point
3. Modify grub.cfg, reference to the 3.2.1 modules, blacklist either modules that you don't want
| Quote: |
menuentry 'GNU/Linux, with Linux x86_64-3.2.1 i915' --class gnu-linux --class gnu --class os {
load_video
set gfxpayload=keep
insmod gzio
insmod part_gpt
insmod ext2
set root='(hd0,gpt3)'
search --no-floppy --fs-uuid --set=root b3be74a4-938d-4a62-a062-952626e84212
echo 'Loading Linux x86_64-3.2.1 ...'
linux /boot/kernel-genkernel-x86_64-3.2.1 root=UUID=b3be74a4-938d-4a62-a062-952626e84212 ro quiet add_efi_memmap modprobe.blacklist=radeon real_init=/bin/systemd
echo 'Loading initial ramdisk ...'
initrd /boot/initramfs-genkernel-x86_64-3.2.1
}
menuentry 'GNU/Linux, with Linux x86_64-3.2.1 radeon' --class gnu-linux --class gnu --class os {
load_video
set gfxpayload=keep
insmod gzio
insmod part_gpt
insmod ext2
set root='(hd0,gpt3)'
search --no-floppy --fs-uuid --set=root b3be74a4-938d-4a62-a062-952626e84212
echo 'Loading Linux x86_64-3.2.1 ...'
linux /boot/kernel-genkernel-x86_64-3.2.1 root=UUID=b3be74a4-938d-4a62-a062-952626e84212 ro quiet add_efi_memmap modprobe.blacklist=i915 real_init=/bin/systemd
echo 'Loading initial ramdisk ...'
initrd /boot/initramfs-genkernel-x86_64-3.2.1
}
|
4. Create a igd-gpu program that switches the apple gpu gmux, contribute by:
| Quote: | | http://ubuntuforums.org/showthread.php?t=1695746&page=27 |
5. Create some local scripts (my setup in /usr/local/sbin)
local-xorg -> to modify contents inside /etc/X11/xorg.d/ to tailor the behavior of xorg server pulling drivers, according to the kernel command line parameter
| Quote: |
#!/bin/bash
#set -x
r_x_f="/etc/X11/xorg.conf.d/01-radeon-mbp82.conf"
cmdline=`dmesg|head|grep "Command line:"`
mpbl=`echo "$cmdline" | sed -e 's@^.*modprobe.blacklist=@@'`
# exit when no modprobe.blacklist for radeon or i915 in the kernel command line
[[ "$cmdline" == "$mpbl" ]] && exit
if [[ -n `echo $mpbl | grep i915` ]] ; then
cat <<EOF> $r_x_f
Section "Device"
Identifier "Card0"
Driver "radeon"
BusID "1:0:0"
Option "ColorTiling" "1"
Option "ForceLowPowerMode" "1"
EndSection
EOF
#wait
fi
if [[ -n `echo $mpbl | grep radeon` ]] ; then
[[ -f $r_x_f ]] && rm $r_x_f
/usr/local/sbin/igd-gpu
fi
exit
|
| Quote: |
#!/bin/bash
r_x_f="/etc/X11/xorg.conf.d/01-radeon-mbp82.conf"
[[ -f $r_x_f ]] && exit
/usr/local/sbin/igd-gpu
|
6. Create systemd.service units to control the operations
| Quote: |
[Unit]
Description=Local custom xorg conf base on kernel boot parm for radeon or i915 driver
After=sysinit.target
Before=multi-user.target
[Service]
Type=oneshot
ExecStart=/usr/local/sbin/local-xorg
[Install]
WantedBy=multi-user.target
|
7. It is very experimental, fine tunes are welcome
8, Suspend, resume under radeon is ok but not under i915
9. Most of the functions are working fine
Hope you enjoy, while under i915 environment, the machines works ~7 hours!
So, with a simple reboot, you can select external monitor support via radeon, or long battery life via i915.
Great works from ubuntu, gmae, archlinx,fedora, freedesktop,....experts!
BTW: suspend/resume under radeon working fine but not under i915 |
|
| Back to top |
|
 |
alvinwu n00b

Joined: 15 Feb 2008 Posts: 36
|
Posted: Wed Jan 25, 2012 1:49 am Post subject: |
|
|
| alvinwu wrote: | Read recent updates from the very long thread:
http://ubuntuforums.org/showthread.php?t=1695746&page=80
I'm glad to say running vanilla-sources-3.2.1 fixes most of the needs for a mbp 8,2 machine.
So, I like to sum up the steps so anyone who own these machines enjoys running open sources software with power!
1. apply the i915 reverse patch to enable i915_lvds_channels works:
| Quote: | | https://github.com/fooblahblah/linux-mainline-efi-lvds/blob/master/i915_reverse.patch |
2. apply those patches for apple_bl, apple_gmux, radeon_bioe as usual, to simply patching work, you may download those patches: | Quote: | | www.eternalit.com/~alvin/download/3.2 |
OK, now it's time to make that workable as my best tool.
1. Compile those radeon, i915 drivers as modules
2. Use the kernel command parameter as a reference point
3. Modify grub.cfg, reference to the 3.2.1 modules, blacklist either modules that you don't want
| Quote: |
menuentry 'GNU/Linux, with Linux x86_64-3.2.1 i915' --class gnu-linux --class gnu --class os {
load_video
set gfxpayload=keep
insmod gzio
insmod part_gpt
insmod ext2
set root='(hd0,gpt3)'
search --no-floppy --fs-uuid --set=root b3be74a4-938d-4a62-a062-952626e84212
echo 'Loading Linux x86_64-3.2.1 ...'
linux /boot/kernel-genkernel-x86_64-3.2.1 root=UUID=b3be74a4-938d-4a62-a062-952626e84212 ro quiet add_efi_memmap modprobe.blacklist=radeon real_init=/bin/systemd
echo 'Loading initial ramdisk ...'
initrd /boot/initramfs-genkernel-x86_64-3.2.1
}
menuentry 'GNU/Linux, with Linux x86_64-3.2.1 radeon' --class gnu-linux --class gnu --class os {
load_video
set gfxpayload=keep
insmod gzio
insmod part_gpt
insmod ext2
set root='(hd0,gpt3)'
search --no-floppy --fs-uuid --set=root b3be74a4-938d-4a62-a062-952626e84212
echo 'Loading Linux x86_64-3.2.1 ...'
linux /boot/kernel-genkernel-x86_64-3.2.1 root=UUID=b3be74a4-938d-4a62-a062-952626e84212 ro quiet add_efi_memmap modprobe.blacklist=i915 real_init=/bin/systemd
echo 'Loading initial ramdisk ...'
initrd /boot/initramfs-genkernel-x86_64-3.2.1
}
|
4. Create a igd-gpu program that switches the apple gpu gmux, contribute by:
| Quote: | | http://ubuntuforums.org/showthread.php?t=1695746&page=27 |
5. Create some local scripts (my setup in /usr/local/sbin)
local-xorg -> to modify contents inside /etc/X11/xorg.d/ to tailor the behavior of xorg server pulling drivers, according to the kernel command line parameter
| Quote: |
#!/bin/bash
#set -x
r_x_f="/etc/X11/xorg.conf.d/01-radeon-mbp82.conf"
cmdline=`dmesg|head|grep "Command line:"`
mpbl=`echo "$cmdline" | sed -e 's@^.*modprobe.blacklist=@@'`
# exit when no modprobe.blacklist for radeon or i915 in the kernel command line
[[ "$cmdline" == "$mpbl" ]] && exit
if [[ -n `echo $mpbl | grep i915` ]] ; then
cat <<EOF> $r_x_f
Section "Device"
Identifier "Card0"
Driver "radeon"
BusID "1:0:0"
Option "ColorTiling" "1"
Option "ForceLowPowerMode" "1"
EndSection
EOF
#wait
fi
if [[ -n `echo $mpbl | grep radeon` ]] ; then
[[ -f $r_x_f ]] && rm $r_x_f
/usr/local/sbin/igd-gpu
fi
exit
|
| Quote: |
#!/bin/bash
r_x_f="/etc/X11/xorg.conf.d/01-radeon-mbp82.conf"
[[ -f $r_x_f ]] && exit
/usr/local/sbin/igd-gpu
|
6. Create systemd.service units to control the operations
| Quote: |
[Unit]
Description=Local custom xorg conf base on kernel boot parm for radeon or i915 driver
##After=sysinit.target
Before=multi-user.target
DefaultDependencies=false
[Service]
Type=oneshot
ExecStart=/usr/local/sbin/local-xorg
[Install]
WantedBy=multi-user.target
|
7. It is very experimental, fine tunes are welcome
8, Suspend, resume under radeon is ok but not under i915
9. Most of the functions are working fine
Hope you enjoy, while under i915 environment, the machines works ~7 hours!
So, with a simple reboot, you can select external monitor support via radeon, or long battery life via i915.
Great works from ubuntu, gmae, archlinx,fedora, freedesktop,....experts!
BTW: suspend/resume under radeon working fine but not under i915 |
|
|
| Back to top |
|
 |
alvinwu n00b

Joined: 15 Feb 2008 Posts: 36
|
Posted: Thu Jan 26, 2012 6:12 am Post subject: |
|
|
Since I encounter occasional kernel panic while bootup with i915, I change a little bit about the setup to make it easier (not 100%) to boot successfully:
Add i915 (together with radeon) to the blacklist kernel command line if you want to boot with it:
| Quote: |
linux /boot/kernel-genkernel-x86_64-3.2.1 root=UUID=b3be74a4-938d-4a62-a062-952626e84212 ro quiet add_efi_memmap modprobe.blacklist=i915,radeon real_init=/bin/systemd |
Modify the service parm as:
| Quote: |
[Unit]
Description=Local custom xorg conf base on kernel boot parm for radeon or i915 driver
Requires=basic.target
After=basic.target
Before=default.target
[Service]
Type=oneshot
ExecStart=/usr/local/sbin/local-xorg
[Install]
WantedBy=multi-user.target |
Replace /usr/local/sbin/local-xorg by the following script:
| Quote: |
#!/bin/bash
#set -x
r_x_f="/etc/X11/xorg.conf.d/01-radeon-mbp82.conf"
cmdline=`dmesg|head|grep "Command line:"`
mpbl=`echo "$cmdline" | sed -e 's@^.*modprobe.blacklist=@@'`
# exit when no modprobe.blacklist for radeon or i915 in the kernel command line
[[ "$cmdline" == "$mpbl" ]] && exit
mpbl=`echo "$mpbl" | sed -e 's@[ \t].*$@@'`
if [[ "$mpbl" =~ 'radeon' ]] && [[ "$mpbl" =~ 'i915' ]] ; then
[[ -f $r_x_f ]] && rm $r_x_f
/usr/local/sbin/igd-gpu
modprobe i915
exit
else
if [[ "$mpbl" =~ 'i915' ]] ; then
cat <<EOF> $r_x_f
Section "Device"
Identifier "Card0"
Driver "radeon"
BusID "1:0:0"
Option "ColorTiling" "1"
Option "ForceLowPowerMode" "1"
EndSection
EOF
exit
else
if [[ "$mpbl" =~ 'radeon' ]] ; then
[[ -f $r_x_f ]] && rm $r_x_f
/usr/local/sbin/igd-gpu
exit
fi
fi
fi
exit
|
|
|
| Back to top |
|
 |
alvinwu n00b

Joined: 15 Feb 2008 Posts: 36
|
Posted: Fri Jan 27, 2012 10:59 am Post subject: |
|
|
I change the service parm as below to make it more reliable:
| Quote: |
[Unit]
Description=Local custom xorg conf base on kernel boot parm for radeon or i915 driver
Requires=basic.target
After=basic.target
After=multi-user.target
[Service]
Type=oneshot
ExecStart=/usr/local/sbin/local-xorg
[Install]
WantedBy=multi-user.target
|
|
|
| Back to top |
|
 |
alvinwu n00b

Joined: 15 Feb 2008 Posts: 36
|
Posted: Mon Mar 26, 2012 7:22 pm Post subject: |
|
|
Upon recent update to systemd-43, I had to modify the custom unit file as below:
| Code: |
[Unit]
Description=Local custom xorg conf base on kernel boot parm for radeon or i915 driver
Before=graphical.target
[Service]
Type=oneshot
ExecStart=/usr/local/sbin/local-xorg
[Install]
WantedBy=multi-user.target
|
And I found previous script was a bit messy, I re-post:
| Code: |
#!/bin/bash
#set -x
r_x_f="/etc/X11/xorg.conf.d/01-radeon-mbp82.conf"
cmdline=`dmesg|head|grep "Command line:"`
mpbl=`echo "$cmdline" | sed -e 's@^.*modprobe.blacklist=@@'`
# exit when no modprobe.blacklist for radeon or i915 in the kernel command line
[[ "$cmdline" == "$mpbl" ]] && exit
mpbl=`echo "$mpbl" | sed -e 's@[ \t].*$@@'`
if [[ "$mpbl" =~ 'radeon' ]] && [[ "$mpbl" =~ 'i915' ]] ; then
[[ -f $r_x_f ]] && rm $r_x_f
/usr/local/sbin/igd-gpu
# modprbe apple_bl
modprobe i915
exit
else
if [[ "$mpbl" =~ 'i915' ]] ; then
[[ -f "$r_x_f" ]] && exit
cat <<EOF> $r_x_f
Section "Device"
Identifier "Card0"
Driver "radeon"
BusID "1:0:0"
Option "ColorTiling" "1"
Option "ForceLowPowerMode" "1"
EndSection
EOF
exit
else
if [[ "$mpbl" =~ 'radeon' ]] ; then
[[ -f $r_x_f ]] && rm $r_x_f
/usr/local/sbin/igd-gpu
exit
fi
fi
fi
exit
|
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|