• WANTED: Happy members who like to discuss audio and other topics related to our interest. Desire to learn and share knowledge of science required. There are many reviews of audio hardware and expert members to help answer your questions. Click here to have your audio equipment measured for free!

camilladsp camillagui as user services Fedora 40

atomant

Member
Joined
Sep 8, 2024
Messages
64
Likes
8
Hi,

I tested the github service scripts available on github and they didn't work

Code:
~$ journalctl --user-unit=camilladsp
sep 26 13:16:46 systemd[3507]: /etc/xdg/systemd/user/camilladsp.service:12: Standard output type syslog is obsolete, automatically updating to journal.>
sep 26 13:16:46 systemd[3507]: /etc/xdg/systemd/user/camilladsp.service:13: Standard output type syslog is obsolete, automatically updating to journal.>
sep 26 13:16:46 (milladsp)[20202]: camilladsp.service: Failed to determine supplementary groups: Operation not permitted
sep 26 13:16:46 systemd[3507]: Started camilladsp.service - CamillaDSP Daemon.
sep 26 13:16:46 systemd[3507]: camilladsp.service: Main process exited, code=exited, status=216/GROUP
sep 26 13:16:46 systemd[3507]: camilladsp.service: Failed with result 'exit-code'.

Therefore, here is my little contribution:

sudo nano /etc/systemd/user/camilladsp.service
Code:
[Unit]
Description=CamillaDSP Service
After=network.target

[Service]
ExecStart=/usr/local/bin/camilladsp /home/user/.config/.camilladsp/stereo.yml -p1234 -w -o /home/user/.config/.camilladsp/camilladsp.log -s /home/user/.config/.camilladsp/statefile.yml
Restart=always

[Install]
WantedBy=multi-user.target
sudo nano /etc/systemd/user/camillagui.service
Code:
[Unit]
Description=CamillaDSP Backend and GUI
After=multi-user.target

[Service]
Type=idle
ExecStart=/usr/bin/python3 /opt/camillagui/main.py

[Install]
WantedBy=multi-user.target

To install, run and enable:
sudo systemctl --user daemon-reload
sudo systemctl --user start camillagui camilladsp
sudo systemctl --user status camillagui camilladsp
sudo systemctl --user enable camillagui camilladsp
sudo systemctl --user daemon-reload

To check for errors:
journalctl --user-unit=camilladsp --user-unit=camillagui

UPDATE sept 27

If it doesn't start at boot, check again with:
sudo systemctl --user status camillagui camilladsp
journalctl --user-unit=camilladsp --user-unit=camillagui


sudo systemctl --user disable camillagui camilladsp

Then edit the files, and again:
sudo systemctl --user daemon-reload
sudo systemctl --user start camillagui camilladsp
sudo systemctl --user status camillagui camilladsp
sudo systemctl --user enable camillagui camilladsp
sudo systemctl --user daemon-reload

and reboot to test...

New files:

Code:
~$ cat /etc/systemd/user/camilladsp.service
[Unit]
Description=CamillaDSP Service
After=pipewire.socket network.target

[Service]
ExecStart=/usr/local/bin/camilladsp /home/user/.config/.camilladsp/stereo.yml -p1234 -w -o /home/user/.config/.camilladsp/camilladsp.log -s /home/user/.config/.camilladsp/statefile.yml
Restart=always

[Install]
WantedBy=default.target

~$ cat /etc/systemd/user/camillagui.service
[Unit]
Description=CamillaDSP Backend and GUI
After=pipewire.socket network.target

[Service]
Type=idle
ExecStart=/usr/bin/python3 /opt/camillagui/main.py

[Install]
WantedBy=default.target
 
Last edited:
Should "user" be the user name?
If your files are in ~/.config then yes. Adjust for your proper paths.
Would "~/..." or "$HOME/..." work in place of "home/user/..."?
Not tested. I'm not a systemd specialist. I worked 20 years with rc.d. Still learning.

BTW I made a few changes again as services were not initializing properly. They goes like this:

1- In the service files:
After=graphical.target
instead of
After=pipewire.socket network.target
2- I still was not satisfied so I made an autostart and disabled the services:

sudo systemctl --user disable camillagui camilladsp

Code:
$ nano .config/autostart/fixsound.desktop
[Desktop Entry]
Type=Application
Exec=bin/fixsound.sh
X-GNOME-Autostart-enabled=true
NoDisplay=false
Hidden=false
Name[en_CA]=fixsound
Comment[en_CA]=Fix alsamixer master playback sound and start camilladsp
X-GNOME-Autostart-Delay=10
Name[fr_CA]=fixsound

Code:
$ nano  bin/fixsound.sh
#!/bin/bash
systemctl --user restart camilladsp camillagui
amixer -c 2 set Master playback 27 || amixer -c 1 set Master playback 27 || amixer -c 0 set Master playback 27


Again, adjust fou your paths.

You might not need that if the services are loading properly. It was not the case here.
Also if your sound volume is ok, you don't need the 'amixer' line. I need it because wirelumber/pipewire is resetting the sound card volume to 37%

Determine the card number with 'aplay -l'. Mine changes from 1 to 2 randomly at boot.

Code:
$ LANG=C aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Loopback [Loopback], device 0: Loopback PCM [Loopback PCM]
  Subdevices: 8/8
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
  Subdevice #3: subdevice #3
  Subdevice #4: subdevice #4
  Subdevice #5: subdevice #5
  Subdevice #6: subdevice #6
  Subdevice #7: subdevice #7
card 0: Loopback [Loopback], device 1: Loopback PCM [Loopback PCM]
  Subdevices: 8/8
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
  Subdevice #3: subdevice #3
  Subdevice #4: subdevice #4
  Subdevice #5: subdevice #5
  Subdevice #6: subdevice #6
  Subdevice #7: subdevice #7
card 1: HDMI [HDA ATI HDMI], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: CMI8738 [C-Media CMI8738], device 0: CMI8738-MC6 [C-Media PCI DAC/ADC]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: CMI8738 [C-Media CMI8738], device 1: CMI8738-MC6 [C-Media PCI 2nd DAC]
  Subdevices: 0/1
  Subdevice #0: subdevice #0
card 2: CMI8738 [C-Media CMI8738], device 2: CMI8738-MC6 [C-Media PCI IEC958]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
 
Mine changes from 1 to 2 randomly at boot.
It's possible to ensure the order remains the same across reboots with USB devices (I've not tried it with on board devices).

It's also worth looking at the alsa-capabilities script (mention on the link below) - I find it easier to interpret the output (instead of aplay).

 
It's possible to ensure the order remains the same across reboots with USB devices (I've not tried it with on board devices).
Hi, thanks for your interest.
It's also possible. I read on that not so long ago.
I've been very busy for the last 6 weeks, fixing one issue after another. Priorities. Will be included eventually. For the moment I test the most probable interface and if it returns an error, I test the next one. Crude but working until I configure it properly.
It's also worth looking at the alsa-capabilities script (mention on the link below) - I find it easier to interpret the output (instead of aplay).

Amazing! Thanks a lot!
 
Back
Top Bottom