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/AM3352: Xorg on AM3352 (no GPU)

Part Number: AM3352

Tool/software: Linux

Hello,

I am working with AM3352 platform and trying to port the X-window system (Xorg) packages.

I am confirmed that Xorg will run on AM3358-EVM. I expected Xorg for AM 3358EVM to work as it is on the AM 3352 platform. However, it fails to start because there is no GPU.

On AM3352 platform, the frame buffer "/dev/fb0" already works, and the the character display on the screen is working without problem.

I tried specifying Section "Device" Driver "fb" Option "fb" "/dev/fb0" in xorg.conf, but Xorg automatically add the GPU and it fail because there is no GPU.

Perhaps if I can clearly prohibit Xorg from using GPU, I may be able to avoid the problem, but I do not know how to do it.

The graphic SDK may only copy the prebuilt binaries according to the command line argument, and it seemed that there was no binary of the configuration without GPU in it.

Now I am trying to solve it by building XFree86 from source code.

Please tell me how to run Xorg on AM3352 platform.Regards

Band

  • Hello,

    What is the PSDK version that you are using here?
    Please refer the below guide:
    software-dl.ti.com/.../Overview_Building_the_SDK.html
    Chapter: "1.2.4. Common Variations (no SGX, X11, etc.)"

    Hope this helps.

    BR
    Margarita
  • Part Number: AM3352

    Tool/software: Linux

    Hello,

    I tried rebuilding the kernel and rootfs image with your suggestion, but I cannot run Xorg.

    I changed the setting of xorg.conf and tried it, but Xorg will stop with an error.

    Since fbdev was not built by the KERNEL_CONFIG setting, and since fbdev has not been maintained yet, I have not tried fbdev behavior. 

    How can I start Xorg without errors?

    The attached zip file contains the following: Xorg log, xorg.conf, dmesg, journalctl, KERNEL_CONFIG_FRAGMENTS under meta-myhw/recipes-kernel/, patch to am335x-evm.dts

    20190308_x11.zip

    Best regards,

    Yukinori Bando

  • Hi Bando-san,

    Typically the windows manager like Xorg/Wayland etc have OpenGL libraries that requires graphics hardware accelerator underneath as they are performance hungry operations. Making them work on platform without accelerators will be tough as we don't have software libraries for OpenGL functions.

    Regards,
    Manisha
  • HI, Manisha-san,

    About OpenGL, I do not need this library for our product.. But Xorg-server load it automatically.

    (II) LoadModule: "glx"
    (II) Loading /usr/local/XSGX/lib/xorg/modules/extensions/libglx.so

    I did not know how to inhibit module loading, so I checked it and I added the following setting to xorg.conf,

    Section "Module"
         Disable "glx"
         Disable "pvr"
    EndSection

    Then, Xorg-server does not load libglx.so (show the attached log).

    But Xorg is stopped with the same error.

    (EE) modeset(0): failed to set mode: Invalid argument

    Now, I am reading the source code with the error string as a clue.

    linux\xorg-server-1.20.4/hw/xfree86/drivers/modesetting/drmmode_display.c :

    function drmmode_set_mode_major()

    when the function drmmode_crtc_set_mode() returns !0 value, xorg-server put out this error. 

    Best regards,

    Bando

    X.Org X Server 1.18.4
    Release Date: 2016-07-19
    X Protocol Version 11, Revision 0
    Build Operating System: Linux 3.13.0-24-generic x86_64
    Current Operating System: Linux omron-nsv3 4.9.41-ge3a80a1c5c #2 PREEMPT Sat Mar 9 18:40:29 JST 2019 armv7l
    Kernel command line: console=ttyO0,115200n8 root=PARTUUID=5713d26b-02 rw rootfstype=ext4 rootwait
    Build Date: 17 June 2017  08:20:30PM
    
    Current version of pixman: 0.32.8
            Before reporting problems, check http://wiki.x.org
            to make sure that you have the latest version.
    Markers: (--) probed, (**) from config file, (==) default setting,
            (++) from command line, (!!) notice, (II) informational,
            (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
    (==) Log file: "/usr/local/XSGX/var/log/Xorg.0.log", Time: Thu Mar 14 03:02:06 2019
    (++) Using config file: "/usr/local/XSGX/etc/xorg.conf"
    (==) Using system config directory "/usr/local/XSGX/share/X11/xorg.conf.d"
    (**) Option "defaultserverlayout" "Server Layout"
    (**) ServerLayout "Server Layout"
    (**) |-->Screen "Screen" (0)
    (**) |   |-->Monitor "Monitor"
    (**) |   |-->Device "Video Device"
    (==) Automatically adding devices
    (==) Automatically enabling devices
    (==) Automatically adding GPU devices
    (==) Max clients allowed: 256, resource mask: 0x1fffff
    (WW) The directory "/usr/local/XSGX/share/fonts/X11/TTF/" does not exist.
            Entry deleted from font path.
    (WW) The directory "/usr/local/XSGX/share/fonts/X11/OTF/" does not exist.
            Entry deleted from font path.
    (==) FontPath set to:
            /usr/local/XSGX/share/fonts/X11/misc/,
            /usr/local/XSGX/share/fonts/X11/Type1/,
            /usr/local/XSGX/share/fonts/X11/100dpi/,
            /usr/local/XSGX/share/fonts/X11/75dpi/
    (==) ModulePath set to "/usr/local/XSGX/lib/xorg/modules"
    (II) The server relies on udev to provide the list of input devices.
            If no devices become available, reconfigure udev or disable AutoAddDevices.
    (II) Loader magic: 0x15c8a8
    (II) Module ABI versions:
            X.Org ANSI C Emulation: 0.4
            X.Org Video Driver: 20.0
            X.Org XInput driver : 22.1
            X.Org Server Extension : 9.0
    (II) xfree86: Adding drm device (/dev/dri/card0)
    (II) no primary bus or device found
            falling back to /sys/devices/platform/ocp/4830e000.lcdc/drm/card0
    (WW) "glx" will not be loaded unless you've specified it to be loaded elsewhere.
    (WW) "pvr" will not be loaded unless you've specified it to be loaded elsewhere.
    (WW) "modesetting" will not be loaded unless you've specified it to be loaded elsewhere.
    (II) "glx" will be loaded even though the default is to disable it.
    (==) Matched modesetting as autoconfigured driver 0
    (==) Matched fbdev as autoconfigured driver 1
    (==) Assigned the driver to the xf86ConfigLayout
    (II) LoadModule: "modesetting"
    (II) Loading /usr/local/XSGX/lib/xorg/modules/drivers/modesetting_drv.so
    (II) Module modesetting: vendor="X.Org Foundation"
            compiled for 1.18.4, module version = 1.18.4
            Module class: X.Org Video Driver
            ABI class: X.Org Video Driver, version 20.0
    (II) LoadModule: "fbdev"
    (WW) Warning, couldn't open module fbdev
    (II) UnloadModule: "fbdev"
    (II) Unloading fbdev
    (EE) Failed to load module "fbdev" (module does not exist, 0)
    (II) modesetting: Driver for Modesetting Kernel Drivers: kms
    (--) using VT number 2
    
    (II) modeset(0): using drv /dev/dri/card0
    (WW) VGA arbiter: cannot open kernel arbiter, no multi-card support
    (II) modeset(0): Creating default Display subsection in Screen section
            "Screen" for depth/fbbpp 24/32
    (==) modeset(0): Depth 24, (==) framebuffer bpp 32
    (==) modeset(0): RGB weight 888
    (==) modeset(0): Default visual is TrueColor
    (II) modeset(0): No glamor support in the X Server
    (II) modeset(0): ShadowFB: preferred NO, enabled NO
    (II) modeset(0): Output LVDS-1 using monitor section Monitor
    (II) modeset(0): Up to 1 crtcs needed for screen.
    (II) modeset(0): Allocated crtc nr. 0 to this screen.
    (II) modeset(0): EDID for output LVDS-1
    (II) modeset(0): Printing probed modes for output LVDS-1
    (II) modeset(0): Modeline "800x600"x60.5   40.00  800 840 904 992  600 639 643 666 +hsync +vsync (40.3 kHz eP)
    (II) modeset(0): Output LVDS-1 connected
    (II) modeset(0): Using exact sizes for initial modes
    (II) modeset(0): Output LVDS-1 using initial mode 800x600 +0+0
    (II) modeset(0): Using default gamma of (1.0, 1.0, 1.0) unless otherwise stated.
    (==) modeset(0): DPI set to (96, 96)
    (II) Loading sub module "fb"
    (II) LoadModule: "fb"
    (II) Loading /usr/local/XSGX/lib/xorg/modules/libfb.so
    (II) Module fb: vendor="X.Org Foundation"
            compiled for 1.18.4, module version = 1.0.0
            ABI class: X.Org ANSI C Emulation, version 0.4
    (==) Depth 24 pixmap format is 32 bpp
    (==) modeset(0): Backing store enabled
    (==) modeset(0): Silken mouse enabled
    (II) modeset(0): RandR 1.2 enabled, ignore the following RandR disabled message.
    (EE) modeset(0): failed to set mode: Invalid argument
    (EE)
    Fatal server error:
    (EE) AddScreen/ScreenInit failed for driver 0
    (EE)
    (EE)
    Please consult the The X.Org Foundation support
             at http://wiki.x.org
     for help.
    (EE) Please also check the log file at "/usr/local/XSGX/var/log/Xorg.0.log" for additional information.
    (EE)
    (EE) Server terminated with error (1). Closing log file.
    
    

  • Hi Bando-san,

    Typically mode setting fails if there's another DRM master opened the device or the configuration is incorrect.

    Unfortunately we don't support X11 in Processor SDK Linux for AM335x, so don't have enough insights into kind of issues with X11 and hence can't help you here.

    Regards,
    Manisha