Topic: Running Pianoteq Headless on Arch Linux — No Audio Output

Hi everyone,

I’m trying to evaluate whether I can use Pianoteq on my setup. I have a headless Arch Linux machine running on bare ALSA, connected directly to my speakers and my MIDI keyboard.

When I launch Pianoteq with:

./Pianoteq\ 8 --headless

it runs, but I don’t get any sound or MIDI response. I also saw the --list-audio-devices parameter somewhere and this is what it returns:

./Pianoteq\ 8 --headless --list-audio-devices
No device type is currently selected.

How can I specify the ALSA output device? And should Pianoteq automatically detect my MIDI keyboard, or do I need to configure that manually? If so, how?

Thanks in advance!


(my system specs: Arch Linux (6.16.10-arch1-1, x86_64), CPU: i5-7500T)

Re: Running Pianoteq Headless on Arch Linux — No Audio Output

I’m not sure it’s the answer you’re looking for, but I must say running headless is a pain, it’s super hard to debug things and change settings. If you can I recommend running it on a desktop environment (on vnc for example if you don’t have a monitor plugged).

(I started on the headless route myself on my odroid and also got stuck, gave up and set up remote desktop, and I must say it’s quite nice to be able to connect via vnc from my laptop or iPad and change instrument and settings).

Re: Running Pianoteq Headless on Arch Linux — No Audio Output

Thanks for the suggestion! It's a good idea and I've honestly never considered it. I'll try installing Openbox and see if I can connect through VNC.

However, I'd still like to give the pure headless idea one more shot... Plenty of folks seem to have it running on Raspberry Pis, so there’s got to be a way...

Last edited by wildflower (07-10-2025 11:42)

Re: Running Pianoteq Headless on Arch Linux — No Audio Output

wildflower wrote:

Plenty of folks seem to have it running on Raspberry Pis, so there’s got to be a way...

I believe the vast majority of those run with a display, not headless.

In any case, I agree, there must be a way, but I don't see it:

Pianoteq\ 8 --help
Pianoteq Trial version 8.3.2/20240923 -- [url]http://www.modartt.com/pianoteq[/url]
Copyright (c) 2024 Modartt.
Options from command-line:
 --help             : show this help, and quit
 --version          : show current version number and date, and quit
 --no-prefs         : start Pianoteq without using any saved preference
 --no-audio-prefs   : start Pianoteq with a clean audio/midi configuration
 --prefs FILENAME   : stores the preferences in the specified file
 --fxp FILENAME     : load an FXP file on startup
 --preset NAME      : load a preset on startup
 --list-presets     : display the list of all presets
 --midimapping NAME : load a midimapping preset on startup
 --midi-channel CH  : listen only to MIDI events on the specified channel (1<=value<=16 or 'all')
 --midi-transpose x : transpose note events by the specified amount (-36<=x<=36)
 --midi FILENAME    : load a midi file, or a *.m3u playlist content. If filename is a folder, 
                      the midi files contained in that folder
 --open file1 file2 ...     : load files, which can be midi, fxp, mfxp, ptq, scl or kbm files.
                      Must be used as the *last* option
 --wav FILENAME     : export midi file as WAV file, and quit
 --flac FILENAME    : export as FLAC
 --mp3 FILENAME     : export as MP3
 --rate FREQ        : change the sample rate for the exported wav
 --bit-depth D      : change the bit-depth for the exported wav (16,24 or 32)
 --dither ON/OFF    : turn dithering when exporting on or off
 --normalize        : turn on volume normalization for the exported wav
 --normalize-db DB  : change the normalization level (default value is -1dB)
 --mono             : export the wav file as mono
 --headless         : do not show the graphical interface
 --fullscreen       : start in fullscreen mode
 --export-lv2-presets PATH : export all presets as LV2 presets
 --export-lv2-presets-std  : export lv2 preset to their default location, which is:
                    /home/davide/.lv2/
 --export-presets-filter all|builtin|ptq|user : select which presets are exported, default is 'builtin'
 --restore-windows  : restore the a previously saved set of windows
 --do-not-block-screensaver : prevent Pianoteq from keeping the screen on
 --install-app-icon-and-quit : create a .desktop and an icon for Pianoteq
 --quiet            : be less verbose
 --play             : immediately start playing the midi file
 --play-and-quit    : start playing the midi file, and quit when it ends
 --serve [IP:]PORT  : start a JSON-RPC server for remote control of Pianoteq.
                      When using --serve "" , the server listens on localhost:8081

Example of use: Pianoteq --preset "U4 Small" --midi foo.mid --wav foo.wav

By the way, you can also try the --serve option which has been described here in many threads

Last edited by dv (08-10-2025 02:28)
Where do I find a list of all posts I upvoted? :(

Re: Running Pianoteq Headless on Arch Linux — No Audio Output

dv wrote:

you can also try the --serve option which has been described here in many threads

I just tried this, and also found ptq-client-webapp, which provides a web GUI for controlling Pianoteq. It runs fine and lets you change instrument settings — but still zero options for output or MIDI device!

Last edited by wildflower (08-10-2025 13:27)

Re: Running Pianoteq Headless on Arch Linux — No Audio Output

Likely the reason it isn't working is the needed supporting software is not installed.

I have never used Arch Linux but my impression is it does not install very much by default unlike most distros. Are you sure Alsa is installed? If it is you can try to enumerate your audio devices using aplay -L assuming aplay is there (this works on Debian based distros not sure about Arch but there will be something similar). This is probably the way Pianoteq enumerates audio devices -- by calling aplay or something that provides this function.  Even the desktop or graphics are not installed by default.

Re: Running Pianoteq Headless on Arch Linux — No Audio Output

levinite wrote:

Are you sure Alsa is installed? If it is you can try to enumerate your audio devices using aplay -L assuming aplay is there

Yes, absolutely. I'm running ALSA and it works. I listen to music through this machine daily. aplay -l returns the usual list of functioning devices.


I poked around a bit since the --serve option works, and tried a few manual JSON-RPC calls with curl.

1.Pianoteq successfully listed my audio devices:

[root@hal ~]# curl -s http://localhost:8081/jsonrpc \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","method":"getListOfAudioDevices","params":[],"id":1}' \
  | jq
{
  "id": 1,
  "jsonrpc": "2.0",
  "result": [
    {
      "devices": [
        "Default Audio Device (1)",
        "PulseAudio Sound Server",
        "Default Audio Device (2)",
        "Rate Converter Plugin Using Libav/FFmpeg Library",
        "Rate Converter Plugin Using Samplerate Library",
        "Rate Converter Plugin Using Speex Resampler",
        "JACK Audio Connection Kit",
        "Open Sound System",
        "Plugin using Speex DSP (resample, agc, denoise, echo, dereverb)",
        "Plugin for channel upmix (4,6,8)",
        "Plugin for channel downmix (stereo) with a simple spacialization",
        "AIRPULSE A300Pro, USB Audio; Front output / input",
        "AIRPULSE A300Pro, USB Audio; 2.1 Surround output to Front and Subwoofer speakers",
        "AIRPULSE A300Pro, USB Audio; 4.0 Surround output to Front and Rear speakers",
        "AIRPULSE A300Pro, USB Audio; 4.1 Surround output to Front, Rear and Subwoofer speakers",
        "AIRPULSE A300Pro, USB Audio; 5.0 Surround output to Front, Center and Rear speakers",
        "AIRPULSE A300Pro, USB Audio; 5.1 Surround output to Front, Center, Rear and Subwoofer speakers",
        "AIRPULSE A300Pro, USB Audio; 7.1 Surround output to Front, Center, Side, Rear and Woofer speakers",
        "AIRPULSE A300Pro, USB Audio; IEC958 (S/PDIF) Digital Audio Output",
        "AIRPULSE A300Pro; USB Stream Output",
        "HDA Intel PCH, ALC294 Analog; Front output / input",
        "HDA Intel PCH, ALC294 Analog; 2.1 Surround output to Front and Subwoofer speakers",
        "HDA Intel PCH, ALC294 Analog; 4.0 Surround output to Front and Rear speakers",
        "HDA Intel PCH, ALC294 Analog; 4.1 Surround output to Front, Rear and Subwoofer speakers",
        "HDA Intel PCH, ALC294 Analog; 5.0 Surround output to Front, Center and Rear speakers",
        "HDA Intel PCH, ALC294 Analog; 5.1 Surround output to Front, Center, Rear and Subwoofer speakers",
        "HDA Intel PCH, ALC294 Analog; 7.1 Surround output to Front, Center, Side, Rear and Woofer speakers",
        "HDA Intel PCH, HDMI 0; HDMI Audio Output",
        "HDA Intel PCH, HDMI 1; HDMI Audio Output",
        "HDA Intel PCH, HDMI 2; HDMI Audio Output",
        "HDA Intel PCH; USB Stream Output",
        "XFY MIC RC; USB Stream Output",
        "Roland Digital Piano; USB Stream Output"
      ],
      "type": "ALSA"
    },
    {
      "devices": [
        "Auto-connect ON",
        "Auto-connect OFF"
      ],
      "type": "JACK"
    }
  ]
}

2. But asking for the current device returns blanks:

[root@hal ~]# curl -s http://localhost:8081/jsonrpc \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","method":"getAudioDeviceInfo","params":[],"id":1}' \
  | jq
{
  "id": 1,
  "jsonrpc": "2.0",
  "result": {
    "audio_output_device_name": "",
    "buffer_size": "",
    "channels": "",
    "device_type": "",
    "force_stereo": "0",
    "sample_rate": "",
    "status": "stopped"
  }
}

very strange...

Last edited by wildflower (08-10-2025 22:56)

Re: Running Pianoteq Headless on Arch Linux — No Audio Output

I got it to work! If anyone ever finds this and has a similar problem - all you've got to do is run pianoteq only once in a graphical environment! And after you set your settings, you can start it as --headless as much as you want and it'll run fine.

Re: Running Pianoteq Headless on Arch Linux — No Audio Output

wildflower wrote:

I got it to work! If anyone ever finds this and has a similar problem - all you've got to do is run pianoteq only once in a graphical environment! And after you set your settings, you can start it as --headless as much as you want and it'll run fine.

I'm not sure, but It seems to me that having to run it first not headless to get it to run headless would be considered a bug. Is there anything in the documentation that would mention this? The software should display a message on the console that you need to run it graphical first.

Last edited by markehle (21-10-2025 09:07)

Re: Running Pianoteq Headless on Arch Linux — No Audio Output

markehle wrote:
wildflower wrote:

I got it to work! If anyone ever finds this and has a similar problem - all you've got to do is run pianoteq only once in a graphical environment! And after you set your settings, you can start it as --headless as much as you want and it'll run fine.

I'm not sure, but It seems to me that having to run it first not headless to get it to run headless would be considered a bug. Is there anything in the documentation that would mention this? The software should display a message on the console that you need to run it graphical first.

I see no point to running it headless (without the GUI).

1. Even with very modest hardware performance should not be a problem even with a GUI running but not connected to a display. For me, on a Raspberry Pi 400, the performance index is over 30, and there is no appreciable latency and never any wrong notes.

2. You can hot-plug USB devices (keyboards, audio interfaces; keyboards with audio interfaces) and it all just works.

Re: Running Pianoteq Headless on Arch Linux — No Audio Output

Pete the Greek wrote:
markehle wrote:
wildflower wrote:

I got it to work! If anyone ever finds this and has a similar problem - all you've got to do is run pianoteq only once in a graphical environment! And after you set your settings, you can start it as --headless as much as you want and it'll run fine.

I'm not sure, but It seems to me that having to run it first not headless to get it to run headless would be considered a bug. Is there anything in the documentation that would mention this? The software should display a message on the console that you need to run it graphical first.

I see no point to running it headless (without the GUI).

1. Even with very modest hardware performance should not be a problem even with a GUI running but not connected to a display. For me, on a Raspberry Pi 400, the performance index is over 30, and there is no appreciable latency and never any wrong notes.

2. You can hot-plug USB devices (keyboards, audio interfaces; keyboards with audio interfaces) and it all just works.

It really depends on how you are using Pianoteq. When I am playing a gig live with it, a monitor is a big distraction. If I only use one piano sound, there is no need for a screen.

Re: Running Pianoteq Headless on Arch Linux — No Audio Output

markehle wrote:

I'm not sure, but It seems to me that having to run it first not headless to get it to run headless would be considered a bug. Is there anything in the documentation that would mention this? The software should display a message on the console that you need to run it graphical first.

I absolutely agree that it's either a bug, or it should be made very obvious to the end user that one GUI session is needed in order to run headless later... It's up to Modartt to implement this, but considering how I had to figure it out myself, I don't believe they read these forums a lot...

markehle wrote:

It really depends on how you are using Pianoteq. When I am playing a gig live with it, a monitor is a big distraction. If I only use one piano sound, there is no need for a screen.

Exactly. In some setups it's a pain in the ass. In my case, I had to figure out how to install xorg / openbox / tigervnc and use it, which cost me a few hours...