Error with Touch Display at shutdowntime

Get help for Volumio here!

Ads helps Volumio remain Free and Open Source. Please consider donating to help us continue to serve you.

Error with Touch Display at shutdowntime

Postby dk31 » Sat May 23 2020 17:56

Hello,

Using volumio (last version 2.773) with Touch Display plugin (version 1.1.7), I have an error message at shutdown time, concerning screen brightness.

The error says:

Code: Select all
Erreur de réglage de la luminosité de l'écran: Error: EACCES: permission denied, open '/sys/devices/platform/rpi_backlight/backlight/rpi_backlight/brightness'


I solved this by changing manually to 666 the rights on the file, which apparently solves the issue....
I guess that something is missing somewhere in the plugin installation.
Version 2.733, RPI3B+, USB Objective DAC, 7" touch screen (Audiophonics LTE Rasptouch).
Random avatar
dk31
Serious Listener
Serious Listener
 
Posts: 90
Joined: Mon Jan 07 2019 10:45

Ads helps Volumio remain Free and Open Source. Please consider donating to help us continue to serve you.


Error with Touch Display at shutdowntime

Postby gvolt » Sat May 23 2020 19:17

Hi dk31,

did you install the plugin before the touchscreen got connected?

Also please check if the file /etc/udev/rules.d/99-backlight.rules exists and report back. If the file should be missing execute
Code: Select all
sudo sh -c "echo 'SUBSYSTEM==\"backlight\", RUN+=\"/bin/chmod 0666 /sys/devices/platform/rpi_backlight/backlight/rpi_backlight/brightness\"' > /etc/udev/rules.d/99-backlight.rules"
to create it.

Edit: Corrected code.
Last edited by gvolt on Sat May 23 2020 22:30, edited 1 time in total.
Random avatar
gvolt
Objectivist
Objectivist
 
Posts: 328
Joined: Fri Mar 02 2018 16:47


Error with Touch Display at shutdowntime

Postby dk31 » Sat May 23 2020 20:23

Hi,

Thanks for the fast reply.

So, the answer is no. The Display was connected before installation: I used it with an older version of Volumio. I use an integrated device, it's a bit cumbersome to disconnect the display when installing a new version.

This file did not exist.

I ran your command in two steps: first "sudo -s", and then "echo ....", otherwise I get a "permission denied error:

Code: Select all
sudo echo "SUBSYSTEM==\"backlight\", RUN+=\"/bin/chmod 0666 /sys/devices/platform/rpi_backlight/backlight/rpi_backlight/brightness\"" > /etc/udev/rules.d/99-backlight.rules
-bash: /etc/udev/rules.d/99-backlight.rules: Permission denied
....
sudo -s
root@volumio-sub:/home/volumio# echo "SUBSYSTEM==\"backlight\", RUN+=\"/bin/chmod 0666 /sys/devices/platform/rpi_backlight/backlight/rpi_backlight/brightness\"" > /etc/udev/rules.d/99-backlight.rules


Now the file exists.
Code: Select all
root@volumio-sub:/home/volumio# ls -l /etc/udev/rules.d/99-backlight.rules
-rw-r--r-- 1 root root 118 May 23 20:09 /etc/udev/rules.d/99-backlight.rules
root@volumio-sub:/home/volumio# more /etc/udev/rules.d/99-backlight.rules
SUBSYSTEM=="backlight", RUN+="/bin/chmod 0666 /sys/devices/platform/rpi_backlight/backlight/rpi_backlight/brightness"



But, as I changed to permissions manually.... Hope it helps... I'll tell you if I see this error again.


Denis
Version 2.733, RPI3B+, USB Objective DAC, 7" touch screen (Audiophonics LTE Rasptouch).
Random avatar
dk31
Serious Listener
Serious Listener
 
Posts: 90
Joined: Mon Jan 07 2019 10:45


Error with Touch Display at shutdowntime

Postby gvolt » Sat May 23 2020 21:53

Thanks for your feedback and your hint regarding my suggestion how to create 99-backlight.rules. My command only works when included in a script file. The correct one liner would be
Code: Select all
sudo sh -c "echo 'SUBSYSTEM==\"backlight\", RUN+=\"/bin/chmod 0666 /sys/devices/platform/rpi_backlight/backlight/rpi_backlight/brightness\"' > /etc/udev/rules.d/99-backlight.rules"
I edited my previous post accordingly.

During plugin install the backlight rules file should get created if the device is a pi and the brightness file exists in /sys/devices/platform/rpi_backlight/backlight/rpi_backlight. The brightness file would of course not be present (and therefore the backlight rules file not be created) if the touchscreen is not connected while the plugin is installing. But as this does not apply to your case I am wondering why the backlight rules file was missing all the same.

Could you test what the result of
Code: Select all
echo $(awk '/VOLUMIO_HARDWARE=/' /etc/*-release | sed 's/VOLUMIO_HARDWARE=//' | sed 's/\"//g')
is?
Random avatar
gvolt
Objectivist
Objectivist
 
Posts: 328
Joined: Fri Mar 02 2018 16:47


Error with Touch Display at shutdowntime

Postby dk31 » Sun May 24 2020 09:44

Hi,

Here it is:
Code: Select all
volumio@volumio-sub:~$ echo $(awk '/VOLUMIO_HARDWARE=/' /etc/*-release | sed 's/VOLUMIO_HARDWARE=//' | sed 's/\"//g')
pi


I run a PI3B+, with a 7" touch display.

And here is the rpi_backlight directory after a fresh restart:

Code: Select all
ls -l /sys/devices/platform/rpi_backlight/backlight/rpi_backlight
total 0
-r--r--r-- 1 root root 4096 May 24 09:41 actual_brightness
-rw-r--r-- 1 root root 4096 May 24 09:41 bl_power
-rw-rw-rw- 1 root root 4096 May 24 09:38 brightness
lrwxrwxrwx 1 root root    0 May 24 09:41 device -> ../../../rpi_backlight
-r--r--r-- 1 root root 4096 May 23 21:58 max_brightness
drwxr-xr-x 2 root root    0 May 24 09:41 power
lrwxrwxrwx 1 root root    0 May 23 21:58 subsystem -> ../../../../../class/backlight
-r--r--r-- 1 root root 4096 May 23 21:58 type
-rw-r--r-- 1 root root 4096 May 23 21:58 uevent


Looks good to me.

Denis
Version 2.733, RPI3B+, USB Objective DAC, 7" touch screen (Audiophonics LTE Rasptouch).
Random avatar
dk31
Serious Listener
Serious Listener
 
Posts: 90
Joined: Mon Jan 07 2019 10:45


Error with Touch Display at shutdowntime

Postby gvolt » Sun May 24 2020 11:00

Thanks a lot.

Yes, all that looks good :)

Though seeing all conditions for creating the backlight rules file fulfilled makes me even more riddling why that file either was not created on plugin install or why and when it has been deleted afterwards...

I think I will modify the plugin in a way that it will adjust the permissions of the brightness file on its own each time the plugin starts (not using UDEV any longer) anyway. This would prevent the problem in the case where the plugin got installed prior to the screen. And if need be the user would also be able to easily reapply the necessary permissions just by restarting the plugin.
Random avatar
gvolt
Objectivist
Objectivist
 
Posts: 328
Joined: Fri Mar 02 2018 16:47


Error with Touch Display at shutdowntime

Postby dk31 » Sun May 24 2020 11:23

I agree it's better to get void of any unattended situation in the order the things were made.

Making the chown through the plugin at each restart should be ok, it's better to do the same thing each time, you're sure it's done...
Version 2.733, RPI3B+, USB Objective DAC, 7" touch screen (Audiophonics LTE Rasptouch).
Random avatar
dk31
Serious Listener
Serious Listener
 
Posts: 90
Joined: Mon Jan 07 2019 10:45


Error with Touch Display at shutdowntime

Postby dk31 » Sun May 24 2020 17:11

Maybe I'm a but curious, but what is the use for changing the brightness of the screen before shutting down?

At shutdown, one usually sync file systems, close everything, but why changing the brightness?
Version 2.733, RPI3B+, USB Objective DAC, 7" touch screen (Audiophonics LTE Rasptouch).
Random avatar
dk31
Serious Listener
Serious Listener
 
Posts: 90
Joined: Mon Jan 07 2019 10:45


Error with Touch Display at shutdowntime

Postby gvolt » Sun May 24 2020 17:54

Purpose is to have full brightness when displaying a start and/or shutting down screen (e.g. with Volumio logo). :)
Random avatar
gvolt
Objectivist
Objectivist
 
Posts: 328
Joined: Fri Mar 02 2018 16:47


Error with Touch Display at shutdowntime

Postby dk31 » Sun May 24 2020 18:05

OK, thanks
Version 2.733, RPI3B+, USB Objective DAC, 7" touch screen (Audiophonics LTE Rasptouch).
Random avatar
dk31
Serious Listener
Serious Listener
 
Posts: 90
Joined: Mon Jan 07 2019 10:45

Next

Return to Help

Who is online

Users browsing this forum: No registered users and 12 guests