question

digitaldvd avatar image
digitaldvd asked

raspberrypi4 4gig touch screen no screen blanking or slider is there a fix yet

managed to get screen working touch etc but cannot get slider or screen blanking has this been resolved yet on the raspberry pi4 4gig using a raspberry 3.5inch screen if so can someone leave a link.

Thanks

Raspberry Pi
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

15 Answers
Kevin Windrem avatar image
Kevin Windrem answered ·

I refer you to my solution:

https://github.com/kwindrem/RpiDisplaySetup

This installs the necessary pieces to get the screen saver working on most touchscreens and the brightness adjustment for at least the official Raspberry Pi 7" touch screen. Some have reported here that it also works on displays connected to the PI. HDMI displays do not support dimming unfortunately.

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

Rob Duthie avatar image
Rob Duthie answered ·

Hi

These is one command to enter to fix this.

This applies to the new versions of the Venus software and the raspi 3 series. i had the same issue by applying this command via the SHH command lien it brings it all back.

Screen brightness slider, not working? use the this command to make it work

( dbus -y com.victronenergy.settings /Settings/Gui/AutoBrightness SetValue 0 )

Regards

Rob D

NZ

1 comment
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

Kevin Windrem avatar image Kevin Windrem commented ·
Yes. I discovered this also. It isn't just RPI 3 It's all platforms with adjustable brightness that do not have automatic brightness (Cerbo + GX Touch). With auto brightness on, the slider is hidden. If the display does not support auto brightness, the auto brightness on/off is hidden and the default is ON !!!!!!!


The command Rob mention iss included in the setup script for my RpiDisplaySetup package.
0 Likes 0 ·
digitaldvd avatar image
digitaldvd answered ·

Hi Guys thanks for the response im not sure if it has anything to do with the hardware or maybe the end user being myself .I have a raspberry pi4 4gig version1 running without any problems but i have not tried the 3.5inch screen on version1 ,the testing i have been doing is on version 1.2 unit i also have two other units which are are pi4 2gig which at this time dont work at all, running the venus os which by the way is not stated as not working on the victron site it was only after i bought them that i found some mention on the forum 2.60 worked and that was it but that does not work either.

Re the screen blanking and slider ( dbus -y com.victronenergy.settings /Settings/Gui/AutoBrightness SetValue 0 ) this did produce the slider on screen but had no effect re brightness i could slide up and down and that was it.Thanks for that Rob at least i got the slider to show up on screen even if it did not work for me:)

Re Kevins setup it took me a while to get anywhere only due to me screwing things up Kevin ,i did have some joy ,i did manage to get the hdmi output working but as for the 3.5 lcd , nothing at all on the screen this may have some bearing on the size off screen verses the 7in not sure or again down to end user installation not being correct.

The link pasted does actually work display touch screen,except slider and diming or screen blanking dont https://community.victronenergy.com/questions/40195/venus-on-pi-with-35-gpio-screen.html

Its not essential that i have the screen but it would be nice to get it working, also im not a wiz kid so sometimes i do get lost but do get there in the end most times but at this time its got me stumped :(

Thanks again for the input

Robin

NZ

10 comments
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

Rob Duthie avatar image Rob Duthie commented ·

Hi Robin

That is why i use the raspi 3B+ as most things work, OK. Except for bluetooth.

The raspi 4 is another issue you are lucky you got a Ver 1 PCB when i brought a raspi4 to test it was was Ver 1.4 PCB and that won't work at all no boot up etc. Has diffrent memory locations?

I have designed a raspi HAT for all the functions like the Cerbo units. Works well on the raspi 3B+.

I have stopped the project until i get the raspi 4 going, need somone to figure out the software out.

Data sheets attached.

Victron Raspi Hat.pdf

Victron Raspi Stetson.pdf

Regarsd
Rob D

NZ

0 Likes 0 ·
Tom h avatar image Tom h Rob Duthie commented ·
I have a pi4 4gb rev1.4 (victron connect labels it as rev1.4 but by looking at photo comparisons of boards it is somewhere between rev1.2 & rev1.4. is there possibly a rev 1.3?)



I copy-pasted into the boot folder the fixup4.dat & start4.elf for the newer versions from the raspberrypi/firmware github


now it boots, I can access it from remote console & Hdmi output works. However usb is not functioning. I am still trying to work this one out.

0 Likes 0 ·
Rob Duthie avatar image Rob Duthie Tom h commented ·

Hi Tom

To check the version number you will have to use a cpu command to pull up the PCB version # command below:

cat /proc/cpuinfo

I will try your trick to install on my test raspi4 fixup4.dat & start4.elf

If it works i will post back.

Regards
Rob D

NZ

0 Likes 0 ·
Tom h avatar image Tom h Rob Duthie commented ·

The output of cat /proc/cpuinfo

Gave this information on the model of board I have.


Hardware : BCM2835

Revision : c03114

Serial : 10000000c793345b

Model : Raspberry Pi 4 Model B Rev 1.4



This trick I got from another user on this forum, however I added also the fixup4.dat because when updating start4.elf alone it was crashing frequently.

0 Likes 0 ·
Rob Duthie avatar image Rob Duthie Tom h commented ·
Hi

Its a Ver1.4 same as mine, i will try later on today.

If it works this will be a big help to eveybody using raspi 4 with Venus.

0 Likes 0 ·
Rob Duthie avatar image Rob Duthie Tom h commented ·

Part success it boots but stuck in a endless bluetooth loop.

I have disabled BT with the disable command but keeps on looping

What is in your config file? can you send me copy txt file?

I have success changed file commands in the config now have it going. Will update later with more tests and checks.

0 Likes 0 ·
Tom h avatar image Tom h Rob Duthie commented ·

I have not noticed the bluetooth, was it causing the pi to restart?


This was the image I used

http://updates.victronenergy.com/feeds/venus/candidate/images/raspberrypi4/



I will try to send a copy of the config file soon. I changed something in there but I didnt see any result.


I also had success booting by replacing the entire boot folder excluding the overlay folder, kernal image files & all bcm's.



0 Likes 0 ·
Rob Duthie avatar image Rob Duthie Tom h commented ·
Hi Tom

Yes i did the same i used the raspi 3 config file and overlays, i keeped the u-boot file as they were and just added those 2 files form raspi github, to make it work etc.

0 Likes 0 ·
Tom h avatar image Tom h Rob Duthie commented ·

here is the contents of the config file:


enable_uart=1

kernel=u-boot.bin


[all]

device_tree=bcm2711-rpi-4-b.dtb


dtoverlay=dwc2,dr_mode=host





We could move discussion to this thread -> Venus OS on Raspberry PI 4 - Victron Community (victronenergy.com)

This is where I saw the trick to try the updated start4.elf

0 Likes 0 ·
Tom h avatar image Tom h Tom h commented ·

keep in mind that I am definatly not an expert on these things. but I found this quote from wikipedia - "given the correct device tree, the same compiled kernel can support different hardware configurations within a wider architecture family"



When I use the updated bcm2711-rpi-4-b.dtb (49kb) file from github it boots now and gets to the victron energy logo screen but the curser keeps blinking and wont go further. is this a similar issue to what you were having with bluetooth?


With the older version bcm2711 file (40kb):

when I plug in a low power usb device for example a sdcard reader the light on it blinks so there must be some power,

but there are no lights on keyboard or mouse and also it doesnt detect any ve.direct to usb inputs or mk3-usb


Is it worth to rebuild the u-boot? its a bit beyond me but If I get time I can try


0 Likes 0 ·
digitaldvd avatar image
digitaldvd answered ·

Hi Rob looks a nice job hope it gets soughted im still having no success with the screen blanking or dimming,also a question to Kevin if you are reading this did you get the display to work on raspberry4 also is it possible that the reason i cant get yours running fully due to the screen size verses your 7inch and mine 3.5 needing the correct driver, again as mentioned before i got everything running fine including the screen slider for dimming, but just can get the screen to shut down or even dim.

Thanks again

Robin

2 comments
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

Kevin Windrem avatar image Kevin Windrem commented ·
Sorry, not sure why it's not working but it is a different display and may need different overlays/drivers.
0 Likes 0 ·
Rob Duthie avatar image Rob Duthie commented ·
Hi Robin

Yes the raspi 4 has different versions the only version that work are Ver1.1,1.2, Ver1.4 PCB don't work yet just blank screen this applies to 2,4,8 Gig of ram.

When i order mine it came in ver 1.4 with 2gb ram. It sound like it has a diffrent kernal so needs a new set of software rebuilds etc for Venus?

Regards

Rob D

NZ

0 Likes 0 ·
digitaldvd avatar image
digitaldvd answered ·

Hi Kevin i had some joy finally although a bit off a screw up yesterday and still not sure what i did as i had the lcd screen blank when my pc hdmi was plugged in and that actually did go blank but as i had the time set short was not able to get things back to normal.

Im running version 2.73 and have your side off things all up on screen have found that if i did not

install the tft35a-overlay.dtb and the touchscreen calibration tools first i was unable to get your side off things running another issue i had was the direct down load via the internet wget ...... using ssh once i cut and pasted then hit return there was a slight delay as if downloading but nothing happened so i did the manual version via usb stick as you explained and this worked,please note this maybe end user issues or the version board.

The only issue left is the screen blanking and dimming, although all that shows up in the display menu the blank screen time is still not working and although the slider is working its not dimming.

Any suggestion where i should try and look re files etc that may need changing.

Thanks

Robin

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

digitaldvd avatar image
digitaldvd answered ·

@Rob Duthie

@Kevin Windrem

Hi Guys im still having issue but one thing that may or may not be the problem , under /sys/class/ backlight should there be files in this directory or an arrow indicating a direction as off now there is nothing there, also i noticed i had failed to give info on the lcd screen it is 3.5inch model xpt 2046 480x320 as far as i can see i have all other files in the correct place hence the screen would not be working at all.

Thanks

2 comments
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

Rob Duthie avatar image Rob Duthie commented ·
Hi

Yes there should be lot of files in there.

0 Likes 0 ·
Kevin Windrem avatar image Kevin Windrem commented ·
And if that directory is empty then it's probably an issue with a driver or overlay.


You may not be able to use the driver/overlay supplied for Raspberry PI OS and the overlay that makes the "official Raspberry PI 7" touchscreen" work probably won't work on this display.


0 Likes 0 ·
bleydh avatar image
bleydh answered ·

Hi,

I got a https://www.waveshare.com/wiki/4.3inch_DSI_LCD display working on rev1.2 P4 4GB running venus v2.80. The command from Rob indeed got me the slider- thanks for that Rob. And I can adjust the brightness of the display with the slider no problem.

However the 'display off time' is just dimming the display, but doesn't switch it off. Any ideas?
Blanking refers to bl-power, thought that does the dimming of my display, not blanking it.

Many thanks,

B

1 comment
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

Rob Duthie avatar image Rob Duthie commented ·

Hi

Do you have these files for the screen here? Just remove the .txt before installing them.

This is all that is required for screen functions.

/etc/venus/backlight_device

/etc/venus/blank_display_device

backlight_device.txt

blank_display_device.txt

Regards

Rob D

NZ

0 Likes 0 ·
bleydh avatar image
bleydh answered ·

Hi Rob,

Yes, that's all in place as well as doing:

echo '/sys/class/backlight/rpi_backlight' >/etc/venus/backlight_device

and

echo '/sys/class/backlight/rpi_backlight/bl_power'  >/etc/venus/blank_display_device

Still no luck, the dimming of the display is working fine, though it doesn't shut off.

Can I test the display switching off OK in different way?

B

1 comment
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

Rob Duthie avatar image Rob Duthie commented ·
Hi

I think the raspi 4 is much different to the raspi3 models. As the settings for the raspi 3 which i use the most have no issues to date. As i know the new raspi 4- 1.4 PCB don't work at all refuse to boot up etc.

0 Likes 0 ·
Kevin Windrem avatar image
Kevin Windrem answered ·

For this display, you may need to tweak the bl_power setting.

Poke around in /sys/class/backlight to see what's being created by the system. You may find other directories besides rpi_backlight. If so, see if you can locate another bl_power file and change /etc/venus/blank_display_device to that one.

For some HDMI displays, I found pointing the bl_power to /sys/class/graphics/fb0/blank worked, but not for the official RPI touchscreen.

It may also be that the display does not support turning off the backlight.

For each display, it takes a fair amount of digging and trial an error. It may also help to boot up Raspberry PI OS and look around for it's screen blanking capabilities. If it doesn't work there, it probably won't in Venus OS.

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

bleydh avatar image
bleydh answered ·

Hi Kevin,

Great guns!! /sys/class/graphics/fb0/blank worked for that display.

I tried with changing the content of the file first (which was empty) to 0 and 1 -> that worked and then I ran

  1. echo '/sys/class/graphics/fb0/blank' >/etc/venus/blank_display_device

Many thanks and keep up the good work.

B

5 comments
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

digitaldvd avatar image digitaldvd commented ·
Hi B i have the same screen as you and have it will almost all working dimming and blank screen did you managed to get all working eg total power down off backlight,as mine is still showing backlight even though i have a blank screen,

Robin

0 Likes 0 ·
Rob Duthie avatar image Rob Duthie digitaldvd commented ·
Hi

Yes it is missing alot of files in the sys/class rpi_backlight for control it was not loaded in the venus OS? For the raspi 3 it is there for the current versions 2.80.21

So need to load or copy a file across for it to work, i am still working on that one as it refused to copy across no permission etc ? as the persmission were set but refused to?

Regards

Rob D

NZ

0 Likes 0 ·
bleydh avatar image bleydh digitaldvd commented ·
Hi @digitaldvd,


yes, the backlight is still on, though it is very marginal in my case. Important for me was that it is blanked and that's the case. Otherwise dimming is working well and waking up by touching the screen or connecting to it via browser.

Of course it'd be great to switch the screen off completely.

I'm using a RPi4 v1.2 4GB and I have just switched over to the 2.80 v21 node-red installation. Currently in the process of adding relays and a BME 280 temp sensor, as well as the LM335 temp probe for the smartshunt (nice to have the RPi cpu temp as well thanks to LaurenceH). Will see how that goes.

Best,
Bleydh

0 Likes 0 ·
digitaldvd avatar image digitaldvd bleydh commented ·
Hi Bleydth

my sytsem is very simple im running easysolar 12/1600/70 and i monitor the charger and inverter,thats about it but do enjoy trying to get things up and running the 7inch screen ,that totally shut the backlight off but the waveshare 4.3 dsi lcd as off yet re backlight switch off still no go but i suspect there is a way ill plod on and if any joy ill let you know.

regards

Robin

0 Likes 0 ·
digitaldvd avatar image digitaldvd bleydh commented ·

Hi Bleydth

wavshare43inchdsilcd.jpghad some success with the backlight,WARNING FOR THOSE THAT MAY TRY THE MOD IF YOU HAVE HAD NO SOLDERING EXPERIENCE ON SMALL COMPONENTS DONT DO THIS.This will turn the backlight off i have had plenty off soldering experience and still nearly stuffed up due to the circuit underlay lifting and the size of the resistor but did solve the problem see diagram as to what resistor to change,this information came from waveshare,many thanks to them,if you stuff up dont blame them or myself :)

0 Likes 0 ·
digitaldvd avatar image
digitaldvd answered ·

@Kevin Windrem

@Rob Duthie

Hi guys thanks for the input but alas still no joy i did follow your suggestion Kevin to look at a raspberry os and could find some similarities but not enough to get the display to go blank or fade out,at this time, obviously i cant see the forest because off the trees :) Im no wize kid and if i could would love to program,but have had enough experience with the raspberry on a couple off other projects and also with running linux with some types off satellite receivers and yes sometimes its been a struggle due to my lack of programing knowledge ,but i usually get there.

Rob a question to you re comments re the files should there be no text within each but just the files name then once its up and running it should generate a txt line.

As i followed other comments where you create the file and add the txt or have i misunderstood what your were saying..

At this time

1 Have got the screen working touch and display all go

2 If i plug into my hdmi port on my pc i can bring the display up and it will also blank out although the lcd screen does not show the display if i touch it it will turn the pc hdmi screen back on.

3 I have noticed the ones that seem to be successful seem to be the hdmi screens or the screens that plug into the hdmi socket on the side off the board and the ones that plug into the display socket.my display plugs into gpio port.

4 If i load all that is required to get all running under raspberry os everything works including screen blanking.

Thanks

Robin

A jack of all trades and a master off none

1 comment
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

Rob Duthie avatar image Rob Duthie commented ·

Hi Robin

Yes just rename the files to have no .txt after it and insert these files in to the directory.

They are file commands:

/etc/venus/backlight_device

/etc/venus/blank_display_device

Yes the venus software is missing lots of stuff for the raspi as it is designed around the CCGX and the Cerbo devices. In fact the CCGX is a beagle bones device.

And GX is a nano pi device.

I tinker with software but not an expert i manily do harware. That is how i got the raspi steston HAT idea off the ground to have the same function as the Cerbo with more relays etc.

Regards

Rob D

NZ

0 Likes 0 ·
digitaldvd avatar image
digitaldvd answered ·

@Rob Duthie

@Kevin Windrem

I have still not been able to get the dimmer and screen blanking to work at this time and think that if those files that are missing under sys/class/backlight are not there then it will not work and may only be there if you are using an hdmi screen, would be nice if you can give me the file names and extension.

What i did find was backlight in another directory under lib/modules/4.19.18-v71/kernel/driver/video/backlight, here there are three files rpi_backlight.ko lcd.ko gpio_backlight.ko

the gpio backlight i suspect has something to do with the lcd screen not the hdmi and maybe my lcd needs directing to this area to make the blanking and dimming work any thoughts ???.

Also anyone reading this do they have a lcd screen running or are they all hdmi touch screen.

Next step was to try a raspberrypi3 + thinking that as most off you are using these all would work,oh dear that was not the case,in fact i could not even bring the victron display up at all i managed to get the cursor and raspberry # to show but nothing else and that was with version 2.66, but did get all test under the webpage on my pc to work fine,and also what did not help was that i plugged the screen into the gpio port and missed by two pins and im almost sure i stuffed the touch screen up as this now longer works, sh*t happens but the screen display still works and under raspberrypi3 os the screen blanks after a time.

As i mentioned before under raspberry pi4 all is working except the blanking and dimming.

Thanks all comments welcome.

Robin

1 comment
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

Rob Duthie avatar image Rob Duthie commented ·
Hi Robin


I use the 7inch touch screen from raspi, not HDMI type the direct connect port DSI on the back of the raspi boards. And never had a issue to date with the screens, I mainly run the raspi3 B+ boards, i do have a raspi4 ver 1.4 that wont run boot etc.

And have only the 2 files required to make it run etc.

Regards

Rob D

NZ

0 Likes 0 ·
digitaldvd avatar image
digitaldvd answered ·

@Rob Duthie

Hi Rob thanks for the reply can you let me know what version off venus os you are using and if you have time let me know the files under /sys/class/backlight that i seem to be missing i also thought the dsi port had a different port addresses verses the gpio port addresses ??

Thanks

2 comments
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

Rob Duthie avatar image Rob Duthie commented ·
Hi

I am running ver 2.80.16 and 2.66, i have seval raspi running on different versions for testing etc. I only have used the DSI port to date.

Under sys/class/backlight folder is alot of files for screen control. brightness, power, runtime, delay etc.



0 Likes 0 ·
Kevin Windrem avatar image Kevin Windrem commented ·
FYI, the entire /sys/class tree is automatically generated by the system. You can't simply add files to it. What appears there is a function of the hardware detected by the kernel.
0 Likes 0 ·
digitaldvd avatar image
digitaldvd answered ·

@Rob Duthie

@Kevin Windrem

Update at this stage unless someone comes up with a solution the 3.5inch gpio screen will not

work on the raspberry 3 b+ under the venus os ,on the raspberry os yes, could not even get the venus display to come up,on a raspberry pi4 yes got the display to work and touch and calibration but could not get the dimmer or backlight to work,i started to think it was just me and a lack off knowledge but i proved myself wrong and decided to go ahead and get a raspberry 7 inch display v1.1 that plugs into the dsp socket on the raspberrypi and within 15min had it all up and running except at first i could not get the dimmer to work or the backlight to turn off by going through next lines fixed the problem.

opkg update

opkg install kernel-module-rpi-backlight

cd /u-boot/overlays

wget https://github.com/PiNet/PiNet-Boot/raw/master/boot/overlays/rpi-backlight-overlay.dtb

This also help re turning backlight off /sys/class/graphics/fb1/blank

prior to this i did have the backlight running at low light output but after changing fb1 it totally turned off.

I did not have to calibrate the display as the touch worked as soon as i had all up and running.

At this time i have not tried the display on a raspberry pi4 i think it would be really convenient if the 3.5inch gpio worked due to its size,im looking at the 4.5 screen next and hope i have that up and running, just seems a bit off a waste using a 7inch screen thats going to be in standby most off the time verses a cheap small screen.

Thanks for the input

Robin



2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

kivanov avatar image
kivanov answered ·

Seems the driver of the cheap 3.5 inch spi lcd (MPI3501 based on xpt2046) does not support either blanking and dimming.

I am planning to implement a hw solution: connect the spi display with some dupont 2.54mm cables to the r-pi header and pass the 5V power pins through a switch.

LCD specs:
https://cdn.awsli.com.br/945/945993/arquivos/MPI3501-3.5inch-RPi-Display-User-Manual-V1.0.pdf

In this discussion it is stated that switching only the power off and than on again, will return the screen to normal operation.
https://github.com/goodtft/LCD-show/issues/200

This will actually suit my setup since keeping the screen directly connected to the r-pi header does not allow good device cooling. I am planning to have the r-pi mounted inside a box and move the display to the box cover as a front command panel, then add the display switch next to it on the same panel. Just when you need it, press the toggle switch and turn it on or off.

According to the display documentation stated above in the first link, pins 2&4 should be the display 5V power. I assume that we can pass one of them via the switch, then to the display header, and leave the other one not connected or simply bridge to the switch output together with the first one. Moving the LCD away from the r-pi as described will have 2 major benefits:

1) better cooling

2) let us use the unused by the display pins on the r-pi header which are blocked if the display sits above the r-pi directly as by default.


I want to ask the r-pi masters here:

Do you think that both 5V pins of the r-pi header must be used? (for example to suit the power draw of the display)? I believe that the 5V GPIO pins are not regulated/fused and are connected directly to the r-pi power, so no need to use more than one of the 5V pins?

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.