Re: X on Armel lenny
Hi!
I had the same problem. This is because your fb driver does not support
to change the screen resolution.
You can solve this in two ways:
1) Change the kernel to always return 0 for the FBIOPUT_VSCREENINFO
ioctl call:
--- linux-2.6.24-ltib/drivers/video/fbmem.c 2008-01-24
20:58:37.000000000 -0200
+++ linux-2.6.24-tec/drivers/video/fbmem.c 2009-03-14
09:14:06.000000000 -0300
@@ -1008,6 +1008,7 @@
return copy_to_user(argp, &info->var,
sizeof(var)) ? -EFAULT : 0;
case FBIOPUT_VSCREENINFO:
+ return 0;
if (copy_from_user(&var, argp, sizeof(var)))
return -EFAULT;
acquire_console_sem();
2) Change the ioctl call using the following hack (thanks to
Massimiliano Galanti):
/* gcc lib.c -O3 -Wall -W --shared -fPIC -o lib.so */
/* AUTHOR: massimiliano galanti <massiblue@libero.it> */
#include <stdarg.h>
#include <fcntl.h>
#include <dlfcn.h>
#include <stdio.h>
#include <linux/fb.h>
#ifndef RTLD_NEXT
#define RTLD_NEXT ((void *) -1l)
#endif
typedef int request_t;
typedef int (* IOCTL) ( int, request_t, void * );
int ioctl( int fd, request_t request, ... )
{
static IOCTL real_ioctl = NULL;
va_list args;
void *argp;
if( !real_ioctl )
real_ioctl = (IOCTL) dlsym( RTLD_NEXT, "ioctl" );
va_start( args, request );
argp = va_arg( args, void * );
va_end( args );
switch( request )
{
case FBIOPUT_VSCREENINFO:
printf("faking FBIOPUT_VSCREENINFO\n");
return 0;
default:
return real_ioctl( fd, request, argp );
}
}
/* EOF */
To use this hack, compile it and run like this:
lexxi:/tmp# gcc lib.c -O3 -Wall -W --shared -fPIC -o lib.so
lexxi:/tmp# LD_PRELOAD="/tmp/lib.so" X
Best regards,
Marcelo Utikawa da Fonseca
Nataraj S Narayan escreveu:
Hi
I am unable to load X windows on AT91sam9263-Ek. I get the following
with 'startx'.
X: warning; process set to priority -1 instead of requested priority 0
X.Org X Server 1.4.2
Release Date: 11 June 2008
X Protocol Version 11, Revision 0
Build Operating System: Linux Debian (xorg-server 2:1.4.2-10.lenny1)
Current Operating System: Linux mail.vaaraahi.com 2.6.30-rc6 #51 Wed
Jun 3 10:12:50 IST 2009 armv5tejl
Build Date: 15 March 2009 03:36:58PM
Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
Module Loader present
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 Jan 1 01:12:58 1970
(==) Using config file: "/etc/X11/xorg.conf"
(EE) FBDEV(0): FBIOPUT_VSCREENINFO succeeded but modified mode
(EE) FBDEV(0): mode initialization failed
Fatal server error:
AddScreen/ScreenInit failed for driver 0
# fbset -i shows
mode "240x320-56"
# D: 4.997 MHz, H: 17.910 kHz, V: 55.622 Hz
geometry 240 320 240 320 16
timings 200120 1 33 1 0 5 1
hsync high
vsync high
rgba 5/0,5/5,5/10,0/0
endmode
Frame buffer device information:
Name :
Address : 0x23940000
Size : 153600
Type : PACKED PIXELS
Visual : TRUECOLOR
XPanStep : 0
YPanStep : 1
YWrapStep : 0
LineLength : 480
MMIO Address: 0x700000
MMIO Size : 4096
Accelerator : No
The following the /var/log/Xorg.log
(II) LoadModule: "dri"
(II) Loading /usr/lib/xorg/modules/extensions//libdri.so
(II) Module dri: vendor="X.Org Foundation"
compiled for 1.4.2, module version = 1.0.0
ABI class: X.Org Server Extension, version 0.3
(II) Loading extension XFree86-DRI
(II) LoadModule: "fbdev"
(II) Loading /usr/lib/xorg/modules/drivers//fbdev_drv.so
(II) Module fbdev: vendor="X.Org Foundation"
compiled for 1.4.0.90, module version = 0.4.0
ABI class: X.Org Video Driver, version 2.0
(II) LoadModule: "mouse"
(II) Loading /usr/lib/xorg/modules/input//mouse_drv.so
(II) Module mouse: vendor="X.Org Foundation"
compiled for 1.4.0.90, module version = 1.3.0
Module class: X.Org XInput Driver
ABI class: X.Org XInput driver, version 2.0
(II) LoadModule: "kbd"
(II) Loading /usr/lib/xorg/modules/input//kbd_drv.so
(II) Module kbd: vendor="X.Org Foundation"
compiled for 1.4.0.90, module version = 1.3.1
Module class: X.Org XInput Driver
ABI class: X.Org XInput driver, version 2.0
(II) FBDEV: driver for framebuffer: fbdev
(II) Loading sub module "fbdevhw"
(II) LoadModule: "fbdevhw"
(II) Loading /usr/lib/xorg/modules/linux//libfbdevhw.so
(II) Module fbdevhw: vendor="X.Org Foundation"
compiled for 1.4.2, module version = 0.0.2
ABI class: X.Org Video Driver, version 2.0
(II) FBDEV(0): using default device
(II) Running in FRAMEBUFFER Mode
(**) FBDEV(0): Depth 16, (--) framebuffer bpp
(==) FBDEV(0): RGB weight 565
(==) FBDEV(0): Default visual is TrueColor
(==) FBDEV(0): Using gamma correction (1.0, 1.0, 1.0)
(II) FBDEV(0): hardware: (video memory: 150kB)
(II) FBDEV(0): checking modes against framebuffer device...
(II) FBDEV(0): mode "320x240" test failed
(II) FBDEV(0): checking modes against monitor...
(--) FBDEV(0): Virtual size is 240x320 (pitch 240)
(**) FBDEV(0): Built-in mode "current": 5.0 MHz, 17.9 kHz, 55.6 Hz
(II) FBDEV(0): Modeline "current"x0.0 5.00 240 273 278 279 320
320 321 322 +hsync +vsync -csync (17.9 kHz)
(==) FBDEV(0): DPI set to (96, 96)
(II) Loading sub module "fb"
(II) LoadModule: "fb"
(II) Loading /usr/lib/xorg/modules//libfb.so
(II) Module fb: vendor="X.Org Foundation"
compiled for 1.4.2, module version = 1.0.0
ABI class: X.Org ANSI C Emulation, version 0.3
(**) FBDEV(0): using shadow framebuffer
(II) Loading sub module "shadow"
(II) LoadModule: "shadow"
(II) Loading /usr/lib/xorg/modules//libshadow.so
(II) Module shadow: vendor="X.Org Foundation"
compiled for 1.4.2, module version = 1.1.0
ABI class: X.Org ANSI C Emulation, version 0.3
(EE) FBDEV(0): FBIOPUT_VSCREENINFO succeeded but modified mode
(EE) FBDEV(0): mode initialization failed
What could be wrong. Please suggest.
regards
Nataraj
---------------------------------------------
Tecnequip Tecnologia em Equipamentos
Endereço/Address: R. Ganges, 557
Cidade/City: São Paulo
Estado/State: SP
País/Country: Brasil
CEP/Postal Code: 03445-030
Fone/Phone: 55-11-20937199
FAX: 55-11-29412289
Reply to: