Kodi on Ubuntu: x11 or fbdev?

Post Reply
circulosmeos
Posts: 31
Joined: Tue Jul 25, 2017 2:34 am
languages_spoken: english
ODROIDs: ODROID-C2
Has thanked: 8 times
Been thanked: 0
Contact:

Kodi on Ubuntu: x11 or fbdev?

Post by circulosmeos »

I'm using Kodi following these instructions to use Kodi instead of mate desktop: viewtopic.php?t=22386
(basically: /usr/bin/xinit /usr/bin/dbus-launch --exit-with-session /usr/bin/kodi-standalone -- :0 -nolisten tcp vt7)

But I'm wondering if I should use kodi-fbdev instead (uninstalling mali-x11 and installing mali-fbdev):
which would be the difference?

User avatar
odroid
Site Admin
Posts: 35266
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean, Japanese
ODROIDs: ODROID
Has thanked: 1074 times
Been thanked: 822 times
Contact:

Re: Kodi on Ubuntu: x11 or fbdev?

Post by odroid »

If you don't need any desktop manager on X11, kodi-fbdev + mali-fbdev on the minimal image will be a much lighter solution.
https://wiki.odroid.com/odroid-c2/os_im ... imal_image

circulosmeos
Posts: 31
Joined: Tue Jul 25, 2017 2:34 am
languages_spoken: english
ODROIDs: ODROID-C2
Has thanked: 8 times
Been thanked: 0
Contact:

Re: Kodi on Ubuntu: x11 or fbdev?

Post by circulosmeos »

well, I love to have both a computer and Kodi running at the same time, X11 included, that I can use via RDP (even if not accelerated at all).

What I'm wondering is if the mali-fbdev + kodi-fbdev may be more efficient/quick than mali-x11.

PS: I'm having issues with Kodi on 4k, and the only guess I have now is mali-x11/mali-fbdev (a clean coreelec runs smoothly!).

PS2: I'd have post this on "CoreELEC/LibreELEC - Kodi Project for C1/C2" subforum. Maybe an op can move this :?

circulosmeos
Posts: 31
Joined: Tue Jul 25, 2017 2:34 am
languages_spoken: english
ODROIDs: ODROID-C2
Has thanked: 8 times
Been thanked: 0
Contact:

Re: Kodi on Ubuntu: x11 or fbdev?

Post by circulosmeos »

I've changed to kodi-fbdev, but I still have issues with 4k: every time I select a resolution over 1920x1080, the image is restricted to the the superior-left-quarter of the screen (it is not windowed: the option is greyed...).

I can select the Kodi option to "Adjust refresh rate", but in this case, the Kodi GUI is still restricted to that quarter. I've been able somehow to reproduce 4k at full screen with "Adjust refresh rate" whilst Kodi GUI is just 1080p, but GUI is still restricted to that quarter (when stopping or otherwise using Kodi), so it seems to be something failing with Kodi?
Any ideas?

I'm using a Samsung Q60R TV. I attach edid.bin and display.bin.
Attachments
edid+display.tar
(10 KiB) Downloaded 33 times

User avatar
odroid
Site Admin
Posts: 35266
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean, Japanese
ODROIDs: ODROID
Has thanked: 1074 times
Been thanked: 822 times
Contact:

Re: Kodi on Ubuntu: x11 or fbdev?

Post by odroid »

Kodi OpenGL-ES GUI screen is limited at Full-HD resolution while the video playback(VPU) layer is 4K.
This is a common limitation on Amlogic devices like C2 as well as N2 due to 4K GUI rendering needs more performance than Mali GPU capability.

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

Re: Kodi on Ubuntu: x11 or fbdev?

Post by joy »

As odroid mentioned, KODI supports max Full-HD resolution "GUI"
and when you try 4K, it will keep 1920x1080 size GUI screen that is scaled down even though HDMI output is 4K and also video output is 4K.

About the restricted GUI display....
To make sure, can I check one?
Do you have restricted display also with 4K resolution?
Your monitor supports 2160p30hz as I checked based on the attachment edid+display.tar
and in this case, KODI should show normal GUI display even though its "GUI" resolution is 1920x1080.

And can you share display captures when you have the display issue with one or two sample of resolutions over 1920x1080?
These users thanked the author joy for the post:
circulosmeos (Mon Dec 16, 2019 7:18 am)

circulosmeos
Posts: 31
Joined: Tue Jul 25, 2017 2:34 am
languages_spoken: english
ODROIDs: ODROID-C2
Has thanked: 8 times
Been thanked: 0
Contact:

Re: Kodi on Ubuntu: x11 or fbdev?

Post by circulosmeos »

When i switch Kodi GUI resolution, TV resolution changes accordingly: I can see TV resolution with an "info" button that shows info in an upper screen band that I've included in the captures:
001: Kodi GUI resolution is 1920x1080 60Hz
002: change Kodi GUI resolution to 4k 30 Hz
003: playing 4k video whilst pausing reproduction to show Kodi controls (with "Adjust refresh rate" on Start/Stop activated: that's why freq is 24Hz now, following video specs)
004: playing 4k video whilst pausing reproduction to show Kodi controls (without "Adjust refresh rate")

The difference between 003 and 004 about kodi GUI transparency is just some of the incoherencies that I found between retries, not something related to that particular test (afaik).

I've run Kodi using both "/usr/bin/xinit /usr/bin/dbus-launch --exit-with-session /usr/bin/kodi-standalone -- :0 -nolisten tcp vt7", or "/usr/bin/kodi-standalone", as kodi user. With the latter, running as root, I can even obtain playing of a 4k video restricted to the quarter: see 005.

PS: I see other problems like Kodi GUI going to black after exactly 10 minutes from start (and this (consoleblank=0 no_console_suspend) doesn't solve it), or Kodi not detecting 4k 50 or 60 Hz modes which are also available and in theory supported on C2.
Attachments
001.jpg
001.jpg (147 KiB) Viewed 2866 times
002.(bg blurred on purpose).jpg
002.(bg blurred on purpose).jpg (127.42 KiB) Viewed 2866 times
003.jpg
003.jpg (109.24 KiB) Viewed 2866 times
004.jpg
004.jpg (120.84 KiB) Viewed 2866 times
005.jpg
005.jpg (106.02 KiB) Viewed 2866 times

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

Re: Kodi on Ubuntu: x11 or fbdev?

Post by joy »

Hi circulosmeos,
Thank you for sharing the detailed information.
Let me check and reproduce it today.

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

Re: Kodi on Ubuntu: x11 or fbdev?

Post by joy »

Hi circulosmeos,
Do you use a version of CoreELEC or LibreELEC?

On Ubuntu mate image and with built-in KODI,
I've checked KODI with some resolutions over 1920x1080 including 3840x2160p60/30Hz
and confirmed KODI GUI works normally.
The following is my test environment with Hardkernel Ubuntu image.
https://wiki.odroid.com/odroid-c2/os_images/ubuntu/v3.1

Code: Select all

Operating system: Ubuntu 18.04.3 LTS (kernel: Linux 3.16.78-48)
KODI Version Info:
Build: Kodi 17.6 Git:2018-07-03-5d07af3-dirty
Compiled: Jun 19 2018
In my case, I got same GUI resolution of KODI according to hdmi resolution from /sys/class/display/mode.
Please note that it may be scaled size from 1920x1080.
ex) hdmimode 2560x1600

Code: Select all

$ cat /sys/class/graphics/fb0/virtual_size 
2560,1600
Also I've tried the command you shared after setting all up based on the forum link,
and got a same result. It works well.
circulosmeos wrote:
Sun Nov 10, 2019 7:41 am
I'm using Kodi following these instructions to use Kodi instead of mate desktop: viewtopic.php?t=22386
(basically: /usr/bin/xinit /usr/bin/dbus-launch --exit-with-session /usr/bin/kodi-standalone -- :0 -nolisten tcp vt7)
Could you share which image you use and KODI versions?
- Ubuntu? CoreELEC? or LibreELEC?
- KODI Version?
These users thanked the author joy for the post:
circulosmeos (Tue Dec 17, 2019 8:27 pm)

circulosmeos
Posts: 31
Joined: Tue Jul 25, 2017 2:34 am
languages_spoken: english
ODROIDs: ODROID-C2
Has thanked: 8 times
Been thanked: 0
Contact:

Re: Kodi on Ubuntu: x11 or fbdev?

Post by circulosmeos »

thanks for the hard work!

Kodi GUI didn't disappear after 10 minutes? (even if a playing continued as usual!)

I use an Ubuntu 18.04 upgraded from 16.04 using `apt dist-upgrade` + `do-release-upgrade`:

Code: Select all

Ubuntu 18.04.3 LTS
Linux odroid64 3.16.75-47 #1 SMP PREEMPT Sat Oct 19 14:21:52 -03 2019 aarch64 aarch64 aarch64 GNU/Linux
Kodi is kodi-fbdev + kodi-fbdev-bin + kodi-fbdev-data installed with apt (after removing kodi + mali-x11), which in my case are all:

Code: Select all

2:17.7+hk2-odroidc2ubuntu21
With mali-fbdev also installed with apt:

Code: Select all

20180710-r6p1-10
I've also tested CoreELEC (because at first I thought it was a TV issue) and it works flawlessly on this ODROID-C2 + TV :o

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

Re: Kodi on Ubuntu: x11 or fbdev?

Post by joy »

Hi circulosmeos,
Thanks for sharing it! :)

I've adjusted my Ubuntu image based on your guide
and now mali-fbdev, kodi-fbdev (kodi-fbdev-bin/data) have been installed.
In my case, all test results are not same as you (some points are a bit different), but I can reproduce KODI GUI issue with kodi-fbdev. (2:17.7+hk2-odroidc2ubuntu21)

During runtime, KODI tries to change hdmi and osd parameters.
And it looks this issue is related to fb scaling sequence.
So far, I haven't found a correct solution and I need more time.

But I found an workaround.
So could you try the following to run KODI-fbdev with 2160p30hz display mode?

1. Booting with manual display mode 2160p30hz
- please modify boot.inig as following.

Code: Select all

### change display_autodetect to false
### setenv display_autodetect "true"
setenv display_autodetect "false"

### change mode to 2160p30hz
### block 1080p60hz
## setenv m "1080p60hz" # Progressive 60Hz
### open 2160p30hz
setenv m "2160p30hz"    # Progressive 30Hz
Then, reboot.
After reboot, you can check display mode here.

Code: Select all

# cat /sys/class/display/mode 
2160p30hz
2. Run Kodi with user id "root"
Still you will have the restricted GUI.

Please note that you need to use root ID because user id, odroid, can not change fb factors according to KODI's forced setup sequence
and it makes this GUI issue.

3. Change resolution from system setting menu.
Please select another resolution and then, re-select 3840x2160p30hz.
From this process, KODI tries to changes fb parameters through sysfs, then I can have normal KODI GUI and movie player display.

Actually this approach is not a fundamental solution to this issue but, it must take a bit long time to solve it, I think.
So could you try this and check if it works with your environment.
These users thanked the author joy for the post:
circulosmeos (Thu Dec 19, 2019 4:56 am)

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

Re: Kodi on Ubuntu: x11 or fbdev?

Post by joy »

Umm.... The point is user permission.
To run kodi-fbdev normally with 4K GUI, we need "root" permission until we find a fundamental solution
and we'd better understand KODI's control flow to drivers through sysfs.
I've encountered a similar pattern on N2 with KODI.

I will also test in on CoreELEC and compare them.
(maybe different or adjusted KODI there...)

circulosmeos
Posts: 31
Joined: Tue Jul 25, 2017 2:34 am
languages_spoken: english
ODROIDs: ODROID-C2
Has thanked: 8 times
Been thanked: 0
Contact:

Re: Kodi on Ubuntu: x11 or fbdev?

Post by circulosmeos »

Hi,
In fact I noted differences between root and other user ids, but was not able to get to that "hack":
It works as you describe!

And with 3840x2160p24hz I'm able to reproduce 4k 24hz without little hangs or stops, but with 25 or 30 Hz they reappear (?) It seems like Kodi has problems adjusting reproduction freq to TV freq, which shouldn't be so difficult to do :?:
I would like to test 50 or 60 Hz TV modes that are available (and which I can force on boot.ini), but Kodi does not show them in dropdown frequency options: just 24, 25 and 30 Hz.

The other problem that persists is the lost of output signal after exactly 10 minutes ( :?: :!: ) This is quite strange and unfortunately make this mode still unusable :?

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

Re: Kodi on Ubuntu: x11 or fbdev?

Post by joy »

Hi,
Thank you for sharing the detailed information.

When KODI starts, it gathers device's display capability from sysfs and tries to control hdmi resolution and fb factors of the device also through sysfs.
It depends on KODI and also C2 should support osd scaler logic according to KODI's setup that means we need to check both sides.

Let me check if (1) how CoreELEC KODI is configured and (2) a solution that we've applied to N2 works on C2 with current KODI.
circulosmeos wrote:
Fri Dec 20, 2019 5:54 am
The other problem that persists is the lost of output signal after exactly 10 minutes ( :?: :!: ) This is quite strange and unfortunately make this mode still unusable :?
Also I can reproduce this with my environment, too. :(
These users thanked the author joy for the post:
circulosmeos (Sat Dec 21, 2019 6:32 am)

circulosmeos
Posts: 31
Joined: Tue Jul 25, 2017 2:34 am
languages_spoken: english
ODROIDs: ODROID-C2
Has thanked: 8 times
Been thanked: 0
Contact:

Re: Kodi on Ubuntu: x11 or fbdev?

Post by circulosmeos »

Hi joy!
Any progress on this issue, or may be it is too difficult to find a near term solution? :?:

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

Re: Kodi on Ubuntu: x11 or fbdev?

Post by joy »

Hi @circulosmeos,
Sorry for very late response.
So far, I have no update to solve it.

It's a long term project.
It's needed to understand KODI logic to define a target resolution and set fb parameters to kernel, so complicated for me to understand it and find workaround on kernel side within a short period. :(

Post Reply

Return to “Ubuntu”

Who is online

Users browsing this forum: No registered users and 1 guest