Author: swordfish6975

Openelec Build for OPI PC and 2 now with HW decoding

  [Copy link]

0

threads

6

posts

96

credits

Registered member

Rank: 2

credits
96
Published in 2016-1-8 18:16:07 | Show all floors
Can some help me resolve problem with OpenELEC-H3.arm-7.0-devel-20151228100408-r21817-g18acaa8 build ?
pvr.hts-2.1.18 build not work. I find pvr.hts-2.2.10  (https://mega.nz/#!lFQFwJKJ!NVvaN ... AEI8rT0J071vPJGJras) this verison works but kodi stuck or crash if i try switch channels

1

threads

90

posts

766

credits

Senior member

Rank: 4

credits
766
Published in 2016-1-8 18:50:06 | Show all floors
Edited by lymon at 2016-1-8 20:09
DrilLer replied at 2016-1-8 18:16
Can some help me resolve problem with OpenELEC-H3.arm-7.0-devel-20151228100408-r21817-g18acaa8 build ...

this is a known issue..it works if you stop the stream before switching to another stream.
A bit annoying, but the only workaround for now.

http://www.orangepi.org/orangepibbsen/forum.php?mod=redirect&goto=findpost&ptid=648&pid=8110&fromuid=154314

http://www.orangepi.org/orangepibbsen/forum.php?mod=redirect&goto=findpost&ptid=648&pid=8117&fromuid=154314


0

threads

6

posts

96

credits

Registered member

Rank: 2

credits
96
Published in 2016-1-8 20:11:12 | Show all floors
Tnx for info.
Is is sad.
May be you know how enable hdmi cec ?

1

threads

90

posts

766

credits

Senior member

Rank: 4

credits
766
Published in 2016-1-8 21:29:17 | Show all floors
DrilLer replied at 2016-1-8 20:11
Tnx for info.
Is is sad.
May be you know how enable hdmi cec ?

you can't at this moment ..CEC support/driver is missing in the current kernel





4

threads

1118

posts

9263

credits

Moderator

Rank: 7Rank: 7Rank: 7

credits
9263
Published in 2016-1-9 00:00:52 | Show all floors
Edited by jernej at 2016-1-8 17:03

I think I found out the reason for kswapd being on 100%. The main problem seems to be high percentage of memory reserved by ION. If you trace the code around ION, you can see that if CONFIG_CMA is enabled, there is actually no carveout memory but instead is transfered to CMA and here is the catch. ION and CMA didn't exist in linux 3.4, they were backported or taken from patches. While ION seems to be just some small optional driver, CMA is not. It is integrated deeply in DMA and other memory management code. And here lays the problem. Changing memory management code is very hard. Because of that, even in newer linux version there are still  problems with CMA when you assign relatively high amount of memory to it:
https://lwn.net/Articles/636234/
https://lwn.net/Articles/619865/
https://lwn.net/Articles/633101/

Main advantage of CMA is that reserved memory can still be used by the system if it is not allocated, so when you are calling "free" command, you can see whole amount of memory available, including that reserved amount. However, CMA code version is one of the earliest, so there is potentially a lot of problems with it. Even the newest version still don't cooperate with kswapd efficiently (as can be read in articles mentioned before). My proposed fix is to disable CONFIG_CMA in config file and live by the fact that system uses only 768MB of it and the rest (256MB) is used explicitly for multimedia (display driver, CedarX and camera). That way kswapd stays at confortable 0% of CPU usage and even kodi seems to work faster (lower CPU load). Lower CPU load means also a lot less heat. Actually, my board with heatsink is barely warm during movie playback.

Can someone test my findings?

1

threads

90

posts

766

credits

Senior member

Rank: 4

credits
766
Published in 2016-1-9 00:56:35 | Show all floors
> Can someone test my findings?

I can confirm your findings and that disabling CMA solves the kswap issue
Openelec reports having 749Mb total memory...CPU temp stays below 50C

I tried a few different videos that had still had issues with the lower ION reserved memory setting, but these play fine now and kswapd  issue doesn't occur.

Nice work !

4

threads

1118

posts

9263

credits

Moderator

Rank: 7Rank: 7Rank: 7

credits
9263
Published in 2016-1-9 01:44:19 | Show all floors
Only issue I see here is that Kodi while waiting in home screen uses 463MB of RAM. If CMA gets disabled, ION reserved memory should probably be lowered a bit. AFAIK filesystems generously use free memory as a cache and they may become slow if not enough of free memory is available. After a quick calculations, 180MB-200MB of RAM may be enough even for 4K videos, but that should be tested.

0

threads

41

posts

213

credits

Intermediate member

Rank: 3Rank: 3

credits
213
Published in 2016-1-9 02:17:20 | Show all floors
jernej replied at 2016-1-9 01:44
Only issue I see here is that Kodi while waiting in home screen uses 463MB of RAM. If CMA gets disab ...

Confirmed here too Thank you. Great work finding this solution.

By the way i see Kodi uses only 100MB after the boot.
Maybe i didn't understand very well what you said.

4

threads

1118

posts

9263

credits

Moderator

Rank: 7Rank: 7Rank: 7

credits
9263
Published in 2016-1-9 02:32:30 | Show all floors
I was referring to VSZ of top command, but now I checked that this can be far from real. Where did you get 100MB figure?

0

threads

41

posts

213

credits

Intermediate member

Rank: 3Rank: 3

credits
213
Published in 2016-1-9 02:48:07 | Show all floors
jernej replied at 2016-1-9 02:32
I was referring to VSZ of top command, but now I checked that this can be far from real. Where did y ...

In the main menu. Under the settings button there is a label 'System informations' or something like this.
Click it and then you can see some informations: free ram etc..
You need to log in before you can reply login | Register

Points Rule

Quick reply Top Return list