Resolution & Display Settings

Post Reply
Aeronaut
Posts: 23
Joined: Mon Aug 31, 2015 6:38 pm
languages_spoken: english, german
ODROIDs: ODROID-XU4
Has thanked: 0
Been thanked: 0
Contact:

Resolution & Display Settings

Post by Aeronaut »

I have again problems with setting correct videoconfig...
My Projector (Panasonic PT-AX200E - 720p native) does only work correctly when switched on and setting

Code: Select all

setenv videoconfig "video=HDMI-A-1:1280x720@60"
setenv HPD "false"
...
It does not work when the Projector is switched off for some reasons (Attached projector-on-edid-fw-Xorg.0.log and projector-off-edid-fw-Xorg.0.log).

At the moment I workaround the issue with

Code: Select all

setenv videoconfig "drm_kms_helper.edid_firmware=edid/1280x720.bin"
what brings X11 up when Projector is off, but shows black on left ~150px and cuts off on the right when on.

Is there a way to extract my projectors edid data to use as firmware, like that:

Code: Select all

setenv videoconfig "drm_kms_helper.edid_firmware=edid/AX200E.bin"
I cant find any edid/*.bin file to dig into, where are they?
Is there an other way, maybe xorg.conf, where I can apply the correct settings?

Thanks in advance.
Attachments
projector-on-edid-fw-Xorg.0.log.log
(21.37 KiB) Downloaded 167 times
projector-off-edid-fw-Xorg.0.log.log
(13.76 KiB) Downloaded 164 times

User avatar
odroid
Site Admin
Posts: 37793
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 1919 times
Been thanked: 1185 times
Contact:

Re: Resolution & Display Settings

Post by odroid »

AFAIK, the edid binary is hardcoded in the Kernel source.
Let me check where it is in the kernel source tree.

Aeronaut
Posts: 23
Joined: Mon Aug 31, 2015 6:38 pm
languages_spoken: english, german
ODROIDs: ODROID-XU4
Has thanked: 0
Been thanked: 0
Contact:

Re: Resolution & Display Settings

Post by Aeronaut »

At least both logs shows lines starting with ...

Code: Select all

ARMSOC(0): EDID (in hex):
following hex-binary data.
If I understand right, the problem is not, that it does not get the edid-Informations, but after:
Loading /usr/lib/xorg/modules/libfb.so ...
It throws a Segmentation fault at address 0x18 ... Whatever that means... Now, that its the second display device this problem appears, is maybe a hardware fault? Or can I close that out in some way?

User avatar
odroid
Site Admin
Posts: 37793
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 1919 times
Been thanked: 1185 times
Contact:

Re: Resolution & Display Settings

Post by odroid »

Try to update the kernel to 4.14 from 4.9.
viewtopic.php?f=29&t=28895
Kernel 4.14 has a better EDID reading feature.

Aeronaut
Posts: 23
Joined: Mon Aug 31, 2015 6:38 pm
languages_spoken: english, german
ODROIDs: ODROID-XU4
Has thanked: 0
Been thanked: 0
Contact:

Re: Resolution & Display Settings

Post by Aeronaut »

Argh... I frequently do dist-upgrades... This time I forgot to install kernelupdate by hand... Is there a way to upgrade them automatically?

joy
Posts: 1584
Joined: Fri Oct 02, 2015 1:44 pm
languages_spoken: english
ODROIDs: .
Has thanked: 179 times
Been thanked: 210 times

Re: Resolution & Display Settings

Post by joy »

Hello Aeronaut,
Pre-built edid binaries are included in kernel image and hardcoded.

Code: Select all

kernel/firmware/edid/
We're checking if it's possible to force custom edid located in file systems or something.
Please give us several days to check it.


And I want to share the basic rule of videoconfig.
Please check the followings.
When you comment all off videoconfig, XU4 read edid data of the monitor that is connected
and parse the information.

Code: Select all

## Block all of videoconfig
# setenv videoconfig "video=HDMI-A-1:1280x800@60"
# setenv videoconfig "drm_kms_helper.edid_firmware=edid/1280x800.bin"
...
...
# setenv videoconfig "drm_kms_helper.edid_firmware=edid/480x800.bin"
You can find the edid information as following.
Here is an example with my AOC monitor.

Code: Select all

root@odroid:~# cat /sys/class/drm/card0-HDMI-A-1/status 
connected
root@odroid:~# cat /sys/class/drm/card0-HDMI-A-1/modes
1920x1080
1920x1080i
1920x1080
1920x1080i
1680x1050
1280x1024
1440x900
1280x960
1280x720
1280x720
1024x768
800x600
800x600
720x576
720x480
720x480
640x480
You said it's working with setenv videoconfig "video=HDMI-A-1:1280x720@60"
and I think you can find 1280x720 mode under the node and switch to another resolution using one of the modes shown in the sys class node.
It means the edid from your monitor is already working.
Could you check this?

joy
Posts: 1584
Joined: Fri Oct 02, 2015 1:44 pm
languages_spoken: english
ODROIDs: .
Has thanked: 179 times
Been thanked: 210 times

Re: Resolution & Display Settings

Post by joy »

And also you can check if the edid from your projector is read as following.

Code: Select all

$ sudo apt-get install edid-decode
$ cat /sys/class/drm/card0-HDMI-A-1/edid | edid-decode
Then the edid information is shown as following example.
If you get this normal information, it's already working with your edid
and the problem is not related to edid but need to consider another approach.

Code: Select all

Extracted contents:
header:          00 ff ff ff ff ff ff 00
serial number:   05 e3 69 22 3b 00 00 00 29 17
version:         01 03
basic params:    80 30 1b 78 2a
chroma info:     43 f5 a7 56 53 9c 26 10 50 54
established:     bf ef 00
standard:        d1 c0 b3 00 95 00 81 80 81 40 81 c0 01 01 01 01
descriptor 1:    02 3a 80 18 71 38 2d 40 58 2c 45 00 dd 0c 11 00 00 1e
descriptor 2:    00 00 00 fd 00 32 4c 1e 53 11 00 0a 20 20 20 20 20 20
descriptor 3:    00 00 00 fc 00 32 32 36 39 57 4d 0a 20 20 20 20 20 20
descriptor 4:    00 00 00 ff 00 42 45 57 44 41 39 41 30 30 30 30 35 39
extensions:      01
checksum:        41

Manufacturer: AOC Model 2269 Serial Number 59
Made week 41 of 2013
EDID version: 1.3
Digital display
Maximum image size: 48 cm x 27 cm
Gamma: 2.20
DPMS levels: Off
Supported color formats: RGB 4:4:4, YCrCb 4:2:2
First detailed timing is preferred timing
Established timings supported:
  720x400@70Hz
  640x480@60Hz
  640x480@67Hz
  640x480@72Hz
  640x480@75Hz
  800x600@56Hz
  800x600@60Hz
  800x600@72Hz
  800x600@75Hz
  832x624@75Hz
  1024x768@60Hz
  1024x768@70Hz
  1024x768@75Hz
  1280x1024@75Hz
Standard timings supported:
  1920x1080@60Hz
  1680x1050@60Hz
  1440x900@60Hz
  1280x1024@60Hz
  1280x960@60Hz
  1280x720@60Hz
Detailed mode: Clock 148.500 MHz, 477 mm x 268 mm
               1920 2008 2052 2200 hborder 0
               1080 1084 1089 1125 vborder 0
               +hsync +vsync 
Monitor ranges (GTF): 50-76Hz V, 30-83kHz H, max dotclock 170MHz
Monitor name: 2269WM
Serial number: BEWDA9A000059
Has 1 extension blocks
Checksum: 0x41 (valid)

CEA extension block
Extension version: 3
26 bytes of CEA data
  Video data block
    VIC 05 1920x1080i@60Hz 
    VIC 20 1920x1080i@50Hz 
    VIC 16 1920x1080@60Hz 
    VIC 31 1920x1080@50Hz 
    VIC 04 1280x720@60Hz 
    VIC 19 1280x720@50Hz 
    VIC 03 720x480@60Hz 
    VIC 18 720x576@50Hz 
    VIC 02 720x480@60Hz 
    VIC 17 720x576@50Hz 
    VIC 01 640x480@60Hz 
  Audio data block
    Linear PCM, max channels 1
    Supported sample rates (kHz): 48 44.1 32
    Supported sample sizes (bits): 24 20 16
  Speaker allocation data block
  Vendor-specific data block, OUI 000c03 (HDMI)
    Source physical address 1.0.0.0
Underscans PC formats by default
Basic audio support
Supports YCbCr 4:4:4
Supports YCbCr 4:2:2
1 native detailed modes
Detailed mode: Clock 27.000 MHz, 477 mm x 268 mm
                720  736  798  858 hborder 0
                480  489  495  525 vborder 0
               -hsync -vsync 
Detailed mode: Clock 74.250 MHz, 477 mm x 268 mm
               1280 1390 1430 1650 hborder 0
                720  725  730  750 vborder 0
               +hsync +vsync 
Detailed mode: Clock 27.000 MHz, 477 mm x 268 mm
                720  736  798  858 hborder 0
                480  489  495  525 vborder 0
               -hsync -vsync 
Detailed mode: Clock 27.000 MHz, 477 mm x 268 mm
                720  732  796  864 hborder 0
                576  581  586  625 vborder 0
               -hsync -vsync 
Checksum: 0x4b (valid)

Aeronaut
Posts: 23
Joined: Mon Aug 31, 2015 6:38 pm
languages_spoken: english, german
ODROIDs: ODROID-XU4
Has thanked: 0
Been thanked: 0
Contact:

Re: Resolution & Display Settings

Post by Aeronaut »

Hello joy,
joy wrote: Pre-built edid binaries are included in kernel image and hardcoded.

Code: Select all

kernel/firmware/edid/
We're checking if it's possible to force custom edid located in file systems or something.
Please give us several days to check it.
Sure ;-)
joy wrote: And I want to share the basic rule of videoconfig.
Please check the followings.
When you comment all off videoconfig, XU4 read edid data of the monitor that is connected
and parse the information.

Code: Select all

## Block all of videoconfig
# setenv videoconfig "video=HDMI-A-1:1280x800@60"
# setenv videoconfig "drm_kms_helper.edid_firmware=edid/1280x800.bin"
...
...
# setenv videoconfig "drm_kms_helper.edid_firmware=edid/480x800.bin"
You can find the edid information as following.
Here is an example with my AOC monitor.

Code: Select all

root@odroid:~# cat /sys/class/drm/card0-HDMI-A-1/status 
connected
root@odroid:~# cat /sys/class/drm/card0-HDMI-A-1/modes
1920x1080
1920x1080i
1920x1080
1920x1080i
1680x1050
1280x1024
1440x900
1280x960
1280x720
1280x720
1024x768
800x600
800x600
720x576
720x480
720x480
640x480
I'm using the boot.ini.default to configure... Projector is powered off, commented out the videoconfig= in boot.ini.default followed by

Code: Select all

$ dpkg-reconfigure bootini
$ sync
$ reboot
...Welcome to Ubuntu 16.04.3 LTS (GNU/Linux 4.14.12-99 armv7l)...
$ cat /sys/class/drm/card0/card0-HDMI-A-1/status
disconnected
$ cat /sys/class/drm/card0/card0-HDMI-A-1/modes
Projector powered on:

Code: Select all

$ cat /sys/class/drm/card0/card0-HDMI-A-1/status
connected
$ cat /sys/class/drm/card0/card0-HDMI-A-1/modes
1920x1080i
1920x1080
1920x1080
1920x1080i
1920x1080
1280x720
1280x720
720x576
720x480
720x480
640x480
Powered off again:

Code: Select all

$ cat /sys/class/drm/card0/card0-HDMI-A-1/status
disconnected
$ cat /sys/class/drm/card0/card0-HDMI-A-1/modes
joy wrote: You said it's working with setenv videoconfig "video=HDMI-A-1:1280x720@60"
and I think you can find 1280x720 mode under the node and switch to another resolution using one of the modes shown in the sys class node.
It means the edid from your monitor is already working.
Could you check this?
It worked with 4.9.61-73, when the Projector was powered on once, after powering it off X still comes up... Cant tell you what cat /sys/class/drm/card0/card0-HDMI-A-1/status returned with 4.9.61-73 after turning it off... Now with 4.14.12-99 X doesn't come up when Projector if off...

Code: Select all

cat /sys/class/drm/card0/card0-HDMI-A-1/edid | edid-decode > edid-decode.txt
edid-decode.txt attached...
Will

Code: Select all

cat /sys/class/drm/card0/card0-HDMI-A-1/edid > ax200e.bin
give me the binary format needed in kernel image?
Attachments
edid-decode.txt
(2.79 KiB) Downloaded 181 times

joy
Posts: 1584
Joined: Fri Oct 02, 2015 1:44 pm
languages_spoken: english
ODROIDs: .
Has thanked: 179 times
Been thanked: 210 times

Re: Resolution & Display Settings

Post by joy »

Hi Aeronaut,
It looks when your projector is turned on, it's ok to read/parse edid and operate it.
You can use the binary as a pre-built edid format under kernel/firmware/edid

Code: Select all

cat /sys/class/drm/card0/card0-HDMI-A-1/edid > ax200e.bin
but you need to edit odoridxu4_defconfig first and built kernel source.

joy
Posts: 1584
Joined: Fri Oct 02, 2015 1:44 pm
languages_spoken: english
ODROIDs: .
Has thanked: 179 times
Been thanked: 210 times

Re: Resolution & Display Settings

Post by joy »

Hi Aeronaut,

I found an instruction for custom edid without kernel build.
Could you try this?

1. Copy the edid from your monitor into /lib/firmware/ directory
- block all of videoconfig in boot.ini then reboot

Code: Select all

cat /sys/class/drm/card0/card0-HDMI-A-1/edid > /lib/firmware/ax200e.bin
or if you have the ax200e.bin in your local place, just copy it in /lib/firmware/

2. Add edid_firmware path in boot.ini with drm_kms_helper parameter
setenv videoconfig "drm_kms_helper.edid_firmware=ax200e.bin"

3. Reboot
Then, reboot

4. Check if custom edid is working now
Now the edid is running.
You can check it as following.

Code: Select all

root@odroid:/# cat /sys/module/drm_kms_helper/parameters/edid_firmware 
ax200e.bin
That's it.
Try this, then could you let me know the result? :)

Aeronaut
Posts: 23
Joined: Mon Aug 31, 2015 6:38 pm
languages_spoken: english, german
ODROIDs: ODROID-XU4
Has thanked: 0
Been thanked: 0
Contact:

Re: Resolution & Display Settings

Post by Aeronaut »

Code: Select all

$ ls -al /lib/firmware/ax200e.bin
-rw-r--r-- 1 root root 256 Jan 10 09:28 /lib/firmware/ax200e.bin
$ cat /media/boot/boot.ini | grep ax200e
setenv videoconfig "drm_kms_helper.edid_firmware=ax200e.bin"
$ reboot
...
$ cat /sys/module/drm_kms_helper/parameters/edid_firmware
ax200e.bin
X comes up even Projector is off. I will check the Picture (if there is black area on left and cut off on the right) later... But since it seems to use the extracted edid it shouldn't.
:D

joy
Posts: 1584
Joined: Fri Oct 02, 2015 1:44 pm
languages_spoken: english
ODROIDs: .
Has thanked: 179 times
Been thanked: 210 times

Re: Resolution & Display Settings

Post by joy »

Aeronaut wrote:

Code: Select all

$ ls -al /lib/firmware/ax200e.bin
-rw-r--r-- 1 root root 256 Jan 10 09:28 /lib/firmware/ax200e.bin
$ cat /media/boot/boot.ini | grep ax200e
setenv videoconfig "drm_kms_helper.edid_firmware=ax200e.bin"
$ reboot
...
$ cat /sys/module/drm_kms_helper/parameters/edid_firmware
ax200e.bin
X comes up even Projector is off. I will check the Picture (if there is black area on left and cut off on the right) later... But since it seems to use the extracted edid it shouldn't.
:D
Thank you for the feedback.
It seems this approach is working and running well with X.
If there is any issue, please let me know.
It will be very helpful to support other forum users. :)
Thanks!

Aeronaut
Posts: 23
Joined: Mon Aug 31, 2015 6:38 pm
languages_spoken: english, german
ODROIDs: ODROID-XU4
Has thanked: 0
Been thanked: 0
Contact:

Re: Resolution & Display Settings

Post by Aeronaut »

I had an issue... When powering on Projector after starting X no picture will appear...
I set

Code: Select all

HPD=false
what does fix this too... Obviously this would always make sense when

Code: Select all

cat /sys/class/drm/card0/card0-HDMI-A-1/status
returns disconnected...

joy
Posts: 1584
Joined: Fri Oct 02, 2015 1:44 pm
languages_spoken: english
ODROIDs: .
Has thanked: 179 times
Been thanked: 210 times

Re: Resolution & Display Settings

Post by joy »

When board is booting up, is the projector in off state? then after booting, turned on?
I haven't tried the pattern.
I will try it.

And could you check with HPD=true?

Aeronaut
Posts: 23
Joined: Mon Aug 31, 2015 6:38 pm
languages_spoken: english, german
ODROIDs: ODROID-XU4
Has thanked: 0
Been thanked: 0
Contact:

Re: Resolution & Display Settings

Post by Aeronaut »

The Odroid is up all the time acting as file server and there is a small script toggling on and off Kodi (using X11) when pressing a Button on a Remote...

The projector is usually off when restarting the Odroid and
when booting with HPD=true:

Code: Select all

cat /sys/class/drm/card0/card0-HDMI-A-1/status
disconnected
When toggling on the projector:

Code: Select all

cat /sys/class/drm/card0/card0-HDMI-A-1/status
connected
The problem here is, that when I try to kill X when the projector is off it will freeze and I need to SysRQ-B/reset...

When booting with HPD=false:

Code: Select all

cat /sys/class/drm/card0/card0-HDMI-A-1/status
is always connected and it doesn't freeze.

I understand that this is just a workaround. A really solution should be that the Odroid detect HDMI as connected even if my projector is powered off...

Interesting:
HPD=true, projector off

Code: Select all

$ cat /sys/class/drm/card0/card0-HDMI-A-1/status
disconnected
$ cat /proc/interrupts | grep hdmi
147:          1          0          0          0          0          0          0          0  exynos4210_wkup_irq_chip   7 Edge      hdmi
The interrupt already got triggered after boot what should logically mean, that there is something attached... It counts up, when toggling the projector on and off or pulling out/in HDMI Plug... Do I understand right, that this means that there is no Hardware / Cable fault?

joy
Posts: 1584
Joined: Fri Oct 02, 2015 1:44 pm
languages_spoken: english
ODROIDs: .
Has thanked: 179 times
Been thanked: 210 times

Re: Resolution & Display Settings

Post by joy »

I think it's not hardware or cable fault.

I will try to reproduce it same as you.
So far I have no idea (1) freeze with HPD=true (2) no picture with HPD=false. :(

Give me a couple of days more.

Aeronaut
Posts: 23
Joined: Mon Aug 31, 2015 6:38 pm
languages_spoken: english, german
ODROIDs: ODROID-XU4
Has thanked: 0
Been thanked: 0
Contact:

Re: Resolution & Display Settings

Post by Aeronaut »

You have no picture with HPD=false?

joy
Posts: 1584
Joined: Fri Oct 02, 2015 1:44 pm
languages_spoken: english
ODROIDs: .
Has thanked: 179 times
Been thanked: 210 times

Re: Resolution & Display Settings

Post by joy »

No.
In my side, there are different patterns from you
and I couldn't reproduce the same issue that you have. :(

Here is my instruction and test result.

I don't have projector so use a normal hdmi monitor that supports various display modes.
(1) turn off the monitor and XU4
(2) turn on XU4 only
(3) after booting done, turn on the monitor

1. HPD=false
I have no issue in this case.
When I turn on the monitor, I can see ubuntu log-in display.

2. HPD=true
I have no picture in this case.
So far I could't reproduce board lock-up that you mentioned.
There is no modes under card0-HDMI-A-1 and status is disconnected.
And at this stage, I've tried the following and now I have a normal screen of ubuntu log-in display.

Code: Select all

$ sudo service lightdm restart
Could you try this command when you have a black screen?
I'm not sure if it's working but just try.

Aeronaut
Posts: 23
Joined: Mon Aug 31, 2015 6:38 pm
languages_spoken: english, german
ODROIDs: ODROID-XU4
Has thanked: 0
Been thanked: 0
Contact:

Re: Resolution & Display Settings

Post by Aeronaut »

joy wrote:No.
In my side, there are different patterns from you
and I couldn't reproduce the same issue that you have. :(

Here is my instruction and test result.

I don't have projector so use a normal hdmi monitor that supports various display modes.
(1) turn off the monitor and XU4
(2) turn on XU4 only
(3) after booting done, turn on the monitor

1. HPD=false
I have no issue in this case.
When I turn on the monitor, I can see ubuntu log-in display.

2. HPD=true
I have no picture in this case.
So far I could't reproduce board lock-up that you mentioned.
There is no modes under card0-HDMI-A-1 and status is disconnected.
And at this stage, I've tried the following and now I have a normal screen of ubuntu log-in display.

Code: Select all

$ sudo service lightdm restart
Could you try this command when you have a black screen?
I'm not sure if it's working but just try.
I experienced the same. No issue with HPD=false, just with HPD=true... I don't use LightDM... Here is how I start Kodi:

Code: Select all

$ cat /etc/systemd/system/kodi.socket
[Unit]
Conflicts=kodi.service

[Socket]
ListenStream=8080

[Install]
WantedBy=sockets.target

$ cat /etc/systemd/system/kodi.service
[Unit]
Description=Launch Kodi on main display

[Service]
Type=oneshot
Environment=DISPLAY=:0.0
Environment=AE_SINK=ALSA
Nice=-1
ExecStart=/bin/chmod 664 /sys/class/graphics/fbcon/cursor_blink
ExecStart=/usr/bin/kodi-alsa
ExecStartPost=/bin/bash -c "sleep 5 && systemctl start kodi.socket"

[Install]
WantedBy=multi-user.target

$ cat /usr/bin/kodi-alsa
#! /bin/bash
# start kodi with ALSA
set AE_SINK=ALSA
/usr/bin/xinit /bin/su -c /usr/bin/kodi odroid
exit 0
This allows me to start Kodi by Browsing to the Web-Interface (ex: http://<ip of odroid>:8080)

joy
Posts: 1584
Joined: Fri Oct 02, 2015 1:44 pm
languages_spoken: english
ODROIDs: .
Has thanked: 179 times
Been thanked: 210 times

Re: Resolution & Display Settings

Post by joy »

Aeronaut wrote: I experienced the same. No issue with HPD=false, just with HPD=true... I don't use LightDM...
To make sure, I will ask one.
Do you mean it works normally with HPD=false after custom edid is applied?
You said that you got "no screen with HPD=false" and "freeze issue with HPD=true" before.

Aeronaut
Posts: 23
Joined: Mon Aug 31, 2015 6:38 pm
languages_spoken: english, german
ODROIDs: ODROID-XU4
Has thanked: 0
Been thanked: 0
Contact:

Re: Resolution & Display Settings

Post by Aeronaut »

joy wrote:
Aeronaut wrote: I experienced the same. No issue with HPD=false, just with HPD=true... I don't use LightDM...
To make sure, I will ask one.
Do you mean it works normally with HPD=false after custom edid is applied?
You said that you got "no screen with HPD=false" and "freeze issue with HPD=true" before.
Oh, now I'm confused... Maybe its some grammatical mistake... Where you read that?
HPD=true and custom edid-firmware freezes X on stop.
HPD=false and custom edid-firmware works for me.

What I thought is, that

Code: Select all

cat /sys/class/drm/card0/card0-HDMI-A-1/status
should return "connected" with HPD=true and Projector powered off but HDMI-cable still connected...

Maybe HPD should/could work in a way that `cat /sys/class/drm/card0/card0-HDMI-A-1/status` returns "connected, powered_off" / "connected, powered_on" / "disconnected" - what would be more informational and self-explaining...
What /sys/class/drm/card0/card0-HDMI-A-1/status reports, is the power-status of the Monitor/Projector but not directly the cable status...

Code: Select all

cat /sys/class/drm/card0/card0-HDMI-A-1/status
No HDMI connected - Is: "disconnected" - Expected: "disconnected"
Monitor/Projector off - Is: "disconnected" - Expected: "connected" - Maybe in Future: "connected,powered_off"
Monitor/Projector on - Is: "connected" - Expected: "connected" - Maybe in Future: "connected,powered_on"

If this could be implemented it will be awesome!

What is the relationship between HPD and .../card0-HDMI-A-1/status ? Maybe there is a way to trace back in source code? I just don't know where to start, maybe you can give me an hint?

joy
Posts: 1584
Joined: Fri Oct 02, 2015 1:44 pm
languages_spoken: english
ODROIDs: .
Has thanked: 179 times
Been thanked: 210 times

Re: Resolution & Display Settings

Post by joy »

Aeronaut wrote: Oh, now I'm confused... Maybe its some grammatical mistake... Where you read that?
HPD=true and custom edid-firmware freezes X on stop.
HPD=false and custom edid-firmware works for me.
I see. I got you still have the same issue.
The problem is I can't reproduce the same pattern as you do with your projector.
By my side, with HPD=false, I can get the screen at the moment when I turn on my monitor.
Hmm...
Aeronaut wrote: What I thought is, that

Code: Select all

cat /sys/class/drm/card0/card0-HDMI-A-1/status
should return "connected" with HPD=true and Projector powered off but HDMI-cable still connected...
The status "connected" means board got the edid information from the monitor.
I don't think it says just cable is connected to the board.
For example, how should it works without a monitor but just with cable connected?
With some of monitors I checked, XU4 can read edid even though monitors are off
and another some have different result, board can't read edid when the monitor is in off state.
And the point is we need to figure out why XU4 can't get the projector's edid at the moment when you turn on the projector.

Can I ask one more?
The following status, does your XU4 get edid normally?
- HPD=false
- projector is in power off state.
- after booting, how is the modes? and can you read edid data with the following command?

Code: Select all

cat /sys/cat /sys/class/drm/card0/card0-HDMI-A-1/edid | edid-decode
Aeronaut wrote: Maybe HPD should/could work in a way that `cat /sys/class/drm/card0/card0-HDMI-A-1/status` returns "connected, powered_off" / "connected, powered_on" / "disconnected" - what would be more informational and self-explaining...
What /sys/class/drm/card0/card0-HDMI-A-1/status reports, is the power-status of the Monitor/Projector but not directly the cable status...
No HDMI connected - Is: "disconnected" - Expected: "disconnected"
Monitor/Projector off - Is: "disconnected" - Expected: "connected" - Maybe in Future: "connected,powered_off"
Monitor/Projector on - Is: "connected" - Expected: "connected" - Maybe in Future: "connected,powered_on"

If this could be implemented it will be awesome!
Sorry,
It's a long term job because the general Linux drm driver should be modified
and I don't want the approach, nor custom modification of Linux drm driver.


And I will try two more,
(1) forced off or disconnect that my monitor can't send edid to my board.
(2) figure out black screen with HPD=true : I can't reproduce the freeze with my monitor as you said. :(

joy
Posts: 1584
Joined: Fri Oct 02, 2015 1:44 pm
languages_spoken: english
ODROIDs: .
Has thanked: 179 times
Been thanked: 210 times

Re: Resolution & Display Settings

Post by joy »

Could you explain your test environment again?
You said you don't use lightdm but use kodi.
Is it enough that I could sync with your environment with this script?
Or do I need to adjust other system parameters?

Code: Select all

$ cat /etc/systemd/system/kodi.socket
[Unit]
Conflicts=kodi.service

[Socket]
ListenStream=8080

[Install]
WantedBy=sockets.target

$ cat /etc/systemd/system/kodi.service
[Unit]
Description=Launch Kodi on main display

[Service]
Type=oneshot
Environment=DISPLAY=:0.0
Environment=AE_SINK=ALSA
Nice=-1
ExecStart=/bin/chmod 664 /sys/class/graphics/fbcon/cursor_blink
ExecStart=/usr/bin/kodi-alsa
ExecStartPost=/bin/bash -c "sleep 5 && systemctl start kodi.socket"

[Install]
WantedBy=multi-user.target

$ cat /usr/bin/kodi-alsa
#! /bin/bash
# start kodi with ALSA
set AE_SINK=ALSA
/usr/bin/xinit /bin/su -c /usr/bin/kodi odroid
exit 0
And do you have the same issue with Hardkernel XU4 official release image?
https://wiki.odroid.com/odroid-xu4/os_i ... buntu_4.14

joy
Posts: 1584
Joined: Fri Oct 02, 2015 1:44 pm
languages_spoken: english
ODROIDs: .
Has thanked: 179 times
Been thanked: 210 times

Re: Resolution & Display Settings

Post by joy »

Hello Aeronaut
Have you tried this boot.ini option?

Code: Select all

setenv videoconfig "drm_kms_helper.edid_firmware=edid/1280x720.bin"
setenv HPD "false"
As I analyze your environment, it looks it works as detached physically when the power is off.
I tried to reproduce these cases and I think the option should work by your side, too.

Code: Select all

1. auto detection without forced videoconfig && hdmi connected && monitor poweroff
(1) HPD=true / (2) HPD=false
when the monitor is turned on, I can get a normal display screen.

2. auto detection without forced videoconfig && hdmi disconnected && monitor poweroff
(1) HPD=true
after power on, status disconnected
when the monitor is turned on, then modes list is shown but black screen and status is changed to connected.
Try service lightdm restart => then, get a normal screen
(2) HPD=false
after power on, status connected by default.
when the monitor is turned on, then modes list is shown but black screen.
Try service lightdm restart => then, get a normal screen

3. auto detection without forced videoconfig, 1280x720 && hdmi connected && monitor poweroff
(1) HPD=true
no modes, status disconnected
when I attach the HDMI cable and turn on the monitor, mode=1280x720 and status=connected, but black screen
Try service lightdm restart => then, get a normal screen with 1280x720
(2) HPD=false
after booting status=connected, modes=1280x720 by default
when I attach the HDMI cab;e, then I can get a normal screen soon.
I've tried your script but no changes of screen.
If you still have the black screen issue, only remaining point is difference of kodi and lightdm setting between you and me.
Actually I don't understand your kodi setup that you said.

Aeronaut
Posts: 23
Joined: Mon Aug 31, 2015 6:38 pm
languages_spoken: english, german
ODROIDs: ODROID-XU4
Has thanked: 0
Been thanked: 0
Contact:

Re: Resolution & Display Settings

Post by Aeronaut »

joy wrote:Hello Aeronaut
Have you tried this boot.ini option?

Code: Select all

setenv videoconfig "drm_kms_helper.edid_firmware=edid/1280x720.bin"
setenv HPD "false"
As I analyze your environment, it looks it works as detached physically when the power is off.
I tried to reproduce these cases and I think the option should work by your side, too.
First post:
Aeronaut wrote:At the moment I workaround the issue with

Code: Select all

setenv videoconfig "drm_kms_helper.edid_firmware=edid/1280x720.bin"
what brings X11 up when Projector is off, but shows black on left ~150px and cuts off on the right when on.
joy wrote:Could you explain your test environment again?
You said you don't use lightdm but use kodi.
Is it enough that I could sync with your environment with this script?
Or do I need to adjust other system parameters?

And do you have the same issue with Hardkernel XU4 official release image?
https://wiki.odroid.com/odroid-xu4/os_i ... buntu_4.14
I will try to explain as best I can...
I started from Ubuntu 16.04.x Server Image... I don't know exact from which point release, but now I have running 16.04.3...
(Maybe) relevant source.list's:

Code: Select all

$ cat /etc/apt/sources.list.d/odroid.list
deb http://deb.odroid.in/5422-s/ xenial main
$ cat /etc/apt/sources.list.d/libretro-ubuntu-testing-xenial.list
deb http://ppa.launchpad.net/libretro/testing/ubuntu xenial main
Installed packages: kodi kodi-bin kodi-data kodi-eventclients-common xserver-xorg-video-armsoc-exynos mali-x11 xinit

I remember, that I experienced trouble libmesa* conflicting mali-x11 libs, to avoid this do:

Code: Select all

rm /usr/lib/arm-linux-gnueabihf/libGLESv2.so /usr/lib/arm-linux-gnueabihf/libGLESv1_CM.so /usr/lib/arm-linux-gnueabihf/libOpenCL.so
apt install --reinstall mali-x11
You can run Kodi without any desktop manager (in your case its lightdm) in standalone mode using:

Code: Select all

/usr/bin/xinit `which kodi`
The systemd things and kodi-alsa script aren't relevant... I just use it to start with force of use ALSA instead of Pulseaudio and starting Kodi by Yatse, Web Interface or IR-Remote... These parts are very experimental and at least the IR part will just work if you have a Ortek Technology, Inc. IR receiver [VRC-1100 Vista MCE Remote Control] (05a4:9881), if you are interested in these I can share it...

Post Reply

Return to “General Topics”

Who is online

Users browsing this forum: No registered users and 2 guests