LCD timings with Waveshare 5.5 AMOLED and XU4Q

Post Reply
4d617474
Posts: 24
Joined: Fri May 24, 2019 4:36 am
languages_spoken: english
ODROIDs: XU4Q
Has thanked: 0
Been thanked: 0
Contact:

LCD timings with Waveshare 5.5 AMOLED and XU4Q

Unread post by 4d617474 » Fri May 24, 2019 4:43 am

Hello,
I am using XU4Q with ubuntu image from your repo.
It works fine, connected to TV there is no issue. I have ordered the screen as above, this one:
https://www.waveshare.com/w/upload/b/be ... ual_EN.pdf
https://www.waveshare.com/wiki/5.5inch_HDMI_AMOLED

My issue is that the provide only timings to set on Raspbian under config script of Raspberry....
I tried setting different options in boot.init, I might test out the last one that is 1920x1080 at 60Hz, but the other three either give no image or yield image but with artifacts.
There is a connection, but I don't know how to provide the correct timings:

"hdmi_timings=1080 1 26 4 50 1920 1 8 2 6 0 0 0 60 0 135580000 3"

They seem to go in this exact order:
"#h_active_pixels = 400
#h_sync_polarity = 0
#h_front_porch = 8
#h_sync_pulse = 9
#h_back_porch = 90
# * = is 507 pixels per line
#v_active_lines = 240
#v_sync_polarity = 0
#v_front_porch = 2
#v_sync_pulse = 20
#v_back_porch = 10
# * = is 272 lines per frame
#v_sync_offset_a = 0
#v_sync_offset_b = 0
#pixel_rep = 0
#frame_rate = 60
#interlaces = 0
#pixel_freq = 8274240
#aspect_ratio = 6"

with of course different values... I am however not sure, but it seems so?
I have never set timings before. My idea was to go where the script points at and manually edit the corresponding file, but I dont have linux on PC at the moment.

Anyway, the question is how to configure this display so it works properly. The touch should do fine, the thing is these timings...
There is image, but it isnt properly sent onto the screen. I havent had a Raspberry (aka found your device better and wanted to lay out more cash and have something better with usb 3.0...),
but they seem to allow custom timings in config file. Is this possible with XU4Q?

I really don't want to "send back" (like it was possible lel) that screen back to China.
It's really nice, this is the only thing that the most likely prevents me from getting what I want.

joy
Posts: 814
Joined: Fri Oct 02, 2015 1:44 pm
languages_spoken: english
ODROIDs: ODROID-C1+, XU4, X
Has thanked: 4 times
Been thanked: 19 times
Contact:

Re: LCD timings with Waveshare 5.5 AMOLED and XU4Q

Unread post by joy » Fri May 24, 2019 10:16 am

Hi 4d617474,

The waveshare monitor's native resolution is 1080x1920.
I think that's why it doesn't work with your monitor even as 1920x1080.
And on hdmi phy driver of xu4 latest kernel, there is no 135.58MHz pixel clock.

I think we can try custom edid approach through drm helper. ;)

[ step 1 ]
I will make a custom edid binary for your monitor by adjust timings a bit to fit one of available pixel clock list.

Code: Select all

"hdmi_timings=1080 1 26 4 50 1920 1 8 2 6 0 0 0 60 0 135580000 3"
[ step 2 ]
It's available to load the edid using this method.
https://wiki.odroid.com/odroid-xu4/appl ... ustom_edid
If it works normally, you will have 1080x1920 portrait display in this step.

[ step 3 ]
Then, you can get landscape display by rotating display on lightdm using this method.
viewtopic.php?f=136&t=34097&p=248459&hilit=ccw#p248459

I will be available to work it early next week, so can you wait for several days?
Once I'm done, I will share the edid with you and ask you to test it.

4d617474
Posts: 24
Joined: Fri May 24, 2019 4:36 am
languages_spoken: english
ODROIDs: XU4Q
Has thanked: 0
Been thanked: 0
Contact:

Re: LCD timings with Waveshare 5.5 AMOLED and XU4Q

Unread post by 4d617474 » Fri May 24, 2019 5:55 pm

Yes, of course.
Thank you very much, this is the first time of mine with any ARM computer and I didn't realize that there could be such issues.
What you said makes some sense. I have never operated on timings before and looking at that code...
it turns out to be the issue like you said? I think that I agree with you.

If that isn't a problem to you, I will wait and be very happy to use your solution.
Thank you very much. I actually thought of something that you want to do, but I didn't know that EID is a binary file:/
I can assume that they must use their own compiler/encoding template and... I dont even have a clue.

joy
Posts: 814
Joined: Fri Oct 02, 2015 1:44 pm
languages_spoken: english
ODROIDs: ODROID-C1+, XU4, X
Has thanked: 4 times
Been thanked: 19 times
Contact:

Re: LCD timings with Waveshare 5.5 AMOLED and XU4Q

Unread post by joy » Mon May 27, 2019 4:08 pm

Hi 4d617474,

I made a test custom EDID binary for you.

The original hdmi timing of your waveshare monitor is...

Code: Select all

Detailed mode: Clock 135.580 MHz, 281 mm x 500 mm
               1080 1106 1110 1160 hborder 0
               1920 1928 1930 1936 vborder 0
               +hsync +vsync 
and I've adjusted some parts of timing to use pixel clock 146.250 MHz that is one of available pixel clocks from exynos5422.

Code: Select all

Detailed mode: Clock 146.250 MHz, 281 mm x 500 mm
               1080 1106 1110 1180 hborder 0
               1920 1928 1930 2060 vborder 0
               +hsync +vsync 
Serial number: Linux
Monitor ranges (GTF): 59-61Hz V, 122-124kHz H, max dotclock 150MHz
Please find the attachment, "1080x1920_60_waveshare.bin.zip",
and follow this instructions.
( related wiki page : https://wiki.odroid.com/odroid-xu4/appl ... ustom_edid )

1. unzip the attachment

2. copy "1080x1920_60_waveshare.bin" into " /lib/firmware/ " of your XU4 card

Code: Select all

$ ls /lib/firmware/1080x1920_waveshare.bin 
/lib/firmware/1080x1920_waveshare.bin
3. modify /media/boot/boot.ini

Code: Select all

.......
.......
# -----------------------------------------------
# 480x800 without monitor data using generic information
# setenv videoconfig "drm_kms_helper.edid_firmware=edid/480x800.bin"
# -----------------------------------------------
# 480x320 without monitor data using generic information
# setenv videoconfig "drm_kms_helper.edid_firmware=edid/480x320.bin"

### Add this line
setenv videoconfig "drm_kms_helper.edid_firmware=1080x1920_waveshare.bin

### Change HPD value to "false"
#------------------------------------------------------------------------------
#
# HDMI Hot Plug detection
#
#------------------------------------------------------------------------------
# setenv HPD "true"
setenv HPD "false"
4. system reboot

Code: Select all

$ sudo reboot
After reboot please check if display is shown on your waveshare monitor.

I don't have a 1080x1920 monitor, so with my monitors, I couldn't test this custom edid.
So could you check it with your monitor, then share test result?
If it works normally, you will have portrait display of ( width 1080 ) x ( height 1920 ).
Attachments
1080x1920_60_waveshare.bin.zip
(301 Bytes) Downloaded 12 times

4d617474
Posts: 24
Joined: Fri May 24, 2019 4:36 am
languages_spoken: english
ODROIDs: XU4Q
Has thanked: 0
Been thanked: 0
Contact:

Re: LCD timings with Waveshare 5.5 AMOLED and XU4Q

Unread post by 4d617474 » Wed May 29, 2019 1:18 am

Okay, I am going to give it a try.
I am not sure whether I can access Ubuntu files through Windows Linux Subsystem, but if not
I will try launching some distro live and replacing these.

Update: Doesn't work.
Update2: Fixed the command, but doesn't work.

Well, you said to turn hotplug to false, but I want to test it on true.
Now the filesystem wont let me change permissions over the boot for some bizzare reason.
I managed to change those in rootfs....

Update3:
I have installed Ubuntu again, put the .bin file into the firmware library, copied its name and provided the path in ini file.
I tried both with hotplug and without it. The only thing I haven't done is "rebooting", how?
How am I supposed to reboot a device that has timings not used by the most of screens? I have done all of that through the USB adapter.

The screen blinks once (not the image, just the light) and doesn't show anything.

joy
Posts: 814
Joined: Fri Oct 02, 2015 1:44 pm
languages_spoken: english
ODROIDs: ODROID-C1+, XU4, X
Has thanked: 4 times
Been thanked: 19 times
Contact:

Re: LCD timings with Waveshare 5.5 AMOLED and XU4Q

Unread post by joy » Wed May 29, 2019 8:48 am

4d617474 wrote:
Wed May 29, 2019 1:18 am
I tried both with hotplug and without it. The only thing I haven't done is "rebooting", how?
You can access XU4 using ssh.
Then, use sudo reboot command on ssh.
4d617474 wrote:
Wed May 29, 2019 1:18 am
The screen blinks once (not the image, just the light) and doesn't show anything.
It looks it doesn't work with your monitor.
Can you share these information?

1. boot.ini file
2. dmesg log
3. kernel information

Code: Select all

root@odroid:~# uname -a
Linux odroid 4.14.120-160 #1 SMP PREEMPT Fri May 17 01:18:14 -03 2019 armv7l armv7l armv7l GNU/Linux
If your version is not the latest one as mine, please update all packages first.

Code: Select all

$ sudo apt-get update -y && sudo apt-get upgrade -y && sudo apt-get dist-upgrade -y
$ sudo reboot

joy
Posts: 814
Joined: Fri Oct 02, 2015 1:44 pm
languages_spoken: english
ODROIDs: ODROID-C1+, XU4, X
Has thanked: 4 times
Been thanked: 19 times
Contact:

Re: LCD timings with Waveshare 5.5 AMOLED and XU4Q

Unread post by joy » Thu May 30, 2019 5:57 pm

Hi 4d617474,

To check various pixel clocks, I made three more edid test files.
So can you check them?

1. 1080x1920_waveshare_125590.bin
2. 1080x1920_waveshare_148500.bin
3. 1080x1920_waveshare.bin


Test instruction is same as before but just you need to modify boot.ini for each case.

Copy them into /lib/firmware/* first.
And replace the following line for each test case.

1. 1080x1920_waveshare_125590.bin

Code: Select all

setenv videoconfig "drm_kms_helper.edid_firmware=1080x1920_waveshare_125590.bin
2. 1080x1920_waveshare_148500.bin

Code: Select all

setenv videoconfig "drm_kms_helper.edid_firmware=1080x1920_waveshare_148500.bin
3. 1080x1920_waveshare.bin

Code: Select all

setenv videoconfig "drm_kms_helper.edid_firmware=1080x1920_waveshare.bin
Please check them and if it doesn't work, share debug information as following.

For more information, please share whole booting log (using dmesg), too.

1. boot.ini file
2. dmesg log
3. kernel information
Attachments
1080x1920_waveshare.tar.gz
(351 Bytes) Downloaded 13 times

4d617474
Posts: 24
Joined: Fri May 24, 2019 4:36 am
languages_spoken: english
ODROIDs: XU4Q
Has thanked: 0
Been thanked: 0
Contact:

Re: LCD timings with Waveshare 5.5 AMOLED and XU4Q

Unread post by 4d617474 » Fri May 31, 2019 10:58 pm

Yes, thank you.
I didn't mean to ignore this thread, but I have been busy and have been awaiting for a few packages.
I tried understanding that SSH thing, and I believe that I would need first to connect my odroid to the local WIFI network and then use net scanner on virtual linux to pick up its IP address.
Perhaps then I could install some SSH client and reboot it through the network. I simply didn't have a keyboard and a mouse at hand (kind of have it by now).

I will try out those new files and see whether it helps. I also found some sort of application for making custom EDID, but am not sure yet whether I could use it.
I will check those files right now.

OFFTOPIC/EDIT:
Sorry again. I have just spent 3-4 hours wondering what the fuck is wrong with UBUNTU, because their team is obviously not smart enough to provide correct dependancies and install scripts for XRDP?
I had to install 19.02 and reinstall the packages for the 5-th time, because 18.04.02 (18.04 should but isnt available, BECAUSE WHY WOULD SOMEBODY PROVIDE PREVIOUS VERSIONS IN THEIR OWN OFFICIAL REPOS HUH? THAT'S SO DUMB TO DO THAT HUH?)
and the stupid enhanced session FINALLY works, so I can now not reboot my stupid PC everytime I want to change anything under EXT4 filesystem, because Microsoft for X years hasn't been "kind" (or smart?) enough to provide any sort of official or unofficial support for EXT4 filesystems just for purpose of reading or editting small files...

Damn it... Maybe you will understand what took me so long. This is just a fraction of my OS not operating as I desired it to.
I of course referenced to this manual https://github.com/Microsoft/linux-vm-t ... ng:-Ubuntu, because I couldn't find any official manuals out there.
If there is an already pre-configured version meant for windows store (that I can't use because I have WS19) then why isn't it available for EVERYONE, so instead of learning about that XRDP and what dependancies it could need they could just ... install a preconfigured iso that already works?

I will attach my memory card and use enhanced session for reading files from my WS19 into EXT4 on that card and will see whether it works now.
Sorry that it took me so long, but it's just painful...

EDIT2:
Now the Windows can't see the Ubuntu root partition of odroid..
Kill me...

4d617474
Posts: 24
Joined: Fri May 24, 2019 4:36 am
languages_spoken: english
ODROIDs: XU4Q
Has thanked: 0
Been thanked: 0
Contact:

Re: LCD timings with Waveshare 5.5 AMOLED and XU4Q

Unread post by 4d617474 » Sun Jun 02, 2019 12:42 am

I have configured SSH and tried all of the setups that you provided.
(Thank you for mentioning it, it was VERY useful, because using shitty live CDs was a painful task)

1 - no image
2 - artifacts all over
3 - artifacts all over

default - some sort of quite "good" image, but with artifacts

The logs are below:
Boot.ini - https://pastebin.com/J4dBpQQ0
Kernel info - ""Linux odroid 3.10.105-141 #1 SMP PREEMPT Thu Jul 27 04:03:10 UTC 2017 armv7l armv7l armv7l GNU/Linux""
it's Ubuntu 16.04 from HK website.

Dmesg - https://pastebin.com/7pL356jV

Sorry that it took me so long, but from now on I can do things in just minutes.
I had to setup filezilla, ssh, ubuntu with XRDP, set up permissions, look up nmap, look up all of that stuff. I have used half of it for the first time...

PS: I will try checking what exact "default" configuration gives me the best quality.
Maybe by looking up that file (is this possible? no?) one could see what the clocks etc. are?
It would then take only changing the default resolution, I guess?


PS: Somebody pointed out that I accidently downloaded the old kernel version of Ubuntu (all are from 2 years ago...)
I will try changing the OS and checking the resolutions again (Honestly, I doubt that it will help anything, but who knows)

4d617474
Posts: 24
Joined: Fri May 24, 2019 4:36 am
languages_spoken: english
ODROIDs: XU4Q
Has thanked: 0
Been thanked: 0
Contact:

Re: LCD timings with Waveshare 5.5 AMOLED and XU4Q

Unread post by 4d617474 » Sun Jun 02, 2019 5:56 pm

Android - android-4.4.4-alpha-6.6-emmc_installer-odroidxu4-20181105

#test
setenv fb_x_res "1080"
setenv fb_y_res "1920"
setenv hdmi_phy_res "1080p60hz"

Kind of works, the image appears vertically.
It has artifacts, the screen "seems" an android screen, but it's still messed up.

joy
Posts: 814
Joined: Fri Oct 02, 2015 1:44 pm
languages_spoken: english
ODROIDs: ODROID-C1+, XU4, X
Has thanked: 4 times
Been thanked: 19 times
Contact:

Re: LCD timings with Waveshare 5.5 AMOLED and XU4Q

Unread post by joy » Mon Jun 03, 2019 11:01 am

4d617474 wrote:
Sun Jun 02, 2019 12:42 am
1 - no image
2 - artifacts all over
3 - artifacts all over

default - some sort of quite "good" image, but with artifacts
Hi 4d617474,
Thank you for sharing the detailed information.
I don't understand the exact meaning artifacts all over. Sorry. :(
Could you take pictures of your monitor and share it with me?
4d617474 wrote:
Sun Jun 02, 2019 12:42 am
The logs are below:
Boot.ini - https://pastebin.com/J4dBpQQ0
Kernel info - ""Linux odroid 3.10.105-141 #1 SMP PREEMPT Thu Jul 27 04:03:10 UTC 2017 armv7l armv7l armv7l GNU/Linux""
it's Ubuntu 16.04 from HK website.

Dmesg - https://pastebin.com/7pL356jV
And could you try the latest version of Ubuntu 18.04 image?
https://wiki.odroid.com/odroid-xu4/os_i ... 1_20181203
The test image that you're using is very old one. :(

4d617474
Posts: 24
Joined: Fri May 24, 2019 4:36 am
languages_spoken: english
ODROIDs: XU4Q
Has thanked: 0
Been thanked: 0
Contact:

Re: LCD timings with Waveshare 5.5 AMOLED and XU4Q

Unread post by 4d617474 » Tue Jun 04, 2019 12:57 pm

Sure. I will try taking pictures.
I have tried Ubuntu "ubuntu-18.04.1-4.14-mate-odroid-xu4-20181203.img"
The kernel is not mounting my partition and gets stuck...

I am not a kernel specialist tbh. Android however booted for me.
An artifact is commonly used in software to describe a bugged rendering/display effect:
https://en.wikipedia.org/wiki/Digital_artifact

joy
Posts: 814
Joined: Fri Oct 02, 2015 1:44 pm
languages_spoken: english
ODROIDs: ODROID-C1+, XU4, X
Has thanked: 4 times
Been thanked: 19 times
Contact:

Re: LCD timings with Waveshare 5.5 AMOLED and XU4Q

Unread post by joy » Tue Jun 04, 2019 5:31 pm

4d617474 wrote:
Tue Jun 04, 2019 12:57 pm
I am not a kernel specialist tbh. Android however booted for me.
Hi @4d617474,

The HDMI timing configuration, "1080p60hz" of Android is same with the following videoconfig from Ubuntu image.
Could you try this video configuration in boot.ini?
https://github.com/mdrjr/5422_bootini/b ... ot.ini#L36

Code: Select all

# 1920x1080 (1080P) without monitor data using generic information (1080p-noedid)
### uncomment only this line and block the other videoconfig-related lines
setenv videoconfig "drm_kms_helper.edid_firmware=edid/1920x1080.bin"
4d617474 wrote:
Tue Jun 04, 2019 12:57 pm
Sure. I will try taking pictures.

An artifact is commonly used in software to describe a bugged rendering/display effect:
https://en.wikipedia.org/wiki/Digital_artifact
Thanks for sharing the link! Now I got the meaning roughly. ;)
But if you're available, please share some pictures. I will be very helpful to figure out current issue.
4d617474 wrote:
Tue Jun 04, 2019 12:57 pm
I have tried Ubuntu "ubuntu-18.04.1-4.14-mate-odroid-xu4-20181203.img"
The kernel is not mounting my partition and gets stuck...
Do you mean XU4 doesn't boot up with Ubuntu 18.04 image card?
or during booting, it suddenly stopped?

Please check md5sum value of the image file that you've downloaded,
and could you try to write the image on your card again?
https://wiki.odroid.com/troubleshooting ... h#flashing

4d617474
Posts: 24
Joined: Fri May 24, 2019 4:36 am
languages_spoken: english
ODROIDs: XU4Q
Has thanked: 0
Been thanked: 0
Contact:

Re: LCD timings with Waveshare 5.5 AMOLED and XU4Q

Unread post by 4d617474 » Thu Jun 06, 2019 6:35 am

Yes. I believe that I tried all four of those.
I will try your EDID on a newer kernel (I doubt that it will help, but well...)

This time I installed my Ubuntu properly and my WiFi also works...

4d617474
Posts: 24
Joined: Fri May 24, 2019 4:36 am
languages_spoken: english
ODROIDs: XU4Q
Has thanked: 0
Been thanked: 0
Contact:

Re: LCD timings with Waveshare 5.5 AMOLED and XU4Q

Unread post by 4d617474 » Thu Jun 06, 2019 7:28 am

AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
it works!

"# Custom 1
# setenv videoconfig "drm_kms_helper.edid_firmware=1080x1920_waveshare_125590.bin""

There is only one issue!
The screen is...
Uhm, lmao...
It might be ubuntu's issue. It isn't rotated as the OS isn't adapted to the screen.
I will give you a picture, it's hard to describe, look.

http://i66.tinypic.com/v591r5.jpg

It's like the OS itself wasn't rotated lmao.

PS: a funny fact:
My TV works better with "# setenv videoconfig "drm_kms_helper.edid_firmware=1080x1920_waveshare.bin"
Lol. The screen itself doesn't work with the other two EDIDs (other than setenv videoconfig "drm_kms_helper.edid_firmware=1080x1920_waveshare_125590.bin) , they all give incorrectly rendered image.

It's "funny" because my TV shows the image horizontally (Ubuntu is set to "normal" in display"), but on the screen it appears horizontally but vertically as shown in that picture.

PS2:

So, yeah. I can't "open device" with xrandr.
https://ubuntuforums.org/showthread.php?t=1947733
Perhaps this could help me?

PS3:

I just realized. Isn't the Ubuntu's screen normally green?
Lol. I think that the 125590 EDID is correct but the colours might be messed up.


Update:
I just opened your bin file and it seems easy? lol
I might try experimenting with that EDID on my own too, everything got loaded.
The clock you set is 125.59 in this one. Honestly. I never tried that before, but I will look into specification of that screen and try finding some things out maybe.

It is possible that I will also rescue one of my old screens;D
Using this EDID tool, since you gave me some idea about how it works.

joy
Posts: 814
Joined: Fri Oct 02, 2015 1:44 pm
languages_spoken: english
ODROIDs: ODROID-C1+, XU4, X
Has thanked: 4 times
Been thanked: 19 times
Contact:

Re: LCD timings with Waveshare 5.5 AMOLED and XU4Q

Unread post by joy » Fri Jun 07, 2019 3:29 pm

Hi~ @4d617474,
4d617474 wrote:
Thu Jun 06, 2019 7:28 am
PS2:

So, yeah. I can't "open device" with xrandr.
https://ubuntuforums.org/showthread.php?t=1947733
Perhaps this could help me?
You'd better to use display console using like "Mate terminal".
But, it must be very annoying because now you only have rotated screen. :(
Well, let's look for another solution setting by init or x11 conf.
4d617474 wrote:
Thu Jun 06, 2019 7:28 am
PS3:

I just realized. Isn't the Ubuntu's screen normally green?
Lol. I think that the 125590 EDID is correct but the colours might be messed up.


Update:
I just opened your bin file and it seems easy? lol
I might try experimenting with that EDID on my own too, everything got loaded.
The clock you set is 125.59 in this one. Honestly. I never tried that before, but I will look into specification of that screen and try finding some things out maybe.

It is possible that I will also rescue one of my old screens;D
Using this EDID tool, since you gave me some idea about how it works.
Ubuntu screen background color is Green.
So you mean still you don't have a normal display with waveshare 5.5 MLOLED even using one of the test edid files, right?

I thought it would work normally with 1080x1920_waveshare_148500.bin file because you said you got rotated but normal display using 1080p60hz on Android.
The edid file is configured by same display timing.

To make sure, can you confirm it for me?
Just a bit confused. ;)
4d617474 wrote:
Thu Jun 06, 2019 7:28 am
PS: a funny fact:
My TV works better with "# setenv videoconfig "drm_kms_helper.edid_firmware=1080x1920_waveshare.bin"
Lol. The screen itself doesn't work with the other two EDIDs (other than setenv videoconfig "drm_kms_helper.edid_firmware=1080x1920_waveshare_125590.bin) , they all give incorrectly rendered image.


1. 1080x1920_waveshare.bin
- most similar pixel clock with the spec of your monitor

Code: Select all

Detailed mode: Clock 146.250 MHz, 281 mm x 500 mm
               1080 1106 1110 1180 hborder 0
               1920 1928 1930 2060 vborder 0
               +hsync +vsync 
2. 1080x1920_waveshare_125590.bin
- lower pixel clock case

Code: Select all

Detailed mode: Clock 125.590 MHz, 281 mm x 500 mm
               1080 1088 1092 1102 hborder 0
               1920 1926 1928 1932 vborder 0
               +hsync +vsync 
3. 1080x1920_waveshare_148500.bin
- same timing with Android 1080p60hz case

Code: Select all

Detailed mode: Clock 148.500 MHz, 281 mm x 500 mm
               1080 1084 1089 1125 hborder 0
               1920 1930 1942 2200 vborder 0
               +hsync +vsync 

4d617474
Posts: 24
Joined: Fri May 24, 2019 4:36 am
languages_spoken: english
ODROIDs: XU4Q
Has thanked: 0
Been thanked: 0
Contact:

Re: LCD timings with Waveshare 5.5 AMOLED and XU4Q

Unread post by 4d617474 » Sat Jun 08, 2019 3:44 am

It didn't work on android on default settings (1080p EDID, but with framebuffer rotated)
it appeared (possibly?) in the good direction, but the image was incorrect.

The timings that worked for me are 1080x1920_waveshare_125590.bin
with the issue that the image is pink/red and not green (like in the picture).

I will boot it up and check the boot.ini again, but im nearly 100% sure that it was 125590
the other ones didn't work, they appeared in the same direction I believe, but were incorrect, with artifacts etc.

To the TV. I meant that the TV worked with 125590 with just a little bit stretched image and a collapsed end part of the image window.
With the .bin it worked really great lol.

On the android however, when rotating the framebuffer, yeah?
I then used 1080p default EDID with frambuffer reversed AND my TV showed vertical image normally, but the waveshare screen still had artifacts.
it is possible that I could rotate screen on android perhaps and use your EDID, but then
I still have the pinkish colour instead of green, and I also dont really want to use Android but rather Ubuntu or distros alike...


Oh yeah, this might be important, yeah?
My TV with 125590 AND .bin was showing stretched vertical image
HOWEVER, with android rotated framebuffer it was showing vertical image but not stretched, rather utilizing like 1/3? of the screen.


Honestly, it's weird to me lol, this one above. Like... In your custom EDID option it should render 1080 pixels vertically and 1920 horizontally...
Perhaps my TV automatically stretches out the pixels... With that frambuffer rotated, it didn't do that... This is weird...
It likely detected 1080p EDID and what? Why did it display it properly horizontally (1080pixels I believe?...), but like... decreased the image size vertically so it fitted 1080 pixels vertically also (it wasnt cut as it was 1920 vertically but not filling into the screen, but rather scaled that 1920 down?)

That's weird.

joy
Posts: 814
Joined: Fri Oct 02, 2015 1:44 pm
languages_spoken: english
ODROIDs: ODROID-C1+, XU4, X
Has thanked: 4 times
Been thanked: 19 times
Contact:

Re: LCD timings with Waveshare 5.5 AMOLED and XU4Q

Unread post by joy » Tue Jun 11, 2019 4:31 pm

Hi @4d617474,
Really sorry for late response. :(

Based on the LCD's specification, its native resolution is width 1080 by height 1920.
https://www.waveshare.com/w/upload/b/be ... ual_EN.pdf
The guide targeting to Rpi board also describes its configuration is width 1080 by height 1920.
So I made the test binaries using 1080x1920.

I think that's the reason you got normal display when you tried 1080p60hz on Android with rotated framebuffer option.
And I guess the weird color issue with 1080x1920_wavesahre_122500.bin seems to be lower pixel clock.

Could you check the following two things?
I wanna check 148.5MHz pixel clock (higher one and same as Android 1080p60hz).
I've asked you to check it, but I couldn't find test results from you here.

1. 1920x1080p60hz with pixel clock 148.5MHz
I've asked you to check 1080p60hz on Ubuntu before.
Have you tried 1080p60hz (1920x1080p60hz) option on Ubuntu?
It's same timing as Android 1080p60hz.
Could you check it and share the result?
And if you get weird display again, please share the picture.
joy wrote: The HDMI timing configuration, "1080p60hz" of Android is same with the following videoconfig from Ubuntu image.
Could you try this video configuration in boot.ini?
https://github.com/mdrjr/5422_bootini/b ... ot.ini#L36

Code: Select all

# 1920x1080 (1080P) without monitor data using generic information (1080p-noedid)
### uncomment only this line and block the other videoconfig-related lines
setenv videoconfig "drm_kms_helper.edid_firmware=edid/1920x1080.bin"
Full boot.ini sample can be as following.

Code: Select all

ODROIDXU-UBOOT-CONFIG

# U-Boot Parameters
setenv initrd_high "0xffffffff"
setenv fdt_high "0xffffffff"

# Mac address configuration
setenv macaddr "00:1e:06:61:7a:39"

#------------------------------------------------------------------------------------------------------
# Basic Ubuntu Setup. Don't touch unless you know what you are doing.
# --------------------------------
setenv bootrootfs "console=tty1 console=ttySAC2,115200n8 root=UUID=e139ce78-9841-40fe-8823-96a304a09859 rootwait ro fsck.repair=yes net.ifnames=0"

# --- Screen Configuration for HDMI --- # 
# ---------------------------------------
# Uncomment only ONE line! Leave all commented for automatic selection.
# Uncomment only the setenv line!
# ---------------------------------------
# ODROID-VU forced resolution
# setenv videoconfig "video=HDMI-A-1:1280x800@60"
# -----------------------------------------------
# ODROID-VU forced EDID
# setenv videoconfig "drm_kms_helper.edid_firmware=edid/1280x800.bin"
# -----------------------------------------------
# 1920x1200 60hz without monitor data using generic information
# setenv videoconfig "drm_kms_helper.edid_firmware=edid/1920x1200_60hz.bin"
# -----------------------------------------------
# 1920x1200 30hz without monitor data using generic information
# setenv videoconfig "drm_kms_helper.edid_firmware=edid/1920x1200_30hz.bin"
# -----------------------------------------------
# 1920x1080 (1080P) with monitor provided EDID information. (1080p-edid)
# setenv videoconfig "video=HDMI-A-1:1920x1080@60"
# -----------------------------------------------
# 1920x1080 (1080P) without monitor data using generic information (1080p-noedid)
setenv videoconfig "drm_kms_helper.edid_firmware=edid/1920x1080.bin"
# -----------------------------------------------
# 1920x1080 50hz (1080P) with monitor provided EDID information. (1080p 50hz-edid)
# setenv videoconfig "video=HDMI-A-1:1920x1080@50"
# -----------------------------------------------
# 1920x1080 50hz (1080P) without monitor data using generic information (1080p 50hz-noedid)
# setenv videoconfig "drm_kms_helper.edid_firmware=edid/1920x1080_50hz.bin"
# -----------------------------------------------
# 1680x1050 without monitor data using generic information 
# setenv videoconfig "drm_kms_helper.edid_firmware=edid/1680x1050.bin"
# -----------------------------------------------
# 1600x1200 without monitor data using generic information 
# setenv videoconfig "drm_kms_helper.edid_firmware=edid/1600x1200.bin"
# -----------------------------------------------
# 1600x900 without monitor data using generic information 
# setenv videoconfig "drm_kms_helper.edid_firmware=edid/1600x900.bin"
# -----------------------------------------------
# 1440x900 with monitor provided EDID information.
# setenv videoconfig "video=HDMI-A-1:1440x900@60"
# -----------------------------------------------
# 1440x900 without monitor data using generic information 
# setenv videoconfig "drm_kms_helper.edid_firmware=edid/1440x900.bin"
# -----------------------------------------------
# 1366x768 without monitor data using generic information 
# setenv videoconfig "drm_kms_helper.edid_firmware=edid/1366x768.bin"
# -----------------------------------------------
# 1360x768 without monitor data using generic information 
# setenv videoconfig "drm_kms_helper.edid_firmware=edid/1360x768.bin"
# -----------------------------------------------
# 1280x1024 without monitor data using generic information
# setenv videoconfig "drm_kms_helper.edid_firmware=edid/1280x1024.bin"
# -----------------------------------------------
# 1280x720 (720P) with monitor provided EDID information. (720p-edid)
# setenv videoconfig "video=HDMI-A-1:1280x720@60"
# -----------------------------------------------
# 1280x720 (720P) without monitor data using generic information (720p-noedid)
# setenv videoconfig "drm_kms_helper.edid_firmware=edid/1280x720.bin"
# -----------------------------------------------
# 1024x768 without monitor data using generic information
# setenv videoconfig "drm_kms_helper.edid_firmware=edid/1024x768.bin"
# -----------------------------------------------
# 1024x600 without monitor data using generic information (ODROID VU7+)
# setenv videoconfig "drm_kms_helper.edid_firmware=edid/1024x600.bin"
# -----------------------------------------------
# 800x600 without monitor data using generic information 
# setenv videoconfig "drm_kms_helper.edid_firmware=edid/800x600.bin"
# -----------------------------------------------
# 800x480 without monitor data using generic information (ODROID 7")
# setenv videoconfig "drm_kms_helper.edid_firmware=edid/800x480.bin"
# -----------------------------------------------
# 720x576 without monitor data using generic information 
# setenv videoconfig "drm_kms_helper.edid_firmware=edid/720x576.bin"
# -----------------------------------------------
# 720x480 without monitor data using generic information 
# setenv videoconfig "drm_kms_helper.edid_firmware=edid/720x480.bin"
# -----------------------------------------------
# 640x480 without monitor data using generic information
# setenv videoconfig "drm_kms_helper.edid_firmware=edid/640x480.bin"
# -----------------------------------------------
# 480x800 without monitor data using generic information
# setenv videoconfig "drm_kms_helper.edid_firmware=edid/480x800.bin"
# -----------------------------------------------
# 480x320 without monitor data using generic information
# setenv videoconfig "drm_kms_helper.edid_firmware=edid/480x320.bin"


# --- HDMI / DVI Mode Selection ---
# ------------------------------------------
# - HDMI Mode
setenv vout "hdmi"
# - DVI Mode (disables sound over HDMI as per DVI compat)
# setenv vout "dvi"


# --- HDMI CEC Configuration ---
# ------------------------------------------
setenv cecenable "false" # false or true
# set to true to enable HDMI CEC


# --- CPU Governor Setup ---
# Uncomment only one line. New governor is set after 90secs after boot.
# ------------------------------------------
# - Performance (Keep all the CPU's at Maximum frequency)
setenv governor "performance"
# ------------------------------------------
# - Ondemand
# setenv governor "ondemand"
# ------------------------------------------
# - Interactive (Pretty much just like ondemand with more possible customization via sysfs.)
# setenv governor "interactive"
# ------------------------------------------
# - Conservative (Like ondemand, but do the frequency transitions more slowly, great for battery powered applications)
# setenv governor "conservative"
# ------------------------------------------
# - Powersave (Keeps the CPU's to the lowest possible temps)
# setenv governor "powersave"

# Enable/Disable ODROID-VU7 Touchsreen
setenv disable_vu7 "false" # false


#------------------------------------------------------------------------------
#
# HDMI-PHY Parameter Control
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
#
# HDMI Hot Plug detection
#
#------------------------------------------------------------------------------
#
# Forces the HDMI subsystem to ignore the check if the cable is connected or 
# not.
# false : disable the detection and force it as connected.
# true : let cable, board and monitor decide the connection status.
# 
# default: true
# 
#------------------------------------------------------------------------------
setenv HPD "true"

#------------------------------------------------------------------------------
#
#  TMDS data amplitude control.
#
#------------------------------------------------------------------------------
#
#  1LSB corresponds to 20 mVdiff amplitude level.
#  tx_amp_lvl : 0 = 760 mVdiff(Min), 31 = 1380 mVdiff(Max)
#
#  Hardkernel default hdmi_tx_amp_lvl = 31(1380 mVdiff);
#------------------------------------------------------------------------------
setenv hdmi_tx_amp_lvl  "31"

#------------------------------------------------------------------------------
#
#  TMDS data amplitude fine control for each channel.
#
#------------------------------------------------------------------------------
#
#  1LSB corresponds to 20 mVdiff amplitude level.
#  tx_lvl : 0 = 0 mVdiff(Min), 3 = 60 mVdiff(Max)
#
#  Hardkernel default
#      hdmi_tx_lvl_ch0 = 3, hdmi_tx_lvl_ch1 = 3, hdmi_tx_lvl_ch2 = 3,
#------------------------------------------------------------------------------
setenv hdmi_tx_lvl_ch0      "3"
setenv hdmi_tx_lvl_ch1      "3"
setenv hdmi_tx_lvl_ch2      "3"

#------------------------------------------------------------------------------
#
#  TMDS data pre-emphasis level control.
#
#------------------------------------------------------------------------------
#
#  1LSB corresponds to -0.45dB emphasis level except for 1
#  tx_emp_lvl : 0 = 0 db(Min), 1 = -0.25 db, 2 = 0.7 db, 15 = -7.45 db(Max)
#
#  Hardkernel default hdmi_tx_emp_lvl = 6 (-2.50 db);
#------------------------------------------------------------------------------
setenv hdmi_tx_emp_lvl      "6"

#------------------------------------------------------------------------------
#
#  TMDS clock amplitude control.
#
#------------------------------------------------------------------------------
#
#  1LSB corresponds to 20 mVdiff amplitude level.
#  clk_amp_lvl : 0 = 790 mVdiff(Min), 31 = 1410 mVdiff(Max)
#
#  Hardkernel default hdmi_clk_amp_lvl = 31 (1410 mVdiff)
#------------------------------------------------------------------------------
setenv hdmi_clk_amp_lvl     "31"

#------------------------------------------------------------------------------
#
#  TMDS data source termination resistor control.
#
#------------------------------------------------------------------------------
#
#  tx_res :
#      0 = Source Termination OFF(Min), 1 = 200 ohm, 2 = 300 ohm, 3 = 120 ohm(Max)
#
#  Hardkernrel default hdmi_tx_res = 0 (Source Termination OFF)
#------------------------------------------------------------------------------
setenv hdmi_tx_res      "0"

#------------------------------------------------------------------------------

setenv hdmi_phy_control "hdmi_tx_amp_lvl=${hdmi_tx_amp_lvl} hdmi_tx_lvl_ch0=${hdmi_tx_lvl_ch0} hdmi_tx_lvl_ch1=${hdmi_tx_lvl_ch1} hdmi_tx_lvl_ch2=${hdmi_tx_lvl_ch2} hdmi_tx_emp_lvl=${hdmi_tx_emp_lvl} hdmi_clk_amp_lvl=${hdmi_clk_amp_lvl} hdmi_tx_res=${hdmi_tx_res} HPD=${HPD} vout=${vout}"


# Load kernel, initrd and dtb in that sequence
fatload mmc 0:1 0x40008000 zImage
fatload mmc 0:1 0x42000000 uInitrd
fatload mmc 0:1 0x44000000 exynos5422-odroidxu3.dtb

# set FDT address
fdt addr 0x44000000

if test "${cecenable}" = "false"; then fdt rm /cec@101B0000; fi
if test "${disable_vu7}" = "false"; then setenv hid_quirks "usbhid.quirks=0x0eef:0x0005:0x0004"; fi

# final boot args
setenv bootargs "${bootrootfs} ${videoconfig} smsc95xx.macaddr=${macaddr} governor=${governor} ${hdmi_phy_control} ${hid_quirks}"

# Boot the board
bootz 0x40008000 0x42000000 0x44000000
2. 1080x1920p60hz with pixel clock 148.5MHz : 1080x1920_waveshare_148500.bin
Have you checked this firmware, 1080x1920_waveshare_148500.bin?
I think you get a display (even weird one...) with the other firmwares, result with pixel clock 148.5Mhz can be better than others.
Could you check this, too?

4d617474
Posts: 24
Joined: Fri May 24, 2019 4:36 am
languages_spoken: english
ODROIDs: XU4Q
Has thanked: 0
Been thanked: 0
Contact:

Re: LCD timings with Waveshare 5.5 AMOLED and XU4Q

Unread post by 4d617474 » Sun Jun 16, 2019 3:31 am

I didn't mean to ignore you.
I haven't seen the reply. I have been busy.
Will test it out in the following week I guess.

If this EDID doesn't work then I will try making my own too.
It didn't work on android (clock issues?), but seemed to display properly (as vertically, hard to say).

This topic isn't dead yet, but I am simply a little bit busy with college and stuff.
I won't just give up on that screen yet lmao.


Perhaps my English isn't perfect, but as I said.
I had tried ALL of your timings about 2 weeks ago and just one worked "good" enough to be recognizable as a desktop image.
The colours however were messed up and the screen was displayed vertically but rotated horizontally (hard to describe).

NONE worked good enough to be classified as "good" ones. Unless you changed the other options there is no possibility that those three timings give me any different results, unless (for some weird reason) there was a software update that perhaps changed the display driver way of working(?).

As said. Old kernel - no image. New kernel - one out of three gives good screen, but with messed up colours.
It was the 125590 I believe. I don't have the time to experiment with clocks right now. I will do that later.

"I've asked you to check 1080p60hz on Ubuntu before.
Have you tried 1080p60hz (1920x1080p60hz) option on Ubuntu?
It's same timing as Android 1080p60hz."

Unless you changed them, I have tried all three of those long time ago and I also tried default 1080p one on Android that gave me screen with artifacts, however it perhaps was displayed vertically and the screen buffer could be also displayed vertically.

I believe that right now the 125590 timings give vertically displayed screen (1080x1920), however the screen buffer itself isn't rotated.
The kernel renders image horizontally but the device is displaying it vertically, that is my issue. The other issue are the pink colours instead of green.


In my opinion it is possible that the new kernel has had something changed, like drivers or perhaps some system functions responsible for driving peripheral devices.
It could explain why the same timings didn't provide ANY image at all, but the new OS kernel provides image on all of them, but the clock and framebuffer are wrong.
I don't know what might be causing the pink colour, because I have never been researching display devices before, but from what I believe the screen is first rendered by odroid and kept in memory to then be sent to the device.
If the screen is rendered in 1920x1080 and the device tries displaying it 1080x1920 as driven by the EDID, then the horizontal axis is messed up and the vertical one perhaps is modified.
I dont know, this happened on my TV for example. When restricting the buffer to 1080x1920 on a 1080p layout the TV with 1920x1080 pixels was displaying a vertical image but scaled down?
It seemed to be scaled down. Perhaps the same happens with a 1080p rendered image that is displayed on a 1080x1920 device. It might be scaled down on the sides and scaled up vertically.
That would perhaps explain the messed up Ubuntu menu that is like, cut in half... on both sides of the screen of something like that.

I have got no idea. I would need to run some tests with various clocks and perhaps try that one working EDID on android with framebuffer rotated.
The thing is that, even if that worked, I don't like Android. I want to install Ubuntu/something else and use it for my projects...

So there is a little bit of research to be done. I am having exams in these two incoming weeks, hence my absence.

Post Reply

Return to “Hardware and peripherals”

Who is online

Users browsing this forum: No registered users and 2 guests