Category: Uncategorized

That *&*%@?!5 GPU card!!!

That *&*%@?!5 GPU card!!!

The MacBook Pro with the dodgy GPU, well, it decided to update itself again, with meant it wouldn’t boot. I did have a look online to see if there was a permanent fix, the only way to do that was to do something with a soldering iron, I thought it was best to steer clear of that. I did train in electronics, but I am rubbish when it comes to physical practical stuff. I would prefer if it could be done programmatically.

This time I missed a few parts. In total, it only took about five minutes to fix it.

So how did I do it I hear you cry, good question, here is the answer…

If you having problems seeing the screen, boot into single user mode but holding down command and S when you boot the machine up.

Run

nvram fa4ce28d-b62f-4c99-9cc3-6815686e30f9:gpu-power-prefs=%01%00%00%00

Reboot. On the reboot, hold down command and R when you boot the machine up, let go when you get the Apple logo.

This image has an empty alt attribute; its file name is UNADJUSTEDNONRAW_thumb_329d-1024x768.jpg
macBook pro – macOS utilities

Click on utilities and terminal:

This image has an empty alt attribute; its file name is UNADJUSTEDNONRAW_thumb_329e-1024x768.jpg
MacBook pro – macOS utilities

If you have more than one partition run the following lines, if you only have one partition you can skip this bit, but we need to find the UUID:

diskutil cs list

diskutil coreStorage unlockVolume UUID

Now, we all need to do the following, run the command:

cd /Volumes/Macintosh\ HD

This image has an empty alt attribute; its file name is UNADJUSTEDNONRAW_thumb_304d.jpg
MacBook pro – terminal change the the directory

Now, we need to remove the AMD Kexts, first create a directory where we can stick them on the off chance you need them in the future using the line:

mkdir AMD_Kexts

Because I had done this a few times, I have now started to create the directory on the date, so this one I called 12Jun21_AMD_KEXTS

Now, lets move those AMD Kexts:

mv System/Library/Extensions/AMD*.* 12Jun21AMD_Kexts/

then type in reboot:

reboot

In theory, if you have done everything correctly, you should now have a working MacBook Pro.

I booted, and it worked!

This image has an empty alt attribute; its file name is PY96KFnCRWct0UZwnJvg_thumb_3612.jpg
MacBook Pro – finally, it is working!

But the question is, will it reboot OK. It did. So I will shut down and leave it and take back to the owner tomorrow. I think if it keeps doing it I will suggest he buys a new one, it is 10 years old now.

Create a UEFI boot compatible USB stick for Windows 10

Create a UEFI boot compatible USB stick for Windows 10

I needed a Windows 10 start up disk, but I didn’t have a working Windows 10 machine. You can grab one from the Microsoft website.

Once downloaded insert the USB stick into the machine and open disks:

This image has an empty alt attribute; its file name is Bootable-disk-1.png
Image of Ubuntu settings.

In the top right hand corner you will see a vertical ellipses:

This image has an empty alt attribute; its file name is vertical-elipses.png
Vertical Ellipses

It’s advised you format the disk first.

To make it compatible with UEFI, I am going to use some software called Ventoy, this is released as open source software and can be downloaded from their website.

I am doing this on Ubuntu, once downloaded you will see a .tar.gz file in your download folder:

Ventoy download .tar.gz

We need to extract this. Double click on the file, find Ventoy with the respective version number:

Extract Ventoy onto your machine.

Click on extract. This will be extracted into the downloaded folder in this instance:

Extracted Ventoy image

OK, now we get onto the interesting bit.

Go into the folder, right click and open the directory in Terminal:

Ventoy, open directory in terminal

OK, the terminal is now open:

Ventoy directory in terminal.

We can now run Ventoy. Run the command:

sudo ./VentoyWeb.sh
Ventoy server is running

In your browser, go to the IP address provided, in this instance 127.0.0.1:24680

Ventoy in your browswer

Click on options then partition type:

Ventoy Usage

As I am trying to create a UEFI boot disk, select GPT.

Hit the install button. You will have a couple of warning prompts, just agree to them, this will format the insetered USB stick:

Ventoy has been installed on the device

Click OK.

Check that the Ventoy disk is showing:

Check the Ventoy disk can be seen

If you can’t see it, unplug the device and re-insert it.

When Ventoy is installed it will change the disk to two partitions, VTOYEFI and Ventoy.

Ventoy partitions.

The VTOYEFI, this is a small partition with some EFI stuff in, the other partition is Ventoy.

Go into the Ventoy partition and simply drag the ISO from your downloads into this partitions:

Drag the Win 10 image into the Ventoy partition

It can take some time for it to copy over, with me it took 20 minutes:

The copying process

Don’t just unplug the USB stick, go through the correct procedure and eject the disk partitions, it can now be used to boot the Windows 10 installer.

It’s as simple as that, job done.

Install Ubuntu 20.4 on a 2010 MacBook

Install Ubuntu 20.4 on a 2010 MacBook

I know it’s been a while since I posted something, 2020 was a bit hectic!

A few years ago my old MacBook failed, turned out to be an issue with the hard drive so replaced it, I had to re-heat sync the CPU as well. When it initially started working again I had already purchased a new laptop, a MacBook Air, so thought I would stick a Linux OS on the old one. Initially, I did Fedora, but over the years I got fed up of that with issues upgrading. So this year I decided to stick Ubuntu onto it. This is how I did it:

The first thing I needed to do was to download a copy of the operating system, I did that on the Fedora operating system. I then used a USB stick that I had not doing anything and restored the stick using the image I had downloaded.

Next was to get any files off Fedora that I wanted to keep. I copied these files onto a external hard drive, no need to do a full back up, there weren’t that many.

A shut Fedora down for one final time. I inserted the USB stick into the MacBook. I booted up the machine holding down the Alt/Command key, I let go and got this:

Boot options to install Ubuntu

I selected the first EFI Boot. This will take you to a screen asking what you want to boot into. I couldn’t get a photo of this, it was quick. When you see the screen I chose Ubuntu and pressed the letter “e”. This took me to:

Ubuntu edit screen.

Where you quiet splash, take your curser down and add nomodeset

Ubuntu edit screen with nomodeset

This reads:

linux  /casper/vmlinuz file=/cdrom/pressed/ubuntu.seed maybe-ubiquity quiet splash nomodeset ---

Press F10 to proceed. Eventually you will get a screen like this:

Ubuntu error check

Once Ubuntu has done its thing you will be asked if you want a demo or install:

Ubuntu selection

This time am going to install Ubuntu. Now you will be taken through the install process.

The first thing to do is select your keyboard. My MacBook is a English UK Macintosh keyboard:

Select a keyboard

Click on continue.

In theory you should be able connect to your network on the next screen. But I had issues with that so I selected the WiFi network at the top right hand corner, select the network and stick your password in.

Click on continue, you will now be asked what type of install:

What to install?

I want a normal installation, download updates during install, I also checked the install third-party software. Click continue:

Where to install?

You may see something different, in this case I am going to erase the disk and instal Ubuntu, click continue, you will get a prompt:

Prompt on what it will do with erasing the disk.

Click continue. Select where you want the timezone, for me, I’ll stick that as Melbourne Australia.

Select timezone.

Click on continue once done.

Nearly done, enter your name, what you want to call the machine, your username and password, continue. Ubuntu will install.

Install Ubuntu

When the install is complete, you will be asked to restart your machine:

Install complete.

Click restart now. The machine will spin down and you will be asked to remove the install media:

Remove install media.

So now is the moment of truth, remove the media and hit enter.

When booting, I got the error:

Error on boot.

After digging around online, I read that this is a common issue when installing Linux on older machines. But the good news, there is a work around.

Stick the install media back into your machine and repeat the process to get into the install screen:

Install media reinserted.

This time select “Try Ubuntu”.

Open the documents file structure and navigate to “Your_Hard_Drive/boot/efi

Ubuntu EFI directory

As you can see, nothing is there. We need get a shim64.efi file in it.

Navigate to /boot/grub/x86_64-efi, find the grub.efi

Grub EFI directory.

What we need to do is move this as root, right click in this directory and open it in terminal.

Run the command:

sudo cp grub.efi ../../efi/shim64.efi
EFI copy terminal command

For those eagle eyed viewers, will notice the screenshot doesn’t have the sudo, you need the sudo to run it as a root user.

Press enter. Now check that it has been copied, go back into the efi directory to make sure it’s there:

EFI directory after.

Job done. Now reboot the machine. I got the same error when rebooting, but after a few seconds, maybe 10 seconds or so and it will start to boot up.

Good luck!

MacBook Pro – AMD GPU issues – how I finally fixed it… WOOOOOHOOOOOO!!!!!!

MacBook Pro – AMD GPU issues – how I finally fixed it… WOOOOOHOOOOOO!!!!!!

So, after several weeks, I finally found a way of fixing it. A few days OK I was ready to give up. But then I found that with the operating system the Mac was using I had to do things differently. The operating system in question, High Sierra.

How did I do it, good question, here is the answer…

First of all, I needed to get a copy of Arch Linux. I downloaded it and stuck it on a USB stick.

Before we go into Arch Linux, I did some preparation on the MacBook pro. At this point the graphics on the Mac was bad, you could barely make out what was going on. Boot in single user mode by holding down command and S.

Once in single user mode, run the command:

sudo nvram fa4ce28d-b62f-4c99-9cc3-6815686e30f9:gpu-power-prefs=%01%00%00%00

Then run:

reboot

When rebooting hold down command R down until you hear the chime.

You will then be able to select which drive you want to boot from. Insert the USB stick with Arch Linux on into the machine. Select the EFI boot. Select Arch Linux archiso x86_64 UEFI CD. Press the E key. At the bottom of the screen you will get a line of code. At the end at nomodeset

MacBook pro – Arch Linux

Run the command:

cd /sys/firmware/efi/efivars

Then

ls

You will get:

MacBook pro – Arch Linux list

At the bottom right hand corner you can gpu-power-prefs-

We need to remove it do this use the command

rm gpu-power-prefs-

Then hit the tab key, this should automatically populate the rest of the filename. I did have a few issues where it didn’t populate the full name so had to type in the last section.

If you don’t have one of these, don’t worry, go to the next section.

Sometimes when removing you may get an error that says

“operation not permitted”

If that’s the case, then the efivarfs has been mounted as read only. You will need to remount it with read write permissions and repeat the rm command. To do this run the command:

cd /
umount /sys/firmware/efi/efivars/
mount -t efivarfs rw /sys/firmware/efi/efivars/
cd /sys/firmware/efi/efivars/
rm gpu-power-prefs-

Again, after the gpu-power-prefs- hit the tab key which should populate the rest of the filename.

Now we have to create a new gpu-power-prefs file, run the command:

printf “\x07\x00\x00\x00\x01\x00\x00\x00” > /sys/firmware/efi/efivars/gpu-power-prefs-fa4ce28d-b62f-4c99-9cc3-6815686e30f9

Finally on this bit (in theory), we can set it so the file can only be accessed by a superuser. You can do this running the chattr command, this is:

chattr +i “/sys/firmware/efi/efivars/gpu-power-prefs-fa4ce28d-b62f-4c99-9cc3-6815686e30f9”

If this works, unmount the efivars using the command:

cd /
umount /sys/firmware/efi/efivars/

This basically flushed the efivars out. Now to reboot.

reboot

For some reason chattr wasn’t found. So I went to basics and changed the owner of the file /sys/firmware/efi/efivars/gpu-power-prefs-fa4ce28d-b62f-4c99-9cc3-6815686e30f9 using chown.

But for some reason, the chown didn’t work, I couldn’t even figure out what the user permission was.

But it still didn’t work. I rebooted the machine, still got stuck half way through.

So I forced shut it down.

If you have done this already, boot into single user mode but holding down command and S when you boot the machine up.

Run

nvram fa4ce28d-b62f-4c99-9cc3-6815686e30f9:gpu-power-prefs=%01%00%00%00

And reboot. On the reboot, hold down command and R when you boot the machine up, let go when you get the Apple logo.

macBook pro – macOS utilities

Click on utilities and terminal:

MacBook pro – macOS utilities

If you have more than one partition run the following lines, if you only have one partition you can skip this bit:

diskutil cs list (find UUID for drive)

diskutil coreStorage unlockVolume UUID

Now, we all need to do the following, run the command:

cd /Volumes/Macintosh\ HD

MacBook pro – terminal change the the directory

Now, we need to remove the AMD Kexts, first create a directory where we can stick them on the off chance you need them in the future using the line:

mkdir AMD_Kexts

Because I had done this a few times, I have now started to create the directory on the date, so this one I called 13Dec19_AMD_KEXTS

Now, lets move those AMD Kexts:

mv System/Library/Extensions/AMD*.* AMD_Kexts/

then type in reboot:

reboot

In theory, if you have done everything correctly, you should now have a working MacBook Pro.

I booted, and f**k me, it worked!

MacBook Pro – finally, it is working!

But the question is, will it reboot OK.

But I still want to want to set that files so it is only accessible to the superuser (technical term – immutable). I have decided not pursue this, it’s December, I need to get this Mac back to her owner before Christmas and fast running out of time.

After looking online, sometimes if the USB stick that you use isn’t formatted correctly that seems to be an issue. So will give that ago if it comes back to me.