[PLUGIN] Touch Display

No, that doesn’t seem to work. Still the same off then on again.

No worries, as the screen was a gift it is no great investment. I really appreciate your help, I’ve learnt a lot along the way, despite not resolving the issue.

Out of interest, is there a list of screens that definitely do work?

I can buy one and then recycle this one as a media player for the kids in the car.

Once I have a screen working well with Volumio I plan to put everything in a box to sit alongside my amp. Thanks again for your help!

1 Like

Not that I know of. You might have a look into these recent discussions over here and here.

If touch is needed I prefer DSI displays because of their less bulky cabeling. In this category the choice of displays is much smaller though. You are safe with the original Raspberry 7" touchscreen if you can live with the higher price, the broad frame and the relatively small viewing angles. An alternative I had no opportunity to test yet could be the 5" DSI display of Osoyoo which is also available as 3.5" and 7" variants. There are also relatively new Waveshare DSI screens. But these seem to have the IMHO disadvantage that their brightness can only be regulated by PWM.

If you don’t need touch functionality pretty much every HDMI display should work (well, the exception proves the rule… :wink: ).

1 Like

Thanks for these recommendations, it really helped me out. I ordered an Osoyoo 5" DSI and a Waveshare 4.3" DSI to compare. They both have the same resolution so this image is slightly sharper on the 4.5" one. However, the text gets a bit small and use is fiddly. Ultimately, I decided to keep the 5" as it suits the project I am building slightly better. Everything works as expected with both these screens.

Thanks for sharing your experiences!

Did you test by any chance if the brightness of these displays can be adjusted by the plugin (especially for the Waveshare display I would not expect that, since the manufacturers description only mentions brightness adjustment using PWM, but …).

This is a follow-up to the first post and an updated description of the touch display plugin.

As of plugin version 1.2.0 the following features are available on the plugin’s configuration page:

  • Screen saver

The options allow setting the timeout in seconds until the screen saver (DPMS state “off”) gets invoked. A value of 0 disables the screen saver.
Further more it is possible to block the screen saver as long as Volumio is in playing state.

  • Screen brightness

For the Raspberry Foundation 7" touch screen the screen brightness can be set. If the current screen brightness should be above 14 and then set to a value below 15 a modal shows up to warn for a very dark screen. The modal offers to test the new (low) value by applying it for 5 seconds before the previous brightness gets restored. After that the user can decide if the new or the previous setting should be kept.

It is possible to define two different brightness values (“Brightness 1” and “Brightness 2”) and to specify the time of day at which each brightness value should be set (e.g. a higher brightness value in the daytime starting at 6:00 and a lower brightness at the night-time starting at 21:00). The time of day values need to follow the 24-hour clock system and the time format hh:mm. If both time of day settings should be identical, the screen brightness will not be changed but only “Brightness 1” will be applied. Regarding the time data be aware that the plugin uses the system time. The system time might deviate from the local time and can only be changed from the command line currently.

The plugin is also prepared for automatic brightness regulation. The option to use automatic brightness regulation will only show up on the plugin’s configuration page if a file named /etc/als exists.

Obviously automatic brightness requires additional hardware in the shape of an ambient light sensor. This is typically an LDR with a voltage divider connected to an ADC like the TI ADS1115. For example if the LDR would be connected to input AIN0 of an ADS1115 measuring single-ended signals in continuous conversion mode the current converted LDR value would appear e.g. in /sys/devices/platform/soc/*04000.i2c/i2c-1/1-0048/in4_input. This file would need to be symlinked to /etc/als as the plugin awaits the current value of an ambient light sensor in /etc/als. For the example above the command to create the symlink would be sudo ln -s /sys/devices/platform/soc/fe804000.i2c/i2c-1/1-0048/in4_input /etc/als.

When automatic brightness gets enabled for the first time the light sensor obligatorily has to be “calibrated” according to minimum and maximum screen brightness. The calibration process consists of measuring the ambient light in a first setting (e.g. darkness or twilight) where the lowest screen brightness should be reached and a second setting (e.g. “normal” daylight or bright sunshine) where the highest screen brightness should be reached. Through a dedicated button the calibration process can be repeated anytime if needed. The range of possible screen brightness values can be adjusted through the minimum and maximum screen brightness settings.

Further more when using automatic brightness it is possible to define a third “reference” point to form a brightness curve between minimum and maximum screen brightness reaching a “reference” screen brightness at a certain ambient brightness. This can be useful if the progression of screen brightness in accordance to ambience brightness needs to be slowed down or accelerated.

  • Display orientation

The display can be rotated in steps of 90°. On applying a changed display orientation setting a modal shows up to inform about a reboot is required. The user has the option to initiate the reboot or proceed (and reboot later).

For the Raspberry Foundation 7" touch screen the touch function is rotated accordingly to the display. In principle this works for other touch screens, too. Depending on the screen additional user action might be necessary if ex-factory the X- and/or Y-axis should be inverted and/or the touch function should not be aligned to the display. As there are a lot of different screens in the market with a lot of different ex-factory settings, the plugin does not take care for these partially weird deviations from a screen with display and touch equally rotated and aligned.

  • GPU memory

The plugin can control the amount of memory used by the GPU. This setting was introduced, because rotating the display by 90° or 270° on a screen with higher resolution requires more GPU memory than 32MB which is the default setting of Volumio. E.g. for a screen with a resolution of 1920x1080 pixels a GPU memory of 36MB has to be set or the screen will stay black.

  • Show/hide mouse pointer

Self explanatory. By default the mouse pointer is hidden.

I used the Volumio image ready made from Audiophonics to match my DAC.
I want to use a waveshare 5.5" Touch Screen. I installed the Touch Plugin and turned the scree 90 degrees. I can see the mouse and the touch function works correctly however the screen just shows a grey surface (execpt for the mouse curser, which is white). what could I check to find out the reason for the mailfunction ?

Bjoern

Hi Bjoern,

what is the exact model name of the screen?

What Volumio version is the Audiophonics image based on? (I have no experience with these customized images and do not know what has altered in comparison to the original Volumio image…)

Did you install other software or modify files apart from installing the Touch Display plugin? If so, which steps did you take in detail?

Please also connect to Volumio via SSH and post the results of

systemctl status -l volumio-kiosk.service

chromium-browser -version

and

ls -al /tmp/.X11-unix

A first estimate: I suspect the chromium browser has not been installed (properly).

Hi and many thanks for your quick response.
I am using a Waveshare 5.5 " HDMI AMOLED. I added the following to the config.sys based on their display pdf:
max_framebuffer_height=1920
max_usb_current=1
config_hdmi_boost=10
hdmi_group=2
hdmi_force_hotplug=1
hdmi_mode=87
hdmi_timings=1080 1 26 4 50 1920 1 8 2 6 0 0 0 60 0 135580000 3

Those settings are working on other OS which I tried and I can see the mouse curser.
This is the output of your command:
Free Audiophile Linux Music Player - Version 2.0

      C 2015 Michelangelo Guarise - Volumio Team - Volumio.org

Volumio Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
volumio@volumio:~$ systemctl status -l volumio-kios.service
● volumio-kios.service
Loaded: not-found (Reason: No such file or directory)
Active: inactive (dead)
volumio@volumio:~$ systemctl status -l volumio-kiosk.service
● volumio-kiosk.service - Volumio Kiosk
Loaded: loaded (/lib/systemd/system/volumio-kiosk.service; disabled)
Active: active (running) since Thu 2020-10-22 15:25:19 CEST; 4min 23s ago
Main PID: 1415 (startx)
CGroup: /system.slice/volumio-kiosk.service
├─1415 /bin/sh /usr/bin/startx /etc/X11/Xsession /opt/volumiokiosk.sh
├─1434 xinit /etc/X11/Xsession /opt/volumiokiosk.sh – /etc/X11/xinit /xserverrc :0 -auth /tmp/serverauth.IBcvW8Kvpk
├─1435 /usr/lib/xorg/Xorg -nolisten tcp :0 -auth /tmp/serverauth.IBcv W8Kvpk
├─1538 /bin/bash /opt/volumiokiosk.sh
├─1555 /usr/bin/ssh-agent /opt/volumiokiosk.sh
├─1560 /usr/bin/openbox --startup /usr/lib/arm-linux-gnueabihf/openbo x-autostart OPENBOX
├─1861 /usr/bin/pulseaudio --start
├─2141 /bin/sh /usr/bin/start-pulseaudio-x11
├─2142 /usr/bin/xprop -root -spy
└─2527 n/a

Oct 22 15:25:20 volumio startx[1415]: Markers: (–) probed, (**) from config fil e, (==) default setting,
Oct 22 15:25:20 volumio startx[1415]: (++) from command line, (!!) notice, (II) informational,
Oct 22 15:25:20 volumio startx[1415]: (WW) warning, (EE) error, (NI) not impleme nted, (??) unknown.
Oct 22 15:25:20 volumio startx[1415]: (==) Log file: “/var/log/Xorg.0.log”, Time : Thu Oct 22 15:25:20 2020
Oct 22 15:25:20 volumio startx[1415]: (==) Using config directory: “/etc/X11/xor g.conf.d”
Oct 22 15:25:20 volumio startx[1415]: (==) Using system config directory “/usr/s hare/X11/xorg.conf.d”
Oct 22 15:25:20 volumio startx[1415]: modprobe: FATAL: Module g2d_23 not found.
Oct 22 15:25:27 volumio pulseaudio[1861]: Unable to contact D-Bus: org.freedeskt op.DBus.Error.Spawn.ExecFailed: /usr/bin/dbus-launch terminated abnormally witho ut any error message
Oct 22 15:25:27 volumio pulseaudio[1861]: Unable to contact D-Bus: org.freedeskt op.DBus.Error.Spawn.ExecFailed: /usr/bin/dbus-launch terminated abnormally witho ut any error message
Oct 22 15:25:27 volumio pulseaudio[1861]: org.bluez.Manager.GetProperties() fail ed: org.freedesktop.DBus.Error.UnknownMethod: Method “GetProperties” with signat ure “” on interface “org.bluez.Manager” doesn’t exist

volumio@volumio:~$ ls -al /tmp/.X11-unix
total 0
drwxrwxrwt 2 root root 60 Oct 22 15:25 .
drwxrwxrwt 13 root root 480 Oct 22 15:25 …
srwxrwxrwx 1 root root 0 Oct 22 15:25 X0

Should work but probably not the screensaver function (see: https://community.volumio.com/t/waveshare-5-5-amoled/41787).

On a Raspberry Pi there is no “config.sys”, but I assume you meant “config.txt” (?). If your Volumio image should be based on at least version 2.673 I would recommend to add the display specific settings

max_framebuffer_height=1920
config_hdmi_boost=10
hdmi_group=2
hdmi_mode=87
hdmi_timings=1080 1 26 4 50 1920 1 8 2 6 0 0 0 60 0 135580000 3

to /boot/userconfig.txt instead of /boot/config.txt.

This has the advantage that these entries remain untouched when Volumio gets updated. In contrast /boot/config.txt gets overwritten on each Volumio update (further information) and you would have to edit it again.

Since max_usb_current=1 and hdmi_force_hotplug=1 are already part of the “standard” /boot/config.txt there is no need to add them to /boot/userconfig.txt.

But placing the above settings to config.txt or userconfig.txt is not the problem here. The reason you only see a grey screen with the mouse cursor is that the chromium browser is not running. Please check if it is installed at all and if so what version (chromium-browser -version)?

Hi I really appreciate your prompt response. I noticed that the touch plug in has a warning saying suitable for Pi3 not Pi3B+ so I firstly uninstalled it. Now I see the login on the screen only.
I also followed the user config recommendation.
I believe you are right that the browser is not installed however I would have to expand the file system first which hasnt worked yet. the raspi-config refuses to do so and I am not sure how I can create the required space to get the browser installed.
PS: I cant find the screensaver option anymore in Volumio, really strange I am pretty sure I saw it before.

1 Like

It runs on Pi3B+, Pi3A and Pi4 too.

Absolutely! It could be that there has not been enough space to download and install chromium browser. Expanding of the file system should happen automatically after the first start of Volumio. BTW: How large is your SD card?

The screensaver option is only present on the touch display’s configuration page. So if you uninstalled the plugin…

Hello dear dev,

Would you kindly please helo. Me with the next situation :

I have a waveshare 4.3 dsi display, rpi4 and usb dac.
I have installed Touch plugin display and is working perfectly
I have installed the peppymeter plugin which shows on the display a picture with the vumeter.
The scripts is starting with
Openvt - s - - python3 peppymeter.py.
The volumio UI is changed to the vumeter display.
But after a killing the peppymeter script the vumeter picture remains hanged on display. I was expecting to be switched to volumio UI but it does not.
I have understood that it is from touch plugin.
În order to see again the volumio UI I need to perform a reboot.
Thanks in advance

First of all: I have no knowledge about peppymeter and how it works.

How do you kill the peppymeter script?

Do you also terminate openvt? If so, how?

Possibly you could use the option -w with openvt which would switch back to the originating VT when the command (i.e. peppymeter.py) completes.

Hi,

The python script I kill it with kill - 9 pid.
I tried also the openvt - w - s but after pressing ctrl+c the display does not switch to volumio ui.

Thanks

Possibly you have to run deallocvt after killing the script, but that’s just a guess…

You may also check that your kill command does not leave the underlying python process running.

Hi gvolt ,

I have found the sequence which makes the Volumio UI appear again:

  1. Start the Vumeter script. on display appear the VUmeter

Blockquote
volumio@volumio:~/PeppyMeter$ openvt -s – python3 peppymeter.py

2.Stop the Vumeter script by KIll -15 PID

Blockquote
volumio@volumio:~/PeppyMeter$ ps -elf | grep peppymeter
4 S volumio 4637 1 5 80 0 - 31198 hrtime 22:17 tty3 00:00:01 python3 peppymeter.py
0 S volumio 4917 1888 0 80 0 - 647 pipe_w 22:17 pts/0 00:00:00 grep peppymeter
volumio@volumio:~/PeppyMeter$ kill -15 4637
volumio@volumio:~/PeppyMeter$
in that Moment the Display is black . The Vumeter script is stopped

  1. Disable Touch plugin
  2. Enable touch plugin .
  3. The Volumio UI is back in business .

Is there anotgher way to make shortert this steps?

Many thanks ,
Florin

1 Like

Did you try deallocvt?

If that didn’t succeed run fgconsole before you start and after you started the script. Post the results please.

Also post the result of ls -al /tmp/.X11-unix after the script has started.

Deallocvt command does nothing

Blockquote
volumio@volumio:~/PeppyMeter$ fgconsole
2
volumio@volumio:~/PeppyMeter$ openvt -s – python3 peppymeter.py
volumio@volumio:~/PeppyMeter$ fgconsole
3
volumio@volumio:~/PeppyMeter$

Thanks

Ok, what shows fgconsole after the script has killed? Don’t stop the plugin at this moment.

Blockquote
volumio@volumio:~/PeppyMeter$ ps -elf | grep peppymeter
4 S volumio 26852 1 3 80 0 - 31198 hrtime 22:58 tty3 00:00:07 python3 peppymeter.py
0 S volumio 28640 1888 0 80 0 - 647 pipe_w 23:01 pts/0 00:00:00 grep peppymeter
volumio@volumio:~/PeppyMeter$ kill -15 26852
volumio@volumio:~/PeppyMeter$ fgconsole
3
volumio@volumio:~/PeppyMeter$