Tiny Core Linux

Tiny Core Base => TCB Q&A Forum => Topic started by: ferite on August 30, 2014, 02:07:08 PM

Title: Make X11 output to framebuffer display.
Post by: ferite on August 30, 2014, 02:07:08 PM
Hi. I'm trying to making Work a tiny (2.8") USB display with TinyCore. Up to now, I have been able to build the driver and load that as kernel module. Now I need to set this display as the "main display". The display vendor gives a X11 config file (named "10-disp.conf") example that looks like that:

Code: [Select]
Section "Device"
         Identifier     "RPUSBDispFB"
         Driver         "fbdev"
         Option         "fbdev"   "/dev/fb1"
EndSection


Section "Screen"
    Identifier "RPUSBDisp"
    Device "RPUSBDispFB"
    DefaultFbBpp 16
    SubSection "Display"
       Visual "TrueColor"
    EndSubSection
EndSection


Section "InputClass"
    Identifier "RPUSBTouch"
    MatchDevicePath "/dev/input/event*"
    Driver "evdev"
EndSection

The manual says that this file should be placed on  X11's config folder and then X11 should be restarted. I have some questions:

1. What would be the equivalent of /usr/share/X11/xorg.conf.d in TinyCore?.
2. Should I rename the file?
3. What would be the equivalent to commnad "service lightdm restart" in tinycore?.

Thanks
Title: Re: Make X11 output to framebuffer display.
Post by: Misalf on August 30, 2014, 11:03:25 PM
@ 1
/usr/local/share/X11/xorg.conf.d

And add that folder to your 'backup'.
Title: Re: Make X11 output to framebuffer display.
Post by: curaga on August 31, 2014, 04:20:11 AM
There is no display manager. Kill the current X server (with killall, or ctrl-alt-backspace, or the exit applet) and run startx.
Title: Re: Make X11 output to framebuffer display.
Post by: ferite on September 01, 2014, 11:51:34 AM
Hi:

I renamed de file as "xorg.conf.d" and placed it in /usr/local/share/X11/. Then I added the folder to the backup file. However when I restart the system, the X output still being directed to the video card, and there is not image on the display. What can I be doing wrong?.
Title: Re: Make X11 output to framebuffer display.
Post by: Misalf on September 01, 2014, 03:51:32 PM
"xorg.conf.d"  is the folder, not the file.

/usr/local/share/X11/xorg.conf.d/10-disp.conf

Title: Re: Make X11 output to framebuffer display.
Post by: ferite on September 01, 2014, 05:44:54 PM
Hi:

I created both directories:

/usr/local/share/X11/xorg.conf.d

/usr/share/X11/xorg.conf.d

Pasted on them the 10-disp.conf config file. Double checked that the display is being recognized as "/dev/fb1" as it is defined in the file.

Added both to backup. However the result is the same.

By the way. On my persistence file I have included the file /etc/sysconfig/Xserver whose only content is Xvesa. I don't now if it is related.

Thanks.
Title: Re: Make X11 output to framebuffer display.
Post by: Misalf on September 01, 2014, 06:07:19 PM
Quote
By the way. On my persistence file I have included the file /etc/sysconfig/Xserver whose only content is Xvesa. I don't now if it is related.
You don't need to do that. In fact, you should not.
When the Xvesa, Xorg or Xfbdev extension gets loaded, its start script writes the respective value into that file. Your backup will override this feature.
Title: Re: Make X11 output to framebuffer display.
Post by: ferite on September 01, 2014, 07:17:32 PM
According to your sugestion, I removed "Xvesa" from the backup. It keeps loading the X system like before.
Title: Re: Make X11 output to framebuffer display.
Post by: Rich on September 01, 2014, 07:54:22 PM
Hi ferite
Have you checked  /var/log/Xorg.0.log  for errors or warnings?
Title: Re: Make X11 output to framebuffer display.
Post by: ferite on September 01, 2014, 08:31:48 PM
Hi Rich.

There is not Xorg.0.log inside /var/log/.

thanks
Title: Re: Make X11 output to framebuffer display.
Post by: Rich on September 01, 2014, 09:15:32 PM
Hi ferite
I think you need to be running Xorg for this to work. Did you install the Xorg extension?
Title: Re: Make X11 output to framebuffer display.
Post by: ferite on September 01, 2014, 09:32:39 PM
Hi Rich:

That would be Xorg-7.7-bin.tcz?. How can I check if a package is installed allready?.
Title: Re: Make X11 output to framebuffer display.
Post by: gerald_clark on September 01, 2014, 09:43:40 PM
Look in /usr/local/tce.installed.
Title: Re: Make X11 output to framebuffer display.
Post by: ferite on September 01, 2014, 10:24:00 PM
Hi Rich.

You were right. After installing Xorg (According to /usr/local/tce.installed, I ended installing Xorg-7.7, Xorg-7.7-bin, Xorg-fonts, xorg-server, Xprogs besides of Xvesa, wich I think was there before), the standard display did not start normally, but showed a message:

"failed in waitforX"

and the $ prompt. There I typed startx, and the desktop started on the miniDisplay!.
Title: Re: Make X11 output to framebuffer display.
Post by: ferite on September 02, 2014, 07:17:55 PM
Hi:

After having configured the display with my system, I noted that the image seems to lack one of the chrome components, as the image color is altered as follows:

Normal image:

(http://s9.postimg.org/eu4ob0mr3/back_320.jpg)

Imagen on the display:

(http://s14.postimg.org/l9eq4qwc1/2014_09_02_17_37_51.jpg)

I am wondering if there is some place where I can tuning the RGB components of the output.

Thanks.
Title: Re: Make X11 output to framebuffer display.
Post by: Rich on September 02, 2014, 09:05:55 PM
Hi ferite
Maybe  xgamma  or  xrandr  have some useful options.
Title: Re: Make X11 output to framebuffer display.
Post by: ferite on September 04, 2014, 03:57:45 PM
Hi Rich:

After some time I noticed that the problem with colors is only with Java applications. In this picture you can see the application in the front, what is a Java application. At the side is Firefox showing the same picture with the proper colors:

(http://s17.postimg.org/aud1yhk4v/2014_09_04_13_35_28.jpg)

So as I think this is not a TinyCore related issue, I have created a new thread at Java Forums.

By the way. Could you kindly recommend me a way to start X system in a more "gracefully" way?. At this time, the first text messages when the OS is loading are being output to the standard monitor (HDMI), up to when a "failed in waitforX" error is shown. At this point you could execute "startx". Only at this moment X starts for the Framebuffer Display as expected, and there is no more output for the standar monitor.

Thanks.
Title: Re: Make X11 output to framebuffer display.
Post by: curaga on September 04, 2014, 04:01:46 PM
The "failed..." message must mean that your driver is not yet loaded at that point (or hw not initialized). How do you load it? Modprobe from where?
Title: Re: Make X11 output to framebuffer display.
Post by: ferite on September 04, 2014, 05:17:52 PM
Hi curaga.

I just added the modprobe line to /opt/bootlocal.sh
Title: Re: Make X11 output to framebuffer display.
Post by: gerald_clark on September 04, 2014, 05:35:15 PM
Add it to /opt/bootsync.sh  instead.  That will ensure that it completes before the autologin.
Title: Re: Make X11 output to framebuffer display.
Post by: ferite on September 04, 2014, 07:15:53 PM
Hi gerald:

I added the line:

Code: [Select]
sudo /sbin/modprobe rp_usbdisplay &
to the file /opt/bootsync.sh, just befre the line

Code: [Select]
/opt/bootlocal.sh &
but I got the message:

Quote
modprobe rp_usbdisplay not found in modules.dep

what did not occur when the command was in /bootlocal.sh. However, after de error message, I can modprobe manually, and the command is done successfully.

Thanks.
Title: Re: Make X11 output to framebuffer display.
Post by: gerald_clark on September 04, 2014, 07:36:13 PM
Do not use sudo in bootsync.sh or bootlocal.sh.  It is already running as root.
Your custom extension/initrd is missing the correct deps file.
Run "depmod -a" before the modprobe.
Title: Re: Make X11 output to framebuffer display.
Post by: Misalf on September 04, 2014, 07:57:58 PM
If extensions are added into the initrd (NOT /tmp/builtin/*.tcz but plain rootfs), their start scripts won't get exeuted.
I'm not sure if it's related; might be worth to be implemented?
I'm not exactly sure about the topic, though.
Title: Re: Make X11 output to framebuffer display.
Post by: curaga on September 05, 2014, 04:11:07 AM
Also, do not background (&) the modprobe. You want the system to wait for it to complete.