This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Compiling and running Krita on a Raspberry Pi 2

Tags: None
(comma "," separated)
UrQuan3
Registered Member
Posts
14
Karma
0
IT WORKS!
mostly.

This was done for the fun of it. I don’t suggest any of the developers spend time on this. Unless, of course, they also find it entertaining.

Versions used: Krita 2.9.9, Raspbian-jessie 09-24-2015.

Compiling:
-First off, upgrade to ‘jessie’. No, really. First, it has major performance improvements for the Pi 2. Second, there are several library incompatibilities between the current Krita source and the Debian ‘wheezy’ distro. I confirmed this on a CI-20. Debian/Raspbian wheezy has multiple library problems such as the png library. Last, the Wacom tablet drivers work out of the box. For Raspbian wheezy, you will have to compile them into the kernel. Let’s keep this simple.

-It turns out the compiling instructions by David Revoy and the Krita team work almost as-is.
http://www.davidrevoy.com/article193/guide-building-krita-on-linux-for-cats
https://community.kde.org/Calligra/Building#Distribution_Specific_Instructions
The problem is that at one point the linker needs around 1.6GB of RAM to complete. The Pi-2 only has 1GB. After trying to learn cross-compiling for several weeks, I got lazy and attached a USB hard drive to act as a swap partition. I would prefer not to include a tutorial for that here, but I will give a few tips. ‘parted’ or ‘gparted’ are partition tools that work on the Raspberry Pi. Look in the fstab. You will see instructions for turning on and off the tiny swap that Raspbian defaults to (dphys-swapfile swap[on|off]). Remember that if you use the fstab to mount the USB swap drive, you need to comment that out before removing the USB drive or the system may not reboot.

My current fstab, showing the USB swap entry commented out:
Code: Select all
proc            /proc           proc    defaults          0       0
/dev/mmcblk0p1  /boot           vfat    defaults          0       2
/dev/mmcblk0p2  /               ext4    defaults,noatime  0       1
# a swapfile is not a swap partition, no line here
#   use  dphys-swapfile swap[on|off]  for that
#UUID=7d245a2d-f96a-4e45-86a3-153f5b2cb2f9 none swap    sw      0       0


-At this point, Krita should compile fine.

Usability:
-There are several GUI bugs, some advanced brushes will crash Krita, and some large brushes lag; but it is actually usable.
-The GUI bugs are just coloration mistakes, shades of green where it should be shades of gray. I personally think it is a bug in the GUI lib port instead of Krita. Krita on the CI-20 did not have this problem.
-Quite a few brushes crash Krita either instantly, or after a second or so of use. I cannot seem to pick up on a pattern of failure, but most of them are ‘texture’ brushes. Again, I think this is a Raspbian library problem. Krita on the CI-20 did not have this problem either.
-Tilt works, but the cursor does not update while hovering. It only updates as you draw.
-Unsurprisingly, there are some brushes that the Pi 2 simply can’t keep up with. They are mostly large brushes. Airbrushes, bristle large, hairy large, smudge texture, etc. Reducing the brush size improves performance, but defeats the purpose of the brushes. On the CI-20...I think I have finally crossed the line into “too slow to be usable”. Only the most basic of brushes (fill_circle) run realtime. Even the pencil brushes lag too much to be usable.

Non-complete list of brushes that crash on the Pi 2:
Pencil tilt
Rake texture
Sponge texture
Splatter thin
Block bristles
Block fuzzy
Block mix tilt
Block tilt

So there we are. A functional Krita machine that cost a quarter what the monitor did and 1/10th what the tablet cost when they were new. Don’t think about that too long.


Bookmarks



Who is online

Registered users: Bing [Bot], claydoh, Evergrowing, Google [Bot], rblackwell