My second week with Haiku: Lots of hidden gems and pleasant surprises, and some issues
TL;DR: Performance much better than initially observed. ACPI seemed to be the culprit for me. Running in a virtual machine works great, and is useful for screencasting. Git and package manager integrated into the file manager. Public WLAN does not work for me. Python woes.
Last week, I discovered Haiku, a “shockingly good” desktop operating system. Even now, in my second week with Haiku, I keep finding lots of hidden gems and pleasant surprises, and my weekly dose of issues as well.
Turns out the absymal performance I had in the first week, especially in the browser (e.g., lag when typing) may have to do with and/or a buggy ACPI implementation in the BIOS of my machine.
To disable it,
sed -i -e 's|#acpi false|acpi false|g' /boot/home/config/settings/kernel/drivers/kernel
and reboot. Now my system finally feels fast, as other reviewers had noted about Haiku in the past. But I cannot reboot the machine anymore without a kernel panic (shutdown works, telling me “it is now safe to turn off the computer”).
ACPI, DSDT, iasl
Oh well, I guess we need to debug the ACPI of this machine, something I vaguely remember from when I had worked on PureDarwin, because the xnu kernel needed patched
DSDT.aml files more often than not.
Off we go…
Get and compile
iasl, the Intel ACPI debugger tool from https://acpica.org/downloads. Actually no, it’s already been ported:
~> pkgman install iasl
Let’s dump the ACPI tables:
~> acpidump -o DSDT.dat
Cannot open directory - /sys/firmware/acpi/tables
Could not get ACPI tables, AE_NOT_FOUND
Turns out this does not work in Haiku yet, so I’d need to boot into Linux and dump the tables there. Then, I could possible fix the errors using iasl, a text editor, and some knowledge (Google for: “Patch DSDT fix”), and a lot of patience. However, I would still be missing the possibility to have the fixed DSDT loaded by the Haiku bootloader.
Normally I am absolutely not a fan of virtual machines because they tend to eat more RAM and resources than I usually have available. Also, I don’t like the overhead involved.
As long as Haiku does not offer me to record screencasts with audio (since no Audio drivers seem to work on my hardware — there is a USB audio driver but it needs a USB 1 (that is one, not two) port and needs to be compiled by hand — I had to venture into virtual machines. And what should I say, the following setup is working very well for my screencasting needs.
Emulating Haiku in KVM
Virtual instances of operating systems are perfect for all kinds of testing purposes that need to be done in a safe and…
Turns out Virtual Machine Manager is a true marvel. Perhaps this virtual machine stuff (that I have been ignoring for the last 15 years or so) is where Red Hat invested all that engineering money. Anyhow, to my big surprise, the virtualized Haiku runs almost faster than native (hard to believe but that is how it feels to me).
On to screencasting. Since it was more fiddling in the end than is my taste, I wrote down the steps (mainly so that I can replicate them later) but maybe you can use this information if you’d like to make your own Haiku screencasts (which you absolutely should do).
- Use C-Media USB audio device with decent headphones
- Boot into Pop!OS NVIDIA Live ISO (for nvenc hardware acceleration of the encoding)
- Download Haiku nightly anyboot image 64-bit
- Set up KVM as in the article above
- Get OBS Studio AppImage (and tell them that you want an official one)
- Add noise cancellation filter to Desktop Audio by right-clicking Desktop Audio, then Filters, then +, then Noise Suppression, leave default dB level
- Fiddle around in Xfce’s audio settings
- Right-click Desktop Audio, Properties, Device select “Audio Adapter Analog Stereo”
- Go to Xfce start menu, enter “Workspaces”
- Number of workspaces: 2
- Ctr-Alt-RightArrow will go to second workspace
- Edit Virtual Machine Manager desktop entry so that it is started as root by prepending
sudo— it did not work otherwise for me
- Start Haiku virtual machine on workspace 2
- Boot into desktop, set resolution to Full HD (I did not manage yet to have Haiku do that automatically; perhaps we somehow can get QEMU/KVM to pass through EDID information; did not find this option in Virtual Machine Manager)
- Press Ctrl-Alt to “release the keyboard and mouse” (get them back to Linux)
- Switch back to workspace 1 by pressing Ctrl-Alt-LeftArrow
- In OBS, add “Window Capture (XComposite)” and select Window “Haiku on QEMU/KVM”, check “Swap red and blue”
- Record, then edit with Shotcut AppImage on Linux (run it as root to get NVIDIA hardware acceleration with nvenc)
- Soundtrack: Timelapsed Tides” from the YouTube music library. Filters: Audio fade in, Audio fade out, Audio volume -35db (no, this should not turn into Shotcut instructions)
- Export, “YouTube”, upload. Becomes Full HD on YouTube without a lot of postprocessing.
I am happy, even though I would be much happier if USB audio, OBS Studio, and Shotcut were working natively in Haiku, so I would not have to do this lengthy setup.
Tracker and Tracker add-ons
Tracker is to Haiku what the Finder is to the Mac, and what Explorer is to Windows. Search for
tracker add-on in HaikuDepot to find these.
Git integrated into the file manager
Just visually citing its homepage here.
But wait… are they kidding?! Password in clear text? Makes me wonder why they are not using a “keychain”, there is BKeyStore in Haiku for this reason. (Ticket)
Contribute to HaikuArchives/TrackGit development by creating an account on GitHub.
Package manager integrated into the file manager
Described by its homepage:
Finds the package(s) of any selected file(s) and opens it in the preferred application.
By default that is HaikuDepot where you can look at its description or the ‘Contents’ tab to see what other files are part of that package and where they are.
A Tracker add-on to find and open the origin package of a file. - humdingerb/OpenOriginPackage
This could probably even be taken a step further to uninstall the package…
How do I launch stuff automatically at boot time?
- rc.local.d = /boot/home/config/settings/boot/userbootscript
- Autostart = /boot/home/config/settings/boot/user/launch
Now, need to find the command to synchronize the local clock with NTP… I hear that it should actually do that automatically, but it does not seem to be working for me. And I need it badly, because the RTC battery in my computer is flat, which means it loses time when powered down.
The Tipster application shows useful tips and tricks (check them out!): https://github.com/humdingerb/Tipster/blob/master/tips/tips-en.txt
WLAN in public spaces
While WLAN works fine for me at home, It did not work for me at all while travelling.
Public areas (think airports, hotels, train stations) typically have many different WLAN networks, one WLAN network typically consists of many access points.
So, what do we find in Frankfurt main station? Many networks:
That should give plenty of connectivity. What does Haiku with those networks? Really not much, except get terribly confused. In fact, I was offline the whole time.
No access point handovers?
It starts with the fact that it shows each access point separately, even if many belong to the same wireless network with a common SSID, unlike any other OS I know.
It should only show each SSID once, and automatically pick the access point with strongest signal for that SSID. The client needs to select another, stronger access point with the same SSID (if available) if the current signal is getting too weak - so that it even works when moving around (WLAN handovers between access points). I have filed a ticket.
No open networks?
It continues with Haiku insisting on a password even though the network needs none. I have filed a ticket, too.
Confused by captive portals?
Many public networks use captive portals, where the user is redirected to a login page where they have to accept terms and conditions before the network can be used. Possibly this added to Haiku getting totally confused in this location.
In the end, the whole wireless stack seemed to be just locked up entirely.
No network for me on the go, sadly.
How easy is it to get a “random” piece of Python software running?
Turns out, not so easy. At least I was not able to figure it out on my own…
git clone https://github.com/micahflee/onionshare.git
cd onionsharepython3 -m venv venv
pkgman i setuptools_python36 # pkgman i setuptools_python installs for 3.7
pip3 install -r install/requirements.txtCould not find a version that satisfies the requirement PyQt5==5.12.1 (from -r install/requirements.txt (line 15)) (from versions: )
No matching distribution found for PyQt5==5.12.1 (from -r install/requirements.txt (line 15))# stalled here - does not continue or exitpkgman i pyqt# No change, same error; how do I get it into the venv?
# Trying outside of venvCould not find a version that satisfies the requirement PyQt5==5.12.1 (from -r install/requirements.txt (line 15)) (from versions: )
No matching distribution found for PyQt5==5.12.1 (from -r install/requirements.txt (line 15))
pip is a known issue (it wants to use hardlinks but Haiku doesn’t support those).
I hear that I need to use
python3.6 (I’d say it’s a mess.)
Opened an issue with pip.
Where do we go from here?
Haiku is a refreshingly focused operating system for personal desktop computers, and as such, it has great concepts that can simplify common workflows considerably. Development has been steady but andante over the past decade, which may have had to do with the fact that hardware support was very limited and the system has been relatively unknown.
Things are changing: Hardware support is at a point where it is feasible to run Haiku on bare metal on a relatively wide range of machines (albeit with hiccups), and given the impeding 1.0 release the system is destined to getting more public attention.
How can I help best? I hope this article series is useful. After week 2, I have started to report issues both to https://dev.haiku-os.org/ticket and https://github.com/haikuports/haikuports/issues/, and have started a series of Haiku screencasts.
Again, a huge thanks to the Haiku development team. You are the best! Let me know how you think I can provide most value to the project, even though I probably won’t be coding C++ anytime soon.
Try it out for yourself today! The Haiku project provides nightly images that can be booted from DVD or USB. Installation consists of downloading the nightly 64-bit image and writing it to a USB stick using Etcher.
This article is part of a series: