beaglebone black ubuntu display x11 server的配置

 Change default resolution on BeagleBone modesetting vs fbdev
digiteltlc
May 7th, 2014, 03:28 PM
Hi
I'm running a BeagleBone with a 5,7" LCD Touchscreen with a native resolution of 640x480
However, the system recognizes monitor as a LCD7 Cape with 800x480 resolution and after LXDE boot desktop is only partially displayed

On the old 12.04 FBDEV was used and I fixed problem adding the /usr/share/X11/xorg.conf.d/10-monitor.conf this way :

Section "Monitor"
Identifier "Configured Monitor"
EndSection


Section "Screen"
Identifier "Default Screen"
Device "Configured Video Device"
Monitor "Configured Monitor"
#Limited by SGX?
DefaultDepth 16
SubSection "Display"
Modes "640x480"
EndSubsection
EndSection


Section "Device"
Identifier "Configured Video Device"
Driver "omapfb"
Option "fb" "/dev/fb0"
EndSection

With new kernel on 13.10 or 14.04 it seems FBDEV is no more used but modesetting is, instead.
So the old 10-monitor.conf is useless.


/var/log/Xorg.0.log from 12.04 is :




[ 25.574] (II) LoadModule: "glx"
[ 25.590] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so
[ 25.621] (II) Module glx: vendor="X.Org Foundation"
[ 25.621] compiled for 1.13.0, module version = 1.0.0
[ 25.621] ABI class: X.Org Server Extension, version 7.0
[ 25.621] (==) AIGLX enabled
[ 25.622] Loading extension GLX
[ 25.622] (II) LoadModule: "omapfb"
[ 25.624] (WW) Warning, couldn't open module omapfb
[ 25.624] (II) UnloadModule: "omapfb"
[ 25.624] (II) Unloading omapfb
[ 25.625] (EE) Failed to load module "omapfb" (module does not exist, 0)
[ 25.625] (==) Matched omapfb as autoconfigured driver 0
[ 25.625] (==) Matched modesetting as autoconfigured driver 1
[ 25.625] (==) Matched fbdev as autoconfigured driver 2
[ 25.625] (==) Assigned the driver to the xf86ConfigLayout
[ 25.625] (II) LoadModule: "omapfb"
[ 25.627] (WW) Warning, couldn't open module omapfb
[ 25.627] (II) UnloadModule: "omapfb"
[ 25.628] (II) Unloading omapfb
[ 25.628] (EE) Failed to load module "omapfb" (module does not exist, 0)
[ 25.628] (II) LoadModule: "modesetting"
[ 25.629] (II) Loading /usr/lib/xorg/modules/drivers/modesetting_drv.so
[ 25.643] (II) Module modesetting: vendor="X.Org Foundation"
[ 25.644] compiled for 1.13.0, module version = 0.5.0
[ 25.644] Module class: X.Org Video Driver
[ 25.644] ABI class: X.Org Video Driver, version 13.0
[ 25.644] (II) LoadModule: "fbdev"
[ 25.645] (II) Loading /usr/lib/xorg/modules/drivers/fbdev_drv.so
[ 25.649] (II) Module fbdev: vendor="X.Org Foundation"
[ 25.649] compiled for 1.12.99.902, module version = 0.4.3
[ 25.649] Module class: X.Org Video Driver
[ 25.649] ABI class: X.Org Video Driver, version 13.0
[ 25.649] (II) modesetting: Driver for Modesetting Kernel Drivers: kms
[ 25.650] (II) FBDEV: driver for framebuffer: fbdev
[ 25.650] (++) using VT number 7


[ 25.656] (WW) Falling back to old probe method for modesetting
[ 25.656] (EE) open /dev/dri/card0: No such file or directory
[ 25.656] (WW) Falling back to old probe method for fbdev
[ 25.656] (II) Loading sub module "fbdevhw"
[ 25.656] (II) LoadModule: "fbdevhw"
[ 25.658] (II) Loading /usr/lib/xorg/modules/libfbdevhw.so
[ 25.661] (II) Module fbdevhw: vendor="X.Org Foundation"
[ 25.662] compiled for 1.13.0, module version = 0.0.2
[ 25.662] ABI class: X.Org Video Driver, version 13.0
[ 25.662] (II) FBDEV(0): using default device
[ 25.662] (WW) VGA arbiter: cannot open kernel arbiter, no multi-card support
[ 25.663] (**) FBDEV(0): Depth 16, (--) framebuffer bpp 16
[ 25.663] (==) FBDEV(0): RGB weight 565
[ 25.663] (==) FBDEV(0): Default visual is TrueColor
[ 25.663] (==) FBDEV(0): Using gamma correction (1.0, 1.0, 1.0)
[ 25.663] (II) FBDEV(0): hardware: DA8xx FB Drv (video memory: 1600kB)
[ 25.663] (II) FBDEV(0): checking modes against framebuffer device...
[ 25.663] (II) FBDEV(0): mode "640x480" ok
[ 25.663] (II) FBDEV(0): checking modes against monitor...
[ 25.664] (--) FBDEV(0): Virtual size is 640x480 (pitch 640)
[ 25.664] (**) FBDEV(0): Default mode "640x480": 25.2 MHz (scaled from 0.0 MHz), 31.5 kHz, 59.9 Hz
[ 25.664] (II) FBDEV(0): Modeline "640x480"x0.0 25.18 640 656 752 800 480 490 492 525 -hsync -vsync (31.5 kHz d)
[ 25.664] (==) FBDEV(0): DPI set to (96, 96)
[ 25.664] (II) Loading sub module "fb"
[ 25.664] (II) LoadModule: "fb"
[ 25.666] (II) Loading /usr/lib/xorg/modules/libfb.so
[ 25.679] (II) Module fb: vendor="X.Org Foundation"
[ 25.679] compiled for 1.13.0, module version = 1.0.0
[ 25.679] ABI class: X.Org ANSI C Emulation, version 0.4
[ 25.683] (**) FBDEV(0): using shadow framebuffer
[ 25.683] (II) Loading sub module "shadow"
[ 25.683] (II) LoadModule: "shadow"
[ 25.684] (II) Loading /usr/lib/xorg/modules/libshadow.so
[ 25.692] (II) Module shadow: vendor="X.Org Foundation"
[ 25.692] compiled for 1.13.0, module version = 1.1.0
[ 25.692] ABI class: X.Org ANSI C Emulation, version 0.4
[ 25.692] (II) UnloadModule: "modesetting"
[ 25.692] (II) Unloading modesetting
[ 25.693] (EE) FBDEV(0): FBIOBLANK: Invalid argument
[ 25.701] (==) FBDEV(0): Backing store disabled
[ 25.702] (==) FBDEV(0): DPMS enabled
[ 25.703] (==) RandR enabled

The 13.10 one is :

[ 24.549] (II) LoadModule: "glx"
[ 24.603] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so
[ 24.805] (II) Module glx: vendor="X.Org Foundation"
[ 24.806] compiled for 1.15.1, module version = 1.0.0
[ 24.806] ABI class: X.Org Server Extension, version 8.0
[ 24.806] (==) AIGLX enabled
[ 24.806] Loading extension GLX
[ 24.816] (==) Matched omapfb as autoconfigured driver 0
[ 24.820] (==) Matched modesetting as autoconfigured driver 1
[ 24.823] (==) Matched fbdev as autoconfigured driver 2
[ 24.823] (==) Assigned the driver to the xf86ConfigLayout
[ 24.823] (II) LoadModule: "omapfb"
[ 24.833] (WW) Warning, couldn't open module omapfb
[ 24.842] (II) UnloadModule: "omapfb"
[ 24.842] (II) Unloading omapfb
[ 24.842] (EE) Failed to load module "omapfb" (module does not exist, 0)
[ 24.842] (II) LoadModule: "modesetting"
[ 24.852] (II) Loading /usr/lib/xorg/modules/drivers/modesetting_drv.so
[ 24.866] (II) Module modesetting: vendor="X.Org Foundation"
[ 24.866] compiled for 1.15.0, module version = 0.8.1
[ 24.866] Module class: X.Org Video Driver
[ 24.866] ABI class: X.Org Video Driver, version 15.0
[ 24.867] (II) LoadModule: "fbdev"
[ 24.868] (II) Loading /usr/lib/xorg/modules/drivers/fbdev_drv.so
[ 24.884] (II) Module fbdev: vendor="X.Org Foundation"
[ 24.888] compiled for 1.15.0, module version = 0.4.4
[ 24.888] Module class: X.Org Video Driver
[ 24.888] ABI class: X.Org Video Driver, version 15.0
[ 24.894] (==) Matched omapfb as autoconfigured driver 0
[ 24.894] (==) Matched modesetting as autoconfigured driver 1
[ 24.894] (==) Matched fbdev as autoconfigured driver 2
[ 24.894] (==) Assigned the driver to the xf86ConfigLayout
[ 24.899] (II) LoadModule: "omapfb"
[ 24.916] (WW) Warning, couldn't open module omapfb
[ 24.916] (II) UnloadModule: "omapfb"
[ 24.916] (II) Unloading omapfb
[ 24.916] (EE) Failed to load module "omapfb" (module does not exist, 0)
[ 24.916] (II) LoadModule: "modesetting"
[ 24.926] (II) Loading /usr/lib/xorg/modules/drivers/modesetting_drv.so
[ 24.926] (II) Module modesetting: vendor="X.Org Foundation"
[ 24.926] compiled for 1.15.0, module version = 0.8.1
[ 24.926] Module class: X.Org Video Driver
[ 24.927] ABI class: X.Org Video Driver, version 15.0
[ 24.927] (II) UnloadModule: "modesetting"
[ 24.927] (II) Unloading modesetting
[ 24.927] (II) Failed to load module "modesetting" (already loaded, 0)
[ 24.927] (II) LoadModule: "fbdev"
[ 24.939] (II) Loading /usr/lib/xorg/modules/drivers/fbdev_drv.so
[ 24.944] (II) Module fbdev: vendor="X.Org Foundation"
[ 24.944] compiled for 1.15.0, module version = 0.4.4
[ 24.944] Module class: X.Org Video Driver
[ 24.945] ABI class: X.Org Video Driver, version 15.0
[ 24.945] (II) UnloadModule: "fbdev"
[ 24.945] (II) Unloading fbdev
[ 24.949] (II) Failed to load module "fbdev" (already loaded, 0)
[ 24.949] (II) modesetting: Driver for Modesetting Kernel Drivers: kms
[ 24.949] (II) FBDEV: driver for framebuffer: fbdev
[ 24.950] (++) using VT number 7


[ 24.955] (II) modesetting(0): using drv /dev/dri/card0
[ 24.956] (WW) Falling back to old probe method for fbdev
[ 24.956] (II) Loading sub module "fbdevhw"
[ 24.956] (II) LoadModule: "fbdevhw"
[ 24.957] (II) Loading /usr/lib/xorg/modules/libfbdevhw.so
[ 24.960] (II) Module fbdevhw: vendor="X.Org Foundation"
[ 24.960] compiled for 1.15.1, module version = 0.0.2
[ 24.967] ABI class: X.Org Video Driver, version 15.0
[ 24.967] (WW) VGA arbiter: cannot open kernel arbiter, no multi-card support
[ 24.968] (II) modesetting(0): Creating default Display subsection in Screen section
"Default Screen Section" for depth/fbbpp 24/32
[ 24.968] (==) modesetting(0): Depth 24, (==) framebuffer bpp 32
[ 24.973] (==) modesetting(0): RGB weight 888
[ 24.974] (==) modesetting(0): Default visual is TrueColor
[ 24.974] (II) modesetting(0): ShadowFB: preferred NO, enabled NO
[ 24.974] (II) modesetting(0): Output LVDS-0 has no monitor section
[ 24.975] (II) modesetting(0): EDID for output LVDS-0
[ 24.975] (II) modesetting(0): Printing probed modes for output LVDS-0
[ 24.975] (II) modesetting(0): Modeline "800x480"x61.5 30.00 800 840 888 928 480 493 496 526 -hsync -vsync (32.3 kHz eP)
[ 24.975] (II) modesetting(0): Output LVDS-0 connected
[ 24.975] (II) modesetting(0): Using exact sizes for initial modes
[ 24.975] (II) modesetting(0): Output LVDS-0 using initial mode 800x480
[ 24.976] (II) modesetting(0): Using default gamma of (1.0, 1.0, 1.0) unless otherwise stated.
[ 24.976] (==) modesetting(0): DPI set to (96, 96)
[ 24.976] (II) Loading sub module "fb"
[ 24.976] (II) LoadModule: "fb"
[ 24.992] (II) Loading /usr/lib/xorg/modules/libfb.so
[ 25.004] (II) Module fb: vendor="X.Org Foundation"
[ 25.005] compiled for 1.15.1, module version = 1.0.0
[ 25.005] ABI class: X.Org ANSI C Emulation, version 0.4
[ 25.005] (II) UnloadModule: "fbdev"
[ 25.005] (II) Unloading fbdev
[ 25.005] (II) UnloadSubModule: "fbdevhw"
[ 25.011] (II) Unloading fbdevhw
[ 25.015] (==) Depth 24 pixmap format is 32 bpp
[ 25.049] (==) modesetting(0): Backing store enabled
[ 25.049] (==) modesetting(0): Silken mouse enabled
[ 25.054] (II) modesetting(0): RandR 1.2 enabled, ignore the following RandR disabled message.
[ 25.057] (==) modesetting(0): DPMS enabled
[ 25.139] (--) RandR disabled

How I can fix resolution in 13.10 ??
Can I still use 10-monitor.conf ? which settings ??

Thank you very much.
digiteltlc
May 8th, 2014, 09:21 AM
I just kept the new modeset driver, no omapfb or fbset

Just instruct which modeline to use in 10-monitor.conf this way :

Start lXterminal in lxde environment and issue the command

cvt 640 480 60 (horizontal - vertical - rate)

its output will be something like:

# 640x480 59.38 Hz (CVT 0.31M3) hsync: 29.69 kHz; pclk: 23.75 MHz
Modeline "640x480_60.00" 23.75 640 664 720 800 480 483 487 500 -hsync +vsync

create a new /usr/share/X11/xorg.conf.d/10-monitor.conf inserting the copied RED line in Monitor section this way :

Section "Monitor"
Identifier "Monitor0"
Modeline "640x480_60.00" 23.75 640 664 720 800 480 483 487 500 -hsync +vsync
EndSection


Section "Device"
Identifier "Device0"
EndSection


Section "Screen"
Identifier "Screen0"
Device "Device0"
Monitor "Monitor0"
DefaultDepth 16 #Choose the depth (16||24)
SubSection "Display"
Depth 16
Modes "640x480_60.00" #Choose the resolution, match the Modeline
EndSubSection
EndSection

Save and reboot,
it worked for me, hope it helps someone with this problem.
原文地址:https://www.cnblogs.com/zym0805/p/4045061.html