Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Anyone using SuperCollider?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
paulj
Guru
Guru


Joined: 30 Sep 2004
Posts: 525
Location: Wales, UK

PostPosted: Wed Sep 25, 2024 5:22 am    Post subject: Anyone using SuperCollider? Reply with quote

I am revisiting supercollider (this time without using lisp!), and have a question regarding scheduling.
I get the following error when starting the supercollider ide:
Code:
Couldn't set realtime scheduling priority 1: Operation not permitted

  • My user is in the realtime group, and also the audio group.
  • I have the pre-emptive kernel set
    Code:
    CONFIG_PREEMPT_BUILD=y
     # CONFIG_PREEMPT_NONE is not set
     # CONFIG_PREEMPT_VOLUNTARY is not set
     CONFIG_PREEMPT=y
     CONFIG_PREEMPT_COUNT=y
     CONFIG_PREEMPTION=y
     CONFIG_PREEMPT_DYNAMIC=y
     # CONFIG_SCHED_CORE is not set
     

  • I have added configuration to the /etc/security/limits.d/
  • I have tried launching scide using
    Code:
    $> pw-jack scide


  • I am using pipewire, and have enabled the jack-ide use flag
  • I don't have jack installed
  • I get the same error message with the sys-kernel/rt-sources kernel

I am not sure if this is something to do with moving to pipewire from pulseaudio - it's been a long time since I ran supercollider, and I am not sure if I had issues then (although I don't recollect this issue).

If anyone can point me in the right direction, I would be very happy!

Thanks for reading!
Back to top
View user's profile Send private message
flexibeast
Guru
Guru


Joined: 04 Apr 2022
Posts: 449
Location: Naarm/Melbourne, Australia

PostPosted: Thu Sep 26, 2024 2:57 am    Post subject: Reply with quote

Off the top of my head:

* You haven't mentioned whether you're on an OpenRC-based or systemd-based system. If it's the former, and you're starting PipeWire via e.g. `gentoo-pipewire-launcher`, you might need to set up elogind so that device access permissions are set up appropriately. The "PipeWire" page on the wiki notes:

Quote:
PipeWire requires the presence of a D-Bus session bus and an XDG-compliant environment. Both requirements should be met by a desktop profile; on such systems, starting PipeWire is as simple as running the pipewire binary. On other profiles, if using OpenRC, permissions requirements might also need the elogind USE flag on the media-video/wireplumber package, together with elogind itself.

* That wiki page also notes, in the "Audio groups" section:

Quote:
For the best experience with fast user switching, it is recommended that you remove your user from the audio group unless you rely on the audio group for device access control or ACLs

and

Quote:
PipeWire's default configuration tries to use realtime scheduling to increase audio thread priorities. It's recommended that users are in the pipewire group. If the user doesn't have the necessary permissions for this, the configuration will try to use RTKit instead, so the package may need to be installed.
Back to top
View user's profile Send private message
paulj
Guru
Guru


Joined: 30 Sep 2004
Posts: 525
Location: Wales, UK

PostPosted: Thu Sep 26, 2024 7:18 am    Post subject: Reply with quote

Good morning flexibeast!
flexibeast wrote:
Off the top of my head:

* You haven't mentioned whether you're on an OpenRC-based or systemd-based system. If it's the former, and you're starting PipeWire via e.g. `gentoo-pipewire-launcher`, you might need to set up elogind so that device access permissions are set up appropriately. The "PipeWire" page on the wiki notes:

Quote:
PipeWire requires the presence of a D-Bus session bus and an XDG-compliant environment. Both requirements should be met by a desktop profile; on such systems, starting PipeWire is as simple as running the pipewire binary. On other profiles, if using OpenRC, permissions requirements might also need the elogind USE flag on the media-video/wireplumber package, together with elogind itself.

I am using an OpenRC based system, with plasma 6 as the desktop environment, using the openrc desktop profile (default/linux/amd64/23.0/desktop/plasma (stable)), so dbus and xdg compliance is good. Pipewire is working fine for all the other applications I use. In fact, apart from the error message, Supercollider is working as I would expect, with no noticeable lag or anything.
Quote:

* That wiki page also notes, in the "Audio groups" section:

Quote:
For the best experience with fast user switching, it is recommended that you remove your user from the audio group unless you rely on the audio group for device access control or ACLs

I need to look into this in more detail. I am not interested in fast user switching, as I am the only user on this machine anyway.
Quote:

Quote:
PipeWire's default configuration tries to use realtime scheduling to increase audio thread priorities. It's recommended that users are in the pipewire group. If the user doesn't have the necessary permissions for this, the configuration will try to use RTKit instead, so the package may need to be installed.

I need to read through this again. I do have the user in the pipewire group, as well as the realtime and rtkit groups, and have rtkit installed. I wonder if rtkit is interfering, and perhaps I should remove it?
Do you use SuperCollider on your system?
Thanks for your comments - I will explore the pointers you have given me!
Back to top
View user's profile Send private message
flexibeast
Guru
Guru


Joined: 04 Apr 2022
Posts: 449
Location: Naarm/Melbourne, Australia

PostPosted: Thu Sep 26, 2024 1:29 pm    Post subject: Reply with quote

i last tried using it in February, when most of my focus was on trying to get the Emacs frontend working (which resulted in me creating the "SuperCollider" page on the wiki and the warning thereon), but unfortunately i don't remember if i had any issues with SC itself then .... But i just tried running `scide` just now.

* The user i ran it under isn't a member of the 'audio' group.

* i use PipeWire+WirePlumber.

* i have sys-auth/rtkit installed on my system.

* i have sys-auth/elogin installed on my system, and use it to ensure that the active 'seat' has permissions to do stuff with hardware. media-video/wireplumber has the `elogind` USE flag enabled.

* Audio works overall without issues.

* In running `scide`, i don't get the error message on stdout you mentioned, but in the IDE itself, i get a "Couldn't set realtime scheduling" message.
Back to top
View user's profile Send private message
paulj
Guru
Guru


Joined: 30 Sep 2004
Posts: 525
Location: Wales, UK

PostPosted: Fri Sep 27, 2024 6:24 am    Post subject: Reply with quote

flexibeast wrote:
i last tried using it in February, when most of my focus was on trying to get the Emacs frontend working (which resulted in me creating the "SuperCollider" page on the wiki and the warning thereon), but unfortunately i don't remember if i had any issues with SC itself then

Yes - that is exactly how I started some time back, and you can find my earlier post about the Emacs frontend elsewhere in the forums!
Quote:

.... But i just tried running `scide` just now.

* Audio works overall without issues.

* In running `scide`, i don't get the error message on stdout you mentioned, but in the IDE itself, i get a "Couldn't set realtime scheduling" message.

This is exactly the same as I have then.

I'll keep going with this and see if I come across any issues as I learn supercollider.

Thanks again for the posts!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum