Touchscreen doesn't close when osmc is shutdown

Hello,
I have a RPI 3 with a 7" touchscreen display. I encountered this issue and did some research about it but didnt find a answer. When you shutdown the OS the display goes white, then it turns black * but with the backlight on * and shows a few white lines across the display. I must mention that i used Raspbian OS the first time and I didnt have that problem.

If this helps : From another experience with the touchscreen displays ( this one was a 5" display with HDMI connection to RPI3 ) and kodi, the display has the same problem if you run kodi with the default audio settings * audio output from HDMI and ANALOG. If you want it to run correctly you must select audio output : analog. Then the display shows the correct image.

I added a few photos of the display after the shutdown

Can anyone help me with this problem?
Thank you!!!

I think the issue is the backlight is left on.

Does echo 0 > /sys/class/backlight/rpi_backlight/bl_power before shutting down help? We could add support for this in systemd’s shutdown capabilities.

hello.
I found this info on the web, but when i go to that path i didn`t find the backlight folder and all the subfolders.
i downloaded/installed the latest version of OSMC from the website. Here is a print Screen of the folders inside sys/class

Thanks!

The most likely reason for the absence of the backlight folder is that your installation doesn’t include the latest RPI firmware. If you update the firmware with:

sudo rpi-update

and then reboot, the missing folders should appear and

echo 1 > /sys/class/backlight/rpi_backlight/bl_power

should immediately switch off the display.

echo 0 > /sys/class/backlight/rpi_backlight/bl_power

will switch it back on again.

You may like to backup your SD card before doing this so that you can revert easily if needed.

sudo rpi-update

is a raspbian command, not for OSMC.

That is a quick way to break an OSMC system. Fortunately we display a warning if this is executed.

Hi

I’ve made sure backlight support is now built as a built-in module, which should mean sysfs module is now available in this commit:

I would like to work on improving the shutdown behaviour. If you can test the following it would be much appreciated:

sudo nano /usr/lib/systemd/system-shutdown/backlight-off

Add the following

#!/bin/sh

if [ -f sys/class/backlight/rpi_backlight/bl_power ]
then
    echo "0" > /sys/class/backlight/rpi_backlight/bl_power
fi

Then run:

sudo chmod +x /usr/lib/systemd-shutdown/backlight-off

Then edit /etc/apt/sources.list and add

deb http://apt.osmc.tv jessie-devel main

And run sudo apt-get update && sudo apt-get dist-upgrade.

If this works, I’ll include these changes in the next update

Cheers

Sam

Hey,
First of all thank you very much for trying to help me!!!

For Sam,
I tried to make this changes but i don`t have the folders you mention.
In /usr/lib/systemd/ there is no system-shutdown folder. - so i created the folder and the file with the info you gave me.
I followed your instructions step by step but sadly the result is the same. There is no difference in the shutdown process
:frowning:

Any other ideas ? :-s

Hello

Thanks for the help!

I tryed the sudo rpi-update command but the update faild because it didn`t find this command.
:frowning:

Despite the multiple warnings?

no warnings… just command not found :frowning:

Yes. It is not available on a pi2 or 3 as the system is debian. Not raspbian.

It would be dangerous and will not help you anyway. So stick to what sam suggests and provide him with feedback.

I followed sams advice and made the mods but that didnt help me :(. The screen still goes white and the backlight is always on.

Any other ideas ? :-s

I told him :wink: