INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: MC28 on Rpi4 - system hanging  (Read 4060 times)

Peter_RN

  • World Citizen
  • ***
  • Posts: 127
  • Old Guys Rule... the older I get the better I was.
MC28 on Rpi4 - system hanging
« on: March 06, 2022, 10:14:01 am »

Hello
I wonder if anyone could help with a problem I am having with MC28 on a Rpi 4.

I have followed installation instructions kindly supplied by Wheaten here: https://yabb.jriver.com/interact/index.php/topic,129811.0.html?PHPSESSID=jp8gmetafi5lc4le37pkothnu3 to the letter except for the section - Software Preparation. Because the music files are on an SSD connected directly to the USB3 input on the Pi those steps were not required.

The Pi boots and runs well as long as music is playing and with reasonably short periods of time when there is no music playing. However, if the Pi is left not playing music, overnight for example, the Pi hangs and is completely unreachable either from the streamers - they show 'no servers', by VNC & SSH - not reachable. The only option is to kill power and reboot.

If MC is closed overnight and reopened in the morning it runs as described. I don't always remember to close it at night though.

The Pi is one of 4 built into a data cabinet which is why pulling the power is a real pain as it is plugged in at the back of the cabinet.

Everything is connected to a Gbit Wired network - no wireless anywhere in the house.

I have tried creating a cron job to start MC each morning but have been unsuccessful - I am not sure if this is possible. I have see an old post here that talks about creating a service to do this but the post referred to no longer exists.

Another issue probably unrelated is when I use VNC Viewer on a Mac to connect to the Pi, I click through the warning - 'This VNC-compatible Server software is non-standard, and may fail to work' etc - but the interface is so sluggish it is almost unusable - is this normal? I have tried to find an alternative viewer but have not been successful so far - I am not a Mac user normally and generally prefer windows but I am waiting to be able to purchase a new server when they become available again.

Many thanks for any  suggestions.
Logged

Wheaten

  • Guest
Re: MC28 on Rpi4 - system hanging
« Reply #1 on: March 06, 2022, 10:28:14 am »

Have you ever monitored the temperature of the rPi, as it's running 24/7 and a USB disk attached,
Is there any note of voltage underrun or Yellow lighting thingy?

Yes accessing the rpi via RDP is sluggish. I did provide some optimizations, but far from ideal. You can lower the resolution of the rpi, to get a better response.
Logged

Peter_RN

  • World Citizen
  • ***
  • Posts: 127
  • Old Guys Rule... the older I get the better I was.
Re: MC28 on Rpi4 - system hanging
« Reply #2 on: March 06, 2022, 11:06:59 am »

Have you ever monitored the temperature of the rPi, as it's running 24/7 and a USB disk attached,
Is there any note of voltage underrun or Yellow lighting thingy?

Yes accessing the rpi via RDP is sluggish. I did provide some optimizations, but far from ideal. You can lower the resolution of the rpi, to get a better response.

Many thanks for your reply.
Yes the temperature is constantly displayed on the toolbar and is rarely above 40C an attached fan cuts in at this temperature plus the data cabinet has 4 200mm fans that operate at 20C. I have never seen the yellow thunderbolt sign on any of my Pi's (I have 8 in use) and just now running vcgencmd get_throttled results in throttled=0x0.

I will look again at your recommendation regarding sluggish RDP response and thanks again for your original instructions.

Regards, Peter
Logged

Zhillsguy

  • Galactic Citizen
  • ****
  • Posts: 325
Re: MC28 on Rpi4 - system hanging
« Reply #3 on: March 06, 2022, 12:56:26 pm »

I was recently having similar issues with my RPi4-4 with the 32bit OS I had installed using those instructions. Ran fine for months. I couldn't figure it out so I reinstalled the OS using a different method.

I downloaded the rpi os image (this time 64bit) and wrote it directly to the USB ssd using Rufus. Once the pi is set up for booting from USB, it will do so if a sd card is not installed. Installed with no problems and running fine for a couple of weeks now.

Worth a shot.
Logged
Ryzen 5 W11 x64 MC 29 HTPC/Server and HP G2 Mini Elitedesk W11 MC 29 (music only zone), various Android Phones and Tablets for control of both, powering two lanai surround systems, 5.1 and 4.1 respectively.

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 71294
  • Where did I put my teeth?
Re: MC28 on Rpi4 - system hanging
« Reply #4 on: March 06, 2022, 05:43:13 pm »

You might have better luck on the Raspberry forum. 

There are well known power issues with some RPi's.  Try a Google search.
Logged

Peter_RN

  • World Citizen
  • ***
  • Posts: 127
  • Old Guys Rule... the older I get the better I was.
Re: MC28 on Rpi4 - system hanging
« Reply #5 on: March 07, 2022, 06:45:06 am »

I was recently having similar issues with my RPi4-4 with the 32bit OS I had installed using those instructions. Ran fine for months. I couldn't figure it out so I reinstalled the OS using a different method.

I downloaded the rpi os image (this time 64bit) and wrote it directly to the USB ssd using Rufus. Once the pi is set up for booting from USB, it will do so if a sd card is not installed. Installed with no problems and running fine for a couple of weeks now.

Worth a shot.

Hello Zhillsguy

Yes definitely worth a shot.

I have made up 2 USB drives following the instructions and both give the same results, I did use the 32bit OS as I was unsure about using the 64bit - so I will give that a try. Other than that did you follow all the other instructions i.e. installed x11vnc - swap size etc?

I have been using MC since MC17 and have never had any issues that I can remember, I did run it for quite a while on a Pi3 but that would have been 3-4yrs back at least - Windows is my preferred OS. I only ever use MC for streaming Audio - the Video/TV options are switched off before any setup is undertaken.

You might have better luck on the Raspberry forum. 

There are well known power issues with some RPi's.  Try a Google search.

Hi Jim

Thanks for your thoughts, I don't think power is the issue as I have swapped power supplies which are all the official Rpi units and the board has run OMV for a couple of months without issue. I re-purposed it to run MC as it has 4GB or ram which I thought would be more useful running MC.

Thank you both for your help.

Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 71294
  • Where did I put my teeth?
Re: MC28 on Rpi4 - system hanging
« Reply #6 on: March 07, 2022, 07:18:44 am »


Thanks for your thoughts, I don't think power is the issue as I have swapped power supplies which are all the official Rpi units and the board has run OMV for a couple of months without issue. I re-purposed it to run MC as it has 4GB or ram which I thought would be more useful running MC.
Please Google it.  The USB ports can't be reliably used to power drives, etc.  Especially true on older RPi's.  I've experienced the problem myself.
Logged

Peter_RN

  • World Citizen
  • ***
  • Posts: 127
  • Old Guys Rule... the older I get the better I was.
Re: MC28 on Rpi4 - system hanging
« Reply #7 on: March 07, 2022, 08:35:04 am »

Please Google it.  The USB ports can't be reliably used to power drives, etc.  Especially true on older RPi's.  I've experienced the problem myself.

Jim
Sorry, my reply could have been better phrased.
I have been Googling it, firstly in the days prior to my post for issues running MC (nothing found) and now explicitly about power issues as you suggested.

The Pi is a couple of months old at most, and is a Revision 1.5 board - which is quite new to my knowledge, one bought the previous month is a rev. 1.4 board, both have new power supplies and interestingly both are running at 1.8GHz which is a side effect of the new O.S. I understand. I do not overclock any of my Pi's.

I will keep looking whilst preparing a new drive with a 64bit OS as suggested by Zhillsguy, I will swap Pi boards and power supplies around if necessary to see if I can pin this down - It's wonderful being retired.

Thanks again for your help.
Logged

BryanC

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2554
Re: MC28 on Rpi4 - system hanging
« Reply #8 on: March 07, 2022, 09:01:40 am »

You need an externally powered USB hub to reliably use external drives with the Pi, something like this. That may not solve your problem but it would eliminate the most likely culprit.

You should also check your system logs as they would provide more clues.

Also, if your external drives are using Realtek chipsets, they are notorious for randomly disconnecting on Linux.
Logged

Zhillsguy

  • Galactic Citizen
  • ****
  • Posts: 325
Re: MC28 on Rpi4 - system hanging
« Reply #9 on: March 07, 2022, 10:18:52 am »

Hello Zhillsguy

Yes definitely worth a shot.

I have made up 2 USB drives following the instructions and both give the same results, I did use the 32bit OS as I was unsure about using the 64bit - so I will give that a try. Other than that did you follow all the other instructions i.e. installed x11vnc - swap size etc?

I didn't use any of them. I use the built-in vnc for remote access.

Logged
Ryzen 5 W11 x64 MC 29 HTPC/Server and HP G2 Mini Elitedesk W11 MC 29 (music only zone), various Android Phones and Tablets for control of both, powering two lanai surround systems, 5.1 and 4.1 respectively.

Peter_RN

  • World Citizen
  • ***
  • Posts: 127
  • Old Guys Rule... the older I get the better I was.
Re: MC28 on Rpi4 - system hanging
« Reply #10 on: March 07, 2022, 12:59:49 pm »

You need an externally powered USB hub to reliably use external drives with the Pi, something like this. That may not solve your problem but it would eliminate the most likely culprit.

You should also check your system logs as they would provide more clues.

Also, if your external drives are using Realtek chipsets, they are notorious for randomly disconnecting on Linux.

Hello Bryan
Thanks for your thoughts on this, they are appreciated, but I have found the Pi very capable or running with an SSD attached. I have 3 others mounted beside this one all with SSD's that have been running for at least 6-8 months with no issues at all. Two others are in specially designed cases and so may well have different circuitry so I should discount these. Of course that is not to say that this could not be an issue with some drive combinations, simply I have not found this to be the case.

I am still researching this as Jim also brought this to my attention.

The strange part is that this Pi/Drive combination runs for hours happily playing music and with gaps when the selected music stops - when a Smartlist or Album finishes - it waits for a new selecting to be made and continues but then hangs when the system is left NOT playing music for a few hours. I would suggest that the current draw of the SSD when no music is playing must be negligible if not zero at least most of the time.

I have just checked and found that I purchased the SSD in November 2020 (I had no idea it was that long ago) I put our music on it then and we used it for some time on a different Pi4 (Buster) but with a monitor attached, the monitor was always switched off overnight. Now this is a completely new install of Bullseye running headless.

I have spent some time looking at logs but:
(1) I don't really know what most of it means - I have zero programming skills but could not see anything obvious to me in the one's I have seen so far, not sure which ones are most useful.
(2) It appears that the logs only last for about 36 hours and I have left MC closed since Saturday just to make sure that the basic OS is happy to be left running without any problems with MC closed - it is.

Regards,
Peter
Logged

Peter_RN

  • World Citizen
  • ***
  • Posts: 127
  • Old Guys Rule... the older I get the better I was.
Re: MC28 on Rpi4 - system hanging
« Reply #11 on: March 07, 2022, 01:13:13 pm »

I didn't use any of them. I use the built-in vnc for remote access.

Ah, thank you. I will start again tomorrow and use the 64Bit OS. You are running headless aren't you?

I feel that this is where my problems are based just need to track it down.

I may just pull it out of the rack and put it back on my desk and connect a monitor see what happens then.

Thanks
Peter
Logged

Zhillsguy

  • Galactic Citizen
  • ****
  • Posts: 325
Re: MC28 on Rpi4 - system hanging
« Reply #12 on: March 07, 2022, 08:23:24 pm »

Yes, headless as a music player.

Some of the most important initial settings are under Preferences/Raspberry Pi Configuration.

Logged
Ryzen 5 W11 x64 MC 29 HTPC/Server and HP G2 Mini Elitedesk W11 MC 29 (music only zone), various Android Phones and Tablets for control of both, powering two lanai surround systems, 5.1 and 4.1 respectively.

Peter_RN

  • World Citizen
  • ***
  • Posts: 127
  • Old Guys Rule... the older I get the better I was.
Re: MC28 on Rpi4 - system hanging
« Reply #13 on: March 08, 2022, 05:14:51 am »

Yes, headless as a music player.

Some of the most important initial settings are under Preferences/Raspberry Pi Configuration.

Thanks again Zhillsguy

My settings are almost the same as yours, I have SSH enabled but not VNC because of the x11vnc that is installed, nor do I have network at boot; I will match your setting when I get back to this later today. I did lower the screen resolution to coincidentally match yours as Wheaten had suggested earlier.

I have also obtain a powered  hub which I will try but that is more tricky due to the Data Cabinet being built in, I need access through the side panels - but it will be done.

The logs are a challenge to me, I have tried to make sense of 4 so far but I counted 31.



Logged

BryanC

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2554
Re: MC28 on Rpi4 - system hanging
« Reply #14 on: March 08, 2022, 06:26:59 am »

The logs are a challenge to me, I have tried to make sense of 4 so far but I counted 31.

There are really only two main logs that you should be interested in:

1. `dmesg`: this will give you some clues if you've got faulty hardware (look for red error output)
2. `sudo journalctl -r`: Scroll down and check around and before the time(s) that the Pi becomes unresponsive for clues
Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 71294
  • Where did I put my teeth?
Re: MC28 on Rpi4 - system hanging
« Reply #15 on: March 08, 2022, 06:33:09 am »

Is this the Pi not working or is it VNC not working?
Logged

Peter_RN

  • World Citizen
  • ***
  • Posts: 127
  • Old Guys Rule... the older I get the better I was.
Re: MC28 on Rpi4 - system hanging
« Reply #16 on: March 08, 2022, 09:21:01 am »

There are really only two main logs that you should be interested in:

1. `dmesg`: this will give you some clues if you've got faulty hardware (look for red error output)
2. `sudo journalctl -r`: Scroll down and check around and before the time(s) that the Pi becomes unresponsive for clues

That is a great help Bryan thank you.
There are red entries in both these files which I don't really understand as they refer to i2c which is not enabled, I have never used i2c so unsure of the significance of this. It also complains about "module-alsa-card" I can only wonder if this refers to the 'Player' output that might be used to play a file locally - this is set to 'null output' in the option.
I will reproduce the end section of code here that shows errors.
'dmesg'
12.373803] hdmi-audio-codec hdmi-audio-codec.3.auto: ASoC: error at snd_soc_dai_startup on i2s-hifi: -19
[   12.374385] hdmi-audio-codec hdmi-audio-codec.3.auto: ASoC: error at snd_soc_dai_startup on i2s-hifi: -19
[   12.374913] hdmi-audio-codec hdmi-audio-codec.3.auto: ASoC: error at snd_soc_dai_startup on i2s-hifi: -19
[   12.382013] hdmi-audio-codec hdmi-audio-codec.3.auto: ASoC: error at snd_soc_dai_startup on i2s-hifi: -19
[   12.382374] hdmi-audio-codec hdmi-audio-codec.3.auto: ASoC: error at snd_soc_dai_startup on i2s-hifi: -19
[   12.382659] hdmi-audio-codec hdmi-audio-codec.3.auto: ASoC: error at snd_soc_dai_startup on i2s-hifi: -19
[   12.409147] hdmi-audio-codec hdmi-audio-codec.4.auto: ASoC: error at snd_soc_dai_startup on i2s-hifi: -19
[   12.409688] hdmi-audio-codec hdmi-audio-codec.4.auto: ASoC: error at snd_soc_dai_startup on i2s-hifi: -19
[   12.410202] hdmi-audio-codec hdmi-audio-codec.4.auto: ASoC: error at snd_soc_dai_startup on i2s-hifi: -19
[   12.416905] hdmi-audio-codec hdmi-audio-codec.4.auto: ASoC: error at snd_soc_dai_startup on i2s-hifi: -19
[   12.417202] hdmi-audio-codec hdmi-audio-codec.4.auto: ASoC: error at snd_soc_dai_startup on i2s-hifi: -19
[   12.417475] hdmi-audio-codec hdmi-audio-codec.4.auto: ASoC: error at snd_soc_dai_startup on i2s-hifi: -19
[   13.180990] hdmi-audio-codec hdmi-audio-codec.3.auto: ASoC: error at snd_soc_dai_startup on i2s-hifi: -19
[   13.181596] hdmi-audio-codec hdmi-audio-codec.3.auto: ASoC: error at snd_soc_dai_startup on i2s-hifi: -19
[   13.182164] hdmi-audio-codec hdmi-audio-codec.3.auto: ASoC: error at snd_soc_dai_startup on i2s-hifi: -19
[   13.189367] hdmi-audio-codec hdmi-audio-codec.3.auto: ASoC: error at snd_soc_dai_startup on i2s-hifi: -19
[   13.189660] hdmi-audio-codec hdmi-audio-codec.3.auto: ASoC: error at snd_soc_dai_startup on i2s-hifi: -19
[   13.190049] hdmi-audio-codec hdmi-audio-codec.3.auto: ASoC: error at snd_soc_dai_startup on i2s-hifi: -19
[   13.218294] hdmi-audio-codec hdmi-audio-codec.4.auto: ASoC: error at snd_soc_dai_startup on i2s-hifi: -19
[   13.218900] hdmi-audio-codec hdmi-audio-codec.4.auto: ASoC: error at snd_soc_dai_startup on i2s-hifi: -19
[   13.219604] hdmi-audio-codec hdmi-audio-codec.4.auto: ASoC: error at snd_soc_dai_startup on i2s-hifi: -19
[   13.226413] hdmi-audio-codec hdmi-audio-codec.4.auto: ASoC: error at snd_soc_dai_startup on i2s-hifi: -19
[   13.226834] hdmi-audio-codec hdmi-audio-codec.4.auto: ASoC: error at snd_soc_dai_startup on i2s-hifi: -19
[   13.227165] hdmi-audio-codec hdmi-audio-codec.4.auto: ASoC: error at snd_soc_dai_startup on i2s-hifi: -19
[   13.276087] bcmgenet fd580000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx
[   13.276117] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[   31.835895] cam-dummy-reg: disabling
[   31.835907] vcc-sd: disabling
[   31.835914] cam1-reg: disabling
[  202.254947] v3d fec00000.v3d: MMU error from client CLE (4) at 0x36a1000, pte invalid


and from  `sudo journalctl -r` which reproduces the above errors plus:
Mar 06 17:35:56 rpi x11vnc[722]: Libgcrypt warning: missing initialization - please fix the application
Mar 06 17:35:48 rpi pulseaudio[588]: Failed to load module "module-alsa-card" (argument: "device_id="2" name="platform-f>
Mar 06 17:35:48 rpi pulseaudio[588]: Failed to find a working profile.
The above error are then displayed followed by:
Mar 06 17:35:48 rpi pulseaudio[588]: Failed to load module "module-alsa-card" (argument: "device_id="1" name="platform-f>
Mar 06 17:35:48 rpi pulseaudio[588]: Failed to find a working profile.
The above error are then displayed followed by:
Mar 06 17:35:48 rpi lightdm[613]: Error getting user list from org.freedesktop.Accounts: GDBus.Error:org.freedesktop.DBus>

Although I don't know the true significance of the above I would think it can't be good, so start again I think is the best idea. I have new SD cards and thumb drives that I can use and if I preserve the current ones I can then compare them.

Thanks again for your information, I would never have found those files.

Peter
[Correction - Sorry seems I can't read now, The log refers ti i2s not i2c]
Logged

Wheaten

  • Guest
Re: MC28 on Rpi4 - system hanging
« Reply #17 on: March 08, 2022, 10:36:29 am »

What kind of DAC are you using, a HAT?
Logged

Peter_RN

  • World Citizen
  • ***
  • Posts: 127
  • Old Guys Rule... the older I get the better I was.
Re: MC28 on Rpi4 - system hanging
« Reply #18 on: March 08, 2022, 10:39:18 am »

Is this the Pi not working or is it VNC not working?

Hi Jim

The Pi is working fine as a general computer running Raspberry OS and Ubuntu Mate and it ran for a short while with OpenMediaVault - no problems of any sort.
Because I could not get another 4GB Pi due to the shortage at this time I did get a 2GB model and decided that the 4GB would be better used to run J River MC as OMV runs well on a 2GB Pi. Only when I put MC28 on a new Sandisk USB3 drive and followed instructions kindly posted by Wheaten and tried running headless did the problem arise.

Now, please don't misunderstand me, I am NOT suggesting for a moment that there is anything wrong with the instructions, there clearly is not. In fact I used them back when the Pi 3b was the current model very successfully.

The thing that puzzled me and the reason I came to the forum was the fact that if I switch on the Pi it boots up and I open MC I can select and play music all day long provided I don't leave MC open but not playing music for too long a period (I am not sure exactly how long too long is) certainly if I go to bed at midnight the system is completely locked up by the morning but I think a couple of hours was also long enough to cause this to happen.

I shut MC down on Saturday (5th) early evening and have left the Pi running ever since and I can still access it both by SSH and VNC.

Clearly as nobody else is having this issue it has to be something specific to the way I am trying to set it up. The folks here on the Forum have been trying to guide me in finding the cause and I am extremely grateful to you all for your efforts.

VNC is not a problem Jim, I use it a lot on several of my Pi's it was just that it was extremely sluggish with MC but again Wheaten explained why and how to improve this.

We love MC in this house it passes our files without any interference and the ability to build complex Smartlists is a genuine bonus.
Logged

Peter_RN

  • World Citizen
  • ***
  • Posts: 127
  • Old Guys Rule... the older I get the better I was.
Re: MC28 on Rpi4 - system hanging
« Reply #19 on: March 08, 2022, 10:54:15 am »

What kind of DAC are you using, a HAT?

Hello again, no hat just the Pi streaming across the network to two locations, there is a Naim Audio streamer at each location.

The lounge has an NDX streamer which then passes the data to a separate Naim DAC before the preamp. The Dining Rm has a Qute.

I must  thank you for your info on the VNC setup - this also led me to discover 'Screen Sharing' which I was unaware of.
Logged
Pages: [1]   Go Up