Touch display pligun: screen not correctly detected

If something seems really buggy, report it here!

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

Touch display pligun: screen not correctly detected

Postby BertM » Wed Dec 04 2019 08:57

Github issue #385 https://github.com/volumio/volumio-plugins/issues/385

I have a RPI3 with the official touch screen. On rotating the screen via the web ui, the display rotates, but the touch does not.

Symptom/effect is here:
volumio-plugins/plugins/miscellanea/touch_display/index.js, lines 975 to 980
Code: Select all
 if (rpiScreen) {
   bootstring = 'lcd_rotate=2' + os.EOL + 'display_hdmi_rotate=2' + os.EOL;
 } else {
   bootstring = 'display_lcd_rotate=2' + os.EOL + 'display_hdmi_rotate=2' + os.EOL;
   transformationMatrix = '-1 0 1 0 -1 1 0 0 1';
 }


I would think rpiScreen would be set here but apparently somethings broken:
Code: Select all
 // detect Raspberry Pi Foundation original touch screen
        exec('/bin/grep "^rpi_ft5406\\>" /proc/modules', { uid: 1000, gid: 1000 }, function (error, stdout, stderr) {
          if (error !== null) {
            self.logger.info('No Raspberry Pi Foundation touch screen detected.');
          } else {
            rpiScreen = true;


Output if I run the command in terminal (ssh):
rpiScreen is not set, but it should be.
Code: Select all
$ /bin/grep "^rpi_ft5406\\>" /proc/modules
rpi_ft5406 16384 0 - Live 0x00000000
Random avatar
BertM
Fresh off the boat
Fresh off the boat
 
Posts: 3
Joined: Wed Dec 04 2019 08:50

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


Touch display pligun: screen not correctly detected

Postby gvolt » Wed Dec 04 2019 11:47

Thanks for reporting. I think I have discovered the reason for the issue. Could you still post or PM the results of
Code: Select all
cat /boot/config.txt

The fix for your problem will probably be part of the changes I am currently working on in order to enable the plugin to make use of the new userconfig.txt instead of boot.txt (which will preserve rotation and GPU memeory settings in case of a system update).
Random avatar
gvolt
Objectivist
Objectivist
 
Posts: 231
Joined: Fri Mar 02 2018 16:47


Touch display pligun: screen not correctly detected

Postby BertM » Wed Dec 04 2019 20:58

Code: Select all
$ cat /boot/config.txt
initramfs volumio.initrd
gpu_mem=32
max_usb_current=1
dtparam=audio=on
audio_pwm_mode=2
dtparam=i2c_arm=on
disable_splash=1
hdmi_force_hotplug=1
#### Touch Display setting below: do not alter ####
lcd_rotate=2
display_hdmi_rotate=2


#### Volumio i2s setting below: do not alter ####
dtoverlay=hifiberry-dacplus


Note that I changed the script so it writes 'lcd_rotate' instead of 'display_lcd_rotate'.
Random avatar
BertM
Fresh off the boat
Fresh off the boat
 
Posts: 3
Joined: Wed Dec 04 2019 08:50


Touch display pligun: screen not correctly detected

Postby gvolt » Wed Dec 04 2019 22:15

So, initially you had "display_lcd_rotate" in /boot/config.txt? That would be the wrong entry I expected after your report on GitHub.

Thanks for your feedback!
Random avatar
gvolt
Objectivist
Objectivist
 
Posts: 231
Joined: Fri Mar 02 2018 16:47


Touch display pligun: screen not correctly detected

Postby BertM » Yesterday 11:38

To add:

the logfile does contain this:
Code: Select all
2019-12-03T08:53:21.532Z - info: Raspberry Pi Foundation touch screen detected.
2019-12-03T08:53:21.567Z - info: Using Xorg socket /tmp/.X11-unix/X0
2019-12-03T08:53:21.666Z - info: Backlight module of a Raspberry Pi Foundation touch screen detected.


So the screen is detected but rpiScreen is unset somewhere along the code...?
My Javascript knowledge is too poor to debug this.
Random avatar
BertM
Fresh off the boat
Fresh off the boat
 
Posts: 3
Joined: Wed Dec 04 2019 08:50


Touch display pligun: screen not correctly detected

Postby gvolt » Yesterday 11:57

Problem has been localized. I hope to be able to commit a bug fix soon. :)
Random avatar
gvolt
Objectivist
Objectivist
 
Posts: 231
Joined: Fri Mar 02 2018 16:47


Return to Bug reports

Who is online

Users browsing this forum: No registered users and 0 guests