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  

Installing Ubuntu 7.10 Gutsy on a Mac Pro (dual-boot with OS X)

This is the quickest way I found to get a basic system up and running on a Mac Pro 8-core (should work for the other versions as well). You DO NOT need Bootcamp to do this! This is assuming you have a single hard disk installed, with a default OS X partition.

Before you proceed: please make sure you have a current backup of your system. The following procedure is risky and could damage your system and/or make it unbootable.

  1. Boot into OS X
  2. Install rEFIt
  3. Repartition your hard drive. Let's say you want to resize your OS X partition to 200GB and create a new 200GB Linux partition. Open a terminal and type:
    sudo diskutil resizeVolume disk0s2 200G Linux Linux 200G
  4. Download the Ubuntu 7.10 Gutsy Live CD and burn it
  5. Restart
  6. When the rEFIt menu comes up, check if the partition tables are synced.
  7. Shutdown
  8. Start it again with the "c" key pressed to boot from the CD
  9. When Ubuntu comes up, click on the "Install" icon on the desktop
  10. Choose "Manual" partitioning and select the new (probably called /dev/sda3) partition as your root
  11. Ignore the warning about the swap partition
  12. Click on "Advanced" before finishing the installation and make sure that the boot loader is installed on /dev/sda3 (or whatever your root partition is) rather than (hd0) or similar
  13. Remove the CD and reboot
  14. Once you're back in Ubuntu, open a terminal and create your swap file (for example a 2GB one):
    dd if=/dev/zero of=/swap bs=1024 count=2097152
    mkswap /swap
    swapon /swap
    chmod 600 /swap
  15. Done!

If you get a black screen during booting from the CD or the installation, then try to remove the "splash" option from the boot options. This helped me with my 23" Apple Cinema Display.

Ok, now you should have a basic Ubuntu installation. Next post will show you how to fix some of the annoyances of the basic installation that are specific to the Mac Pro.

Drop me a comment if you know any way to optimize this install procedure, I'd be glad to hear from you.

Posted byvfxdude at 2:27 PM 17 comments  

My configuration

Currently, this is what I'm running.

Mac Pro 8-core
4 GB RAM
500GB HDD
XFX 8800GTS 320MB graphics card (read the article about this)
23" Apple Cinema Display (aluminum bezel)

refit as boot manager
Ubuntu 7.10 (final) Gutsy, installed from the Live CD
Kernel 2.6.23-mactel (with mactel patches)
Nvidia 100.14.19 driver

Posted byvfxdude at 2:14 PM 0 comments  

PC graphics card in the Mac Pro

I was unlucky enough to buy an ATI X1900XT graphics card as a BTO option for my Mac Pro. I've been burned by ATI many times before but there was no alternative this time as the FX4500 cost $2000.

And again it turned out as a bad decision.

The card works ok under OS X, but under Linux it's a pain. The drivers are much better than they were a year ago but Nuke for example is constantly crashing whenever I go into the 3d view. And than there's the noise. Under OS X it's nice and quiet, on Linux it's loud and annoying. Couldn't figure out a way to silence it. I was ready to throw the card away and order a FX4500 when I had a idea: why not try a regular PC graphics card in the Mac Pro? All the forums were stating that this is not going to work, the screen is going to stay black because the cards don't have the EFI ROM. I didn't care and took a XFX 8800GTS 320MB from my PC and put it into the Mac Pro...

The display stayed black for the first 30 seconds. I had the machine set up to automatically boot the Ubuntu Gutsy partition I set up earlier, so as soon as Grub took over, I was able to read it on my Apple Cinema Display! Now you have to make sure, that you remove the "splash" keyword from the end of the boot parameters and boot. Everything was working just fine, X started up in the native 1920x1200 resolution and I could enable the restricted Nvidia drivers.

And what a difference this Nvidia card is! It's quiet and the drivers are amazingly quick and stable.

If you are willing to dump OS X and run Linux only on your Mac Pro, than just get a cheap consumer Nvidia and you have the best possible bang for buck. Just make sure you set up refit to boot automatically from your Linux partition.

Let me know how it worked out for you!

Posted byvfxdude at 1:59 PM 7 comments  

Let's get started

I've bought a 8-core Mac Pro a couple of weeks ago for running CPU-heavy applications in the visual effects field (mainly Nuke and Houdini). I thought running Linux on this box is going to be a piece of cake but I can tell you, it's not. There's a serious lack of information on the subject and this is what this blog is trying to fix. I will try to post howtos, tutorials and small snippets of random information that is going to help you to get your Mac Pro up and running with Linux. Ok, than let's get started!

Posted byvfxdude at 1:50 PM 7 comments  

FeedBurner FeedCount

Subscribe to RSS feed