question

Kevin Windrem avatar image
Kevin Windrem asked

Generic touchscreen on Cerbo

I just acquired a Cerbo GX and the companion Touch 50. I've been using a Waveshare HDMI touch screen on my Raspberry Pi running Venus. It communicated touch information via USB unlike the Touch 50.

As a test, I connected the Waveshare display to Cerbo. Works out of the box including touch. No overlays or any other software needed. No calibration necessary.

This might provide an alternative for those trying to locate the display a long way from Cerbo when the Touch 50 cable isn't long enough and an extender doesn't function.

The display I tried is this:

https://amazon.com/gp/product/B077PLVZCX

Others may also work

Note: you can NOT use the USB port closest to the HDMI connector as this is a power only port.

cerbo gxtouchscreen
2 |3000

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

20 Answers
jean-joubert avatar image
jean-joubert answered ·

@M_Adriaans I have done this with a Waveshare 7inch screen (1024 x 600).

https://www.waveshare.com/7inch-hdmi-lcd-h-with-case.htm

Connect to your Cerbo via SSH.
Run the following commands...

opkg update
opkg install tslib-calibrate

Enable headless mode...

touch /etc/venus/headless

Reboot your Cerbo.
Set screen resolution and run calibration utility...

fbset -xres 1024 -yres 600
ts_calibrate

Now go to the screen and do the actual calibration on the screen.
Once calibration is done disable headless mode...

rm /etc/venus/headless

Reboot your Cerbo again and touch should be working.

7 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.

Munteanu George Ciprian avatar image Munteanu George Ciprian commented ·

i can't enable headless mode

0 Likes 0 ·
Jay Smith avatar image Jay Smith commented ·

Bit of an old thread but I just bought the 7" waveshare, from your link and I am not getting it to work at all. A couple folks have said it should be plug and play. I just get a blank screen.

Now, I am using the somewhat new "S" model, slimmed down model GX. I was able to enable SSH Root access but I hesitate to start running commands. If I mess up a config, can I factory reset and undo my changes?

Any other tips for me? Should I just run through the code you posted here, is that required to get this 7" display working?

0 Likes 0 ·
Jay Smith avatar image Jay Smith Jay Smith commented ·

I went ahead and ran through your steps, unfortunately after the reboot when I run fbset I get an error saying:

fbset: can't open '/dev/fb0': No such file or directory


0 Likes 0 ·
matthew-hodder avatar image matthew-hodder Jay Smith commented ·
how have you got it connected? Are you using the USB cable into one of the 2 most left ports for the touchscreen and power? I don't have the S, just the normal GX and on the latest firmware was just plug and play - then run through the code below under Kevin King to get the time out working.


It seems to be based on getting a LCD with the same resolution as the victron ones - if you got the one linked it should just work (I didn't get that one but same brand).


0 Likes 0 ·
mikenr avatar image mikenr commented ·

Thank you for the info, I advised a friend to buy one of the Waveshare 7inch screens, it displays but the touch doesn't work, the whole point of him having it is so he can control his system when the wifi isn't working. I have it plugged in one of the USBs not next to the HDMI port - I have tried the above fix, but when I enter ts_calibrate I get this message: ts_setup: No such file or directory exists

Any ideas?

Many thanks for your help!

0 Likes 0 ·
k12 avatar image k12 mikenr commented ·
I am getting this same ts_setup problem. Tried doing this a few months ago, wasnt even able to get tslib_calibrate to install. I now have that installed but getting this error. Screen works for everything except touch.
0 Likes 0 ·
Frank Rosch avatar image Frank Rosch commented ·

I actually used this on a cerbo s-gx today and it worked. With a $50 7" touch screen with a case (link will be below) I have not messed with dimming yet in the victron but it does have an on/off button on screen so that's not a concern. It does have a few more buttons also but honestly I was more concerned on figuring out the case assembly so I really don't know what the other ones are except for power and menu but these exact steps worked for the s-gx

https://www.amazon.com/dp/B08KXXKPW9?ref_=cm_sw_r_apan_dp_P8T38QXZFQZJEWM4KBK6&peakEvent=4&dealEvent=1&language=en-US

0 Likes 0 ·
Kevin King avatar image
Kevin King answered ·

Update! I did some testing and i managed to get the display timeout working!

Simply run

nano /etc/venus/blank_display_device

And replace with

/sys/class/graphics/fb0/blank

Save.

then

nano /etc/venus/blank_display_device.in

And replace with

/sys/class/graphics/fb0/blank % victronenergy,cerbo-gx

Save.

Reboot and the screensaver should be working!

8 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.

hohe avatar image hohe commented ·

I have tried your settings on my Cerbo GX, but the screensaver does not work with a generic display. The "echo 0/1 > blank" procedure works for fb0. Do I need to set the

"hdmi_blanking=1"

somewhere? The config.txt does not exist on the Cerbo X.


Update

I need to correct me, because I made a mistake. In the two config files

/etc/venus/blank_display_device & /etc/venus/blank_display_device.in

I have commented out the original settings with a #-sign. After removing these lines, the screensaver worked. Seems to be a Linux thing....


1 Like 1 ·
Kevin Windrem avatar image Kevin Windrem hohe commented ·
True. HDMI screen blanking does not work on Cerbo. Not sure why.
0 Likes 0 ·
hohe avatar image hohe Kevin Windrem commented ·
It works, if the instruction is just followed...
0 Likes 0 ·
matthew-hodder avatar image matthew-hodder hohe commented ·

Confirming that Kevin's guide does work to blank a generic screen, works with the Cerbo's screensaver config as well. Hohe is also correct - I had the same issue, do NOT comment out the original line, you need to delete and add the new lines. Reboot and away you go.

Thank you both!


Also for reference - if you need to return to the original code for some reason:

Run the following

nano /etc/venus/blank_display_device

replace line with

/sys/class/backlight/gxdisp-2-0051/bl_power

save and exit, then open the next file

nano /etc/venus/blank_display_device.in

replace line with

/sys/class/backlight/gxdisp-2-0051/bl_power % victronenergy,cerbo-gx.*

save and exit, then reboot.


Lastly for additional info, I used Waveshare's new super thin QLED 7" display, was plug and play, no need to calibrate touch or adjust screen size, worked out of the box.

Waveshare 7" QLED Display

https://www.amazon.com.au/dp/B0B93TK446?psc=1&ref=ppx_yo2ov_dt_b_product_details

0 Likes 0 ·
matthew-hodder avatar image matthew-hodder matthew-hodder commented ·

just a follow up to this - depending on the firmware, these changes may not survive firmware updates - just had to update it again to get it working again.

0 Likes 0 ·
Tuong Lee avatar image Tuong Lee commented ·

Has anyone gotten this to work on a Cerbo GX-S? I did run

nano /etc/venus/blank_display_device

And replace with

/sys/class/graphics/fb0/blank

but that change doesn’t stick. When I read the file after I commit the change, it shows up as empty. Once I reboot, the timeout menu item under display settings is missing.

I was able to commit the changes to

etc/venus/blank_display_device.in

Once I restored the file to the original, the timeout menu on display settings is restored. Is it a different file or location on the Cerbo GX-S vs the regular Cerbo GX?

0 Likes 0 ·
Tuong Lee avatar image Tuong Lee Tuong Lee commented ·
Nevermind, it works. I must’ve fat fingered the command. Tried it again and it works beautifully. Thanks, what a wonderful community! I can confirm that this 7” EQV touch screen from AliExpress works fine without any calibration or scripting change. Complete plug and play. Just plug usb into the touch USB (and not the power only) as others have stated on here. Link to the screen I purchased here
0 Likes 0 ·
colin avatar image colin commented ·

Thanks for this, it did the trick with my Cerbo and a generic 7" touchscreen (cannibalised from a raspi project).
However, after the screen goes blank it comes back on and shows a blue screen with "no signal". Presumably because it is not detecting hdmi input? Any ideas how to prevent this?

0 Likes 0 ·
Jesse avatar image
Jesse answered ·

I can also confirm that the cheap ($50) 5" capacitive touch screens on AliExpress work perfectly with no configuration.

The 800x480 resolution and 5" size is more than enough. Less would be fine. I run touch data and power over the same USB 2.0 extension cable.

This is an example - EQV 5 inch Portable Monitor HDMI 800 x 480 Capacitive Touch Screen LCD Display for Raspberry Pi 4 3B+/ PC/Banana Pi|LCD Modules| - AliExpress

4 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.

david-66 avatar image david-66 commented ·

Hi Jesse, I bought the same as you. The screen works well but not the touch screen. Did you change anything or use another cable?

0 Likes 0 ·
ivanjh avatar image ivanjh david-66 commented ·

I bought from that listing - but the touchscreen I received didn't work on a Cerbo GX venus 3.00. Cerbo GX linux is missing the hid-multitouch driver. Building/installing seems to have fixed it for me (but that's a real PITA).

0 Likes 0 ·
sebi avatar image sebi ivanjh commented ·
Hey ivanjh, would you mind making the multitouch driver you build available for us?
1 Like 1 ·
ivanjh avatar image ivanjh commented ·

Touchscreen didn't work for me.
The listing shows differing hardware images - I wonder if my purchase from the same listing is the same hardware?

Jesse, was this a Cerbox GX or Raspi? What venus version?

0 Likes 0 ·
liam-tuvey avatar image
liam-tuvey answered ·

Has anyone had any luck in turning off a third party (waveshare 7" HDMI in my case) screen automatically when connected to a Cerbo? Screen displays perfectly but auto time out and dimming functions within Venus dont take effect.

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 answered ·

I have one of the Waveshare 7" HDMI displays and screen saver works, but no dimming.

My RpiDisplaySetup will handle the necessary steps,

https://github.com/kwindrem/RpiDisplaySetup

or you can manually do it from the command line:

echo "/sys/class/graphics/fb0/blank" > /etc/venus/blank_display_device

Add the following line to /u-boot/config.txt:

hdmi_blanking=1


then reboot.

If you are plugged into the second HDMI port use fb1 in place of fb0.

If you do it manually, you'll need to repeat the steps after a firmware update.

If the display does not support backlight control, you will get a blank screen with the backlight still on.

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.

Kevin King avatar image Kevin King commented ·
@Kevin Windrem Any advice on getting this working on a cerbo with a generic display? Thanks!
0 Likes 0 ·
Kevin Windrem avatar image Kevin Windrem Kevin King commented ·

Do some poking around in /sys/class file system to see if you can figure out which display device is being used. See if there is anything in /sys/class/backlight/.

/etc/venus/blank_display_device contains a pointer to the device the system will attempt to turn backlight on and off. For the Raspberry PI, the file will contain:

/sys/class/backlight/rpi_backlight/bl_power

for the "Official 7" Raspberry Pi Display" or

/sys/class/graphics/fb0/blank

If you find something in /sys/class/backlight/ that resembles "bl_power" or "blank" then try writhing values to that file (you can use the echo command) and see if you can find something to make the display go black.

I can plug an HDMI display into my Cerbo tomorrow and will let you know if I find anything.

0 Likes 0 ·
Kevin King avatar image Kevin King Kevin Windrem commented ·

Hi, i did some testing and i manage to blank the display by calling "echo 1 > blank " In the "/sys/class/graphics/fb0/" Directory. Calling "echo 0 > blank " turns it back on! I dont know how to make this work with the display timeout in the venus os settings

0 Likes 0 ·
Kevin Windrem avatar image Kevin Windrem Kevin King commented ·

Enter the following commands

echo "/sys/class/graphics/fb0/blank" > etc/venus/blank_display_device
reboot

The display should then blank

0 Likes 0 ·
Kevin Windrem avatar image Kevin Windrem Kevin King commented ·
I did some poking around on my Cerbo today and struck out.

With the Gx Touch 70 attached /sys/class/backlight is populated with a pointer to gxdisp-2... which contains a bl_power file.

Without the GX Touch connected, /sys/class/backlight is empty.

/sys/class/graphics contains fb0 and fbcon but neither have anything that looks like a backlight control file.

My generic HDMI display works including touch via USB but no screen saver.

Sorry, this is beyond my ability to troubleshoot. Maybe someone else ????

Maybe Victron would be interested in making a generic HDMI display work. It's so close already.

0 Likes 0 ·
liam-tuvey avatar image
liam-tuvey answered ·

Thanks @Kevin Windrem, I'm actually trying to do this on a Cerbo GX not a Pi.
I attempted to use your script but it checks to see if it's running on a Pi and if not aborts.

I tried the first manual command as you suggested but didnt have any luck as I assume this is Pi specific. (also there is no /u-boot on the Cerbo)

I've looked at other solutions like /usr/bin/tvservice etc for turning off the screen but I'm wary of installing new services on Venus, seems to me to be preferable to use the existing functionality in Venus (if possible!)

2 |3000

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

John macrae avatar image
John macrae answered ·

Thanks @Kevin Windrem , I'm also using a generic Aliexpress screen - works great! I bought one with a separate backlight button on the back. Fairly trivial to move it round the front - adjusts in 20% increments.

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.

adahmen avatar image adahmen commented ·
Do you have a link to the product (from Aliexpress)?
0 Likes 0 ·
itsme avatar image
itsme answered ·

Just for information, if other user have the same problems like i had...

To use the Waveshare 7inch Screen (1024x600) you have to add the following to /u-boot/config.txt:

Section [all]

max_usb_current=1
hdmi_group=2
hdmi_mode=87
hdmi_cvt 1024 600 60 6 0 0 0
hdmi_drive=1

works perfect for me on a RPi 3+


2 |3000

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

Greg Melton avatar image
Greg Melton answered ·

Kevin,

I know this is an old post but I have received two defective Touch 70 displays so I am looking for an alternative while Victron works out the issues with the Touch 70. I purchased the display that you linked from Amazon.

Disclaimer: I am electrical challenged but I am an engineer.

I connected the Waveshare display to the Cerbo and I am unsuccessful and making it functional. I connected the HDMI cable, of course. And I connected the included adapter from the USB connector on the Cerbo to the “DC” labeled port on the Waveshare. What am I missing?

TIA,

Greg

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 answered ·

To get touch to work you need to connect the TOUCH port to a USB port on Cerbo. The USB port closest to the HDMI connector is power only, so you need to pick another port. You should not need to connect the DC port as power is also supplied via the TOUCH port.

If you don't have enough USB ports on Cerbo, use a powered hub to connect everything.

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.

mufmur avatar image mufmur commented ·

The only thing I need to do is adjust the resolution so that everything fits on the screen. I am using a cerbo GX with a 7" waveshare screen. This one: https://www.waveshare.com/wiki/7inch_HDMI_LCD_(B)

Right now everything is cropped and zoomed in. I am not familiar with root access and modifying the Cerbo's code, what would be the easiest way to do this? I literally am looking for a dummy guide..

0 Likes 0 ·
m-adriaans avatar image
m-adriaans answered ·

Hello,

I have connected a 7" UCtronics touchs screen to my Cerbo GX. All data is displayed correctly but the touch function needs calibration and I have no clue if that is possible and if so, how to do that. Any help is much appreciated.

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 King avatar image
Kevin King answered ·

Hi! I know this is an old post, but did anyone find a solution to the screen off time on a cerbo gx with a generic display? I have the touch and resolution working, but i cannot figure out the screensaver. Any advice is much appreciated.

2 |3000

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

marcve avatar image
marcve answered ·

Read through this topic, to find a solution to be able to dim or "screensafe" the waveshare 7" hdmi display, and got an easy solution. Because the display has the on/off button on the side, it is not easy to get to if you mount the display in a panel. However, when you power/touch function the display by the usb port on the Cerbo, which is also used for the touch-function, you can disable the display with a switch in the + and - lead of the usb cable, and bring this to the front of the panel. Tested this a bunch of times, and display comes back in correct window and touch-function when back online again.

2 |3000

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

Alistair Warburton avatar image
Alistair Warburton answered ·

I always use a cheap android tablet over ethernrt/wifi. You can pic up an Amazon Fire 7 for less than £40 usually. Strip out th Bloat and add Google Play services with Fire Toolbox... It just works.

And of course you can access Node Red Config and Dasboards too!

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.

usernamepasswordbs avatar image usernamepasswordbs commented ·
Please give a few details about set up. I've got a couple of Fires hanging around and would like to try this.
0 Likes 0 ·
usernamepasswordbs avatar image usernamepasswordbs commented ·
@Alistair Warburton I would love some more details on this: which generation/model of Fire exactly etc. Connections etc.

Much appreciated.

0 Likes 0 ·
michaelschmid avatar image
michaelschmid answered ·

8inch Capacitive Touch Display, Optical Bonding Toughened Glass Panel, 1280×800, IPS, HDMI Interface | 8DP-CAPLCD (waveshare.com) works fine with the Cerbo GX. As well the display timeout is working.

Many thanks for all this information.

2 |3000

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

fkai avatar image
fkai answered ·

Hi,
I also tried some display's.
the only one, works out of the box inlc. touch was
Waveshare 5inch Capacitive Touch Screen LCD (H) Slimmed-down Version, 800×480, HDMI, Toughened Glass Panel, Low Power


But after reboot the resolution was not properly set. Seem, that Cerbo boot up with 1024x600 (=GX touch 70).

I fixed it that way:
On ssh

nano /data/etc/screensetup

Insert into file

*/5 * * * * root /usr/sbin/fbset -xres 800 -yres 480

save and exit the file

chmod 644 /data/etc/screensetup
nano /data/rc.local

Insert into file

#!/bin/sh -e

/usr/sbin/fbset -xres 800 -yres 480



FILE=screensetup

if [ -f "/etc/cron.d/$FILE" ]; then

echo "$FILE exists."

else

cp /data/etc/$FILE /etc/cron.d

chmod 644 /etc/cron.d/$FILE

fi



exit 0

save and exit the file

chmod 755 /data/rc.local

cp /data/etc/screensetup /etc/cron.d

chmod 644 /etc/cron.d/screensetup


After a reboot the rc.local will be run and check if the screensetup cronjob file is there. If not (after fw-upgrade) it will be copy on the right location.
Now every 5 minutes, the screen resolution will be setup. If you like, you can modify how often it will be setup.


After reboot or if disply showup wrong resolution, execute following

- disconnect HDMI + USB

- connect HDMI

- connect USB

Display will reboot. If still wrong resolution, disconect only HDMI

Wait the time, setup in cronjob (in my case 5 minutes)

connect HDMI again.

Display will boot up mainly in wrong resolution, but will boot immediatelly again with right one.


Now you can switch off the display and/or disconnect the USB as you like, display will ever boot in right resolution until next Cerbo reboot

2 |3000

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

abalsamo avatar image
abalsamo answered ·

Has anyone been able to rotate the HDMI output for these generic screens?

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.

Neo Nos avatar image Neo Nos commented ·
Does the Victron auto rotate or something? Your best bet is a get an autorotating one that does it without the software, cause if Victron's does rotate its probably cause the tablet has that feature built in and it is not really happening on any Victron or even OS software level.
0 Likes 0 ·
jonny-b avatar image
jonny-b answered ·

Has anyone actually managed to find a replacement wired screen that works 100%, in place of a Touch 50 or 70 without modification? And if so, has it survived Cerbo GX updates?

I thought the GX touch screens were just dumb displays, and a cheaper alternative would be a simple solution - I should have known better!

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.

matthew-hodder avatar image matthew-hodder commented ·
never had an issue with mine and always survived updates. The only thing that doesn't work on mine is the brightness (never has since it was introduced as a feature), and I need to reset the screen timeout (screensaver) with each firmware update, but that is just a small script I run and takes 1 second to sort.
0 Likes 0 ·
Neo Nos avatar image
Neo Nos answered ·

I love this! I was gonna do the same thing figured search here see if anyone else has done it. Being a software engineer I went with the specs that seemed like a good bet, tried to do it as cheap as possible at $35 with this:

https://www.amazon.com/dp/B07TG8BN65?psc=1&smid=A3JZY4ZDSFJG99&ref_=chk_typ_imgToDp

(Will update on here if I need to root or if it works out of the box)

I love Victron but they kind of wanna do the "Apple" trick and put every little dongle that should be included in a separate boxes and sell it to you for quadriple the price. It's the one thing I truly dislike about any brand that does that. I wish the community could influence them to be a little less like that... it would be nice to put everything that is needed, no one should be purchasing stupid cheap Chinese mage cables separately. Eww.... I feel better now that I vented that... tried to refrain from anything that would get me kicked out of here. lol

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.

Ben Isikoff avatar image Ben Isikoff commented ·
any update on if that worked straight out of the box, with screensaver?
0 Likes 0 ·
kevinc-63559 avatar image
kevinc-63559 answered ·

I tried this one before finding this thread:

https://www.amazon.com/gp/product/B0BRMWMK6X/ref=ppx_yo_dt_b_asin_title_o08_s00?ie=UTF8&psc=1

I can get it to work at 1024x600 via the /u-boot/config.txt settings above, but the touchscreen is wild and pretty uncontrollable. I've written the manufacturer, so will see if they have any advice, but would suggest others spend just a bit more.


2 |3000

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

Related Resources