Announcement

Collapse
No announcement yet.

Touch screen problem on PiCore (bug/ just some tslib setting?)

Collapse
X
 
  • Time
  • Show
Clear All
new posts

  • Touch screen problem on PiCore (bug/ just some tslib setting?)

    Click image for larger version

Name:	piCore1.jpg
Views:	0
Size:	0
ID:	1635078
    I got 7 Inch Raspberry Pi 4 Model B Touch Screen 1024x600 IPS Capacitive LCD - screen is on sale from different sellers in two version (with and without speakers). Lcd wiki - lcdwiki.com description and driver for raspi you can find on http://www.lcdwiki.com/7inch_HDMI_Display-H.
    Touch screen is on Raspberry Bullseye working absolut flawlessly without calibration. I installed Max2play player with Jivelite without any problem. I do not like Max2play much because of limited possibilities and license politics, I prefer Pcp.
    On Picoreplayer I experienced problem with touchscreen: LCD screen is working without any problem, even with default settings. It doesn't need any setting in config.txt, for sure I am setting:
    #---Begin-Custom-(Do not alter Begin or End Tags)-----
    hdmi_group=2
    hdmi_mode=87
    hdmi_cvt 800 480 60 6 0 0 0
    #---End-Custom----------------------------------------
    dtoverlay=hifiberry-dacplus
    I tried different jivelite.sh settings:
    #export JIVE_NOCURSOR=1
    export SDL_VIDEODRIVER=fbcon
    export SDL_FBDEV=/dev/fb0
    export TSLIB_TSDEVICE=/dev/input/$EVENTNO
    export SDL_MOUSEDRV=TSLIB
    In this case touch on every place on screen results on the same coordinates. Thus calibration is impossible :
    tc@pCP:~$ sudo TSLIB_FBDEVICE=/dev/fb0 TSLIB_TSDEVICE=/dev/input/event0 /usr/loc
    al/bin/ts_calibrate
    xres = 800, yres = 480
    Took 1 samples...
    Top left : X = 1024 Y = 600
    Took 1 samples...
    Top right : X = 1024 Y = 600
    Took 1 samples...
    Bot right : X = 1024 Y = 600
    Took 1 samples...
    Bot left : X = 1024 Y = 600
    Took 1 samples...
    Center : X = 1024 Y = 600
    ts_calibrate: determinant is too small -- 0.000000
    Calibration failed.
    In the case I set::
    export SDL_MOUSEDEV=dev/input/$EVENTNO​
    is the touch erratic other way: every touch on the same place results in different coordinates. I intentionally left mouse cursor on - mouse cursor disappear after some time and appears again after touch.


    I suppose it does man som problem with Tslib - touch doesn't understand screen for some reason. I tried figure out how to modify ts.conf, but without any success. I basically use the same ts.conf as Raspian did:
    # Access plugins
    ################

    # Uncomment if you wish to use the linux input layer event interface
    module_raw input

    # For other driver modules, see the ts.conf man page


    # Filter plugins
    ################

    # Uncomment if first or last samples are unreliable
    # module skip nhead=1 ntail=1

    # Uncomment if needed for devices that measure pressure
    module pthres pmin=1

    # Uncomment if needed
    # module debounce drop_threshold=40

    # Uncomment if needed to filter spikes
    # module median depth=5

    # Uncomment to enable smoothing of fraction N/D
    # module iir N=6 D=10

    # Uncomment if needed
    # module lowpass factor=0.1 threshold=1

    # Uncomment if needed to filter noise samples
    module variance delta=30
    module dejitter delta=100

    # Uncomment and adjust if you need to invert an axis or both
    # module invert x0=800 y0=480

    # Uncomment to use ts_calibrate's settings
    module linear
    Problem concerns just TinyCore/piCore. Maybe it is some bug. Due to the fact there is some bug in second Captcha on TinyCore forum (no contact to admin available), I didn't manage register in the forum and do some search.

    Update: some values of
    tc@pCP:~$ sudo TSLIB_FBDEVICE=/dev/fb0 TSLIB_TSDEVICE=/dev/input/event0 /usr/loc
    al/bin/ts_print
    1680017322.833839: 997 569 255
    1680017322.983794: 997 569 0
    1680017323.162811: 997 569 255
    1680017323.302796: 997 569 0
    1680017323.447806: 997 569 255
    1680017323.576793: 997 569 0
    1680017323.829812: 997 569 255
    1680017323.829812: 997 569 255
    1680017323.829812: 997 569 255
    1680017323.946790: 997 569 255
    1680017323.979796: 997 569 0
    1680017324.592808: 997 569 255
    and
    some values of
    tc@pCP:~$ sudo TSLIB_FBDEVICE=/dev/fb0 TSLIB_TSDEVICE=/dev/input/event0 /usr/loc
    al/bin/ts_print_raw
    1680017407.974838: 1024 600 255
    1680017408.103798: 0 0 0
    1680017413.196824: 1024 600 255
    1680017413.515794: 0 0 0
    1680017420.534831: 1024 600 255
    1680017420.747793: 0 0 0
    1680017421.445813: 1024 600 255
    1680017421.626794: 0 0 0
    1680017421.932809: 1024 600 255
    1680017422.082793: 0 0 0
    1680017422.420809: 1024 600 255
    1680017422.601796: 0 0 0
    1680017423.130815: 1024 600 255
    1680017423.332793: 0 0 0
    1680017423.713815: 1024 600 255
    1680017423.862793: 0 0 0
    1680017424.221814: 1024 600 255
    1680017424.403795: 0 0 0
    1680017426.118820: 1024 600 255
    1680017426.234793: 1024 600 255
    I didn't find interpretation of those values, but it seems second and third value are coordinates and last value is 255 on touch and 0 when removing touch. Value 255 seems to be problematic, should be less then 255?

    Many thanks for hints, advice, help .....
    Last edited by kjansik; 2023-03-28, 16:44.

  • #2
    I am deeply disappointed - problem is clearly in software and concerns TinyCore (and PiCore as well) and no support is available. There is even impossible to register on TinyCore forum - registration problem is known since several months (years) and unresolved. It is very pity for Picoreplayer - it is impossible get support for very promising hardware....

    Comment


    • #3
      Hi kjansik

      I'm sorry about the lack of response. The official Raspberry Pi 7 inch Touchscreen display is supported:
      Official Raspberry Pi product. - 7 "Touchscreen Display. - Display Dimensions: 194mm x 110mm x 20mm (including spacers) - Visible screen size: 155mm x 86mm - Display Resolution 800 x 480 pixels - 10 finger capacitive touch. - Connects to Raspberry Pi board using a flat cable connected to the DSI port. - Adapter board is used to power the monitor and convert the parallel signals from the screen to the serial (DSI) port on the Raspberry Pi.


      The one you're referring to looks like a neat upgrade (with higher resolution, IPS and so on), but it
      isn't officially supported, so in general you're on your own.

      There have been previous attempts at setting up other screens, and sometimes successfully.
      Have you had a look at this, for example : https://docs.picoreplayer.org/projects/add-a-display/

      I'm sorry that TinyCore and PiCore are not that responsive to our piCorePlayer. It's because we're
      in princple piggy-backing on their work. To get their support, you should install their OS instead,
      and ask for help with it. Then maybe you can 'transfer' the findings to piCorePlayer.

      Here are some forum posts, where people work out different screens - have you checked this out?



      In particular I recommend this thread:


      I wish you best of luck.
      Sorry I can't offer any specific help.
      I really wish you success, because the display you've found looks like a nice one.

      With kind regards,
      Claus

      Comment


      • #4
        High resolution screens aren't of high value, unless someone creates higher resolution jivelite skins. 800x480 is the most supported resolution of jivelite skins.

        You have only provided data and config settings as it is related to the video portion of your screen, you leave out the sections that deal with the touch driver. What touch driver is being loaded by the kernel?

        [code]
        export TSLIB_TSDEVICE=/dev/input/$EVENTNO
        [code]

        This line is meaningless, unless you also include the portion of the script that sets the event number. Are you sure event0 is the correct event. What is the output of the script that shows the event number?


        piCorePlayer a small player for the Raspberry Pi in RAM.
        Homepage: https://www.picoreplayer.org

        Please donate if you like the piCorePlayer

        Comment


        • #5
          Hi Claus,
          many thanks for your effort and kind answer. I did study and know all your recommended links (especially it concerns the link with Elecrow screen). My understanding is that there is some system bug with roots in TinyCore. I did install TinyCore and XORG and the problem persists.
          Screen is working flawlessly with Raspbian, Kali, Odroid etc. I successfully installed Max2play with Jivelite, did install changes I found in forum (Eyecrow s VU Meters etc.)
          My understanding TInyCore is based on Raspbian and due some (minor) differences it doesn't work with identical hardware.
          I am looking for some hint how to circumvent (modify) it and solve the problem. Unfortunately (I am 74 years and probably the oldest guy on the forum) i do not have enough knowledge to find out the solution.
          I suppose should be benefit for whole PiCoreplayer community if it would work with the same way with screens supported by Raspbian.

          Comment


          • #6
            HI Paul,
            please read my answer to Claus.
            I do not stick on screen resolution: I am using Joggler. Official raspberry is poor quality: upside down, poor view angles, fade colors, maybe too expensive. Those chinese ISP screens are good quality, cabling is simple with delivered connectors, nice colors and view angles, costs 40-50€ with brackets and delivered in 15 days (I got 2 pieces already).
            Concerning the value of EVENT0 following:
            EVENTNO=$(cat /proc/bus/input/devices | awk '/QDtech MPI7003/{for(a=0;a>=0;a++){getline;{if(/mouse/==1){ print $NF;exit 0;}}}}')
            I did many attempts to solve the problem and attached different hardware (mouse, keyboards) to USB ports, touch is getting different dev events. I am aware about necessity to have proper event connected. Concerning touch driver: I tried
            module_raw input
            and did some try with module Waveshare. With waveshare modul screen behaves little bit different, but basically with the same result.
            I did check ts,conf with working Raspbian, no success.
            I thoroughly read TSLIB on Git, didn't found any solution (may be i didn't understand or noticed some important thing).
            My question is: what is the difference on (TSLIB?) implementation between Raspbian and Picoreplayer?
            Last edited by kjansik; 2023-04-07, 21:48.

            Comment


            • #7
              Are you really trying Raspbian?

              I would suggest you use a Linux distribution based on Raspberry Pi OS, that is what most screen hardware manufacturers assume you are using. That way their install scripts will work for you.

              The piCore and the piCorePlayer Teams only have a couple of people. Unfortunately we can't spend the time and money buying, testing and doing the development for hundreds of screens.

              I was really hoping the piCorePlayer documentation was enough to help those that decided to take select an alternative path - see Raspberry Pi 7" Touch Display.

              Comment


              • #8
                Hi Greg,
                in the I am running Max2play with Jivelite on Stretch, but I did make Jivelite on Bullseye succesfully. I am playing with the idea to built my own libts.tcz, I do believe the problem is hidden in TSLIB implemetation in PiCore.
                Concering screens: I have one Pcp player with official Raspberry Pi 7" Touch - disappointed by poor screen quality (colors, viewing angles, upside down). Another Pcp player I got with Waveshare 7" (C), fair screen, case ugly, cabling hairy... I intend to buy some chinese DSI IPS screen and try to build next try.
                Max2play is OK, but far not so elegant and flexibly as Pcp. I am just looking for idea, how to solve the problem, due to the fact I am old pensioner I can spent my time with experiments.

                Comment


                • #9
                  Regarding screen rotation, piCorePlayer has 0 and 180 degrees screen rotation available. That works for the official 7" screen. It's on the Tweaks tab of the pCP web interface.

                  Robert
                  Home: Raspberry Pi 4/pCP7.0/LMS8.1.2/Material with files on QNAP TS-251A
                  Touch > DacMagic 100 > Naim Audio Nait 3 > Mission 752 (plus Rega Planar 3 > Rega Fono Mini; Naim CD3)
                  2 x Squeezebox Radios, 1 X Squeezebox 3 (retired), 1 x SqueezeAMP
                  Office: LMS8.0.0 running on Raspberry Pi3; Raspberry Pi 3 player with touchscreen/piCorePlayer/IQaudIO DAC and Amp
                  Portable: Raspberry Pi 3B/pCP7.0.1/LMS8.1.2/Material, files on Seagate portable drive, powered via power brick

                  Comment


                  • #10
                    Hi Robert,
                    I know, but it is not ISP and even screen is rotated, it is upside down and colors are poor if you are viewing it from top angles....
                    Last edited by kjansik; 2023-04-08, 20:35.

                    Comment


                    • #11
                      There is nothing special about tslib on pCP, it’s compiled from the same source. Any other disto is likely using an X based setup. How are you setting the screen size and how are you settIng the matrix size of the touch.

                      piCorePlayer a small player for the Raspberry Pi in RAM.
                      Homepage: https://www.picoreplayer.org

                      Please donate if you like the piCorePlayer

                      Comment


                      • #12
                        So far I know, every other distro is using X. Concerning screen, I tried every possible combination, basicaly all (config.txt, jivelite.sh) is set to 800x480.
                        I suppose the important clue is following - ts_calibrate:
                        tc@pCP:~$ sudo TSLIB_FBDEVICE=/dev/fb0 TSLIB_TSDEVICE=/dev/input/event0 /usr/loc
                        al/bin/ts_calibrate
                        xres = 800, yres = 480
                        Took 1 samples...
                        Top left : X = 1024 Y = 600
                        Took 1 samples...
                        Top right : X = 1024 Y = 600
                        Took 1 samples...
                        Bot right : X = 1024 Y = 600
                        Took 1 samples...
                        Bot left : X = 1024 Y = 600
                        Took 1 samples...
                        Center : X = 1024 Y = 600
                        ts_calibrate: determinant is too small -- 0.000000
                        Calibration failed.​
                        For every possible screen setting (I tried even some exotic settings like 640x480) calibration touch results in the same coordinate 1024, 600 e.g. bottom right corner of native resolution of screen.
                        Last edited by kjansik; 2023-04-08, 14:37.

                        Comment


                        • #13
                          I need to know how you are setting resolution. And I still need to know which kernel driver you touchscreen is using.
                          piCorePlayer a small player for the Raspberry Pi in RAM.
                          Homepage: https://www.picoreplayer.org

                          Please donate if you like the piCorePlayer

                          Comment


                          • #14
                            I hope I do understand you right:
                            dtoverlay=vc4-kms-v3d,

                            hdmi_mode=87
                            hdmi_drive=2
                            display_rotate=0
                            hdmi_cvt 1024 600 60 6 0 0 0 respectively 800 480 60 6 0 0 0

                            I did try also sometimes
                            /usr/sbin/fbset -xres 800 -yres 480
                            Last edited by kjansik; 2023-04-08, 16:01.

                            Comment


                            • #15
                              Please post the output of “lsmod”

                              fbset happens well after the touchscreen driver loads, and the other commands are hdmi related.

                              use framebuffer_width and framebuffer_height. See. https://www.raspberrypi.com/document...#video-options



                              piCorePlayer a small player for the Raspberry Pi in RAM.
                              Homepage: https://www.picoreplayer.org

                              Please donate if you like the piCorePlayer

                              Comment

                              Working...
                              X
                              😀
                              🥰
                              🤢
                              😎
                              😡
                              👍
                              👎