This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/PROCESSOR-SDK-AM437X: Weston not working

Part Number: PROCESSOR-SDK-AM437X

Tool/software: Linux

Hello,

I have AM437x-gp-evm board (Rev 1.5) and I'm using processor SDK 4.01. Graphical applications like matrix gui are not working.

I'm using an RGB LCD and not the HDMI port, The screen just displays "Please Wait"


Output of cat /proc/version: 20170926213135


Things I have tried -

1) One of the posts mentions that there may be a service race so I've launched in the order
/etc/init.d/weston stop
/etc/init.d weston start
/etc/init.d/matrix-gui-2.0 start

2) Immediately after bootup, I launch kmscube. This works fine. However, if I stop it and start it again, it doesn't work. The error is
"EGL Extensions "EGL_IMG_client_api_ogl EGL_KHR_image EGL_KHR_image_base EGL_KHR"
display 0 failed to set mode: Permission denied "

3) If I completely stop weston and run an application like -
./Application -platform eglfs
In this case I get the error - "Could not set DRM (4) CRTC (33) mode! (Permission denied)"

3.5) Alternately, if I try - ./Application -platform custom-wayland                 
************* The Qt Custom Extension Example Plugin is active ************     
Failed to create display (No such file or directory)

4) The output of cat /var/log/weston.log is
Date: 2017-09-26 UTC                                                            
[21:33:02.103] weston 1.11.0                                                    
               wayland.freedesktop.org                                   
               Bug reports to: bugs.freedesktop.org/enter_bug.cgi
               Build: 1.10.93-2-g2d825ed configure.ac: bump to version 1.11.0 f)
[21:33:02.104] OS: Linux, 4.9.41-ge3a80a1c5c, #1 PREEMPT Tue Sep 26 18:20:30 EDl
[21:33:02.108] Using config file '/etc//weston.ini'                             
[21:33:02.119] Output repaint window is 7 ms maximum.                           
[21:33:02.124] Loading module '/usr/lib/weston/drm-backend.so'                  
[21:33:02.160] initializing drm backend                                         
[21:33:02.185] using /dev/dri/card0                                             
[21:33:02.191] Loading module '/usr/lib/weston/gl-renderer.so'                  
failed to load module: /usr/lib/gbm/gbm_dri.so: cannot open shared object file:y
failed to load module: /usr/lib/gbm/gbm_gallium_drm.so: cannot open shared objey
loaded module : gbm_pvr.so                                                      
found valid GBM backend : gbm_pvr.so                                            
[21:33:02.296] warning: either no EGL_EXT_platform_base support or specific pla.
[21:33:02.331] warning: EGL_EXT_buffer_age not supported. Performance could be .
[21:33:02.331] Retrieving EGL client extension string failed.                   
[21:33:02.333] warning: no input devices on entering Weston. Possible causes:   
        - no permissions to read /dev/input/event*                              
        - seats misconfigured (Weston backend option 'seat', udev device proper)
[21:33:02.333] failed to create input devices                                   
[21:33:02.487] fatal: failed to create compositor backend

5) Sometimes, weston throws the error : "Couldn't open /dev/dri/card0"

6) sgx is enabled in device tree as follows -
&sgx {
    status = "okay";
};

7) Output of /etc/weston.ini
[shell]                                                                         
locking=false                                                                   
animation=zoom                                                                  
panel-location=top                                                              
startup-animation=fade                                                          
                                                                                
[screensaver]                                                                   
# Uncomment path to disable screensaver                                         
#path=@libexecdir@/weston-screensaver                                           
                                                                                
[output]                                                                        
name=HDMI-A-1                                                                   
mode=1024x768

Am I missing any configuration settings?

The only change I've made is that I've disabled the rtc by commenting it out in both the "dtsi" and the "dts" files.

Is matrix gui supposed to work out-of-the-box because I have not changed anything except disabling the rtc.

Thanks,

Rajat Rao

  • Do you have a pointing device (e.g. USB mouse) connected to the EVM before starting Weston?
  • No devices connected at all.

    Only debug serial port.

    By the way, output of modetest is attached.

    trying to open device 'i915'...failed                                           
    trying to open device 'radeon'...failed                                         
    trying to open device 'nouveau'...failed                                        
    trying to open device 'vmwgfx'...failed                                         
    trying to open device 'omapdrm'...done                                          
    Encoders:                                                                       
    id      crtc    type    possible crtcs  possible clones                         
    30      33      TMDS    0x00000001      0x00000000                              
                                                                                    
    Connectors:                                                                     
    id      encoder status          name            size (mm)       modes   encoders
    31      30      connected       (null)-1        0x0             1       30      
      modes:                                                                        
            name refresh (Hz) hdisp hss hse htot vdisp vss vse vtot)                
      1024x768 60 1024 1048 1184 1344 768 771 777 806 flags: nhsync, nvsync; type: r
      props:                                                                        
            1 EDID:                                                                 
                    flags: immutable blob                                           
                    blobs:                                                          
                                                                                    
                    value:                                                          
            2 DPMS:                                                                 
                    flags: enum                                                     
                    enums: On=0 Standby=1 Suspend=2 Off=3                           
                    value: 0                                                        
                                                                                    
    CRTCs:                                                                          
    id      fb      pos     size                                                    
    33      42      (0,0)   (1024x768)                                              
      1024x768 60 1024 1048 1184 1344 768 771 777 806 flags: nhsync, nvsync; type: r
      props:                                                                        
            26 background:                                                          
                    flags: range                                                    
                    values: 0 16777215                                              
                    value: 0                                                        
            27 trans-key-mode:                                                      
                    flags: enum                                                     
                    enums: disable=0 gfx-dst=1 vid-src=2                            
                    value: 0                                                        
            28 trans-key:                                                           
                    flags: range                                                    
                    values: 0 16777215                                              
                    value: 0                                                        
            29 alpha_blender:                                                       
                    flags: range                                                    
                    values: 0 1                                                     
                    value: 0                                                        
            23 zorder:                                                              
                    flags: range                                                    
                    values: 0 3                                                     
                    value: 0                                                        
                                                                                    
    Planes:                                                                         
    id      crtc    fb      CRTC x,y        x,y     gamma size      possible crtcs  
    32      33      42      0,0             0,0     0               0x00000001      
      formats: RX12 AR12 RG16 XR24 RG24 AR24 RA24 RX24                              
      props:                                                                        
            5 type:                                                                 
                    flags: immutable enum                                           
                    enums: Overlay=0 Primary=1 Cursor=2                             
                    value: 1                                                        
            23 zorder:                                                              
                    flags: range                                                    
                    values: 0 3                                                     
                    value: 0                                                        
            24 global_alpha:                                                        
                    flags: range                                                    
                    values: 0 255                                                   
                    value: 255                                                      
            25 pre_mult_alpha:                                                      
                    flags: range                                                    
                    values: 0 1                                                     
                    value: 0                                                        
    34      0       0       0,0             0,0     0               0x00000001      
      formats: XR24 RG24 RX12 RG16 YUYV UYVY                                        
      props:                                                                        
            5 type:                                                                 
                    flags: immutable enum                                           
                    enums: Overlay=0 Primary=1 Cursor=2                             
                    value: 0                                                        
            23 zorder:                                                              
                    flags: range                                                    
                    values: 0 3                                                     
                    value: 1                                                        
            24 global_alpha:                                                        
                    flags: range                                                    
                    values: 0 255                                                   
                    value: 255                                                      
            25 pre_mult_alpha:                                                      
                    flags: range                                                    
                    values: 0 1                                                     
                    value: 0                                                        
    37      0       0       0,0             0,0     0               0x00000001      
      formats: RX12 AR12 RG16 XR24 RG24 YUYV UYVY AR24 RA24 RX24                    
      props:                                                                        
            5 type:                                                                 
                    flags: immutable enum                                           
                    enums: Overlay=0 Primary=1 Cursor=2                             
                    value: 0                                                        
            23 zorder:                                                              
                    flags: range                                                    
                    values: 0 3                                                     
                    value: 2                                                        
            24 global_alpha:                                                        
                    flags: range                                                    
                    values: 0 255                                                   
                    value: 255                                                      
            25 pre_mult_alpha:                                                      
                    flags: range                                                    
                    values: 0 1                                                     
                    value: 0                                                        
                                                                                    
    Frame buffers:                                                                  
    id      size    pitch 
    

  • I should emphasize that on bootup, except matrix-gui, other applications are working.
    kmscube works fine.
    Custom applications work with eglfs but not wayland (probably due to Qt compiling issues?).
    HOWEVER, nothing works if the first application is stopped. It looks like the first application does not release the display resources.
  • Hello Rajat,

    Please, see this post. The weston is the process which holds these resources. You must run /etc/init.d/weston stop to release the display resources before launching your non-weston application.

    Best regards,
    Kemal

  • I connected a USB mouse and it started working.
    What is the reason for this?
    Is there any workaround so that the weston works without a mouse connected?

    Thanks,
    Rajat Rao
  • Yes I am running the stop command but to no avail.
    There seems to be some other problem.
  • Please, see this thread.