Old 2010 Macbook Nvidia Ubuntu black screen fix

All the credits are for Andreas @ https://askubuntu.com/questions/264247/proprietary-nvidia-drivers-with-efi-on-mac-to-prevent-overheating/613573#613573

Nvidia is always a pain in the ass on Linux. Especially with a old white 2010 macbook. I have black screen issues every time so I create this article so I can easy find it when I reinstall this laptop πŸ˜‰

First find the right identifiers.

We need both the IDs for the graphics card and the PCI-E bridge that it is connected to. Issue the following command in a shell:

~$ sudo lshw -businfo -class bridge -class display
pci@0000:00:00.0              bridge         MCP89 HOST Bridge
pci@0000:00:03.0              bridge         MCP89 LPC Bridge
pci@0000:00:0e.0              bridge         NVIDIA Corporation
pci@0000:00:15.0              bridge         NVIDIA Corporation
pci@0000:00:16.0              bridge         NVIDIA Corporation
pci@0000:00:17.0     >!!<     bridge         MCP89 PCI Express Bridge
pci@0000:04:00.0     >!!<     display        MCP89 GeForce 320M

Have a look at (1) the line saying display and (2) the line with bridge right before that display line. Write down the PCI-E bus ids (format XX:YY.Z) of the bridge device (here 00:17.0) and the display device (here 04:00.0) and remember which is which. Note: Those IDs may be different on your machine, depending on your Mac model and revision.

Create a GRUB script for setting the PCI-E registers during boot

Fire up a text editor with sudo nano /etc/grub.d/01_enable_vga.conf and copy/paste the content below. Make sure to paste all 4 lines into that file! Replace 00:17.0 with the PCI-E ID of your bridge device noted in step 1. Replace 04:00.0 with the PCI-E ID of your display device noted in step 1.

cat << EOF
setpci -s "00:17.0" 3e.b=8
setpci -s "04:00.0" 04.b=7
EOF

Finally, make the created file executable and update your grub config files using the following TWO commands.

~$ sudo chmod 755 /etc/grub.d/01_enable_vga.conf
~$ sudo update-grub

Install Nvidia drivers and enjoy!

Fix Intel SSD 320 problem on a Macbook

From one day to another my Intel 320 SSD was not visible anymore. So I download Ubuntu 14.04 boot it and start gparted.Β  Then I saw no SSD disk in my disk selection πŸ™

ubuntu-disk-missing

So I download the Intel firmware tool and boot it and then I get a BAD_CTX and a disk with 0GB πŸ™

bad_ctx

After some google’ing on the BAD_CTX I saw this was an known issue. The only way to fix this was completely secure erase your disk and so all your data on the disk is gone ARRRRGGGGG!!!!!!!!!!!!!!!!!!!!!!!!!!

I found a lot information how to secure erase the disk but finding some mac / apple specific articles was a lot more painful.

So I tried a lot of things and fixing the problem is quite easy if you know the steps. So I explain this for you so it cost you only one evening to fix this πŸ˜›

First go to https://partedmagic.com/ and buy and download parted magic ISO ($9). Now burn the parted magic ISO to a CD.

Then boot the parted magic. If you don’t know how to boot from a CD or USB with mac you must press the “option (alt) key” immediately after you press the power button and select the disk.

If parted magic is started, start secure erase and follow the wizard to accomplish this step. If you disk is frozen use the sleep key in the wizard to change the state to “not frozen”.

After the disk is completely erased shutdown the computer.

Now download the Intel SSD drive firmware update tool and burn it to a CD. Then boot the tool and update your disk firmware.

Then reinstall your OSX. For the people who use time machine is very easy to get the latest status back to your pc.

I know one thing for sure. This was my latest Intel SSD…

If I helped you please help me to supporting this blog without any advertising.

Some extra info:
CNET outdated article
Secure erase article from Parted Magic
Nice blog about this issue and fix it with a standard PC

[Pinta] Crossplatform Paint.NET alternative

Today I found a very nice cross platform Paint.NET program clone with the name Pinta.

Now I can edit images on every platform (OSX, Linux & Windows) and use always the same interface and hotkeys for the few times a year I need a simple paint prgram.

When you install the software under windows do not forget to install the “Gtk# for Windows“. Without the GTK the program don’t start and don’t give any error.

You can find the software here: http://pinta-project.com/

Manage multiple passwords for different websites

One of the worst things you can do on the internet is use the same password for different websites. When one of the webites is hacked or there is an bad sysadmin they can use your password to login your email or other sites to steal all your private information and worst case scenario your bank account.

Every self respected browser has an built-in password safer but when your computer/laptop is stolen or hacked by a mad person (in dutch we call them klootzakken πŸ˜‰ ) they can easily steal all your passwords. So don’t use the built-in password safer (or configure a strong master password).

There are two great solutions for managing your passwords. One is a local and one is a cloud solution. I will describe them both so you can choose what is best for you.

KeePass (local):
KeePass is a great tool for managing your passwords. There is an built-in password generator, the passwords saved in one local encrypted file and you must always give up a master key to access the passwords. The tool is crossplatform (using .net/mono) and there are a lot of plugins, example; there is a browser plugin to replace the insecure built-in pass safer. The great thing about this tool is that is is an local tool so only you can access and manage the password files. If you want to share the password file on multiple places you can use dropbox to synchronise/centralise the password files.

LastPass (cloud):
LastPass is also a great tool for managing your password especialy when you use multiple computers and different operating systems. LastPass replaces the default integrated browser password safer with his own. Your password stored localy and in the cloud and are encrypted. Without the master password it is not possible to automatic login or see your password. I like LastPass because tons of options and integration with all the operating systems and smartphones. The default settings are good but I recommend that you change the setting that the LastPass is logoff automaticly when you close the browser.

The only thing you must keep in mind that you password is in sync at LastPass (cloud) so you must trust the company.

Keep in mind
That using multiple random words password (example: “correct battery horse staple”) mostly of the time is better then using complex passwords (“Tr0ub4dor&3”). This picture tells why:

Last but not least
Always
use a BIOS password on a laptop. Most of the thief’s are very dumb people and if they stole you laptop they cannot remove the BIOS password and your laptop is useless for them.

Use one mouse and keyboard to control multiple PC’s (Crossplatform)

There is a very nice opensource / freeware tool you can use to control multiple PC’s like KVM. It’s compatible with Linux, OSX and Windows.

Quote:

What is Synergy?

Do you have two computers at your desk, with two screens and two sets of keyboard and mouse? Here’s where Synergy comes in…

Synergy is Free and Open Source Software that lets you easily share your mouse and keyboard between multiple computers, where each computer has its own display. No special hardware is required, just a network connection. Synergy is supported on Windows, Mac OS X and Linux. Usage is as simple as moving the mouse off the edge of your screen. You can even share your clipboard.

Download: http://synergy-foss.org/download/

Make a screenshot in OSX

The build-in graphical screenshot tool in OSX is crappy because it only save the file in tiff format. You can use this commands to maken a screenshot and save it to PNG format.

Key Combination Result
Command+Shift+3 Capture entire screen and save as a file
Command+Control+Shift+3 Capture entire screen and copy to the clipboard
Command+Shift+4 Capture dragged area and save as a file
Command+Control+Shift+4 Capture dragged area and copy to the clipboard
Command+Shift+4 then Space bar Capture a window, menu, desktop icon, or the menu bar and save as a file
Command+Control+Shift+4 then Space bar Capture a window, menu, desktop icon, or the menu bar and copy to the clipboard

You can also download and install the freeware tool SnapnGrap from http://www.yellowmug.com

Setup ADB and Fastboot with Android SDK on Mac OSX

[banner]

Download Android SDK (original article @ http://androidtricks.net/setup-adb-and-fastboot-android-sdk-mac-osx-18)

Download and extract Android SDK from http://developer.android.com/sdk/index.html to your desktop

Browse to Tools and double click “android”. It will open up a terminal window and load the SDK.

Install packages

Here go to “Available Packages” and select what you want to download. I selected everything. Wait for the packages to download and install.

Set the Path

Next you need to update the PATH for tools/ and platform-tools/ folder. To do this you need to edit your ~/.bash_profile (create it if you don’t already have one). Add the following two lines

export PATH=${PATH}:/Users/(username)/Desktop/android-sdk/tools
export PATH=${PATH}:/Users/(username)/Desktop/android-sdk/platform-tools

Download Fastboot

Now go to http://developer.htc.com/adp.html scroll to the middle of the page and download Fastboot binary for OSX. Because HTC host no longer the fastboot binary you can download the version on my blog. Unzip it and place it in /tools/

 

Now your all set for ADB and Fastboot

Tnx http://androidtricks.net/ for the article!

To check if your fastboot works you can start your terminal and cd /Users/(username)/Desktop/android-sdk/tools
then run ./fastboot-mac devices

When you some output you are connected. Happy modding!! πŸ™‚

Note: please check the comments for more feedback

[banner]

OSX Finder: Sort Folder Before File

Here the trick to change this behavior under Finder.
  1. Open Terminal.
  2. Open InfoPlist.strings file using vi text editor as a root.
    sudo vi /System/Library/CoreServices/Finder.app/Contents/Resources/English.lproj/InfoPlist.strings

    (change English.lproj to your language)

  3. Find below line:
    /* General kind strings */
    “Folder” = “Folder”;
  4. Do following change (by adding space before ” Folder” word after equal sign).
    “Folder” = ” Folder”;
  5. Save the InfoPlist.strings file by press [esc], type wq (mean write and quit vi) then press [return].
  6. Close Terminal
  7. Restart your Finder, right click on Finder icon while pressing the key[option] andΒ select Relaunch your Finder.
  8. Open Finder and order by Kind.