I have an ARM-based board(http://wiki.friendlyarm.com/wiki/index.php/NanoPi_M1) and use Ubuntu-server 16.04 on it. I have a 2.2" TFT-LCD with SPI connection, and use this framebuffer driver(https://github.com/notro/fbtft) to launch it. I can setup my LCD with this command:

sudo modprobe fbtft_device custom name=fb_ili9341 gpios=reset:1,dc:201,led:6 speed=16000000 rotate=90 bgr=1

And before, when I had Ubuntu desktop, I could change display by this command:

FRAMEBUFFER=/dev/fb8 startx

But in Ubuntu-server I get this error message:

X.Org X Server 1.18.4
Release Date: 2016-07-19
X Protocol Version 11, Revision 0
Build Operating System: Linux 4.4.0-97-generic armv7l Ubuntu
Current Operating System: Linux nanopim1 3.4.113-sun8i #16 SMP PREEMPT Tue Jun 13 14:15:57 CEST 2017 armv7l
Kernel command line: root=UUID=10b3b795-f372-4ea9-b78a-93ae9355c20c rootwait rootfstype=ext4 console=tty1 console=ttyS0,115200 hdmi.audio=EDID:0 disp.screen0_output_mode=1920x1080p60 panic=10 consoleblank=0 loglevel=1 ubootpart=bd75a2d6-01 ubootsource=mmc   sunxi_ve_mem_reserve=0 sunxi_g2d_mem_reserve=0 sunxi_fb_mem_reserve=16 cgroup_enable=memory swapaccount=1
Build Date: 13 October 2017  01:59:44PM
xorg-server 2:1.18.4-0ubuntu0.7 (For technical support please see http://www.ubuntu.com/support) 
Current version of pixman: 0.33.6
    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: "/var/log/Xorg.0.log", Time: Thu Oct 26 16:44:04 2017
(==) Using config directory: "/etc/X11/xorg.conf.d"
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
Fatal server error:
(EE) no screens found(EE) 
Please consult the The X.Org Foundation support 
     at http://wiki.x.org
 for help. 
(EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
(EE) Server terminated with error (1). Closing log file.

And have only a blank screen. I want to know how can I set this LCD as my boards default LCD and make it to run.

In addition I must say I have installed xorg and openbox too.

EDIT: I found this configuration file of raspberryPi and tried to replace it in this file: /etc/X11/xorg.conf.d/01-armbian-defaults.conf :

# FBTFT xorg config file
# startx -- -layout TFT
# startx -- -layout HDMI
# startx
# When -layout is not set, the first is used: TFT

Section "ServerLayout"
    Identifier "TFT"
    Screen 0 "ScreenTFT"

Section "ServerLayout"
    Identifier "HDMI"
    Screen 0 "ScreenHDMI"

Section "Screen"
    Identifier "ScreenHDMI"
    Monitor "MonitorHDMI"
    Device "DeviceHDMI"

Section "Screen"
    Identifier "ScreenTFT"
    Monitor "MonitorTFT"
    Device "DeviceTFT"

Section "Monitor"
    Identifier "MonitorHDMI"

Section "Monitor"
    Identifier "MonitorTFT"

Section "Device"
    Identifier "DeviceHDMI"
    Driver "fbturbo"
    Option "fbdev" "/dev/fb0"
    Option "SwapbuffersWait" "true"

Section "Device"
    Identifier "DeviceTFT"
    Option "fbdev" "/dev/fb1"

But didn't work.

This is the contents before replacing:

Section "Monitor"
    Identifier      "Monitor0"
    Option          "DPMS" "false"
Section "ServerFlags"
    Option          "BlankTime" "0"
    Option          "StandbyTime" "0"
    Option          "SuspendTime" "0"
    Option          "OffTime" "0"
  • The modesetting X driver is installed? If yes, can you write an xorg.conf to make sure it gets loaded, as it doesn't appear in the log?
    – dirkt
    Oct 27 '17 at 11:37
  • Or alternatively, the fbdev driver, depending on what your kernel driver needs.
    – dirkt
    Oct 27 '17 at 11:41
  • @dirkt: please explain more simple to a newbie :)
    – WDR
    Oct 28 '17 at 4:49
  • How can I find are there installed fbdev or modesetting on my pc or not? I searched them by find fbdev or find modesetting but says there is no file or directory
    – WDR
    Oct 28 '17 at 4:54
  • As I searched there is no "/var/log/Xorg.0.log" file, but "/etc/X11/xorg.conf.d" and "/usr/share/X11/xorg.conf.d" are exist but empty
    – WDR
    Oct 28 '17 at 5:15

If the command dpkg -l '*xserver-xorg-video*' | grep ^ii had no results, that means you didn't install the necessary video drivers. I just looked up that the modesetting driver is part of the core, so it should already be installed.

So install the frame buffer window driver favorite package manager, e.g. from the command line as root:

apt-get install xserver-xorg-video-fbdev 

Also make sure /usr/lib/xorg/modules/drivers/ contains the modesetting driver (just in case).

Restart X, and see if the log output changes.

  • These file are inside the /usr/lib/xorg/modules/drivers : fbdev_drv.so modesetting_drv.so And I don't know how to restart X
    – WDR
    Oct 28 '17 at 8:30
  • Reboot, and execute your FRAMEBUFFER=/dev/fb8 startx command.
    – dirkt
    Oct 28 '17 at 8:31
  • Yes I can see a black mouse pointer in a blank black page. So how can I set these setting permanent? Also, if I want to show images or videos in my c++ program, should I install GTK?
    – WDR
    Oct 28 '17 at 8:44
  • The last is a completely separate question (or even several questions). What happens when you just do startx? If the driver picks up the correct framebuffer, you are fine. Otherwise, you probably need an xorg.conf file. See man fbdev, option fbdev. You can automatically start X using a display manager like xdm (or gdm for Gnome, or others). Google.
    – dirkt
    Oct 28 '17 at 9:09
  • At first, if i don't execute this command sudo modprobe fbtft_device custom name=fb_ili9341 gpios=reset:1,dc:201,led:6 speed=16000000 rotate=90 bgr=1 nothing happens and my LCD is completely off. after that command, I have a blank black screen, and nothing happens with start x command. So I must execute ` FRAMEBUFFER=/dev/fb8 startx` to have the black mouse pointer.
    – WDR
    Oct 28 '17 at 10:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.