Tiny Core Linux

Tiny Core Extensions => TCE Corepure64 => Topic started by: Juanito on November 23, 2012, 09:38:56 AM

Title: Xfbdev
Post by: Juanito on November 23, 2012, 09:38:56 AM
I've made several attempts to build Xfbdev from the Xorg-7.6 source, but so far it's not self-contained and does not start properly.

I doubt the xfree86 source will compile 64-bit - any suggestions on obtaining a working Xfbdev gladly received...
Title: Re: Xfbdev
Post by: curaga on November 23, 2012, 10:08:47 AM
The last version with working kbd and mouse was from xorg-server-1.2.0, IIRC. I wouldn't discount xfree86 for 64-bit, given 4.7.0 was released in 2007, but it does take more effort.
Title: Re: Xfbdev
Post by: Juanito on November 24, 2012, 01:16:11 PM
'tried a couple of versions of Xfree86 (fails to compile) and several versions of xorg-server (compiles, but Xfbdev seg faults).

The trouble is I don't know whether Xfbdev would work with the intel hd3000 anyway...
Title: Re: Xfbdev
Post by: curaga on November 24, 2012, 02:41:46 PM
That's quick to test with the 32-bit TC.
Title: Re: Xfbdev
Post by: coreplayer2 on November 25, 2012, 03:57:51 AM
Xfbdev works with Intel HD4000  using core64  but not corepure  unfortunately
Title: Re: Xfbdev
Post by: Juanito on November 25, 2012, 04:33:06 PM
That's because it's 32-bit  :)

I got Xfbdev working with core/core64 on the dell e6220 so it's confirmed it works with the hd3000 also (using vga=0x318 video=vesafb:mtrr)

Using Xfbdev compiled 64-bit from the same xorg-server as Xorg-7.6, I can get Xfbdev to "startx", but the mouse doesn't work whatever I do (- mouse /dev/input/mice; /dev/input/mouse1; evdev,5,/dev/input/event9; etc)

As per google, somebody got things to work with xorg-server-1.13.0, but of course this would mean re-compiling half of the *proto sources, etc

I'm unable to compile XFree86-4.8.0 as it doesn't seem to be able to find it's own header files  ???

Code: [Select]
tce-load -i fontconfig-dev perl5

cd xc

grep "__undef_LINUX" /usr/include/sys/kd.h 2>&1 > /dev/null || sed -i.bak '/X.h/i #include <linux/types.h>' programs/Xserver/hw/xfree86/os-support/linux/lnx_agp.c

make -C config/util -f Makefile.ini lndir
mkdir ../xcbuild
cd ../xcbuild
../xc/config/util/lndir ../xc

sed -i 's:^.*asm.*$:# define PAGE_MASK   (~(getpagesize() - 1)):' ../xc/programs/Xserver/hw/xfree86/fbdevhw/fbdevhw.c
sed -i -e "s@^#include <linux/config.h>@/* & */@" `grep -lr linux/config.h ../xc`

copy host.def to xcbuild/config/cf/

Edit /usr/include/limits.h line 125
# include_next <../include-fixed/limits.h>

make World
...
making all in programs/Xserver/hw/dmx...
make[6]: Entering directory `/usr/src/xcbuild/programs/Xserver/hw/dmx'
rm -f dmxinit.o
gcc -c -O2 -fno-strength-reduce -fno-strict-aliasing -Wall -Wpointer-arith -Wundef     -I. -I../../../../programs/Xserver/include -I../../../../programs/Xserver/os -I../../../../programs/Xserver/mi          -I../../../../programs/Xserver/fb -I../../../../programs/Xserver/miext/shadow       -I../../../../programs/Xserver/render -I../../../../programs/Xserver/Xext  -I../../../../exports/include -I/usr/X11R6/include   -Dlinux -D__amd64__ -D_POSIX_C_SOURCE=199309L                            -D_POSIX_SOURCE -D_XOPEN_SOURCE                                 -D_BSD_SOURCE -D_SVID_SOURCE                                 -D_GNU_SOURCE                           -DSHAPE -DXINPUT -DXKB -DLBX -DXAPPGROUP -DXCSECURITY -DXSYNC -DXF86BIGFONT        -DDPM.tension -DBIGREQS -DPANORAMIX -DRENDER -DRANDR  -DRES  -DPIXPRIV                              -DNDEBUG                    -DNEED_STRLCAT -DGCCUSESGAS -DAVOID_GLYPHBLT -DPIXPRIV -DSINGLEDEPTH                               -DXFree86Server                            -DSMART_SCHEDULE                                -DBUILDDEBUG                            -DX_BYTE_ORDER=X_LITTLE_ENDIAN -D_XSERVER64  -DFUNCPROTO=15 -DNARROWPROTO   -DDDXOSINIT -DSERVER_LOCK -DDDXOSFATALERROR                             -DDDXOSVERRORF -DMITSHM -DMITMISC -DXTEST   -DXTRAP -DXCMISC -DXRECORD -DTOGCUP     -DXF86VIDMODE -DXF86MISC -DXFreeXDGA    -DDBE -DEVI -DSCREENSAVER -DXV      -DXVMC -DGLXEXT -DXF86DRI -DGLX_DIRECT_RENDERING -DGLX_USE_DLOPEN -DGLX_USE_MESA -D__GLX_ALIGN64 -DFONTCACHE -DDMXEXT -UDBE -UNEED_DBE_BUF_BITS                                     -UNEED_DBE_BUF_VALIDATE                                         -UNEED_DBE_BUF_REVALIDATE -UMITSHM -URANDR -UXPRINT         -UMULTIBUFFER -UXV -UXVMC       -UXTESTEXT1 -UXF86VIDMODE -UXF86MISC    -UXFreeXDGA -UGLXEXT -UXF86DRI -UTOGCUP     -UMITMISC -USCREENSAVER         -UFONTCACHE -UXFree86LOADER       -DVENDOR_STRING=\""DMX Project"\" -DVENDOR_RELEASE="((1)     * 100000000) +     ((3)     *   1000000) +     ((2006-2000) *     10000) +     ((2)     *       100) +     ((20)       *         1)" -DOSNAME='"Linux 3.0.21-tinycore64 x86_64 [ELF]"' -DOSVENDOR='""'   dmxinit.c
In file included from dmx.h:57:0,
                 from dmxinit.c:41:
dmxclient.h:86:54: fatal error: X11/Xmu/SysUtil.h: No such file or directory
compilation terminated.
make[6]: *** [dmxinit.o] Error 1
make[6]: Leaving directory `/usr/src/xcbuild/programs/Xserver/hw/dmx'

I can correct the path to SysUtil.h but then a gazillion other relative paths in other headers are wrong.

..which must mean something more basic is amiss - any suggestions welcome
Title: Re: Xfbdev
Post by: bmarkus on November 25, 2012, 04:57:43 PM
I spent days to build Xfbdev on 1.13 basis for the Raspberry Pi. When I got X server working, there were no mouse and keyboard. Going back to xserver 1.2 and Xorg 7.1 I got a working Xfbdev with mouse and keyboard with a missing arrow and insert/home/pageup keys so finally gave it up and now using full Xorg. Well, with fbdev as no accelerated driver available. In between I tried few older versions but it was either not working or a mess due to different libs, tools, protos, ...

To be honest, to build a working Xorg is a nightmare to find which option you can ot you must enable and disable, there are many dependencies, ....
Title: Re: Xfbdev
Post by: Juanito on November 26, 2012, 02:55:41 AM
I finally got the XFree86-4.8.0 version of Xfbdev working  :)

The trouble is editor/fluff/opera-12 work, but something (to do with fonts I guess) stops beaver2/emelfm2 from opening a window  :(

Thus I'm somewhat hesitant to publish an extension...
Title: Re: Xfbdev
Post by: tinypoodle on November 26, 2012, 09:37:13 AM
Does opera-12 work in GTK toolkit mode or not?
Title: Re: Xfbdev
Post by: curaga on November 26, 2012, 11:19:46 AM
That's what I meant with "they have broken tinyX mouse and keyboard after 1.2.0" ;)
Title: Re: Xfbdev
Post by: Juanito on December 02, 2012, 03:40:11 AM
Xfbdev from xorg-server-1.2 posted.

Things work for me with the following boot codes:
Code: [Select]
vga=0x318 video=vesafb:mtrr
..and the following first line in .xsession:
Code: [Select]
Xfbdev -br -screen 1024x768x32 -mouse /dev/input/mice,5 -fp /usr/lib/X11/fonts/misc,/usr/lib/X11/fonts/75dpi -nolisten tcp &
..and beaver2 and emelfm2 both work with this version of Xfbdev
Title: Re: Xfbdev
Post by: curaga on December 02, 2012, 04:31:00 AM
One day, we should get a fork of Xvesa + Xfbdev put up somewhere. Latest code, bugfixes, smallest binary, in one place and compilable ;)
Title: Re: Xfbdev
Post by: tinypoodle on December 02, 2012, 03:22:23 PM
Good idea, perhaps a fork might lead to contributions/collaboration from devs of other distros making use of Xvesa/Xfbdev.
Title: Re: Xfbdev
Post by: Juanito on January 24, 2013, 04:27:21 AM
As advised by @coreplayer2 when using Xfbdev and moving an flwm window to the right, the window does not get redrawn correctly.

It seems that this only applies to 64-bit Xfbdev and, after an appropriate patch, the corruption is fixed, but a window gets re-drawn very slowly when moved in any direction.

I managed to compile Xfbdev from xorg-server-1.13.1 and, after reverting a patch, I can remove the "Pointer option key (device=) of value (/dev/input/event5) not assigned!" error, but now I'm stuck:
Code: [Select]
Xfbdev -br -screen 1024x768x32 -mouse evdev,5,device=/dev/input/event5 -fp /usr/lib/X11/fonts/misc,/usr/lib/X11/fonts/75dpi -nolisten tcp &
...
Ungrabbing evdev mouse device failed: Bad file descriptor

As per:

http://kemovitra.blogspot.com/2012/10/linux-building-xorg-kdrive-server.html

This should work  :(

..any suggestions gratefully received...
Title: Re: Xfbdev
Post by: sebus on January 27, 2013, 08:43:52 AM
Xfbdev works with Intel HD4000  using core64  but not corepure  unfortunately

Any more development as far as HD4000 is concerned?
Title: Re: Xfbdev
Post by: Juanito on January 28, 2013, 12:01:22 AM
As said above, I believe @coreplayer2 has Xfbdev working with an hd4000, but there is corruption when dragging a window right.
Title: Re: Xfbdev
Post by: coreplayer2 on January 30, 2013, 05:52:10 PM
Xfbdev working great now on Intel HD Graphics 4000  [8086:0166] (rev 09)  (Mac mini, late 2012)

The previous Xfbdev version exhibited video corruption when dragging a window from right to left.   

The latest Xfbdev (thanks juanito) md5 8e44ad536eda290142caa2d6e7d6b373  works great with flwm and flwm_topside    Also the speed of window movement is not impaired any.
Title: Re: Xfbdev
Post by: Juanito on February 01, 2013, 02:17:22 AM
posted - thanks for testing  :)
Title: Re: Xfbdev
Post by: sebus on February 10, 2013, 10:20:16 AM
Have my Hitachi 4Gb Micro Drive in USB reader with Pure64 with xorg7.6 and xf86-video-all

That was working perfectly fine on AMD machine with nVidia GS8400 graphics

And now it is working perfectly on Gigabyte GA-Z77N-Wifi board & i3 3225 with Intel HD 4000 with full HD resolution via HDMI
No issue of any kind with no windows corruption etc

sebus
Title: Re: Xfbdev
Post by: coreplayer2 on February 15, 2013, 10:37:41 PM
Looks like the patch fixed that video corruption permanently   thanks  :)
Title: Re: Xfbdev
Post by: sebus on February 16, 2013, 01:29:52 PM
I suppose the thanks for to Juanito (as I do not use Xfbdev  at all)
Title: Re: Xfbdev
Post by: polikuo on February 20, 2017, 04:24:01 AM
It seems that the latest firefox (51.0.1) doesn't work well with the Xfbdev server.
Every button on the toolbar is unclickable.
Firefox works well under Xorg, not sure about Xvesa.
Any idea ? ???
Title: Re: Xfbdev
Post by: Juanito on February 20, 2017, 04:30:33 AM
If you start firefox from a terminal window, do you see any error messages?

Anything in dmesg or syslog or /tmp/wm_errors?
Title: Re: Xfbdev
Post by: polikuo on February 20, 2017, 04:40:53 AM
If you start firefox from a terminal window, do you see any error messages?

Anything in dmesg or syslog or /tmp/wm_errors?

Terminal output:
Code: [Select]
Xlib:  extension "XInputExtension" missing on display ":0.0".
(firefox:2841): Gtk-WARNING **: Error loading theme icon 'dialog-information' for stock: Icon 'dialog-information' not present in theme Adwaita

(firefox:2841): Gtk-WARNING **: Error loading theme icon 'edit-copy' for stock: Icon 'edit-copy' not present in theme Adwaita

(firefox:2841): Gtk-WARNING **: Error loading theme icon 'media-playback-start' for stock:

(firefox:2841): Gtk-WARNING **: Error loading theme icon 'media-playback-pause' for stock: Icon 'media-playback-pause' not present in theme Adwaita

(firefox:2841): Gtk-WARNING **: Error loading theme icon 'edit-undo' for stock:

(firefox:2841): Gtk-WARNING **: Error loading theme icon 'edit-cut' for stock: Icon 'edit-cut' not present in theme Adwaita

(firefox:2841): Gtk-WARNING **: Error loading theme icon 'edit-paste' for stock: Icon 'edit-paste' not present in theme Adwaita

(firefox:2841): Gtk-WARNING **: Error loading theme icon 'edit-delete' for stock: Icon 'edit-delete' not present in theme Adwaita

(firefox:2841): Gtk-WARNING **: Error loading theme icon 'edit-select-all' for stock: Icon 'edit-select-all' not present in theme Adwaita

dmesg output:
Code: [Select]
Chrome_ChildThr[2801]: segfault at 0 ip 000000000040730b sp 00007f40395fe340 error 6 in plugin-container[400000+60000]

/tmp/wm_errors, nothing at all.
Title: Re: Xfbdev
Post by: Juanito on February 20, 2017, 06:33:03 AM
Is the libXi (or possibly libinput) extension loaded?

You can get rid of several of the other warnings by loading the adwaita-icon-theme extension.
Title: Re: Xfbdev
Post by: polikuo on February 20, 2017, 08:25:12 AM
Is the libXi (or possibly libinput) extension loaded?

You can get rid of several of the other warnings by loading the adwaita-icon-theme extension.

After some testing, I found out that:
1. "adwaita-icon-theme" is unnecessary for the toolbar buttons to work, it's not a part of the dep of Xorg-7.7
2. It doesn't look like a case of missing dependencies
3. Running firefox under Xorg-7.7 also gets the same warning

Code: [Select]
### boot code "base"
tce-load -i aterm wbar Xlibs Xfbdev Xprogs firefox flwm_topside
startx
### buttons unclickable ...
tce-load -i Xorg-7.7
### with Xfbdev still running, unclickable ...
kill `cat /tmp/.X0-lock`
startx
### buttons become functional while the terminal output remains the same.

Edit:
It may have something to do with gtk3

firefox-ESR (45.6.0) has the dep with gtk2 and the toolbar works just fine.

However, running firefox (51.0.1) with both gtk2 and gtk3 under Xfbdev doesn't help.
Title: Re: Xfbdev
Post by: Scampada on March 13, 2017, 01:45:14 PM
Hi,

where can I ever find source project for Xfbdev??
I tried google as usual 'Xfbdev source download' expecting for sourceforge or github links but, no thing!
Title: Re: Xfbdev
Post by: Scampada on March 13, 2017, 01:47:02 PM
Looks like it's GLX disabled in the default TC Xfbdev package. I can't run applications requiring GLX, (and in Xorg they're not working too, strange... But this is off topic)
Title: Re: Xfbdev
Post by: curaga on March 13, 2017, 01:48:01 PM
https://github.com/tinycorelinux/tinyx

GLX cannot be enabled in the tiny X servers at all.
Title: Re: Xfbdev
Post by: Scampada on March 13, 2017, 02:13:15 PM
I knew it. I traced the game process and found it that the application was sending GLX requests to X socket then X returned "No GLX here bro". I also found out that TinyX doesn't support GLX at all. Yet just few moments ago I viewed this in my Google output and hoped for best...

(https://pp.userapi.com/c626516/v626516354/4f39d/I_UQHV36f0c.jpg)

PS Do you know other lightweight alternate X server which does support GLX and synaptics but doesn't clutter with unnecessary dependencies? Is it Wayland or something? ???
Title: Re: Xfbdev
Post by: curaga on March 13, 2017, 03:11:59 PM
That pic shows the configure options for Xorg too, as back then Xorg and tinyX were in the same tree. Some options are only relevant for one of them.

Xorg is the only X server that supports 3d and synaptics. Wayland is a different thing altogether, and may or may not be compatible with your game.
Title: Re: Xfbdev
Post by: Scampada on March 13, 2017, 04:12:10 PM
Then I must compile it with the least of dependencies, perhaps. To make it boot fast, for now I can boot Xfbdev.tcz (and few deps) in 3 s and the whole Xorg thing in something like 17..20 s. And when I shut down the system from Xorg, it does unnecessary things in my console, switching to a new tty and printing there some junk messages... I wonder perhaps it may be turned off, but... So much of unnecessary things everywhere in Xorg...