Screen and Touch Display plugin makes DAC unhappy

Here’s a log after trying to stream from a phone via Tidal Connect. It has the same behavior as before:

http://logs.volumio.org/volumio/JpqcrMC.html

I changed from the Manifest theme to the Contemporary theme to see if that changes anything. No change in behavior. Here’s the log:
http://logs.volumio.org/volumio/v2eyZo8.html

Alright, I was finally able to test the behavior with the SMSL SU-9 dac. I found that it has the same behavior as with the Khadas Tone2Pro. With the touch display plugin disabled (but with the screen plugged into the Pi for power and touch), the system works perfectly. When I enable the touch display plugin, the screen works properly, but as soon as I try streaming via Tidal Connect, the connection is broken, and no audio is sent to the dac. Here’s the log:
http://logs.volumio.org/volumio/TenRUjP.html

Do you think a fresh install would fix this? Perhaps I’ll give it a shot.

I ran some more tests tonight. I started with a fresh install of the latest Volumio release. I added the necessary content to userconfig.txt to drive the screen. I tested the system, and it worked perfectly. I then downloaded and installed the touch display plugin, and it worked initially. I adjusted some settings to optimize the screen, and it stopped working. I then disabled the plugin and Volumio started working properly again. Finally, I reenabled the touch display plugin, and it asked that I restart the system to rotate the screen 90 degrees. Before restarting, I tested the system, and it is working properly with Tidal Connect, or Tidal from the local stream. It makes me wonder if one of the touch display settings is causing the trouble. Here’s a log from the working system, but with the screen rotated 90 degrees:
http://logs.volumio.org/volumio/6c2fW1I.html

More testing. I set all the touch display plugin preferences as I normally would, and it broke Volumio again. I then set the screen rotation back to 0 degrees, and the system started working properly again. Here’s a functional log:
http://logs.volumio.org/volumio/C0CeuxW.html

More troubleshooting. I kept the screen rotation at 0 in the touch display plugin, and instead added display_rotate=1 to the userconfig.txt (per the Waveshare 5.5 amoled wiki). The screen looks proper, but now Volumio is broken again. It seems that somehow the screen rotation breaks Volumio. Here’s a log:
http://logs.volumio.org/volumio/fLSc9mG.html

Final test of the night. I took the last setup, commented out the display_rotate=1 in userconfig.txt, and rebooted. The system works properly again, just with the display rotated 90 degrees. Log:
http://logs.volumio.org/volumio/AUBvQ1f.html

@gvolt , any thoughts?

According to this rotating by 90 or 270 degrees uses a lot of memory bandwidth. While I would not have expected this to cause your problem, it seems most likely to me at the moment.

Hm. I’m not seeing evidence to support this. I’m on a Pi 4 with 4gB memory. I manually assigned up to 512MB to the GPU, and the behavior remains the same at all levels. Here’s the memory usage according to “top”. It looks like there is plenty unused:

top - 01:00:48 up 6 min, 1 user, load average: 0.17, 0.69, 0.42
Tasks: 165 total, 1 running, 164 sleeping, 0 stopped, 0 zombie
%Cpu(s): 0.2 us, 0.3 sy, 0.0 ni, 99.4 id, 0.1 wa, 0.0 hi, 0.0 si, 0.0 st
MiB Mem : 3407.4 total, 2392.9 free, 324.7 used, 689.9 buff/cache
MiB Swap: 0.0 total, 0.0 free, 0.0 used. 2869.6 avail Mem

It appears that something behind the scenes is breaking. When I have the screen horizontal, and the GPU memory at any level, the system behaves fine, and the screen displays properly until I try to play content. When I stream via Tidal connect, the control device (native Tidal app on my iPhone) briefly shows playing, then goes back to pause mode. Meanwhile, the display shows that the desired content is playing on the Pi, though there is no audio out. If I then try to load Tidal content locally on the Pi, it throws up an error saying ‘failed to open “alsa” (alsa); Failed to open ALSA device “volumio”: No such device’

I also tried rebooting, and playing Tidal directly on the Pi, and got the same alsa error. It doesn’t appear that Tidal connect is breaking things. It is something deeper.

What would be a useful next troubleshooting step?

It is not the amount of memory I was referring to but the memory bandwidth. In comparison to landscape mode portait mode seems to require a lot more read and write operations between buffer and memory. Quoted from the link I posted:

So when the display is portrait, the HVS doesn’t composite on-the-fly. It has to write a landscape buffer to memory. It then has to use the transposer hardware to convert the landscape image to a portrait image, involving another memory read and write. It then finally fetches this portrait image and outputs to the display.

But I also have my doubts as to whether this is the culprit.

Do you have the same issue if you playback from other sources as well or does it only happen when streaming from Tidal?