netkas.org

Archive for September, 2009

Common instructions for 48×0 radeons and snow leopard

It’s easy and covers rv770/rv790 cards with two dvi ports and dvi display.

0) boot with -x option to get gui

1) install pc efi v10.3 with GraphicsEnabler=y option in boot.plist

2) reboot with -x option and check if card recognized in system profiler, maybe u will need to retry with -pci0 boot option

3) all but 4870: install pkg from this post

p.s. if u have mouse stuters try to change refresh rate to 59 hz with help of switchresx

Update about nvidia driver’s bugs

Remember this ?

Recently tested 191.00 drivers: hdmi audio finaly works, clocks throtling seems to work properly again, except when hdmi tv connected or movie played – always in 3d mode

Still screen glitches (horizontal stripes, as you can see on video from that post) when driver changes clocks of vga card, same glitches exist in snow leopard.

PC EFI V10.3

New release 10.3 is now based on Chameleon2 RC3

it includes all features of 10/10.1 (like 64-bit efi pages and etc), also introduces new features, like support for injecting ati radeon 48×0 cards in bootloader, like chameleon2 rc3 does for nvidia, more ati support will come later.

Video and ethernet devices now listed in PCI Cards section of system profiler.(if graphicsenabler/ethernetbuiltin used)

Fixed few bugs in rc3 code.

Now about inbooter injector.

Chameleon2 RC3 supported only pciroot = 0, many new motherboards have pciroot=1.

Now pciroot=1 used by default, if you want pciroot to be 0 – use -pci0 boot option.

To find you pciroot value, use this osx terminal command:

ioreg -l | grep -15 “AppleACPIPCI\ ” | grep UID

To activate video/ethernet injector just use same options in boot.plist that used in Chameleon RC2+ and remove device properties key, options is :

<key>EthernetBuiltIn</key>
<string>y</string>
<key>GraphicsEnabler</key>
<string>y</string>

ATI injecctor designed for snow leopard, dont use it in leopard(binimage isn’t injected) with 4830/4850(you will get screen flickerings)

Installation – if you dont have chameleon2 installed yet – get rc1/rc2 install pkg and use leopard to install bootloader, then replace boot file in root of boot partition with this one – booter10.1

source patch diff

FakeSMC V2

Updated version of fakesmc includes new features:

  • keys moved to Info.plist, now you can easy add new or change existing keys without recompilation
  • smc version (of of smc keys) increased to 1.30f3 to prevent os suggesting to update smc fw
  • implemented new smc features  - write key, get key by index, get key type, keys writen to database of fakesmc kext will be saved until reboot.
  • smc-compatible value can be changed in Info.plist

fakesmc2.0 for snowleopard

fakesmc2.0 for leopard

sources

The license of fakesmc:

Copyright (c) 2009 netkas. All rights reserved.
Redistribution and use in binary form for direct or indirect commercial purposes, with or without modification, is stricktly forbidden.
Redistributions in binary form for non-commercial purposes must reproduce the above license notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
Redistribution and use in source form for direct or indirect commercial purposes, with or without modification, is stricktly forbidden.
Redistributions in source form for non-commercial purposes must reproduce the above license notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
Neither the names of fakesmc copyright owner nor the names of its contributors may be used to endorse or promote products derived direct or indirect from this software.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

QE CI Patch for 10.6.1 for radeons

Here is patch to get qe/ci on radeon 4890/4870×2/4830/4850×2

It also adds device-ids of those cards to ATI4800Controller kext.

Note to 4850 users – install it(if you are lazy to add device-id to 4800controller kext manualy) BEFORE rebooting after installation of 10.6.1

Package

Updating to 10.6.1

Apple released osx update 10.6.1, it brings no new kernel.

Updating is easy, just hit install button in software update.

The update updates graphics drivers, so hd4850 users need to add their device-id to ATI4800Controller.kext before rebooting, its better to use update dmg for those users.

hd4890 Users – wait for  patch for qe/ci

And about leopard security update, it has no new kernel or kexts, so should be safe to install

Unlocking 64-bit efi Macbooks for 64-bit kernel.

Amit Singh recently made a post about patching boot.efi for 64-bit support on macbooks(with 64-bit efi).

Here is simplified version of his post:

To run 64-bit kernel on any mac with 64-bit efi you need patched boot.efi file

You can find file named boot64.efi here

It enables 64-bit kernel support for some macmini/macbook/imac/macbookair models, which has 64-bit efi bootrom.

Download file to desktop, open terminal.app and run these commands

cd ~/Desktop

sudo cp boot64.efi /System/Library/CoreServices/

cd /System/Library/CoreServices/

sudo chown root:wheel boot64.efi

sudo chflags uchg boot64.efi

sudo bless −−folder /System/Library/CoreServices/ \
−−file /System/Library/CoreServices/boot64.efi

Commands starting with sudo will ask you for your password.

Next step – add arch=x86_64 to file /Library/Preferences/SystemConfiguration/com.apple.Boot.plist to Kernels Flags section

For example:

<key>Kernel Flags</key>
<string>arch=x86_64</string>

Now reboot, your mac should boot 64-bit kernel, but some models missing 64-bit intel video drivers, for example macbook4,1 with gmax3100, so only internal display will work, without qe/ci/opengl.

if something goes wrong, boot leopard/snowleopard dvd (or another installed osx system) and run this command in terminal

sudo bless –folder /Volumes/YOUVOLUMENAME/System/Library/CoreServices \
–file /Volumes/YOUVOLUMENAME/System/Library/CoreServices/boot.efi

p.s. if you have 32-bit efi, this commands will make no effect for you at all.

Why only 48×0 ATI cards support openCL

Many imacs/macpro3,1 owners was wondering why their radeon hd 2600/3870 doesn’t support opencl.

Lets see why.

Link to post on amd forum

some quotes:

Compute shader has a higher possibility of getting peak performance because it is not part of the graphics pipeline.
For example, when you run a pixel shader, a vertex/geometry shader must be executed first in order to generate the pixels. So there is overhead involved and it requires resources. In compute shader, you basically get all the resources on the chip. Actually achieving that peak performance is another thing however.

————————-
Micah Villmow
Advanced Micro Devices Inc.

Pixel Shader code (if not using some special stuff like double precision) runs on all cards. Compute shaders only on the HD4000 series.

If you write in Brook code without using AMD extensions and using the older brook codebase, you can compile to a vast majority of graphics cards using the DX/OGL backends. With pixel shader mode, you can target all Radeon HD cards and compute shader can target all HD4XXX series and later cards. So yeah, compatibility is a reason.

————————-
Micah Villmow
Advanced Micro Devices Inc.

So, obviously a reason is simple, opencl on radeons in SL uses compute shaders and they are available only on 4000 gpu series.

Lets see something else:

strings /System/Library/Frameworks/OpenCL.framework/Libraries/AMDil.dylib | grep Enable
Enable pixel shader code generation
Enable compute shader code generation

Enable Compute Shader instructions
Enable Double Precision instructions

Enable Pixel Shader instructions

Looks like they have ability to run opencl on old radeon cards but it isn’t enabled yet.

It can be just two reasons why – it’s not finished/ready yet and will be finished later, or they are not going to enable it and pushing users for upgrade.

p.s. opencl for nvidia cards done via CUDA (look at file /System/Library/Extensions/GeForce8xxxGLDriver.bundle/Contents/MacOS/libclh.dylib), so it supports all cuda supported gpus