Mac Pro and Linux

Missing libs

Ever had the error message, that a lib is missing? Did a "cannot open shared object file: No such file or directory" drive you crazy because you just couldn't find that missing file? Well, it happened to me a lot and a little tool made my life much easier: getlibs.

Get the .deb here: http://www.boundlesssupremacy.com/Cappy/getlibs/getlibs-all.deb

Install with

sudo dpkg -i getlibs-all.deb

Then just enter

sudo getlibs nameofbinary

And it will auto-magically download and install all the required libs. That's it!

Posted byvfxdude at 12:16 PM 0 comments  

Fan control python script for 8-core Mac Pro

Ok, here it is. Sorry for the long wait.

This is a quick and dirty Python script to control the fan RPM on a 8-core Mac Pro (might work on other Mac Pro's too but hasn't been tested). You need the following things to get this thing running:

1. You need one of the following kernels:

-2.6.23 custom kernel that I posted in one of the previous posts
-any other mactel-linux patched kernel, that includes the 8-core mac pro temperature patch

It might work on other mactel-linux patched kernels too, but again, this hasn't been tested, so try this at your own risk. It will NOT run on 2.6.23 and previous unpatched kernels as the core temperature won't be read correctly. This might result in a too low RPM, so DO NOT TRY THIS!

The temperature patch was incorporated into the mainstream kernel at 2.6.24, but I haven't tested this.

2. The "coretemp" binary.

Unfortunately this binary was removed from the mactel-linux patches some time ago as it was incorporated into the kernel. As I have no idea how to access the data from the kernel, my script uses this binary to read the CPU temp. It's very primitive, but it works.

This is how you can get the coretemp binary:

a) Create a new directory in tmp

mkdir /tmp/coretemp
b) Save this link (the source of the Makefile) to /tmp/coretemp/Makefile

c) Save this link (the source of the coretemp program) to /tmp/coretemp/coretemp.c

d) Compile with
cd /tmp/coretemp
make
e) Copy the coretemp binary to /usr/bin
sudo cp /tmp/coretemp/coretemp /usr/bin
f) Download this script to your home directory, for example.

g) run the script with
sudo ~/macprofan.py

This is important. You have to run it with sudo!

You have to leave the terminal open, so the script can run in the background all the time. Do not close it or the fans won't be controlled.

Make sure you monitor the temperatures and fan RPMs the first time you run the script. There's a lot that can go wrong. If you have the wrong kernel, you're temperature readings may be off, resulting in too low/too high RPMs.

Again, this is a quick and dirty solution to the problem. Don't look at the code if you have a weak heart. ;)

Please don't forget to leave feedback including your kernel and other system infos. Thanks!

Posted byvfxdude at 10:26 AM 4 comments  

Update: Howto compile the 2.6.23 kernel for the Mac Pro

I've updated my previous post with a new .config file.

I had some problems with my wacom tablet (an IRQ conflict after about 10 minutes usage). The reason was that i still had legacy IDE support compiled statically into the kernel and that is not necessary (or even good at all) for the Mac Pro. So it's removed now in the new .config.

Posted byvfxdude at 10:39 AM 19 comments  

Wacom tablet configuration

This is not Mac Pro specific, but has been bugging me for years. This is on a default Ubuntu installation, but has happened to me also on Redhat 8+. Fedora 1-8 and Debian 3+.

For a few seconds the tablet seems to work fine, whenever I get closer to the physical edge of the tablet, the cursor on the screen gets close to the border of the screen. After a minute or so this changes and the cursor stops an inch (this varies with time) before the edge even though the pen is already at the phsyical edge of the tablet. The only way to fix is to quickly swipe to the opposite end of the tablet and than back. This resets the mapping. You can imagine how unbelievable annoying this is if you have to do this a thousand times a day.

The fix is simple (took me a long time to figure out though): you have to set the borders of the tablet explicitly in the xorg.conf file.

  1. Make a copy of your original xorg.conf file
    cd /etc/X11
    sudo cp xorg.conf xorg.conf-backup-beforewacomchange
  2. Edit the new xorg.conf
    nano xorg.conf
  3. Look for a section called "InputDevice" that contains a Driver called "wacom". Make sure it says the following:
    Section "InputDevice"
    Driver "wacom"
    Identifier "stylus"
    Option "Device" "/dev/input/wacom"
    Option "Type" "stylus"
    Option "USB" "on"
    Option "TopX" "100"
    Option "TopY" "100"
    Option "BottomX" "20300"
    Option "BottomY" "16200"
    EndSection
    Section "InputDevice"
    Driver "wacom"
    Identifier "stylus"
    Option "Device" "/dev/input/wacom"
    Option "Type" "stylus"
    Option "USB" "on"
    Option "TopX" "100"
    Option "TopY" "100"
    Option "BottomX" "20300"
    Option "BottomY" "16200"
    EndSection
  4. Inside the section called "ServerLayout", make sure you have these two lines:
    InputDevice "stylus" "SendCoreEvents"
    InputDevice "cursor" "SendCoreEvents"
  5. And also make sure that the ServerLayout section is the last section in the file, otherwise this will not work (as it is referencing other sections).
  6. Done!

  7. Important: This is tested on Wacom Intuos USB A5 tablet. If you have a different model, than you may have to change the USB option and/or the X,Y coordinates.



Posted byvfxdude at 2:53 PM 0 comments  

Photoshop CS2 on Linux

This is not Mac Pro specific. Tested on Ubuntu 7.10, using the Photoshop CS2 30-day trial.

  1. First you have to install wine. If you already have, make sure you have at least version 0.9.46.
    sudo apt-get install wine
  2. Start winecfg, so your .wine directory gets set up in your home directory
    winecfg
  3. Change into the virtual c drive
    cd ~/.wine/drive_c
  4. Download the official 30-day trial of Photoshop CS2 trial from here and put it into the ~/.wine/drive_c directory
    wget http://download.adobe.com/pub/adobe/photoshop/win/cs2/Photoshop_CS2.exe
  5. Run the downloaded .exe, which will unzip all the contents
    wine Photoshop_CS2.exe
  6. Start the setup
    wine /home/miklos/.wine/drive_c/Photoshop\ Tryout/Photoshop\ CS2/Setup.exe
  7. After the setup has finished, start Photoshop
    wine /home/miklos/.wine/drive_c/Program\ Files/Adobe/Adobe\ Photoshop\ CS2/Photoshop.exe
  8. Done!

Posted byvfxdude at 2:40 PM 0 comments  

Howto compile the 2.6.23 kernel for the Mac Pro

This is based on a post on ubuntuforums.org, extended with Mac Pro specific points for version 2.6.23 of the kernel. Tested under Ubuntu Gutsy.

  1. Start by becoming root, let's avoid sudo'ing all the time
    sudo bash
  2. Get all libraries and dependencies
    apt-get install build-essential bin86 kernel-package libqt3-headers libqt3-mt-dev libncurses5 libncurses5-dev subversion
  3. Change to /usr/src
    cd /usr/src
  4. Download the 2.6.23 kernel source
    wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.23.tar.bz2
  5. Unpack the kernel source
    tar -xf linux-2.6.23.tar.bz2
  6. If this is not the first time you're compiling a kernel, remove the old symlink
    rm -rf linux
  7. Set the new symlink to version 2.6.23
    ln -s linux-2.6.23 linux
  8. Get the mactel-linux kernel patches
    svn co https://mactel-linux.svn.sourceforge.net/svnroot/mactel-linux/trunk/kernel/mactel-patches-2.6.23
  9. Go into the patch directory
    cd mactel-patches-2.6.23
  10. Apply the patch
    ./apply /usr/src/linux
  11. Change to the kernel source directory
    cd ../linux
  12. Download my custom .config file from the attachment of my post or from here and unzip it and drop it into /usr/src/linux
    unzip config.zip
    rm config.zip
  13. If this is not the first time you're compiling the kernel, make sure everything is nice and clean
    make-kpkg clean
  14. Do the compiling and packaging
    make-kpkg -initrd kernel_image kernel_headers modules_image
  15. Change to /usr/src
    cd ..
  16. Install the generated packages
    dpkg -i linux-image-*.Custom_i386.deb

    dpkg -i linux-headers-*.Custom_i386.deb
  17. Edit /boot/grub/menu.lst and make sure, that 2.6.23 are the two first entries and remove the "splash" boot option.
  18. Get and install the latest release of "Envy" an excellent script to set up proprietary graphics card drivers.

    wget http://albertomilone.com/ubuntu/nvidia/scripts/ubuntu/envy_0.9.8-0ubuntu8_all.deb
    dpkg -i envy_0.9.8-0ubuntu8_all.deb

  19. Reboot
  20. Select the 2.6.23 rescue image to boot. We have to do this because the "envy" is only going to work when we have booted with the right kernel. If you'd choose the regular 2.6.23 image than it would have problems getting X up and running. So don't do it.
  21. When in the prompt, start the envy text interface.
    envy -t
  22. Select "Install Nvidia driver" for Nvidia or "Install ATI driver" for ATI. Wait a couple of minutes until it finishes.
  23. Reboot.
Done!

The following should work at this point:
  • fully accelerated graphics card drivers
  • sound (when plugged into the rear connector)

Known Issues (maybe someone has a good idea how to solve these?)
  • sound doesn't work when loudspeaker is plugged into the front connector
  • cpu frequency scaling (this is probably a kernel bug - very annoying as the CPU core temperatures are much higher this way)
  • cpu fan control (they are set to 500RPM, doesn't matter how hot the CPU gets - this is very dangerous for CPU-intensive tasks!)

Posted byvfxdude at 4:46 PM 4 comments  

Skype on 64-bit Gutsy

Forget about all the complicated tutorials and installing a billion libs. This is the quick and easy way:

  1. Make sure you have the latest 32-bit libs
    apt-get install ia32-libs
  2. Download the latest static version of Skype. Right now it is:
    wget http://skype.com/go/getskype-linux-static
  3. Extract it with
    tar -xf skype_static-1.4.0.118.tar.bz2
  4. Move it to /usr/local
    mv skype_static-1.4.0.118 /usr/local/
  5. Create a symbolic link to it
    ln -s /usr/local/skype_static-1.4.0.118 /usr/local/skype
  6. Create another one in /usr/bin/
    ln -s /usr/local/skype/skype /usr/bin/
  7. Run it
    skype
Update: If you want to create an icon on your Desktop for Skype, than:
  1. Create a file called Skype.desktop
    gedit ~/Desktop/Skype.desktop
  2. Copy-paste this into the file
    [Desktop Entry]
    Encoding=UTF-8
    Version=1.0
    Type=Application
    Terminal=false
    Exec=skype
    Name=Skype
    Icon=/usr/local/skype/icons/SkypeBlue_48x48.png

That's it. Have fun!

Posted byvfxdude at 4:29 PM 10 comments  

FeedBurner FeedCount

Subscribe to RSS feed