Please select To the mobile version | Continue to access the desktop computer version

OrangePi

 Login            
 Register            
Search
Hot search: orangepi
Author: swordfish6975

Openelec Build for OPI PC and 2 now with HW decoding

  [Copy link]

4

Threads

1128

Posts

8214

Credits

Moderator

Rank: 7Rank: 7Rank: 7

Credits
8214
Post time 2015-12-7 19:46:12 From the mobile phone | Show all posts
bronco replied at 2015-12-7 08:47
And why is your system swapping all the time? Have you checked for processes suffering from memory  ...

I don't know why. Only thing I noticed is that everything is ok when kodi is not running. Once kswapd goes to 100% nothing helps, even if I close kodi. Funny thing is that top shows around 300MB of kodi memory usage. Command free shows more than half of memory free at any time. Flushing cache also doesn't help.

Any suggestion how to debug this?

1

Threads

13

Posts

240

Credits

Intermediate member

Rank: 3Rank: 3

Credits
240
Post time 2015-12-7 20:30:56 | Show all posts
Edited by pieta at 2015-12-7 20:38

Hi,Have you tried this:
echo vm.swappiness=0 >> /etc/sysctl.conf
or this:
echo 1 > /proc/sys/vm/drop_caches
or:
echo 3 > /proc/sys/vm/drop_caches
(if above will not help)

when problem occurs ?
You can use smem tool for some debug. Tool called perf top can also help.
This is probably an bug in kernel.

Regards.


Post time 2015-12-7 21:11:11 | Show all posts
jernej replied at 2015-12-7 19:46
I don't know why. Only thing I noticed is that everything is ok when kodi is not running. Once ksw ...

If you run top and let it sort for memory consumption (simply type the capital letter "M") what is the VIRT size for the kodi process?

4

Threads

1128

Posts

8214

Credits

Moderator

Rank: 7Rank: 7Rank: 7

Credits
8214
Post time 2015-12-8 04:51:44 | Show all posts
Thanks for all suggestions. I will try them when I will come home.

4

Threads

1128

Posts

8214

Credits

Moderator

Rank: 7Rank: 7Rank: 7

Credits
8214
Post time 2015-12-10 01:03:32 | Show all posts
bronco replied at 2015-12-7 14:11
If you run top and let it sort for memory consumption (simply type the capital letter "M") what is ...

This is the output of top:
  1. Mem: 285000K used, 744144K free, 107244K shrd, 35524K buff, 149184K cached
  2. CPU:  0.8% usr 28.5% sys  0.3% nic 70.1% idle  0.0% io  0.0% irq  0.0% sirq
  3. Load average: 3.36 1.14 0.41 2/109 571
  4.   PID  PPID USER     STAT   VSZ %VSZ CPU %CPU COMMAND
  5.   496   492 root     S     347m 34.5   2  9.5 /usr/lib/kodi/kodi.bin --standalon
  6.   484     1 root     S     8196  0.8   0  0.0 /usr/bin/smbd --configfile=/run/sa
  7.   482     1 root     S     8180  0.7   2  0.0 /usr/bin/nmbd --configfile=/run/sa
  8.   170     1 root     S     7352  0.7   2  0.0 /usr/lib/systemd/systemd-udevd
  9.   454     1 root     S     6112  0.5   2  0.0 /usr/bin/wpa_supplicant -u
  10.   451     1 root     S     5208  0.5   1  0.0 /usr/sbin/connmand -nr --config=/e
  11.   424     1 root     S     4348  0.4   3  0.0 /usr/sbin/sshd -D
  12.     1     0 root     S     4252  0.4   0  0.0 /usr/lib/systemd/systemd
  13.   464     1 avahi    S     3984  0.3   0  0.0 avahi-daemon: registering [OpenELE
  14.   174     1 dbus     S     3924  0.3   1  0.0 /usr/bin/dbus-daemon --system --ad
  15.   477     1 root     S     3444  0.3   1  0.0 /usr/bin/rpcbind
  16.   211     1 root     S     2952  0.2   1  0.0 /usr/sbin/eventlircd -f --evmap=/e
  17.   556   130 root     R     2656  0.2   1  0.0 top
  18.   130     1 root     S     2656  0.2   2  0.0 /bin/sh
  19.   492     1 root     S     2656  0.2   2  0.0 {kodi.sh} /bin/sh /usr/lib/kodi/ko
  20.   388     1 root     S     2652  0.2   0  0.0 /sbin/crond -f -S
  21.   284     1 root     S     2564  0.2   1  0.0 /usr/lib/systemd/systemd-logind
  22.   154     1 root     S     2460  0.2   1  0.0 /usr/lib/systemd/systemd-journald
  23.    36     2 root     RW       0  0.0   3 19.9 [kswapd0]
  24.     5     2 root     SW       0  0.0   0  0.0 [kworker/u:0]
Copy the Code


@pieta,
I tried everything you listed but nothing helps.

CONFIG_SWAP=y is in config file. I will try to disable it, because there is no swap partition on sd card.

Additional info:
  1. OpenELEC:~ # mount
  2. rootfs on / type rootfs (rw)
  3. devtmpfs on /dev type devtmpfs (rw,relatime,size=381844k,nr_inodes=95461,mode=755)
  4. proc on /proc type proc (rw,relatime)
  5. sysfs on /sys type sysfs (rw,relatime)
  6. /dev/mmcblk0p1 on /flash type vfat (ro,noatime,fmask=0022,dmask=0022,codepage=cp437,iocharset=ascii,shortname=mixed,utf8,errors=continue)
  7. /dev/mmcblk0p2 on /storage type ext4 (rw,noatime,data=ordered)
  8. /dev/loop0 on / type squashfs (ro,relatime)
  9. tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
  10. devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620)
  11. tmpfs on /run type tmpfs (rw,nosuid,nodev,mode=755)
  12. tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)
  13. cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,release_agent=/usr/lib/systemd/systemd-cgroups-agent,name=systemd)
  14. cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpuacct,cpu)
  15. cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
  16. tmpfs on /tmp type tmpfs (rw)
  17. tmpfs on /var type tmpfs (rw,relatime)
  18. debugfs on /sys/kernel/debug type debugfs (rw,relatime)
  19. mqueue on /dev/mqueue type mqueue (rw,relatime)
  20. fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)
Copy the Code


1

Threads

13

Posts

240

Credits

Intermediate member

Rank: 3Rank: 3

Credits
240
Post time 2015-12-10 03:17:22 | Show all posts
Edited by pieta at 2015-12-10 03:27

Jernej,

For me, after exluding swap Kodi did not want to even compile. The whole process hangs

Also take a look at this: http://moinejf.free.fr/opi2/
"Status 2015-10-14: HDMI audio ok - random kswapd loop"

It seems that it is really a bug in kernel 3.4.x

and from what I read on some debian forum problem was partially fixed in kernel 3.8-3 and absent from kernel 3.15 RC.
I do not know which exact version is without error. Read this: http://forums.debian.net/viewtopic.php?f=5&t=107621 and this: http://forum.siduction.org/index ... .msg26753#msg26753.

Please try set:
vm.swappiness=10
in /etc/sysctl.conf
and run: sysctl vm.swappiness=10

Default setting in Fedora 22/RedHat EL is: vm.swappiness=60.

Read this: https://access.redhat.com/docume ... emory-tunables.html for more possible options. Maybe some help.

4

Threads

1128

Posts

8214

Credits

Moderator

Rank: 7Rank: 7Rank: 7

Credits
8214
Post time 2015-12-10 03:52:09 | Show all posts
pieta replied at 2015-12-9 20:17
Jernej,

For me, after exluding swap Kodi did not want to even compile. The whole process hangs

Hm, I'm using that patch. Is it possible that it introduced some kswapd loop? Contrary to other OrangePi H3 image builds which doesn't have that problem (at least I didn't noticed it), this system uses gcc 5.2 and this patch...

I compared vmscan.c to stock one (3.4.39) and I noticed that some patch was already applied (I can't find corresponding mail list where it was published at the moment).

I will certainly do some more research on this topic in the future.

1

Threads

13

Posts

240

Credits

Intermediate member

Rank: 3Rank: 3

Credits
240
Post time 2015-12-10 04:24:28 | Show all posts
Edited by pieta at 2015-12-10 04:26

Maybe this one ? https://lists.ubuntu.com/archive ... ecember/023333.html
http://lkml.iu.edu/hypermail/linux/kernel/1403.0/04733.html

I think we all need kernel 4.4

4

Threads

1128

Posts

8214

Credits

Moderator

Rank: 7Rank: 7Rank: 7

Credits
8214
Post time 2015-12-10 04:45:41 | Show all posts
pieta replied at 2015-12-9 21:24
Maybe this one ? https://lists.ubuntu.com/archive ... ecember/023333.html
http://lkml.iu.edu/hyperma ...

Yes, that's it.

Couldn't agree more. In the meantime, this should do.

@everyone,

I added support for HW video decoding. I tried MPEG4 and H264 video and both played with smooth 24 fps as should they. Any testing and reporting highly appreciated. H265 and others should also be supported.

Image rendering and scaling is for now implemented via GPU. This will be improved in future with zero copy display for better performance.

1

Threads

13

Posts

240

Credits

Intermediate member

Rank: 3Rank: 3

Credits
240
Post time 2015-12-10 04:51:00 | Show all posts




Jernej this is great news! And great job !
How can I use your work on my orange pi plus ?
What do I need?
Whether it will work with Linux 3.4.39-02-lobo ?


You have to log in before you can reply Login | Register

Points Rules

Archiver|Mobile edition|Darkroom|OrangePi En ( 粤ICP备14086627号-2

2021-10-27 21:18 GMT+8 , Processed in 0.032840 second(s), 20 queries .

Powered by Discuz! X3.2

© 2014-2015 orangepibbs en.

Quick Reply To Top Return to the list