Headless Server 100% 1 CPU on Rpi4 (fixed)

Pi4, IC7100.

Is there a way to get the headless wfserver to run at boot without grabbing 100% of a CPU and generally dragging the system down?

If i run it in over ssh it behaves really well, and without any audio glitching whatsoever with WSJTx, but, i cannot start it on boot or it maxes out a single CPU and starts to drag the system down…

Crond, rc.local, all manner of tricks fail - same every time, it needs to be run ‘live’ to be stable and normal.

I can run the GUI version as a server from cron at boot, but the audio breaks up heavily with WSJTx and VAC etc. The headless version is really solid for this - aside from the odd forgetting to toggle transmit…

What am i missing here?

wfserver is very much a work-in-progress and we have never released it due to various issues.

It currently has no mechanism to ‘daemonise’ so needs to be run via a shell. The best way to simulate this is to use the Linux screen command https://linuxize.com/post/how-to-use-linux-screen.

Phil

Ah, that’s the kind of thing i was going to try next, thanks Phil…

I like the Headless version, it’s more in the spirit of Linux, Pi etc.

I will do some more testing with the GUI version as a server also, see if i can cure the glitches when using WSJTx. I know it’s possible to make it happen thanks to the headless version working eliminating many of the variables.

This works!!

in Your cron:

@reboot /bin/bash/ /home/[your user name]/wfviewboot.sh

then make a executable script in your /home called wfviewboot.sh with this in it:

#!/bin/sh
screen -S wfview -d -m /usr/local/bin/wfserver

and on boot, the headless will run, overhead is barely visable in htop!!

user@raspberrypi:~ $ screen -list
There is a screen on:
1461.wfview (20/03/24 23:08:47) (Detached)
1 Socket in /run/screen/S-user.

You may have to connect/disconnect on the client twice at first.

One thing i did notice, if i define the sound card, in any way other than “default” (ie: none, go look and find the right one please…) in the config, errors appear when the server is starting, and sometimes connecting fails, and i have to repeat connecting from the client a few times. LEAVING it as “default” causes the server to probe about and select the correct USB AUDIO for the IC7100. I had been correctly naming the sound devices, and although this sped up the start slightly, it made things more unreliable.

I also decided to nuke the on-board sound on the Pi. The HDMI can be killed by altering the config.txt line “dtoverlay=vc4-kms-v3d” to “dtoverlay=vc4-kms-v3d,noaudio” and analogue audio output can be disabled by omitting “dtparam=audio=on” from the same config.txt. You then will only have the USB AUDIO available in the raspi-config system options/sound, no loss given the pi is dedicated to being a WFview server.

I am still allowing the GUI to start, even though the pi is headless/armless. Switching the server to ‘X’ in raspi-config will allow the running of NOMACHINE remote desktop correctly (no white screen bug), which will allow You to enjoy the best of both worlds, INCLUDING using JTDX or WSJTx or FLDIGI on the pi itself over NOMACHINE, bypassing the need to run a wfview server at all, should that be a thing You like the idea of. I don’t, but it’s there if I am bored.