Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Solved: Touch not working correct
#1
Hello

i'm building a Audio Streamer based on Moode, using Raspberry Pi CM4 and CM4 I/O board. From given dimension of the selected case the Waveshare 7.9" DSI display with touch would fit perfectly. So I took the hard way to make non standard setup working.

Currently I have a working setup with this local display using with native resolution of 1280 by 400 px. Even the touch device is working, but not perfect. The remaining problem is, that the touch driver thinks the screen Y resolution is 480 instead of 400. The X resolution of 1280 is correct also for the touch device.
I tried to use xinput_calibration for X11, without success.

Screen reending with 1280x400 works perfect, only touch in Y direction is incorrect.

I need some hint where to find setting of 480 in height is set which disturbs touch behaviour.

here some pics:
   
Waveshare DSI 7.9 1280x400
   

Touch pointer top of screen
   
Touch bottom of screen
   

Output of xrandr (minimal height set to 480?)
   

Please help

Felix
Reply
#2
Hi

im still having the issue with incorrect touch device in Y direction.
Now I did the following:

Setup another pi4 with raspian bullseye 64bit lite, moved the Waveshare DSI Display to the Pi4,
installed drivers as proposed by Waveshare on https://github.com/waveshare/Waveshare-DSI-LCD

Now I installed a chromium kiosk installation as described here: https://blog.developbyter.com/raspberry-...inrichten/
Just pointed the URL to the moodeaudio installation on the CM4 Hardware.

Surprise the moode UI on this Installation just worked flawless including touch pointer!

As far as I understand: both installation are based on standard bullseye 64bit lite. Both have kernel 6.1.21 both are based on Xorg and chromium.


Just searching the difference in setup... and/or configuration.

Has anybody Waveshare 7.9 DSI Display successful setup including touch device as local display?

kindly
Felix
Reply
#3
Look in the file /home/pi/.xinitrc

Below is the command used to determine the screen size. Maybe it's not detecting the correct height?

Code:
# Capture screen size
SCREENSIZE="$(fbset -s | awk '$1 == "geometry" { print $2","$3 }')"
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#4
(04-27-2024, 07:06 PM)Tim Curtis Wrote: Look in the file /home/pi/.xinitrc

Below is the command used to determine the screen size. Maybe it's not detecting the correct height?

Code:
# Capture screen size
SCREENSIZE="$(fbset -s | awk '$1 == "geometry" { print $2","$3 }')"

Hi Tim

yes, there seem to be the problem because fset does not return the expected values. In my pi4 raspian lite with chromium kiosk mode setup values gives:
Code:
$ fbset -s

mode "400x1280"
   geometry 400 1280 400 1280 16
   timings 0 0 0 0 0 0 0
   accel true
   rgba 5/11,6/5,5/0,0/0
endmode

while in moode it gives:
Code:
$ fbset -s

mode "400x480"
   geometry 400 480 640 1280 16
   timings 0 0 0 0 0 0 0
   accel true
   rgba 5/11,6/5,5/0,0/0
endmode

and therefore to make chromium work in landscape with 1280 x 400 one needs to change .xinitrc as suggested by forum members to

Code:
# Capture screen size
#SCREENSIZE="$(fbset -s | awk '$1 == "geometry" { print $2","$3 }')"
SCREENSIZE="1280,400"

view port reports correct 1279 x 399

regards
Felix
Reply
#5
Got it.

I'll add a "Screen size" option to the Local Display section to allow automatic detection to be overridden.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#6
(04-28-2024, 11:10 AM)Tim Curtis Wrote: Got it.

I'll add a "Screen size" option to the Local Display section to allow automatic detection to be overridden.

Well while doing further tests and comparing with the pi4 install it seems that the fbset difference has nothing to do with the touch anomaly.

I tested this change in .xinitrc without any improvement in touch behaviour:
Code:
fbset --geometry 400 1280 400 1280 16

# Capture screen size
SCREENSIZE="$(fbset -s | awk '$1 == "geometry" { print $3","$2 }')"
#SCREENSIZE="1280,400"

note the inversion of params in awk statement

now screen is as before but touch still misbehaving
although fbset -s now gives expected values: (exactly the same as on the pi4 lite install)
Code:
felix@moode:~ $ fbset -s

mode "400x1280"
   geometry 400 1280 400 1280 16
   timings 0 0 0 0 0 0 0
   accel true
   rgba 5/11,6/5,5/0,0/0
endmode

I compared installed X11 packets, but could not find differences. Looking further...

Kindly Felix
Reply
#7
(04-28-2024, 11:10 AM)Tim Curtis Wrote: Got it.

I'll add a "Screen size" option to the Local Display section to allow automatic detection to be overridden.

This would be a cool feature and avoid half of my customizations to .xinitrc, but not the other half... while you are at the code, an option to rotate the screen, or more flexible, include .xinitrc.local... well, I can use ssh and edit the script, but it will get overwritten at updates, so any way of adding customization would be cool.
Reply
#8
(04-28-2024, 12:19 PM)felix1024 Wrote:
(04-28-2024, 11:10 AM)Tim Curtis Wrote: Got it.

I'll add a "Screen size" option to the Local Display section to allow automatic detection to be overridden.

Well while doing further tests and comparing with the pi4 install it seems that the fbset difference has nothing to do with the touch anomaly.

I tested this change in .xinitrc without any improvement in touch behaviour:
Code:
fbset --geometry 400 1280 400 1280 16

# Capture screen size
SCREENSIZE="$(fbset -s | awk '$1 == "geometry" { print $3","$2 }')"
#SCREENSIZE="1280,400"

note the inversion of params in awk statement

now screen is as before but touch still misbehaving
although fbset -s now gives expected values: (exactly the same as on the pi4 lite install)
Code:
felix@moode:~ $ fbset -s

mode "400x1280"
   geometry 400 1280 400 1280 16
   timings 0 0 0 0 0 0 0
   accel true
   rgba 5/11,6/5,5/0,0/0
endmode

I compared installed X11 packets, but could not find differences. Looking further...

Kindly Felix

Interesting. I'll hold off until the root cause is identified.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#9
(04-28-2024, 12:30 PM)popeye65 Wrote:
(04-28-2024, 11:10 AM)Tim Curtis Wrote: Got it.

I'll add a "Screen size" option to the Local Display section to allow automatic detection to be overridden.

This would be a cool feature and avoid half of my customizations to .xinitrc, but not the other half... while you are at the code, an option to rotate the screen, or more flexible, include .xinitrc.local... well, I can use ssh and edit the script, but it will get overwritten at updates, so any way of adding customization would be cool.

If there were a set of options common to all these display panels and that actually worked to set the display correctly I would add them but as you can see from @felix1024 post the proposed screen size option did not have any effect.

Another approach would be to include xinitrc in the Backup/Restore process which would effectively preserve user customizations.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#10
(04-28-2024, 01:12 PM)Tim Curtis Wrote:
(04-28-2024, 12:30 PM)popeye65 Wrote:
(04-28-2024, 11:10 AM)Tim Curtis Wrote: Got it.

I'll add a "Screen size" option to the Local Display section to allow automatic detection to be overridden.

This would be a cool feature and avoid half of my customizations to .xinitrc, but not the other half... while you are at the code, an option to rotate the screen, or more flexible, include .xinitrc.local... well, I can use ssh and edit the script, but it will get overwritten at updates, so any way of adding customization would be cool.

If there were a set of options common to all these display panels and that actually worked to set the display correctly I would add them but as you can see from @felix1024 post the proposed screen size option did not have any effect.

Another approach would be to include xinitrc in the Backup/Restore process which would effectively preserve user customizations.
Now I did a complete new setup from scratch on a pi4, just trial and error to exclude any problem caused by CM4 and CM4 I/O board. No success absolute same behavior.

Next I compared the installed X11 packages between working pi4/chromium/kiosk-mode and Moode image install on CM4, no difference found.
Then i did the same comparing dtoverlays in /boot again no difference.

Can i install Moode from git repository above of a working pi4 bullseye lite and installed X11 and chromium?
Any other idea where to search further?

-Felix
Reply


Forum Jump: