More > JRiver Media Center 23 for Linux
Thread priorities not working in headless mode
(1/1)
JHaycox:
I installed Media Center on a Raspberry Pi 3 B running the latest distribution of Raspbian (as of a week or so ago). I followed the "new" installation guide, thought not straight through since I initially picked up old directions. Media Center version is 23.0.102. When I run Media Center manually thread priorities look OK. But when I start it as a service thread priorities are not working.
Starting via the VNC viewer start menu gives:
pi@raspberrypi:~ $ ps -T -eo user,pid,tid,class,rtprio,ni,pri,comm | grep mediacenter23
pi 3412 3412 TS - 0 19 mediacenter23
pi 3412 7193 RR 46 - 86 mediacenter23
pi 3412 7194 RR 46 - 86 mediacenter23
pi 3412 7203 RR 50 - 90 mediacenter23
pi 3412 7205 RR 50 - 90 mediacenter23
pi 3412 7207 RR 50 - 90 mediacenter23
pi 3412 7211 RR 50 - 90 mediacenter23
Stopping the manually initiated task and starting system service shows:
pi@raspberrypi:~ $ sudo systemctl start jriver.service
pi@raspberrypi:~ $ ps -T -eo user,pid,tid,class,rtprio,ni,pri,comm | grep mediacenter23
pi 7357 7357 TS - 0 19 mediacenter23
pi 7357 7560 TS - 0 19 mediacenter23
pi 7357 7572 TS - 0 19 mediacenter23
pi 7357 7576 TS - 0 19 mediacenter23
pi 7357 7580 TS - 0 19 mediacenter23
pi 7357 7584 TS - 0 19 mediacenter23
pi 7357 7586 TS - 0 19 mediacenter23
pi 7357 7588 TS - 0 19 mediacenter23
pi 7357 7996 TS - 0 19 mediacenter23
pi 7357 7998 TS - 0 19 mediacenter23
pi 7357 8000 TS - 0 19 mediacenter23
pi 7357 8004 TS - 0 19 mediacenter23
pi 7357 8008 TS - 0 19 mediacenter23
The same thing happens when the service is started at bootup.
I tried some of the ideas in the installation guide posts (changing @audio to pi in limits.conf, etc.) but nothing helped.
JHaycox:
I am new to forum based support and I apologize if I did something wrong that accounts for zero replies. Please let me know if there is a better way to present issues next time.
I found a solution that seems to fix the problem:
Add the following line in the [Service] section of jriver.service:
LimitRTPRIO=100
To test I entered the following commands:
sudo systemctl daemon-reload
sudo systemctl stop jriver.service
sudo systemctl start jriver.service
Thread priorities were working at this point and after reboot.
To clarify the context of this fix see the following topic:
https://yabb.jriver.com/interact/index.php/topic,111505.0.html
Scroll to the section "Running Without a Monitor". My suggestion applies to the "new" method that runs MediaCenter as a service.
mwillems:
--- Quote from: JHaycox on February 16, 2018, 05:28:27 pm ---I am new to forum based support and I apologize if I did something wrong that accounts for zero replies. Please let me know if there is a better way to present issues next time.
I found a solution that seems to fix the problem:
Add the following line in the [Service] section of jriver.service:
LimitRTPRIO=100
To test I entered the following commands:
sudo systemctl daemon-reload
sudo systemctl stop jriver.service
sudo systemctl start jriver.service
Thread priorities were working at this point and after reboot.
To clarify the context of this fix see the following topic:
https://yabb.jriver.com/interact/index.php/topic,111505.0.html
Scroll to the section "Running Without a Monitor". My suggestion applies to the "new" method that runs MediaCenter as a service.
--- End quote ---
You didn't do anything wrong, the linux section of the forum is just a little "slower" than some of the other parts ;)
I can confirm your fix works, and thank you for figuring it out. I am the author of the systemd services and had been paddling around trying to figure out a robust solution to this problem, and this looks like a good fix. I'll add it to the services after a little more testing.
Navigation
[0] Message Index
Go to full version