Ubuntu X window will hang with i.MX 6 Q/D L3.0.35_1.1.0 GA release

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Ubuntu X window will hang with i.MX 6 Q/D L3.0.35_1.1.0 GA release

ソリューションへジャンプ
3,342件の閲覧回数
LeviathanSteven
Contributor III

Hi,

Recently, I worked on the imx6 sabre lite board. And found one issue that the Ubuntu X Window will hang after login when using "vivant_drv.so" as the X driver. But if I change to use "fb_drv.so", the X window will work well!

Could anyone can kindly help?? What should I do to correctly set up the X11_Acceleration?

Thanks in advanced.

The following are the duplicate steps.

     1,  dd if=uboot......     (from L3.0.35_1.1.0_121218_images_MX6.tar.gz)

     2, dd if=uImage ...      (from L3.0.35_1.1.0_121218_images_MX6.tar.gz)

     3, tar L3.0.35_1.1.0_oneiric.tgz -C /mnt/sd

     4, Inserted the SD card to the imx6 sabre lite board and powered on.

     5,  Run the following command through the COM port terminal on a Linux host.

               dpkg -i gpu-viv-bin-mx6q_1.1.0-1_armel.deb

               dpkg -i kernel_3.0.35-imx_1.1.0_armel.deb

     6, reboot

After system started up, I found that the X-window will hang after login. But COM port connected to another Linux host still worked well, and I can kill X through the COM port terminal.


Also I tried to follow the instructions on 'Instructions_to_setup_X11_acceleration_on_Ubuntu.txt'

But X window still will be hang.

The content of this document is as below:

    Instructions to Setup X11 acceleration on Ubuntu

Contents

     1. Prepare Ubuntu desktop build environment

     2. Build GPU driver on target board

     3. Build EXA and DRI part GPU driver on target board

     4. Start X server

     5. Troubleshooting

1. Prepare OpenGL desktop build environment

===========================================

1.1 Update package index on your target board (sudo apt-get update)

1.2 Remove follow packages on your target board if exist (sudo apt-get remove xxx):

        gpu-viv-bin-mx6q

1.3 Install follow packages on your target board (sudo apt-get install xxx):

        xserver-xorg-dev

        x11proto-xf86dri-dev

        x11proto-render-dev

        x11proto-gl-dev

        libdrm-dev

        mesa-common-dev

        mesa-utils

        libgl1-mesa-dev

        libglu1-mesa-dev

        freeglut3-dev

        libglew1.6-dev

        libglui-dev

        libxmu-dev

        build-essential

        xutils-dev

1.4 Comment out '/usr/sbin/lightdm' in /etc/X11/default-display-manager to disable starting X by default on your target board.

        #/usr/sbin/lightdm

2. Install GPU Base driver on target board

===========================================

2.1 Install Vivante GPU Base driver.

        dpkg -i gpu-viv-bin-mx6q_<KERNEL VERSION>-<RELEASE VESRION>_armel.deb

2.2 Install Kernel module driver.

        dpkg -i kernel_<KERNEL VERSION>-imx_<RELEASE VESRION>_armel.deb

        After this debian package is installed, please double check drm.ko and

        vivante.ko is properly installed.

        If you don't use prebuilt linux kernel, you need rebuild the kernel module

        while build your own Linux kernel. Please refer to Linux reference manual

        for building DRM.

2.3 Switch the default egl backend from fb to x11.

        cd /usr/lib

        rm libGAL.so

        rm libEGL.so

        rm libEGL.so.1

        rm libVIVANTE.so

        sudo ln -s libGAL-x11.so libGAL.so

        sudo ln -s libEGL-x11.so libEGL.so

        sudo ln -s libEGL-x11.so libEGL.so.1 // [new]

        sudo ln -s libVIVANTE-x11.so libVIVANTE.so

3. Build EXA and DRI part GPU driver on target board

===========================================

3.1 Install EXA GPU driver source code on the target board.

    (should from package xserver-xorg-video-imx-viv-<KERNEL VERSION>-<RELEASE VESRION>.tar.gz)

        export BOARD_CODE_ROOT=$HOME/srcdir

        Install your Vivante GPU driver to $BOARD_CODE_ROOT, then the directory tree should be looked like this:

        srcdir

        |---EXA

        |---DRI_1.10.4

        |---build.sh

        |---install.sh

        |---...

        |---...

3.2 Build EXA driver on target board.

        cd $BOARD_CODE_ROOT/srcdir

        ./build.sh

        sudo ./install.sh

3.3. Disable Mesa openGL on target board

mv /usr/lib/arm-linux-gnueabi/mesa /usr/lib/arm-linux-gnueabi/mesa_bak

mv /usr/lib/arm-linux-gnueabi/mesa-egl /usr/lib/arm-linux-gnueabi/mesa-egl_bak

3.4 Update /etc/X11/xorg.conf

Replace xorg.conf with following contents

######################################

Section "ServerLayout"

        Identifier      "Default Layout"

        Screen          "Default Screen"

EndSection

Section "Module"

        Load            "dbe"

        Load            "extmod"

        Load            "freetype"

        Load            "glx"

        Load            "dri"

EndSection

Section "InputDevice"

        Identifier      "Generic Keyboard"

        Driver          "kbd"

        Option          "XkbLayout" "us"

        Option          "XkbModel" "pc105"

        Option          "XkbRules" "xorg"

EndSection

Section "InputDevice"

        Identifier      "Configured Mouse"

        Driver          "mouse"

        Option          "CorePointer"

EndSection

Section "Device"

        Identifier      "i.MX Accelerated Framebuffer Device"

        Driver          "vivante"

        Option          "fbdev"         "/dev/fb0"

        Option          "vivante_fbdev" "/dev/fb0"

        Option          "HWcursor"      "false"

EndSection

Section "Monitor"

        Identifier      "Configured Monitor"

EndSection

Section "Screen"

        Identifier      "Default Screen"

        Monitor         "Configured Monitor"

        Device          "i.MX Accelerated Framebuffer Device"

        DefaultDepth    24

EndSection

Section "DRI"

        Mode 0666

EndSection

######################################

Note: If you want to use 16bpp framebuffer, you can change the defaultdepth to 16.

4. Start X server

=================

4.1 Start X Window system.

        service lightdm start

4.2 If all things work properly, we could restore lightdm and make ubuntu startup as usual.

        restore "/usr/sbin/lightdm" in /etc/X11/default-display-manager

        reboot

5. Troubleshooting

==================

5.1 If you run OpenGL application and find window is created but nothing is drawn inside,

    try exporting this variable __GL_DEV_FB.

        export __GL_DEV_FB=$FB_FRAMEBUFFER_0

    If it doesn't work.Please check /var/log/X11.0.log

    (.0 can be .1,.2, depends on :0, refer to 5.2)

    if drm  boot up properly. If not, please double check if Section 2.2 is executed.

5.2 If you found there's something like "Cannot open Display", try

        export DISPLAY=:0

    then run again.

    You can run ps -ef | grep X to check if X is running at :0, if it's at :1.

    Above command should be changed accordingly.

    And for ligthdm, UART terminal can't run gpu application. ssh terminal should

    be used instead.

5.3 If you find "sudo ./install.sh" failed in section 3.2. Please try to setup

    your system time correctly.

5.4 If you observe following error while trying to running an gpu application.

    "Invalid MIT-MAGIC-COOKIE-1 KEY", please check if you are using root account.

    root account is not permitted to run gpu application. Please try to use linaro

    account instead.

5.5 If you meet segment fault when running gpu application.

    Please check if the attribute of /dev/galcore if 666. If not, please update it.

    And you can use add "KERNEL=="galcore", MODE="0666"" in file

    /etc/udev/rules.d/10-imx.rules to update the attribute automatically when

    system boot up.

    Also please make sure your kernel and gpu driver are matched.

5.6 If your destop on target board has some problem after installing listed pakcages

    in section 1.3. You can use command "ps -ef| grep compiz" to check if compiz

    is running. If it runs, it means Ubuntu is using unity-3d by default.

    You can change "ubuntu" to "ubuntu-2d" in /var/lib/AccountsService/users/linaro

    to roll back default window manager to unity-2d.

0 件の賞賛
1 解決策
863件の閲覧回数
LeviathanSteven
Contributor III

Hi All,

Thanks for your kindly replay.

I changed to use L3.0.35_4.0.0_130424 release and then everything worked well.:smileylaugh:

元の投稿で解決策を見る

0 件の賞賛
4 返答(返信)
863件の閲覧回数
PrabhuSundarara
NXP Employee
NXP Employee

Can you please provide the Xorg log file.

0 件の賞賛
863件の閲覧回数
karina_valencia
NXP Apps Support
NXP Apps Support

There is no update  from customer

0 件の賞賛
863件の閲覧回数
PrabhuSundarara
NXP Employee
NXP Employee

We are facing the problem. What should I do now?

0 件の賞賛
864件の閲覧回数
LeviathanSteven
Contributor III

Hi All,

Thanks for your kindly replay.

I changed to use L3.0.35_4.0.0_130424 release and then everything worked well.:smileylaugh:

0 件の賞賛