I’ve noticed recently that Bitwig Studio, starting with version 5.2, has the automatic Onset detection broken in NixOS. The chain of failure seems to be as follows:
- Bitwig Studio resides in the Nix Store, all non-executable files have “444” permissions
- For the Onset detection feature, Bitwig uses an external plugin host which gets the operation details using a config file
- There are several template config files in the Nix Store
Now, when a new Onset detection is to be done:
- Bitwig copies the template config file to
$HOME/.BitwigStudio/cache/audio/<some-temporary-folter>/<some-temporary-filename>
, crucially, this preserves the read-only permissions, the file appears here with permissions “444”:
-r--r--r-- 1 jan users 145 Jan 1 1970 onsets-2A7BB5059582D44CCC0A5EAA1D30E9F7-config
- Bitwig now tries to modify this file to insert the currently chosen UI parameters. Since the file is read-only, this fails, causing the whole operation to fail
From the logs (ignore version “5.3-beta” there, it’s the same issue with 5.2)
[2024-11-28 10:45:10.722 float-sample-analysis error] Error analyzing onsets for file /home/jan/.BitwigStudio/temp-projects/fc2d7061-3a79-4250-b079-bee97d6cffa3/bounce/Drum and Bass Kit 1-bounce-1.wav with transform file /nix/store/hk4sk7wffbfzy4f0d75mrqaas53h2n69-bitwig-studio-5.3-beta-1/libexec/resources/VampTransforms/BeatDetection/Default.vamp:
xI: Could not analyze onsets: Error running Bitwig Vamp Plug-in Host: /home/jan/.BitwigStudio/cache/audio/7949815B52CE8DF24FFA2FAFC747AA2C/beats-A7A355B9E2DCF301708B8381C4F7DEE3-config (Permission denied)
at xC.NX1(SourceFile:45)
at xl.NX1(SourceFile:1568)
at xl.NX1(SourceFile:1445)
at YuN.NX1(SourceFile:74)
at xl.NX1(SourceFile:1443)
at xh.run(SourceFile:72)
at wCl.run(SourceFile:307)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
I am in contact with the manufacturer, ideally the program would just ensure the file to be writable after copying, but I’m not sure if that is going anywhere.
So I’m wondering if there is anything that I could do from my side to fix this. Is there maybe some ACL magic that could be done so that all files under a certain folder will always be writeable, regardless of what their permissions were before they were copied there?