My Linux Mint 17.1 Cinnamon 2009 Macbook Experience

Write tutorials for Linux Mint here
More tutorials on https://github.com/orgs/linuxmint/discu ... /tutorials and (archive) on https://community.linuxmint.com/tutorial
Forum rules
Don't add support questions to tutorials; start your own topic in the appropriate sub-forum instead. Before you post read forum rules
Post Reply
DarkDaedelus
Level 1
Level 1
Posts: 8
Joined: Fri Dec 19, 2014 8:56 pm

My Linux Mint 17.1 Cinnamon 2009 Macbook Experience

Post by DarkDaedelus »

Hello there Linux Mint Forum people,

I'm an avid reader here and have found an answer to previous problems here repeatedly, now I have
finally decided to actually join and tell you my story about my experience with Linux Mint 17.1 Cinnamon, on a MacBook 2009 early model no less (slightly advanced people think: ‘oh oh.. problems ahead), and they’re right. But hey, I like a challenge so here goes:

This being a few of my first things I do within Linux (only have only basic knowledge of Linux so far), I decided to write this, both as a documentation for myself as for other people having the same transtional problems, and as a bit of entertainment :mrgreen: .

Now, at this moment my laptop is running a dual boot of Linux Mint 17.1 Cinnamon and Windows 7, that's right, no mac partition anymore (note1: yeah, I found out this would indeed bite me in the rear a few hours later today, but oh well).

Okay, so first up, what I did was running all the updates; quite simple, just run the next bit a few times, until it's up to date:

Code: Select all

User@Laptop ~ $ sudo apt-get update
(give your password)
User@Laptop ~ $ sudo apt-get upgrade
Afterwards it's checkable by running "Driver Manager" I found this in the start menu later today.

Next, the wireless driver. I have had a few problems with this one in the past, so I had learned how to "make" a new wireless driver. What are those steps you say, well I'll even write them down:

Since it's a macbook, it's using a Broadcom driver. And there is an official download available for that (which you can download using another system and usb devices, or using a network cable. I did the latter).

I downloaded the 64-bit driver and readme files here: http://www.broadcom.com/support/802.11/linux_sta.php

The readme was very useful actually, so I was pleased with that, however it contained a whole lot more information than I needed, so here is a shrunk down version;

First of all you create a directory, change into that directory and then untar the file. There are 2 easy ways to untar, either you type in "tar xzf " and follow up with the '
' key to self-complete or you typ in “tar xzf” and drag the file into the terminal (so you don’t have to type location+name. For me the following was shown:

Code: Select all

User@Laptop ~ $ mkdir hybrid_wl
User@Laptop ~ $ cd hybrid_wl
User@Laptop ~ $ tar xzf 'home/User/Desktop/hybrid-v35_64-nodebug-pcoem-portsrc.tar.gz'
I could now find the files in "Home" (because "~ $" was visible). Next I have to make build it as a Linux loadable kernel module:

Code: Select all

User@Laptop ~ $ make
After this I will found the file "wl.ko" in the hybrid_wl directory (as it stated in the readme).

Since I have a fresh install, the following needs to be done. Remove any broadcom drivers, and "blacklist" them, the "ls" rule will display all items, the "rmmod" will remove them:

Code: Select all

User@Laptop ~ $ lsmod | grep "brcmsmac\|b43\|ssb\|bcma\|wl"
User@Laptop ~ $ rmmod b43
User@Laptop ~ $ rmmod brcmsmac
User@Laptop ~ $ rmmod ssb
User@Laptop ~ $ rmmod bcma
User@Laptop ~ $ wl
Now I will blacklist them:

Code: Select all

User@Laptop ~ $ echo "blacklist ssb" >> /etc/modprobe.d/blacklist.conf
User@Laptop ~ $ echo "blacklist bcma" >> /etc/modprobe.d/blacklist.conf
User@Laptop ~ $ echo "blacklist b43" >> /etc/modprobe.d/blacklist.conf
User@Laptop ~ $ echo "blacklist brcmsmac" >> /etc/modprobe.d/blacklist.conf
Next I will insert the module, (readme said something about a security module if you don't insmod):

Code: Select all

User@Laptop ~ $ modprobe lib80211
User@Laptop ~ $ modprobe cfg80211
User@Laptop ~ $ insmod wl.ko
Now it should be working, and I should have probably tested it, but since I did this part before I knew the readme wasn’t lying and I want it to work after a (re)boot too:

Code: Select all

User@Laptop ~ $ uname -r
User@Laptop ~ $ cp wl.ko /lib/modules/[text above]/kernel/drivers/net/wireless
User@Laptop ~ $ depmod -a

User@Laptop ~ $ echo modprobe wl >> etc/rc.local
Boom! Working wireless.
DarkDaedelus
Level 1
Level 1
Posts: 8
Joined: Fri Dec 19, 2014 8:56 pm

Re: My Linux Mint 17.1 Cinnamon 2009 Macbook Experience

Post by DarkDaedelus »

In the previous post, I updated my installation of Linux Mint and got my Wireless working.
However while looking up a few things, I came across a website “10 things to do first in Linux Mint 17.1 Cinnamon”
(for more of the steps, please read here, it was very detailed about the things you need to do:
https://sites.google.com/site/easylinux ... amon-first )

So I ended up doing a few of those too, Apply all the updates, well I did that, but I didn’t improve or changed the update manager, neither did I enable security updates for level 4 and/or 5. Having this laptop will be going to be hard enough as is, and don’t want any strange updates causing harm I can’t fix (yet). And apparently it’s a good thing too, I had a laptop, with Broadcom, from before 2010 and something about “better not to update”, great. Good thing I didn’t do that then :D

The update interval I thought was too soon as it is, it was every 30 minutes or so I believe. Why would I want it that quick. The Windows Updates annoyed me enough and to think about it I don’t even check my email that often. So yeah, that was a good one, And changed that to 1 day

Then it said something about installing kernel updates. I didn’t really know what that meant, so took a peek. According to the man (or woman) only to “look for the latest 3.13.x kernels, because older versions are of no use”. So yeah, I was running -37, and now 43 was available. I thought that was a change big enough, so I installed it. After a reboot I didn’t really notice anything different though. Apart from some text while loading being bigger? Oh well.

Installing missing drivers? Ohw, right, so I would want “nvidia-current” then? It did say that that one was recommended in the Driver Manager. Right, might as well install that, and so I did using the Driver Manager (it actually worked! It didn’t in Mint 13). I’m hoping that was the last of updates I needed, and went for another reboot.

Oh wait, should have known to read before I act, now I read that “decreasing the Swap” was important. This I could understand, and it was easy enough too. Yay!

so the next line gave me “60” as the page said:

Code: Select all

 User@Laptop ~ $ cat /proc/sys/vm/swappiness
so I installed “gksu” and “leafpad” (I know there already was “Text Edit” but I liked LeafPad, so I installed it)

Code: Select all

 User@Laptop ~ $ sudo apt-get install gksu leafpad
after this I opened /etc/sysctl.conf using:

Code: Select all

 User@Laptop ~ $ gksudo leafpad /etc/sysctl.conf
I added the text it mentioned:
#Decrease swap usage to a more reasonable level
vm.swappiness=10
and proceeded to save and closed it.

Then it said “Turn on the firewall”, and I thought hey, that’s a good one, being in IT and all.I saw it was easy to turn it on too, so I did using:

Code: Select all

 User@Laptop ~ $ sudo ufw status verbose
So far so good really, I had to shut down my laptop for now, but something small was bugging me still. As I was paying attention to the boot messages earlier, checking for differences, I saw a message about the iSight camera. It appears it wasn’t loaded. So I looked that up. I found you could test your webcam using “Cheese” so I installed cheese using:

Code: Select all

 User@Laptop ~ $ sudo apt-get install cheese 
After installing I started it by putting “cheese” in the terminal:

Code: Select all

 User@Laptop ~ $ cheese
Well, unfortunately it really wasn’t working. Using a special list thingy:

Code: Select all

 User@Laptop ~ $  lsusb
I found out that the module wasn’t loaded. Apparently I needed a file from my Mac Partition, no. wait what? really? I don’t have that anymore.. Well Shucks. So I took my Mac DVD and found that wasn’t good enough, but didn’t want to install Mac OS X on my laptop again. So I started looking for alternatives. There were a few fake downloads for it, and a few shady ones too, so didn’t do that. However seeing as I had a dvd, I tried giving it a go on my VMWare on windows, knowing full well VMWare doesn’t support it. So that gave me a fair share of trouble, so I decided to ditch that. I decided to look for a download once more, seeing as I have a Macbook, and I do have the legitimate DVD too, there wasn’t anything I was doing wrong here. So I downloaded it from a not so shady website and got on with it. Using “Synaptic Package Manager” I searched for the package “isight-firmware-tools” and installed this with the package manager. During this installation I skipped the auto-unpacking from the driver, since I had to copy it to my laptop first, and continue to install it. After putting the package on my desktop I extracted it with the terminal and added it with modprobe:

Code: Select all

User@Laptop ~ $ sudo ift-extract –a ‘/home/User/Desktop/AppleUSBVideoSupport’
User@Laptop ~ $ modprobe uvcvideo
after this I gave the laptop another reboot. It worked! Not that I’m going to use it very much. But it works!
Last edited by DarkDaedelus on Tue Dec 23, 2014 12:17 am, edited 3 times in total.
DarkDaedelus
Level 1
Level 1
Posts: 8
Joined: Fri Dec 19, 2014 8:56 pm

Re: My Linux Mint 17.1 Cinnamon 2009 Macbook Experience

Post by DarkDaedelus »

In the previous post, I updated my installation of Linux Mint a bit more, firewall, isight. Things were smoothing out quite a bit:

For now I’ve:
  • - Fixed the wifi (at home, not tested at different location yet (or tkip for that matter))
    - Turned on the firewall (I’m in IT, should be an example :mrgreen:
    - Fixed the driver for the iSight camera
    - Installed the “right” nvidia driver
    - Shutting down was no problem (this was a problem on linux mint 13 before, so mentionable)
There were a few things I noticed though:
My USB Mouse was not responding when I booted my laptop (unplug, plug works though)

And what’s more, the dim-the-screen-buttons didn’t react anymore. Wut.

Okay, so trying to use the nvidia driver + the buttons, I did a little research, and came across a help topic somebody else posted (on a different forum) and since it ‘worked’, I added it below:

First, I checked if it were true what they said:

Code: Select all

User@Laptop ~ $ ls /sys/class/backlight/*/brightness
this came up with:
“apple_backlight”, so I filled that in:

Code: Select all

User@Laptop ~ $ cat /sys/class/backlight/apple_backlight/brightness
and this returned “15”. I changed into the apple_backlight directory using:

Code: Select all

User@Laptop ~ $ cd /sys/class/backlight/apple_backlight
there I checked:

Code: Select all

User@Laptop ~ $ sudo max_brightness
this gave me “15”, so that was alright.
So the next bit was to try:

Code: Select all

User@Laptop ~ $ echo 5 | sudo tee /sys/class/backlight/apple_backlight/brightness
And behold! It dimmed, so that was still working. Good. Glad I used “5” and not “0”, that would’ve been a laugh.. After that, there was a line that “could get my button working again”, it said I had to “make a file” in some strange directory called the xorg.conf.d directory. I looked it up a bit and found more entries and more people having trouble with it. It wasn’t very clear what to do apart from “create a file”. Looking it up, I found different directories but that was due to different linux versions. So what’s more to do than try? So again I did it:

Code: Select all

User@Laptop ~ $ sudo gedit /usr/share/X11/xorg.conf.d/10-nvidia-brightness.conf
By doing this, I automatically created a text file, in xorg.conf.d, the next code part had to go in that file:

Code: Select all

Section “Device”
	Identifier	“nvidiaDevice0”
	Driver		“nvidia”
	VendorName	“NVIDIA Corporation”
	Option		“NoLogo”	“True”
	Option		“RegistryDwords”	“EnableBrightnessControl=1”
EndSection
First, I tried without the NoLogo part (I got the rest from different website, which was slightly better explained), but that gave me a login splashscreen of the nvidia logo. So yeah, no thanks. So I put that in there as well. I logged out and logged back in again. I tested the brightness control, and what do you know? It was working. Hurray!

But wait! What’s this?

If I go to the lowest setting, the screen goes off, that’s okay, I like that. However, values below “5” only illuminate the right-side of my screen? And even more the value “3” makes my screem display all weird black bars and stuff. Wow, trippy.. But hey: “I’m using the nvidia driver with the brightness control”..

Photo’s included, since print screens really won’t help:

Brightest (top right = default wallpaper shade):

Image

Darkest (before screen goes off):

Image

So yeah, what?

Anybody have a clue, except for “don’t use the nvidia driver” ?
I’m calling it a night.
Last edited by DarkDaedelus on Sun Dec 21, 2014 9:14 am, edited 3 times in total.
DarkDaedelus
Level 1
Level 1
Posts: 8
Joined: Fri Dec 19, 2014 8:56 pm

Re: My Linux Mint 17.1 Cinnamon 2009 Macbook Experience

Post by DarkDaedelus »

I found out quite a lot of people had trouble using “suspend”. In the beginning I had trouble with this as well. Unfortunatly I’m not very sure how, but it seems I got rid of it. I previously had problems with it giving me a black screen after “waking it” again. I did get a mouse, but I couldn’t see anything but the mouse.

If I now choose “suspend” from the shutdown menu, it seems to work.

Closing the lid will make the little apple “flash” though. which is quite annoying. However it stops after a few times. Nice. Open up the screen, press a button and it wakes up again. Seems that it’s really solved now. It might have something to do with the nvidia display drivers being installed.

Next up: hibernation.
Choosing hibernate from the shutdown menu gives me a black screen for a few seconds, and then shows it’s creating an image. After this the screen goes blank, and the LED turns off. Pressing the power button gives me a harddrive “spin” and continues showing me the Grey Bios–ish screen from Mac as it always does. Taking very long though. Next it shows me the GrubScreen (since I have a dualboot) and proceedes to boot.

Paying attention to the bootcscreen again, I can’t fail but notice that the strange visual artefacts have gone now. Probably because of the display driver too! At first I thought that was a “Mint Feature”. Glad to see those are gone now. And indeed, hibernate seems to work too. Glad.
WinterTroubles

Re: My Linux Mint 17.1 Cinnamon 2009 Macbook Experience

Post by WinterTroubles »

Just a small note about '10 things to do after installing xxxxxxx' type articles found on-line, especially for inexperienced users.

Like everything you find on the internet don't forget to ask yourself why you trust the source.. There are some good articles of this type out there, but, I've also seen some that are very poorly executed 'cut and paste' jobs that include either poor advice or inaccurate advice. There was even an example mentioned on these forums a few months ago that included screenshots that weren't even from the correct Distro, if I remember correctly.

This is not a comment on the article linked to 3 posts above, just a general point for the unwary :)
Last edited by WinterTroubles on Sat Dec 20, 2014 10:44 am, edited 1 time in total.
alphadingo

Re: My Linux Mint 17.1 Cinnamon 2009 Macbook Experience

Post by alphadingo »

Great post! Thanks.
3fRI

Re: My Linux Mint 17.1 Cinnamon 2009 Macbook Experience

Post by 3fRI »

@DarkDaedelus: Interesting post, which I'm sure will help some Mac users out there. But I have to ask: a MacBook with Windows, Mint, and no OSX? :shock: Sounds like you've figured out things well despite the configuration. I've run Linux on both my old MacBook (since deceased) and my 2009 iMac, and found it advantageous to maintain a partition for OSX, primarily to update firmware, etc. That way, you usually avoid iSight and suspend issues. When I decided to wipe OSX from the old MacBook, I could never get iSight to work again, but everything else seemed to work OK.
DarkDaedelus
Level 1
Level 1
Posts: 8
Joined: Fri Dec 19, 2014 8:56 pm

Re: My Linux Mint 17.1 Cinnamon 2009 Macbook Experience

Post by DarkDaedelus »

WinterTroubles wrote:Just a small note about '10 things to do after installing xxxxxxx' type articles found on-line, especially for inexperienced users.

Like everything you find on the internet don't forget to ask yourself why you trust the source.. There are some good articles of this type out there, but, I've also seen some that are very poorly executed 'cut and paste' jobs that include either poor advice or inaccurate advice. There was even an example mentioned on these forums a few months ago that included screenshots that weren't even from the correct Distro, if I remember correctly.

This is not a comment on the article linked to 3 posts above, just a general point for the unwary :)
Thank you for this addition, especially since I forget to put in something like that. Imagine: "Install this and this software (with that nice backdoor I put in there), which does absolutely nothing else!" Of course the person posting that message would like you to install that, but doubt if that's a good idea :lol:
DarkDaedelus
Level 1
Level 1
Posts: 8
Joined: Fri Dec 19, 2014 8:56 pm

Re: My Linux Mint 17.1 Cinnamon 2009 Macbook Experience

Post by DarkDaedelus »

3fRI wrote:@DarkDaedelus: Interesting post, which I'm sure will help some Mac users out there. But I have to ask: a MacBook with Windows, Mint, and no OSX? :shock: Sounds like you've figured out things well despite the configuration. I've run Linux on both my old MacBook (since deceased) and my 2009 iMac, and found it advantageous to maintain a partition for OSX, primarily to update firmware, etc. That way, you usually avoid iSight and suspend issues. When I decided to wipe OSX from the old MacBook, I could never get iSight to work again, but everything else seemed to work OK.
First off, Thank you :)
The reason I decided to ditch MacOS X (at least for the time being), is that I actually never use it. It had too many little things that bugged me (two simple, but annoying examples: pressing F2 to rename a file doesn't work, pressing Enter to open a file or directory will only give you a preview. These have become functions I use quite often). And being in a Windows based IT education, I use Windows all the time. I do think of Mac OS as a nice operating system, but for people who don't 'need' to do a lot of tinkering with it. And I have to say the sound recording from iLife / GarageBand for some reason sounds a lot better than Windows programs I used so far. But it didn't weigh in. Then the small matter of dual (read: triple) booting, using a UEFI boot helper/loader, holding the option-key to select the boot item (which did look quite nice), and afterwards the Grub screen too I thought of as messy. Without the Grubscreen, I couldn't boot at all, even though I was able to select (e.g. Linux) in the screen before. I did have a triple boot for quite a while, using Mac OS Mavericks + Windows 7 + Linux Mint 13, so I certainly tried it.

Ghaha, Another fun thing was the "start-up chime" when you boot a mac. When I still had my MacOS installed, I used a small progam/script to disable the startup chime (I often boot my laptop at night or during classes). After I deleted my Mac partition and reinstalled my laptop, I encountered a little problem booting. I don't know what it was exactly and in the end it resolved itself (I believe it was a harddrive issue). However a classmate suggested I use "Option - E" while booting (I believe it was to RAM flush or something, can't recall the exact keycombination I'm afraid). After using this, my laptop still didn't boot, and the annoying chime was back xD

I have been messing around so much afterwards to disable that chime again xD I will check to see if I documented that anywhere, since that might be useful to other people with macbooks too :)

note: Using the isight-firmware-tools, I didn't have any trouble using iSight at all. Didn't install Skype yet though, since I want to create a system image first. I know what happened last time :roll:
3fRI

Re: My Linux Mint 17.1 Cinnamon 2009 Macbook Experience

Post by 3fRI »

^When we bought the iMac, I thought it would be the best choice for my freelance work, but I soon found that I disliked Apple and OSX more than i thought--and that after years as a long-time user. It's good hardware, however, and I'll dual-boot as long as my wife still prefers OSX over Linux. I rarely access the OSX partition these days, save for maintenance and an occasional other task. As long as the machine keeps running, I'll hang on ot it. When it dies or when I feel it's it's time to replace, I'll probably go with a desktop machine from http://zareason.com/shop/home.php.
erikapekop

Re: My Linux Mint 17.1 Cinnamon 2009 Macbook Experience

Post by erikapekop »

DarkDaedelus wrote
I have been messing around so much afterwards to disable that chime again xD I will check to see if I documented that anywhere, since that might be useful to other people with macbooks too

I use 'Start Ninja' to get rid of the chime.
What to do on a Mac without OSX, I don't know

edit:wrote name wrong
Post Reply

Return to “Tutorials”