LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-06-2014, 10:26 AM   #1
ferite
Member
 
Registered: Jul 2014
Posts: 30

Rep: Reputation: Disabled
Framebuffer display shows Java apps in weird color.


Hi.

I have to set up a system where the main display is going to be a tiny framebuffer USB display, tied to a x86 mini PC running Linux. Now, when the OS desktop or any "non-java" application is shown, all the colors in the picture are "normal", but when any Java application is running, the color is altered, as if one of the RGB components was missing. In the following picture you can see on the foreground the Java application with weird color. On the side is the same picture (same file) opened with firefox.

http://s17.postimg.org/aud1yhk4v/201...4_13_35_28.jpg

When I perform the same tests using a "conventional" (HDMI or VGA) display, the image in Java apps is shown well. The same as if I execute the app with X forwarding.

I made the tests on TinyCore Linux (Kernel 3.8.10) and in Lubuntu (14.04.01), and the result is the same.

I am wondering if somebody has a possible explanation or a tip to fix this.

Thanks.
 
Old 09-10-2014, 09:10 PM   #2
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,801

Rep: Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140
I can't help with an answer as such, except to wonder if it is a colour space issue (a problem between the frame buffer driver and assumed colour space by java application). It may be bug report material, or perhaps the java application needs tweaking to handle this framebuffer device correctly. I apologize in advance if I'm off track here.

Anyway, FWIW I share the following link (even though it is discussing a custom framebuffer driver for Linux on the Wii)
http://fartersoft.com/blog/2011/06/2...for-wii-linux/
just to illustrate some of the pitfalls encountered around the data format used.


IIRC 'fbset' can be used (compatible with some frame-buffer devices) to set/check settings (including colour format)
Code:
fbset --info
*It may need to be installed first.

Hopefully, others with more experience about this behaviour can chime in.
 
Old 09-10-2014, 10:55 PM   #3
ferite
Member
 
Registered: Jul 2014
Posts: 30

Original Poster
Rep: Reputation: Disabled
Hi @ferrari:

Actually you are not far from the truth.This is what the display manufacturer told me about:

Quote:
The wired color in Java applications may cause by the RGB color arrangement in the frame buffer memory.

Traditional, Linux framebuffer device use the {R, G, B} sequence (where the R component locates in MSB). But most LCD hardware uses a reversed order: {B, G, R}.

In our framebuffer driver design, in order to improve the overall performance, the usb display’s framebuffer uses {B,G,R} order. For applications like X11, it will query the framebuffer device for the correct RBG order. But there are applications like Java that may assume the framebuffer is always {R,G,B}.

In order to solve this problem, you may try to modify the kernel driver to use the R->G->B order and convert it to BGR before sending the data to the screen. Alternatively, you may check whether there is some configuration options to allow you to alter the RGB sequence in Java VM.
So I searched for a Java VM option, but there is nothing related with this. Now I trying to modify the driver, although it escapes of my limited knowledge regarding C and driver development.

I am going to read your link. Thanks a lot for the sugestion.
 
  


Reply

Tags
framebuffer, java


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
GTK apps display chinese, QT apps dont zhangmaike Linux - Desktop 0 07-03-2007 11:57 PM
Framebuffer console: background color deftone` Linux - Software 1 02-12-2007 07:20 AM
Weird Framebuffer probelms. securitybreach Slackware 4 03-27-2006 09:26 PM
Run xwindow apps in framebuffer console? Ren McCourtey Linux - Software 1 02-24-2006 09:29 AM
Synaptic Package Manager shows 'java-common' and 'java-gcj-compat' as Installed. swiadek Ubuntu 3 02-12-2006 11:54 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:44 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration