You are not logged in.

#76 2015-07-20 10:22:28

hungerfish
Member
Registered: 2009-09-13
Posts: 254

Re: Macbook Pro 7.1 (mid 2010), nvidia blob,efi and hybrid mbr,gpt

I haven't used the wireless since going to 4.1 but I'll give it a try later. I've never tried with the broadcom-wl, but I know from days past that using b43 has always been kind of a hassle.
It frequently lost connections, or degraded in performance, and no amount of fiddling seem to really help. I hope(d) that after 4.0 it would be working better, because the devs cleaned up the b43 driver, but I haven't done any extensive testing lately, because I just use ethernet when at home these days.
I'll give it a whirl later, meanwhile, try the other driver, maybe you'll be lucky and it will just work.

Sidenote: If you are running in efi mode, maybe going back to csm could yield an improvement.
I'm not really satisfied with the mbp's 'behaviour' when running linux in efi mode, despite the 'gains' we've made here...


Beetles and bacteria are vastly more successful than humans in terms of survival.

Offline

#77 2015-07-20 14:03:14

boterock
Member
Registered: 2015-07-19
Posts: 3

Re: Macbook Pro 7.1 (mid 2010), nvidia blob,efi and hybrid mbr,gpt

I don't need dual boot (i'm only running arch) so I don't need CSM-mode if I understand correctly.
So I could just run arch in BIOS and would be ok? I installed in EFI-mode because I remember running windows with bootcamp did not have any power management (never tried running windows only, with the disk as mbr, but i imagine it would be no different) and the pc was always running hot and with poor battery life
I wanted power management so I thought EFI was the way to go
If installing bios-only works better, and has power management, I don't have really any reason to keep using EFI

Offline

#78 2015-07-21 07:27:20

hungerfish
Member
Registered: 2009-09-13
Posts: 254

Re: Macbook Pro 7.1 (mid 2010), nvidia blob,efi and hybrid mbr,gpt

So first off, running '4.1.2-2-ARCH' with the b43 driver gives me a working wireless setup after boot. No need for the 'suspend->resume-cycle'.
I don't have anything  configured for this to work (I think), and this holds true for both efi- and csm-modes.

I'm sadly still having the same connectivity problems that I've always had using this driver, so during my 'extensive testing'(in efi-mode) consisting of about 30min of browsing and watching a youtube video (1080 & 720*see below) I got to about half-time before the connection 'brakes'(it does not disconnect). I could however, just reconnect/reset the connection and continue browsing.
I am using the b43-firmware by the way.

I don't need dual boot (i'm only running arch) so I don't need CSM-mode if I understand correctly.

In an ideal world, you would never need csm-mode on an efi system (like the mbp) and the 'ugly hacks'(hybrid mbr) that go along with it.
But Apple implemented it the way they did (on the mbp7.1), presumably because of better support for windows 7 (only later windows versions 'properly' support efi).

Up until recently, you had to do csm-mode when running linux to get the proprietary nvidia driver to work at all.
Thanks to fumfi we now have a way of getting the nvidia blob to work when booting in efi-mode, so using csm/efi-modes doesn't really depend on you having a dualboot setup at all.

I wanted power management so I thought EFI was the way to go

I don't know about power-management problems specific to csm-mode, if anything I've found the mbp's 'behaviour' as alluded to in my earlier post slightly better performance/power/thermal wise (subjective!). So you could try csm-mode and see if you get better results. Note that you will need to probably change your partition table(refer to wiki) so make backups! smile

*note: As mentioned, my 'testing' included watching youtube vids. I've noticed that when in efi-mode, I can forget about 1080 as 'accelerated video rendering' is disabled according to youtube's flashplayer. The same video, while in csm-mode works fine in 1080. So maybe another reason to just stick with csm-mode?

** I've written this post whilst in csm-mode and I've been connected via wifi for well over 30mins, so maybe the connectivity is also better...


Beetles and bacteria are vastly more successful than humans in terms of survival.

Offline

#79 2015-07-21 13:14:32

boterock
Member
Registered: 2015-07-19
Posts: 3

Re: Macbook Pro 7.1 (mid 2010), nvidia blob,efi and hybrid mbr,gpt

okay I understand, I confused csm-mode with hybrid-mbr, csm-mode is bios-booting, while the other is bios-booting with gpt...
I've been watching videos fine with my efi installation (using html5 player, seen no issues)
anyway I will try csm-mode, its too bad that efi does not work well... I hope that solves all my issues
thank you again smile

Offline

#80 2015-07-21 18:28:02

JohnWinkerbelt
Member
Registered: 2013-04-28
Posts: 17

Re: Macbook Pro 7.1 (mid 2010), nvidia blob,efi and hybrid mbr,gpt

Hey there again, it's nice to see that a solution has shown up about this problem, so to carry on the post, on my old Arch with CSM it were always broadcom-wl. Are there technical benefits in using the b43 or brcm80211 driver? Except that the first one is reverse engineered and the second one opensourced? I once saw my friend installed the b43 driver in the past, but he had a lot of trouble getting it to work properly. That scared me somehow.

A big thumbs up for otonvm hinting to this solution, it was a rough way to go.. only because of two settings apparently..

About the CSM-mode, just like hungerfish mentioned, it is "nasty", "ugly" and "not even standard", but it works. With this, you can use MacOS, which only uses the GUID Partition Table (gpt) and another OS, which only works with the master boot record (mbr).
This hybrid-mbr is created by making a normal gpt table and partition, then forcefully write an mbr table (with same information of the gpt partitions) into the header. Voilà, there you have a "pimped" gpt partition with mbr header (hybrid-mbr), which can be read by both EFI and BIOS systems. Naturally, you have to redo these steps, if you changed the partitioning.

Now back to the EFI-mode and its little nice detail, the nvidia graphics clock is even lower than it was in CSM-mode (~240 Mhz vs. ~101 MHz). It seems that due the pure efi mode, the API to control the clocking finally works properly. Maybe now, the overclocking works too?
After measuring the system with powertop, I conclude the EFI-mode even consumes about ~15% less power than the CSM-mode. Of course, no real and complex measure tools are used here.

About the lack of youtube acceleration with flash, which hungerfish has to fight with, assuming you have everything about vdpau installed, this is something you should try:

sudo mkdir /etc/adobe
sudo echo -e "EnableLinuxHWVideoDecode = 1\nOverrideGPUValidation = 1" | sudo tee /etc/adobe/mms.cfg

After creating the config and setting the important parameters, reload the page or restart firefox, look at the "nerd stats" of the flashplayer or the stats in the nvidia-settings, if it finally accelerate properly with gpu.

That's all for now.

Last edited by JohnWinkerbelt (2015-07-25 19:03:24)


Depending on how you change a running system, it can break or gets better.

Offline

#81 2015-07-22 11:26:51

otonvm
Member
From: Italy
Registered: 2013-05-24
Posts: 11

Re: Macbook Pro 7.1 (mid 2010), nvidia blob,efi and hybrid mbr,gpt

boterock wrote:

Hello, hope you are still here.

A little time ago (like a month) I started using arch with gnome, after using ubuntu (and hating unity) for like 3 months.
I thought trying arch would be a great way to learn about arch (and it surely has been).

Your guide (hungerfish and fumfi) has been a great help and I also have my macbook with arch with nvidia drivers. Thank you very much for that smile
The only issue I have left is the wireless, requiring to close and open the lid to work.

I think this also has others issues behind, because the wireless is very unstable, today I was trying to get steam home streaming to work, and even setting it in the lowest bitrate did not work, jumping between 3mbit and 200kbit every 20 seconds or so..

you say that the 4.0.1-ARCH kernel seems to work, but I have  4.1.2-2-ARCH and it does not work. I don't know what could be happening.

I installed the b43 driver following the instructions here https://wiki.archlinux.org/index.php/Broadcom_wireless, installing AUR: b43-firmware, is that the one you are using too?
I don't know what else it could be, any help would be appreciated.

Thank you again for your help

Hello!
I don't know about the others but I'm still resisting.
I've been using arch exclusively for a month now, almost since the new grub/efi hacks were discovered.

Unfortunately wifi is a moving target. First only wl drivers worked, now only b43 drivers work and not too well as you suggested.
It's "ok" for small stuff but at home I'm using a usb stick from Tp-link, the TL-WN722N which loads the atheros drivers that should be compatible and stable.
And it's allright but I still get random disconnects from time to time, just rarely.

So yeah... Get a long ethernet cable? smile

Still, even with these problems, I'm happier with arch+gnome on my old laptop than I was with MacOS that recently became virtually unusable.

Oh, and get libinput set up for the touchpad, it's great!

Good luck!

Offline

#82 2015-08-28 13:54:00

markus21
Member
Registered: 2015-08-28
Posts: 26

Re: Macbook Pro 7.1 (mid 2010), nvidia blob,efi and hybrid mbr,gpt

Hey there!

I just wanted to migrate to Linux / Arch again. Last time I've installed it was back in 2011 with refit and legacy grub.
Now I finally got systemd-boot to start Arch in EFI mode but the proprietary nvidia driver obviously won't work.

The wiki entry to the macbook 7,1 metions the ability to a) use a special grub parameter or b) use a udev script as a workaround.

"Running the drivers in efi-mode requires setting some PCI registers before the kernel modules get loaded, preferably using a udev hook or GRUB script."

Reading this thread I only found the grub solution. So I was wondering how a udev script could look like to get the same effect with systemd-boot...
I could not find anything about this...

Thanks for advise!

* I created a new thread, because I mostly would like to know how to issue the setpci command during a systemd-boot process: https://bbs.archlinux.org/viewtopic.php … 0#p1557330

Last edited by markus21 (2015-08-29 07:34:05)

Offline

#83 2015-08-29 08:38:26

hungerfish
Member
Registered: 2009-09-13
Posts: 254

Re: Macbook Pro 7.1 (mid 2010), nvidia blob,efi and hybrid mbr,gpt

While I'm not saying that this isn't possible 'somehow' without using grub, I really don't understand why you don't just use grub!? Grub in efi mode is just another *.efi binary, which you can use to issue the setpci commands, then load the kernel - or if you so choose another *.efi binary, like systemd-boot. I myself looked around for a non-grub solution and came up empty. I don't know what the wiki is referring to as all my attempts to call the setpci commands 'after' loading the kernel didn't work. Maybe save yourself some time wink

On the other hand, if you figure this one out, be sure to tell us how!


Beetles and bacteria are vastly more successful than humans in terms of survival.

Offline

#84 2015-08-29 08:57:47

markus21
Member
Registered: 2015-08-28
Posts: 26

Re: Macbook Pro 7.1 (mid 2010), nvidia blob,efi and hybrid mbr,gpt

Well right now, I wished I would have installed grub2 in the first place. I wasn't really aware of this problem before I tried out systemd-boot.
I thought systemd-boot is the best way to go, since i only need arch to boot and nothing else... So i thought it would be faster, too.

But as you pointed out grub seems to make more sense here...

BTW: braodcom-wl-dkms from aur works just fine for me, including 5GHz support... Looks like there was an update to the wl driver, so it works again with 4.x kernel

Last edited by markus21 (2015-08-29 10:06:10)

Offline

#85 2015-09-01 22:34:47

fumfi
Member
Registered: 2015-04-24
Posts: 13

Re: Macbook Pro 7.1 (mid 2010), nvidia blob,efi and hybrid mbr,gpt

hungerfish wrote:

I don't know what the wiki is referring to as all my attempts to call the setpci commands 'after' loading the kernel didn't work.

I added this udev idea to the wiki because you're right: after loading the kernel, to be more specific, after loading the nvidia kernel module, it might be too late for setting the registers. Even more if systemd is involved with its parallelized boot which might run X too early. So my thought was actually towards creating a udev rule that hooks into the PCI subsystem on the PCI bridge and graphics device ids that (1) issues the setpci commands and (2) modprobes the nvidia module. That way (hypothetically), The X driver would wait for the kernel module and udev ensures that the setpci commands are executed first. So there would be a resolution of the grub dependency and make it a more generic solution.

But to be honest, I never tried this out. And meanwhile, I have sold that mbp 7,1 and replaced it with a 2015 air which btw boots fine from an SDXC in pure EFI. It has other issues with the Intel driver, though... roll lol

Offline

#86 2016-01-09 23:53:20

sleeping
Member
Registered: 2016-01-09
Posts: 35

Re: Macbook Pro 7.1 (mid 2010), nvidia blob,efi and hybrid mbr,gpt

Thank you for all your efforts to make people able to use their MacBooks with a more worthy operating system.
In my case, I tried to install Darwin Debian, Xubuntu, Linux Mint; in all cases I was able to set the correct PCI like explained here, but unfortunetely, x-org still was unable to load the NVIDIA module.

In the hope that Arch would offer me more flexibility, I decided to give it a last shot.
However, unlike the Darwin-based distros, Arch (obviously) does not install grub by default.
My question is if I can install GRUB alongside with refind, so that I can select GRUB from refind...
If so, where should I install grub?

Any help is greatly appreciated.

Last edited by sleeping (2016-02-06 19:16:40)

Offline

#87 2016-01-11 13:44:39

hungerfish
Member
Registered: 2009-09-13
Posts: 254

Re: Macbook Pro 7.1 (mid 2010), nvidia blob,efi and hybrid mbr,gpt

My question is if I can install GRUB alongside with refind, so that I can select GRUB from refind...

To answer your question, yes, yes you can! big_smile
Once you have REFIND installed it should automatically find grub on your disk if its installed.
This assumes you already have a working system though, but since you don't provide any details about your system/setup its not really possible to assist you more specifically.
Also, I'm pretty certain you meant 'Debian', not 'Darwin' wink


Beetles and bacteria are vastly more successful than humans in terms of survival.

Offline

#88 2019-02-27 00:08:52

besworks
Member
Registered: 2019-02-26
Posts: 1

Re: Macbook Pro 7.1 (mid 2010), nvidia blob,efi and hybrid mbr,gpt

I know this thread (and this hardware) is kind of old but hopefully this helps somebody out there.

I managed to get the proprietary Nvidia drivers to work using rEFInd without GRUB by setting the PCI registers and booting via an EFI shell script like this:

mm 04000004 1 ;PCI :7
mm 0017003E 1 ;PCI :8
fs1:\linux.efi root=PARTUUID=27f79559-272a-e340-99fd-0c3ad19e53b2 rw initrd=/initramfs-linux.img

You might need to change fs1:\ to point to your /boot partition depending on your partition table layout.

linux.efi is a symlink that I created pointing to vmlinuz-linux because the shell won't run any executable that doesn't end in a .efi extension.

You need to specify your unique PARTUUID of your root partition.

Save the script to the root of your ESP partition as macbook-arch.nsh

Download the v1 uefi shell binary and put it in refind's tools_x64 directory.

Then add a boot entry to your refind.conf like so (assuming fs0 is your ESP) :

menuentry "Arch" {
        icon /EFI/refind/icons/os_arch.png
        loader /EFI/refind/tools_x64/shell.efi
        options "fs0:\macbook-arch.nsh"
}

Offline

#89 2019-06-07 05:48:48

robopepe
Member
Registered: 2018-08-06
Posts: 2

Re: Macbook Pro 7.1 (mid 2010), nvidia blob,efi and hybrid mbr,gpt

besworks wrote:

I know this thread (and this hardware) is kind of old but hopefully this helps somebody out there.

Thank you so much for posting this! This got my 3d acceleration working on the Geforce 320M (mac mini) in arch. Nouveau wouldn't work so the nvidia blob using this method was my only option. You legend. The only thing I did differently was get the v1 efi shell from the arch install media (location found from checking the arch wiki:

https://wiki.archlinux.org/index.php/Un … UEFI_Shell

Last edited by robopepe (2019-06-07 05:52:38)

Offline

Board footer

Powered by FluxBB