INTERACT FORUM
More => Old Versions => JRiver Media Center 23 for Linux => Topic started by: mwillems on July 23, 2017, 08:33:08 am
-
This guide to performing a fresh install of JRiver's ARM build for the Raspberry Pi version 1 B+, Raspberry Pi version 2, or Raspberry Pi version 3. If you're looking to upgrade an older installation, see this thread for instructions: https://yabb.jriver.com/interact/index.php/topic,111372.0.html
Mediacenter works best on a Pi 2 or 3, but will work on the Pi 1 B+ (especially if you overclock), but the experience is limited. The steps to get MC running on the Pi are somewhat similar to getting it running on a normal linux system, with a few tweaks.
Setup
Hardware/OS setup:
Install Raspbian onto an SD card using the downloaded NOOBS image from the Raspberry Pi website. They have good instructions for install there.
Configuring Hardware:
At first boot the Pi may show a config utility (called raspi-config), if it doesn't show, it is now available through the launcher menu at the top left of the desktop. For easy use of mediacenter, I recommend a) making sure that the Pi is set to boot into a graphical desktop environment by default, b) choosing the audio output you want by default (HDMI or the Pi's built in audio output*), and c) thinking about whether you want to choose one of the overclock* options in the advanced options. Once you've picked your settings, reboot.
Notes:
Audio: the Pi's HDMI output works great, but the built in stereo jack is not the highest quality output in the world. I wouldn't recommend using it for actual listening. If you have a USB DAC, just ignore that for now, this option is only about the behavior of the Pi's built in audio outputs.
Overclocking: Overclocking can potentially shorten the life of your Pi or cause instability. However, because the Pi now comes with built in thermal throttling, you can overclock using the raspberry pi utility as described above without voiding your warranty. Overclocking makes a huge difference in performance for the Pi 1; I did not find the Pi 1 usable at stock settings, YMMV. Overclocking is less important for the Pi 2, but it definitely improves performance. AFAIK, the Pi 3 does not support out of the box overclocking. I have not personally encountered overclocking related instability with about four different Pis, but that doesn't mean you won't. If you decide to wait to overclock you can get back to the built in configuration utility any time by running the raspi-config utility from the menu in the upper right hand corner.
Software Preparation:
After rebooting, you should be looking at the Pi's desktop. If your Pi isn't plugged into to an ethernet line, take a minute to configure your wi-fi adapter to get internet access. Once that's done, open a terminal by clicking on the icon that looks like a computer monitor. Enter the following into the terminal:
sudo apt-get update && sudo apt-get dist-upgrade
After you enter the line, you'll be prompted whether to install updates to packages; press "y" to confirm. It may take a little while for the packages to download and install. Now enter the following into the terminal
cd /boot
sudo nano config.txt
This will show you the file config.txt in the text editor nano. You'll see a lot of information in the config file already, scroll down to the bottom of the file using the direction keys on your keyboard and enter the following two lines exactly as shown:
framebuffer_depth=32
framebuffer_ignore_alpha=1
Then save the file by pressing Ctrl+O, then enter. Then press Ctrl+X to exit, and you should be back at the terminal. Now close the terminal and reboot the pi.
Installing MC:
After the reboot, it's time to install MC:
wget -q "http://dist.jriver.com/mediacenter@jriver.com.gpg.key" -O- | sudo apt-key add -
sudo wget http://dist.jriver.com/latest/mediacenter/mediacenter23native.list -O /etc/apt/sources.list.d/mediacenter23.list
sudo apt-get update
sudo apt-get install mediacenter23
After installation completes, you should see MC in the application menu in the upper left hand corner under "sound and video." Open MC, and you're off!
Installing a License:
JRiver offers a 30-day trial, but to keep using the software you'll need to buy and register it. Currently a JRiver for Linux license or Master license will work. There are several ways to install a JRiver License, but the easiest way is to do it on the command line.
When you purchase JRiver, you receive an E-mail with an .mjr file. Download that file to your Raspberry Pi's Downloads directory (the one created above). Then open a terminal by clicking on the icon that looks like a computer and enter the following command:
mediacenter23 /RestoreFromFile ~/Downloads/"Media Center23 Linux-YYYYYY.mjr"
Replace the Y's with the numbers from your .mjr file, but otherwise enter the command exactly as shown.
NOTE for advanced users: This will not work correctly if you try to do it via ssh, because Mediacenter needs a display/xserver in order to run. If you have used the headless/VNC setup
instructions below, try connecting to the pi using VNC and using lxterminal to register your license.
Setting Thread Priorites for Improved Performance
To help ensure fewer dropouts and more seamless operation on a resource contrained sytem like a raspberry pi, you should set mediacenter to have greater priority over CPU time. To set the thread priorities, type
sudo nano /etc/security/limits.conf
This will open limits.conf for editing. Enter the following at the bottom of the file (if the file is empty when you open it, that's fine too):
pi - rtprio 100
@audio - rtprio 100
Then type the following into the terminal.
sudo usermod -aG audio pi
After your next reboot, Mediacenter should have improved thread priorities.
Audio Setup:
If you're using the Pi's built in audio output (HDMI or stereo), it should just work provided you did the steps above. If you have a USB DAC, you'll need to configure MC to address it just like in normal MC for Linux. That means looking under options --> Audio Devices and looking for a hardware device (an entry for your DAC that has something like "front:" or "surround:" in the name).
Updating:
To update mediacenter (and the rest of your Pi OS) just enter the following line on the terminal:
sudo apt-get update && sudo apt-get dist-upgrade
Troubleshooting Audio
If you followed the steps above and are not getting audio output via HDMI, try the following:
Alsamixer:
In the terminal "alsamixer" and you will see a volume bar (a "graphical" mixer displayed using ASCII characters). Check whether the volume is muted by looking at the bottom of the column: if you see "MM" press the "m" key to unmute and then press escape to exit. If you see "00" then the output isn't muted and that's not the problem (press escape to exit)
Monitor/DVI issues:
Many monitors expect/request a DVI input, which results in the Pi not sending sound to those monitors by default. To find out if that's what's causing your problem, open a terminal, and type
sudo nano /boot/config.txt
and then find the line that reads
#hdmi_drive=2
Remove the "#" symbol, and leave the rest of the line intact. If your file doesn't have that line for some reason, you can just add the line at the end of the file. In either case, save the file by pressing CTRL+O, and exit nano by pressing CTRL+X. Then reboot the Pi and test whether you can get sound over HDMI. Changing that option in config.txt has resolved no-audio issues for several folks with screens that have those issues with HDMI support.
Pops and Dropouts:
Pops or dropouts can be caused by a lot of different things and can be tough to troubleshoot. Some users have found that adjusting CPU frequency scaling can help on RPi 2's (RPI 1's won't benefit from this tweak). The following link explains how to set your RPi 2 to stay at maximum CPU frequency (using the performance CPU governor: http://yabb.jriver.com/interact/index.php?topic=95578.msg676554#msg676554
Some notes on getting the most out of MC on the Pi:
The Pi is not a full-featured computer so things will take longer to do on the Pi than on a normal computer. Be patient especially during startup or right after. It might take ten or even thirty seconds for mediacenter to start after you click the icon (depending on whether you have a pi 1 or pi2 and your other settings). Video is not currently supported. Other than that issue, everything I've tested works pretty well.
An Important Note Concerning Power:
Pi's are very sensitive to not having enough power; if you plug in too many power hungry USB peripherals it can cause the Pi to reboot or turn off (and corrupt the sd card!). The safest way to resolve this is to use a good powered USB hub and plug the peripherals into that. The best part is that the Hub can also power the Pi itself, so you still only have one wall plug! Some USB hubs won't work very well due to back-power issues, but a recommended list of hubs is available here: http://elinux.org/RPi_Powered_USB_Hubs. To be clear, if you're just plugging in a usb keyboard/mouse and a wi-fi adapter you should be fine with the normal power supply; it's things like external hard drives and USB DACs that need more juice.
Additionally, if you don't want to use a USB hub, you may be able to power more peripherals by adding the following line to your config.txt:
max_usb_current=1
That line allows the Pi's USB ports to supply more current to peripherals, which has allowed several forum members to use an external Hard Drive without using a USB hub. [Thanks to Hilton for finding and testing that option.]
Pi's are also sensitive to sudden loss of power: cutting off the power on a pi without shutting down properly can and will corrupt your sd card. For that reason it's important to always shut down your pi appropriately. However accidental power outages do occur, so, as a best practice, consider backing up your sd card with a disk imaging utility once you've gotten everything working the way you want. Another more advanced approach is to hook up a rechargeable battery in between the power supply and the Pi to act as a buffer in case of sudden power loss, and configure the Pi to shut down gracefully when mains power goes out, but that's a more advanced topic.
Status of Features
What I've tested that works for me:
1) Local audio playback of FLACs and MP3s (Pi 1, 2, and 3)
2) Using the Pi as a library client (Pi 1, 2, and 3)
3) Using the Pi as a DLNA renderer (Pi 1, 2, and 3)
4) Controlling the Pi with gizmo or eos (Pi 1, 2, and 3)
5) Streaming to gizmo from the Pi (works on Pi 2 and 3, not on the Pi 1)
6) Normal window resizing
7) ALSA-compatible USB DACs
8 ) Using an external hard drive with the Pi (some additional configuration required for some drives)
9) A user has reported that DSD works on the pi (as of 2017)
What I have not tested:
1) Airplay, etc. (I have no macs or i-devices to test with)
What is not working/supported:
1) Video Playback
-
Running Without a Monitor: If you would like to run the Pi without a monitor attached, that's a slightly more advanced topic. MC needs some kind of "display" in order to run. When a monitor is not attached, the pi will not necessarily start it's display, which will prevent MC from running. The following steps outline a very basic method of creating a virtual display and allowing for remote control of Mediacenter on the pi. NOTE: If you're using a different username than "pi", you should replace all instances of "pi" in the code below with your username.
Enter the following onto the end of your /boot/config.txt file (as described above)
framebuffer_width=1920
framebuffer_height=1080
hdmi_group=2
hdmi_mode=82
hdmi_drive=2
New Method
This method has some advantages over the old method and is recommended.
First enter the following text in a file at /etc/systemd/system/jriver.service:
[Unit]
Description=JRiver
After=display-manager.service
[Service]
Type=simple
Environment=DISPLAY=:0
User=pi
ExecStart=/usr/bin/mediacenter23 /MediaServer
Restart=always
RestartSec=10
KillSignal=SIGHUP
TimeoutStopSec=45
LimitRTPRIO=100
[Install]
WantedBy=graphical.target
Then enter the following text in /etc/systemd/system/x11vnc.service:
[Unit]
Description=x11vnc
After=display-manager.service
[Service]
Type=forking
Environment=DISPLAY=:0
User=pi
ExecStart=/usr/bin/x11vnc -rfbauth /home/pi/.vnc/passwd -display :0 -geometry 1920x1080 -auth guess -forever -bg
Restart=always
RestartSec=10
[Install]
WantedBy=graphical.target
Then run the following command replacing "your_password" with a password of your choice:
sudo apt-get install x11vnc
x11vnc -storepasswd your_password ~/.vnc/passwd
Once you've done the above, set them to start on boot by typing
sudo systemctl enable jriver.service
and
sudo systemctl enable x11vnc.service
Then reboot, and you should have jriver and a VNC server running automatically on boot and both will restart if they crash. Test it out by trying to log in from another computer using a VNC client. For example, tigervnc is available for Windows, Mac, and Linux: https://bintray.com/tigervnc/stable/tigervnc/1.4.3
When you start TigerVNC it will ask you for the VNC server details. Enter the ip address* of your pi. It will look something like 192.168.1.35
Once you enter the address, click connect, and it will prompt you for your password.
*If you don't know the ip address of your pi, enter "sudo ifconfig" in a terminal on your pi, and it will tell you. You're looking for a 4-part number separated by periods next to the phrase "inet addr." You want the one in the paragraph labelled eth0 if your pi has a wired connection or wlan0 if your pi has a wireless connection.
You should now be looking at your pi desktop with MC running!
Old Method (Don't use this in addition to the new method, its either/or)
Then enter the following commands replacing your_password with a password you will remember
sudo apt-get install x11vnc
mkdir /home/pi/.vnc
x11vnc -storepasswd your_password /home/pi/.vnc/passwd
Now enter the following line:
x11vnc -rfbauth ~/.vnc/passwd -display :0 -geometry 1920x1080 -auth guess -forever -bg
You should now have a remote VNC server running on your pi. Test it out by trying to log in from another computer using a VNC client. For example, tigervnc is available for Windows, Mac, and Linux: https://bintray.com/tigervnc/stable/tigervnc/1.4.3
When you start TigerVNC it will ask you for the VNC server details. Enter the ip address* of your pi. It will look something like 192.168.1.35
Once you enter the address, click connect, and it will prompt you for your password.
*If you don't know the ip address of your pi, enter "sudo ifconfig" in a terminal on your pi, and it will tell you. You're looking for a 4-part number separated by periods next to the phrase "inet addr." You want the one in the paragraph labelled eth0 if your pi has a wired connection or wlan0 if your pi has a wireless connection.
You should now be looking at a virtual desktop on your pi, from which you can run MC!
We're not done yet, though, as we still need to configure the pi to start the vncserver and MC on boot. The easiest way to do this is with a cron script. Type "sudo nano ~/headless" into the terminal and type the following#!/bin/bash
export USER=pi
export DISPLAY=:0
x11vnc -rfbauth ~/.vnc/passwd -display :0 -geometry 1920x1080 -auth guess -forever -bg
mediacenter23 /mediaserver
Once you're done, press CTRL-X, and choose "y" and press "enter" twice. Now type
sudo chmod 755 ~/headless
crontab -e
After you enter the second command, you may be prompted you to choose an editor; if so choose /bin/nano, which should be option 1. Now you should now be looking at a file with some information in it.
If you want mediacenter to launch on boot type the following line at the bottom of the file:@reboot /home/pi/headless > /dev/null
Once you've added the one you want, press CTRL-X and then "y" and "enter" twice. Now reboot your pi as described above, and within a few minutes you should be able to access MC and your VNC desktop.
-
Thanks very much, mwillems!
-
Where can I find JRiver 21 for linux?
-
Where can I find JRiver 21 for linux?
https://wiki.jriver.com/index.php/Old_Versions
-
Running Without a Monitor:
x11vnc -storepasswd your_password ~/.vnc/passwd
I tried the above command with "your-password" changed and received an error message: "bash: x11vnc: command not found"
-
Is there a timeline for video and/or tv support? If so, could you please share this information?
-
Is there a timeline for video and/or tv support? If so, could you please share this information?
No timeline for TV support.
As for video, it is being considered.
-
I tried the above command with "your-password" changed and received an error message: "bash: x11vnc: command not found"
Apologies, I forgot to bring something over from the old method. First run "sudo apt-get install x11vnc"
-
Apologies, I forgot to bring something over from the old method. First run "sudo apt-get install x11vnc"
Thank you. Could you explain why this method of starting a x11vnc service is preferred over the built-in one which just enables VNC in the RPi's settings (together with ssh)?
-
Thank you. Could you explain why this method of starting a x11vnc service is preferred over the built-in one which just enables VNC in the RPi's settings (together with ssh)?
1) The "built in" VNC method is a relatively new addition to the raspbian image, so I haven't personally tested it (i.e. there was not a usable option for that the last time I set up my own pi systems).
2) Not all VNC servers are equivalent. Several linux vnc servers (tightvncserver and others) no longer work with MC at all due to changes in MC in the MC22 cycle. X11vnc is used because it is known to work; I don't know what VNC server the pi uses for its built in option. It may or may not work. If you test it and it works as expected, do report back and I'll add a note.
-
In the Raspberry configuration file I enable VNC and on my Macs I run VNC Viewer. I do this on both a Raspberry 3 and a Raspberry 1+ on which I run Pi-hole. In both cases it is very stable. What isn't so stable is MC which crashes regularly after using JRemote.
-
In the Raspberry configuration file I enable VNC and on my Macs I run VNC Viewer. I do this on both a Raspberry 3 and a Raspberry 1+ on which I run Pi-hole. In both cases it is very stable. What isn't so stable is MC which crashes regularly after using JRemote.
I was more concerned about stability with MC, not stability in general. It sounds like you're having instability with MC which may or may not be related to the VNC solution. With at least one VNC server, MC was just constantly crashing after the changes in MC22, so you might want to try x11vnc just to rule out the VNC server as a source of instability.
-
I wrote some notes to myself to remind me how to set up MC23 on a headless Raspberry using MWillems's excellent guide. I added some other details I found to be useful and the necessary information to make it work with a Synology NAS. I hope they might be of some use to others as well.
Headless Raspberry SETUP MC23 on Mac
Use Etcher (https://etcher.io/) to “burn” Raspberry Stretch image (https://www.raspberrypi.org/downloads/raspbian/) to SD card (I use 8 rather than 16 Gb since it keeps the backups smaller)
Add “ssh” file (may be empty; no extension) to root dir of BOOT SD on Mac (this forces raspberry to enable ssh)
After boot ssh into Raspberry from Mac terminal: ssh pi@192.168.X.XX
[If necessary delete the key that is preventing access with: ssh-keygen -R 192.168.X.XX]
Run from Terminal in Raspberry: sudo raspi-config and go to “Interfacing options” and enable VNC
Edit fstab to gain access to NAS (Synology in my case) music folder:
sudo nano /etc/fstab
add the following line at the end:
192.168.X.XX:/volume1/music /home/pi/Music nfs defaults,noatime,x-systemd.automount.nolock 0 0
To install MC23 follow: https://yabb.jriver.com/interact/index.php/topic,111505.0.html Use MWillems’s New Method to set up headless [I have disabled the x11vnc.service setup part because the built in VNC options with VNC Viewer on the Mac/Windows offers more security and flexibility. If you did set up x11vnc.service, as I did, and want to disable it, run in a Terminal window (without quotation marks) “sudo systemctl disable x11vnc.service” This will remove the symbolic link that indicated that the service should be started automatically]
Remember also to:
— setup the audio properly in MC using Options > Audio
— pre-build missing thumbnails in Tree & View > Thumbnails (otherwise JRemote might crash)
— set Thumbnails creation to Low in Tree & View > Thumbnails
— set MC to backup to external USB stick (Options > File locations) because if you leazve it set to the default it will back up to sd card and if that card becomes unreadable (as happened to me) your MC backup is gone too.
— install the licence
— set MC to audio only (View > Audio only) if you prefer a slightly less cluttered view
-
Is this solution bit pefect?
-
If you're using one of the hw: or front: devices for (ALSA) output, then yes. If you're using Pulse, no.
-
Thanks so much for taking the time to write up the guide. Well done. Saved me a bunch of time.
Ken
-
I already own a windows license. Can I install a 30 day linux trial license on my PI? Also, can the arm version use a hifiberry DAC?
-
Yes, you can run MC on the Pi with a 30 day trial.
But, keep in mind, you can't use the Windows license on Linux (unless you have a master license).
-
Thanks, mainly I just want to see if I'm capable of installing it before upgrading to a masters license.
can the arm version use a hifiberry DAC?
-
https://yabb.jriver.com/interact/index.php/topic,110253.msg762296.html#msg762296
-
perhaps I can save somebody a little grief. I am in no way a linux expert or even beginner.
Added to /boot/config.txt
# Enable audio (loads snd_bcm2835)
#dtparam=audio=on MAKE SURE THIS IS COMMENTED OUT
#HiFIBerry
dtparm=i2c1=on
dtparm=audio=off
dtparm=i2c1=on
dtoverlay=hifiberry-dacplus
Create file /etc/asound.conf with the following contents
pcm.!default {
type hw card 0
}
ctl.!default {
type hw card 0
}
-
When I click "Upgrade to masters license" from a registered windows install it says $36.98. Is that correct price and is going through mediacenter the best way to upgrade?
-
You have mail.
-
JimH You have a PM.
-
OK, I got running with a master license installed. In a quest to get album artist art working smoothly I ended up with a hybrid kind of configuration. I installed raspbian stretch lite then xFce on top of that. Theater mode is dicey but I'm content with display mode showing playing now the cover art.
I'm not a linux guy, ideally I would like jriver to start in the console on power on. I have linux doing a autologon into xFce already, I'm just missing the boat on how to bring up the jriver app within the console.
Once its running I'm using Panel to control it and ssh to shut it down from a chrome book.
any help would be appreciated, I know very little about linux.
-
nevermind I figured it out with autostart
-
@astropupy. Could you tell us how you managed to start MC automatically? Thanks
-
Sure, basically I followed these instructions
https://neverbenever.wordpress.com/2015/02/11/how-to-autostart-a-program-in-raspberry-pi-or-linux/ (https://neverbenever.wordpress.com/2015/02/11/how-to-autostart-a-program-in-raspberry-pi-or-linux/)
My autologin user is astropuppy so pi is replaced with astropuppy in the directory structure,
[Desktop Entry]
Name=mediacenter23
Exec=mediacenter23
Type=application
From there I set jriver options to display mode when a song is played.
I am not a linux person, there may be better ways to do this.
-
Sure, basically I followed these instructions
https://neverbenever.wordpress.com/2015/02/11/how-to-autostart-a-program-in-raspberry-pi-or-linux/ (https://neverbenever.wordpress.com/2015/02/11/how-to-autostart-a-program-in-raspberry-pi-or-linux/)
My autologin user is astropuppy so pi is replaced with astropuppy in the directory structure,
[Desktop Entry]
Name=mediacenter23
Exec=mediacenter23
Type=application
From there I set jriver options to display mode when a song is played.
Thanks for the tip
I am not a linux person, there may be better ways to do this.
Neither do I ;)
Any particular reason why you choose xFce?
-
Depending on the desktop environment you're using, it *should* have some sort of "startup applications" feature. I do know GNOME (via GNOME Tweak Utility) and Cinnamon has such features.
Xfce is probably being used because it's pretty lightweight and fast, perfect for a Pi setup.
-
Any particular reason why you choose xFce?
Long story, but basically xFce worked with auto-login and the others: pixel and lxde did not. My PI's single purpose is to run JRiver audio. Hence I go with the flow of what works easily.
Because I loaded xFce on top of Stretch lite my xFce is very basic, no browser etc. The only extra it has is the command window. I used raspi-config to setup auto login and auto start to fire up JRiver. Linux is still a very mysterious thing to me, I'm just bumping along, enjoying the music along the way.
-
Thanks Awesome Donkey and astropuppy, I'll stick to what you experienced and that sounds good. As a matter of fact my RPi will act as client only (with Hifiberry Digi+ Pro connected to external DAC). I'm using JRiver in audio only mode, and at last I will get rid of the PC in the audio/video room.
-
Thanks to all the information in this thread and thanks to the awesome work that has been achieved by JRiver team in order to get a linux version, I must say that I'm pretty impressed by MC23 running as a client to a library server. I installed Stretch lite and Xcfe4 https://www.raspberrypi.org/forums/viewtopic.php?f=66&t=133691 (https://www.raspberrypi.org/forums/viewtopic.php?f=66&t=133691). As said in another post I have a Hifiberrry Pro + powered by a low noise power supply, connected to an external DAC (everything is upsampled to 24 bits/192KHz did not try yet SoX)
VNC is setup as well. MC starts automatically as soon as the desktop is running. However I'd like to get the session autologged. Maybe I did not search correctly, but I did not find how to achieve this.
-
First thanks to every one that has contributed to the Linux version and this specific implementation on the Raspberry Pi.
I have MC on several W10 machines in my home and two external using a FreeNas File Server as source of my media material. Today I installed the Unix version on a Raspberry Pi 3 running the Raspian OS installed as recommended in this thread. Previously I have installed Kodi (17) on the same HW with good results.
The install went without trouble and mounting my library likewise. Playing music is OK but playing video is stuttering and unresponsive. (I am trying to stream the original material at full quality).
So Kolia how did your installation turn out?
Anyone that have any suggestions/opinions on weather the slow speed can be improved and if so, how?
-
Well I'm using MC in audio only mode. I'm using Plex on Nvidia Shield Pro for video.
-
Thanks... I have not actually tried to find out if the Video Play is released. It seems to work though. I have forced a re-coding at the server to 470p, but the same stuttering. Since PLEX works I guess that the processing power is sufficient and that video playback is not finished yet?
Any comments from someone else?
Post Note: From the release notes it seems the functionality should work OK .. So either my set up is buggy or the HW is not fast enough
-
Thanks... I have not actually tried to find out if the Video Play is released. It seems to work though. I have forced a re-coding at the server to 470p, but the same stuttering. Since PLEX works I guess that the processing power is sufficient and that video playback is not finished yet?
Any comments from someone else?
Post Note: From the release notes it seems the functionality should work OK .. So either my set up is buggy or the HW is not fast enough
Video isn't supported on the Pi in MC as far as I know. That's included in the list of things that don't work at the top of this thread. It works for the linux version more generally, but to my knowledge it is neither working nor supported on the Pi or the armhf platform generally.
-
Hi guys
Thanks @mwillems for the effort to maintain up-to-date info! It makes it so much easier for us guys that dont play with linux everyday. :)
I did an in-place upgrade of Wheezy to Jessie stretch (which took forever to run) but it did finish. I had a backup and was fully prepared (reluctantly) to have to rebuild my customisations for my Pi Brick from scratch. Thankfully it wasn't needed.
I followed your new instructions for X11VNC and have replaced my old XRDP remote desktop setup successfully with VNC. I'm just stress testing the upgrade with MC23 with a mix of different files and formats from MP3 to different FLAC and DSD DFF files. So far so good.
I was running MC21 for the last couple years on the Pi and was dreading the upgrade because of all my customisations for my Pi player.
Thankfully all my customisations came through unscathed too!
If all goes well the Pi MC23 will become a permanent fixture in my car again to replace all the other things I've been playing with to get quality audio in the car again (without resorting to bluetooth or chromecast)
One thing I did note - it's imperative to force a thumbnail build on the Pi before you start using JRemote. With only 3k or so files in the library, MC23 would crash whenever I loaded up JRemote and started navigating the library.
After building the thumbnails all good so far. :)
Thanks again!
-
Is it possible to set thread priorities on a Pi? Can't seem to get it to work as described in the main thread: https://yabb.jriver.com/interact/index.php/topic,111373.msg769735.html#msg769735
-
Is it possible to set thread priorities on a Pi? Can't seem to get it to work as described in the main thread: https://yabb.jriver.com/interact/index.php/topic,111373.msg769735.html#msg769735
Yes, this works. It's the default setup on our IdPi's.
Did you reboot after doing the setup?
Are you running MC as the user (or group) for which you setup the thread priorities?
-
Yes, this works. It's the default setup on our IdPi's.
Did you reboot after doing the setup?
Are you running MC as the user (or group) for which you setup the thread priorities?
Thanks Bob....
User pi is in the audio group:
pi@raspberrypi:~ $ groups
pi adm dialout cdrom sudo audio video plugdev games users input netdev gpio i2c spi
Here is the end of the limits.conf file:
# End of file
@audio - rtprio 100
I followed the instructions verbatim and rebooted several times. I didn't get any errors. My other pc linux install priorities work fine, just not the pi (3). Currently I am getting the following on the pi3:
pi@raspberrypi:~ $ ps -T -eo pid,tid,class,rtprio,ni,pri,comm | grep mediacenter23
1428 1428 TS - 0 19 mediacenter23
1428 1775 TS - 0 19 mediacenter23
1428 1779 TS - 0 19 mediacenter23
1428 1785 TS - 0 19 mediacenter23
1428 25842 TS - 0 19 mediacenter23
pi@raspberrypi:~ $
Any help is appreciated.
-
Thanks Bob....
User pi is in the audio group:
pi@raspberrypi:~ $ groups
pi adm dialout cdrom sudo audio video plugdev games users input netdev gpio i2c spi
Here is the end of the limits.conf file:
# End of file
@audio - rtprio 100
I followed the instructions verbatim and rebooted several times. I didn't get any errors. My other pc linux install priorities work fine, just not the pi (3). Currently I am getting the following on the pi3:
pi@raspberrypi:~ $ ps -T -eo pid,tid,class,rtprio,ni,pri,comm | grep mediacenter23
1428 1428 TS - 0 19 mediacenter23
1428 1775 TS - 0 19 mediacenter23
1428 1779 TS - 0 19 mediacenter23
1428 1785 TS - 0 19 mediacenter23
1428 25842 TS - 0 19 mediacenter23
pi@raspberrypi:~ $
Any help is appreciated.
Seems fine to me
I am assuming you are running a fairly current build of MC 23?
You might try change the @audio in /etc/security/limits.conf to pi instead (if you are running MC as the pi user).
Maybe look for errors in limits.conf?
-
Seems fine to me
I am assuming you are running a fairly current build of MC 23?
You might try change the @audio in /etc/security/limits.conf to pi instead (if you are running MC as the pi user).
Maybe look for errors in limits.conf?
Yes, running version .93.
I already tried changing @audio to @pi with the same results.
I don't see any errors in limits.conf, actually all lines are commented out other than what I added.
I will try reverting back to a previous version of MC.
EDIT: Reverted back to stable .80 with same results.
OBSERVATION: It's been a while since I did the initial MC install and can't remember how I achieved MC autostart. It may be related, now when I exit MC in Raspbian MC restarts automatically without reboot, cannot keep MC closed.
-
Yes, running version .93.
I already tried changing @audio to @pi with the same results.
I don't see any errors in limits.conf, actually all lines are commented out other than what I added.
I will try reverting back to a previous version of MC.
EDIT: Reverted back to stable .80 with same results.
OBSERVATION: It's been a while since I did the initial MC install and can't remember how I achieved MC autostart. It may be related, now when I exit MC in Raspbian MC restarts automatically without reboot, cannot keep MC closed.
I was thinking to try the pi without @ in front of it (pi user not group).
The autostart may be the issue. It could be autostarting before limits.conf is read.
-
I was thinking to try the pi without @ in front of it (pi user not group).
The autostart may be the issue. It could be autostarting before limits.conf is read.
I was using the systemd service type startup here: https://yabb.jriver.com/interact/index.php/topic,111505.msg770591.html#msg770591 and it prevented priorities from working. Priorities works when starting MC normally. Now I am trying to figure out the easiest way to start MC on boot.
EDIT: Placed "@mediacenter23" in /home/pi/.config/lxsession/LXDE-pi/autostart, all is well now.
-
So the systemd autostart is preventing the thread priorities from working? That is indeed very odd. I'll need to tinker and see if I can figure out why that should be; the systemd unit definitely waits until after the display manager loads; you'd think the limits would be established by then.
-
So the systemd autostart is preventing the thread priorities from working? That is indeed very odd. I'll need to tinker and see if I can figure out why that should be; the systemd unit definitely waits until after the display manager loads; you'd think the limits would be established by then.
I'm guessing that the limits.conf per user/group settings might require getting past some user login code.
-
I was thinking to try the pi without @ in front of it (pi user not group).
The autostart may be the issue. It could be autostarting before limits.conf is read.
Thanks Bob and Zhillsguy. changing @audio to pi in the limits.conf worked for me. I now get the RR 99 part, which I wasn’t getting with @audio in the etc/security/limits.conf file.
I hope this fixes my random micro freezes.
-
I just installed Lubuntu for the Pi available here:
https://ubuntu-pi-flavour-maker.org/download/
Followed the normal MC install instructions for Debian/Ubuntu, all went flawlessly. Seems pretty responsive as well, definitely a usable alternative to Raspbian.
-
I need some help with Media Center 23. It is running on a raspberry pi 2 and installed according to this thread. The MC is running in headless mode. The MC is running well for about 2 to 3 days and then MC is stopping/crashing, although the raspberry pi is still running (I can ping it and also connect via ssh). When I try to connect to the MC via JRemote or Gizmo, I get a message "Java refused to connect". After rebooting MC is running well again for another 2 to 3 days. I already installed a crontab for the user pi and the root for a reboot every day at 1 and 3 am every day, but still MC stops.
The frequently manual rebooting is not the right solution for me, especially because the users of the MC are not pc experts. Has somebody a good idea how to solve the problem?
-
It's possible the power supply isn't adequate for the attached devices, if any. Please describe your configuration.
-
Thank you for responding. I am pretty sure, that the power supply is not the problem. The power supply is a raspi 5.1V, 2.5 Ampere power supply. The raspi is running on LAN and the only connection is one external USB harddrive 2.5 ", 500GB for the music data. The raspi is running 24/7 days and in the beginning I found a problem with the router which had only a lease of 1 day. I changed that to a fixed ip address and then the raspi run for about 2 days. I am not sure if there are running some logs under MC23 ? Nevertheless I implemented a crontab for restart every day at 3 am. I am controlling the MC via JRemote with the iPad or EOS with the android tablet. The music is playing in three different zones, but only one zone at the time.
I am not quite sure, but the last time the MC23 run for 3 days (which was record !) and my daughter started her old android tablet with gizmo to control the music. After that the MC crashed again. Can it be that the old gizmo is not any longer compatible with MC23 on raspberry pi?
-
Thank you for responding. I am pretty sure, that the power supply is not the problem. The power supply is a raspi 5.1V, 2.5 Ampere power supply. The raspi is running on LAN and the only connection is one external USB harddrive 2.5 ", 500GB for the music data. The raspi is running 24/7 days and in the beginning I found a problem with the router which had only a lease of 1 day. I changed that to a fixed ip address and then the raspi run for about 2 days. I am not sure if there are running some logs under MC23 ? Nevertheless I implemented a crontab for restart every day at 3 am. I am controlling the MC via JRemote with the iPad or EOS with the android tablet. The music is playing in three different zones, but only one zone at the time.
I am not quite sure, but the last time the MC23 run for 3 days (which was record !) and my daughter started her old android tablet with gizmo to control the music. After that the MC crashed again. Can it be that the old gizmo is not any longer compatible with MC23 on raspberry pi?
Did you pre-build all thumbnails and set the thumbnailing priority to low? If using gizmo triggers a crash it's almost certainly an issue with running out of memory while building thumbnails (triggered by browsing in gizmo). Did you use any of the auto-restart options in the top of the thread (i.e .the systemd services)?
-
The power supply is a raspi 5.1V, 2.5 Ampere power supply. The raspi is running on LAN and the only connection is one external USB harddrive 2.5 ", 500GB for the music data.
The drive may draw more power than the Pi can supply. Please read this:
https://www.raspberrypi.org/help/faqs/#topPower
-
I set up the MC with a monitor but I do not know if I put the thumbnail priority to low. Now the raspi is running headless (and actually I cannot connect a monitor). Is it possible to access the thumbnail priority via ssh?
Yes I installed MC according to your excellent introduction, which worked perfect including the auto start according to your "old" instruction.
If gizmo is the possible crashing issue, I will now test for the next days with JRemote and EOS. If it runs stable, I will deinstall all gizmos. I will now monitor the issue for the next 3 days and come back with the results. If it still crashes I will also change the harddrive to an external hub with extra power supply. The actual external housing has only power supply via USB cable.
I remember there was a possibility to increase the current for the USB devices, can you please send me the comand line?
-
I set up the MC with a monitor but I do not know if I put the thumbnail priority to low. Now the raspi is running headless (and actually I cannot connect a monitor). Is it possible to access the thumbnail priority via ssh?
Yes I installed MC according to your excellent introduction, which worked perfect including the auto start according to your "old" instruction.
If gizmo is the possible crashing issue, I will now test for the next days with JRemote and EOS. If it runs stable, I will deinstall all gizmos. I will now monitor the issue for the next 3 days and come back with the results.
You've misunderstood me; any of the android remotes will cause the problem I'm thinking of because all of them force MC to start thumbnailing like crazy which will create an out of memory condition. You can find instructions in the second post at the top for how to access a headless system remotely via VNC which will allow you to change the thumbnailing priority and pre-build thumbnails.
-
Does MC still build thumbnails if the option is unchecked under Tools/Import/Configure Auto-Import?
-
Does MC still build thumbnails if the option is unchecked under Tools/Import/Configure Auto-Import?
Yes, MC will always build thumbnails when viewing albums, it's only a question of when they get built. If the option you mention is checked, MC builds the thumbnails when importing media. If you leave that box unchecked and don't pre-build thumbnails, MC builds the thumbnails on demand (i.e. when you try to view a library view that displays cover art either in a remote or in MC). On a normal PC this works great and doesn't really create any problems other than the UI might slow down on occasion. But building thumbnails on demand sometimes creates problems for the pi. The pi has very little CPU power and very little memory, so a sudden request to build a bunch of thumbnails (which consumes quite a bit of CPU and memory because its image processing), possibly while also decoding and playing music, will create enough memory pressure to crash MC (or get it killed by the linux out of memory killer). The "best" case scenario is that things slow down and you might get some skips and dropouts in the music.
The winning solution is to (when first setting up the pi) set the thumbnailing priority to low (which will reduce the CPU contention and memory pressure), and then click the menu item to build all thumbnails. Then leave the pi alone for a few hours or overnight. When you come back all the thumbnails will have been pregenerated and you will have a much more stable and performant MC instance on your pi. You're more likely to encounter this problem the larger your library becomes, but I've managed to trigger it with comparatively small libraries. The mobile clients seem to be more likely to trigger the problem, I think because it's easy to scroll through a huge list of albums which triggers on-demand thumbnailing for all of them.
-
Thanks for the detailed explanation. I've always been curious about thumbnail generation. You are spot on about the Pi getting overwhelmed easily, it doesn't take much of a bump in the road to make it skip or buffer, but if set up correctly it's quite usable.
I've been looking at other SBC's, and ended up ordering an Odroid C2. More powerful but not as much community support. There are enough available OS images to make it palatable to use with MC.
-
Thanks for the detailed explanation. I've always been curious about thumbnail generation. You are spot on about the Pi getting overwhelmed easily, it doesn't take much of a bump in the road to make it skip or buffer, but if set up correctly it's quite usable.
I've been looking at other SBC's, and ended up ordering an Odroid C2. More powerful but not as much community support. There are enough available OS images to make it palatable to use with MC.
Do you have it working well with the C2? I tried running MC on an older ODROID C1 and an ODROID U3, and there were basic roadblocks because their video outputs didn't support adequate color space so MC just appeared as a solid black or white square; attempts to set the video output to a higher color space either didn't work or broke X11 (because the firmware didn't support it). There were also dozens of other issues with the two SoC's (certain USB DACs that worked in mainline didn't work with odroid, no video hardware acceleration for most programs, etc.) that were never resolved before ODROID EOLed those boards, which led me to shelve ODROID indefinitely. But if everything works great on the C2 that would be good news and I might give them another chance.
-
The C2 won't be here until next week, I will advise after tinkering.
-
thank you mwillems for the detailed explanations. It makes it clearer for me. Actually I have several crashes of MC per day always with the message "java.net connect exception: connection refused". I will now get an adapter to get the monitor connected to the raspi in order to change the thumbnail issue. I hope that will solve the problem.
-
My previously registered and working copy of mediacenter23 on Raspbian no longer saves my registration details - it accepts the registration code at program start-up, but then forgets the registration details when it is re-started. I have a Master licence which I purchased in Nov 2017 as an upgrade from MC22. The drive that all software is installed on is accepting writes OK (it's not the fault where Raspberry Pi drives go permanently read-only). Mediacenter23 is installed in /usr/bin, which I assume is correct. I've used up 6 of my 20 annual restores so far trying different ways to fix this problem.
-
Make sure you're using the latest 23.0.100 build.
-
I eventually got that to work, but it took a long time, and I've used up about 8 of my year's worth of restores.
-
I've reset your restores.
-
I need some possibilty to access MC23 remotely. I followed these instructions and trie to connect with MS Remote Desktop. No chance: »Bad request«. Something is lacking. But what? I did all exactly as described here, but...
(I need remete access because the auto import is not working and I must start the import manually when I added new files. So if this doesn’t work, MC23 is useless.)
-
I need some possibilty to access MC23 remotely. I followed these instructions and trie to connect with MS Remote Desktop. No chance: »Bad request«. Something is lacking. But what? I did all exactly as described here, but...
(I need remete access because the auto import is not working and I must start the import manually when I added new files. So if this doesn’t work, MC23 is useless.)
If you followed the instructions above, you'll need to use a VNC client, not MS Remote Desktop (RDP). There are other instructions on the forums (not in this thread) for making MS RDP work if you can't use a VNC client for some reason.
-
I changed to TigerVNC and get now: »connection refused«. This is not really a progress.
I followed the instructions and all worked well except on point: When I entered »x11vnc -storepasswd your_password ~/.vnc/passwd« I got something like »no directory«. So I created dirctory .vnc, and it worked. But with TigerVNC I get just »connection refused«. What can I do?
with sudo service x11vnc status I get:
â—Ź x11vnc.service - x11vnc
Loaded: loaded (/etc/systemd/system/x11vnc.service; enabled; vendor preset: e
Active: inactive (dead)
EDIT: Aha. One step further. I didn’t know that the .service files must be executable. (I don’t find this information in the text.) Now I can connect an – get »password check failed«. Is there anything to do?
-
Have you confirmed that you're trying to connect to the correct ip address and port? Also this may be an obvious question, but did you change "your_password" to your actual password in the command you quoted?
Can you also post the output of the following commands when logged into the pi:
cat /etc/systemd/system/x11vnc.service
ps -e | grep vnc
-
I managed it. It works. Now remains just one question: Can I use another VNC-server? And how. With x11vnc I have the problem that it throws me out from time to time. No connection can last more than 1 minute. After this I have to reconnect at least 3 times until I’m back. This is with Tiger-VBC as with VNC-Viewer, so I think the problem is on the side of x11vnc.
-
I managed it. It works. Now remains just one question: Can I use another VNC-server? And how. With x11vnc I have the problem that it throws me out from time to time. No connection can last more than 1 minute. After this I have to reconnect at least 3 times until I’m back. This is with Tiger-VBC as with VNC-Viewer, so I think the problem is on the side of x11vnc.
You can try the Pi's built in VNC service if you like (Real VNC) and see if that works better for you. It works, but many other VNC servers (tightvncserver and tigervncserver) don't actually work well with MC due to the way MC draws windows.
-
I just ordered a Raspberry Pi 4 and will give it a try with JRiver.