Please Provide subtitles security fix for Kodi 16.X

  Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
da-anda Offline
Team-Kodi Member
Posts: 5,820
Joined: Jun 2009
Reputation: 78
Location: germany
Post: #16
as for your issues that are mostly related to usage of Kodi as a desktop app - devs usually use it on their living room as standalone app and don't use it in a desktop env. But ofc, during development some issues should have popped up, unless they are not specific to your HW and drivers.

If you have mentioned these issues during beta phase, it's also really unfortunate that these haven't be fixed. I'll forward your post to our linux devs.
(This post was last modified: 2017-06-09 09:55 by da-anda.)
find quote
da-anda Offline
Team-Kodi Member
Posts: 5,820
Joined: Jun 2009
Reputation: 78
Location: germany
Post: #17
oh pemartins, btw, would you be willing to test if the CPU usage issues are gone in recent nightly builds? There have been done some optimisations a couple days ago.
find quote
peak3d Offline
Team-Kodi Member
Posts: 122
Joined: Mar 2015
Reputation: 7
Post: #18
@pemartins : phrases like "Is it possible that no dev ever done that also?" are not very straightforward for devs wich do the stuff in their spare time for free.
devs of kodi don't HAVE to do anything, Your phrase leads to nothing, there will be no outcome to your question because the question is simply not relevant for the issue..
(This post was last modified: 2017-06-09 10:17 by peak3d.)
find quote
jjd-uk Offline
Team-Kodi Member
Posts: 6,293
Joined: Oct 2011
Reputation: 158
Post: #19
(2017-06-08 20:24)pemartins Wrote:  @jjd-uk I'd really like that to be the truth, that the problem was to be my system... I'd also also like to believe that Kodi 17.x is excellent and very well maintained in Linux.
But come on, if things are like you say they are, please explain me how the following bugs exist.
First the mentioned "\" bug: is it possible that the devs use Kodi 17.x on Linux and no dev ever switched between fullscreen and windowed mode?

From looking at your post history this is the thread in question https://forum.kodi.tv/showthread.php?tid=306226 for Fullscreen/Windowed mode problem, from that it seems to be only 4 people experiencing the problem which suggests to be it might not a bug that will occur on every system, for example it could before people with only a make/model of GPU will see the problem.
find quote
pemartins Offline
Member
Posts: 66
Joined: Oct 2013
Reputation: 2
Post: #20
@da-anda I tested the latest nightly and I believe that the cpu issue is indeed solved: I used to have insane cpu usage, i.e. during video play it was normally above 110%, and in that nightly it was in the range between 30 and 60%. Excellent news indeed!

@peak3d please re-read the post and the context it is in because you read it wrong. There's no offensive or diminishing intention at all and so there's no need to take this subject into a conflict path. It's totally the opposite and I believe we all want Kodi to be the best it can be.

@jjd-uk asap I will provide all the info I can to try to solve the "\" issue. But related to that specific bug I believe there's an old bug report and I've read about many people complaining about the issue while browsing the net looking for a solution.

According to any issue let me know how/if I can help and I'll try my best to be of some assistance.

Thank you all once again.
find quote
wsnipex Offline
Team-Kodi
Posts: 6,433
Joined: Jun 2011
Reputation: 166
Post: #21
30-60% cpu still seems too high, are you sure hardware decoding is working? Can you provide a Debug Log?
find quote
pemartins Offline
Member
Posts: 66
Joined: Oct 2013
Reputation: 2
Post: #22
@wsnipex thank you very much for your help!

I cannot tell if my hardware decoding is working or not because I do not have the skills or knowledge to be able to answer that, I hope that with the following information you can help me on that.

So I ran a Kodi session in which I basically ran some random streams: http://pasted.co/96b24576

Here's my hardware configuration:
Code:
$ inxi -F
System:    Host: pemartins-X55U Kernel: 4.8.0-53-generic x86_64 (64 bit)
           Desktop: N/A Distro: Peppermint Eight
Machine:   Mobo: ASUSTeK model: X55U v: 1.0
           Bios: American Megatrends v: X55U.423 date: 08/06/2013
CPU:       Dual core AMD E2-1800 APU with Radeon HD Graphics (-MCP-) cache: 1024 KB
           clock speeds: max: 1700 MHz 1: 1360 MHz 2: 1360 MHz
Memory:    No dmidecode memory data: try newer kernel.
Graphics:  Card: Advanced Micro Devices [AMD/ATI] Wrestler [Radeon HD 7340]
           Display Server: X.Org 1.18.4 driver: radeon
           Resolution: [email protected]
           GLX Renderer: Gallium 0.4 on AMD PALM (DRM 2.46.0 / 4.8.0-53-generic, LLVM 4.0.0)
           GLX Version: 3.0 Mesa 17.0.2
Audio:     Card-1 Advanced Micro Devices [AMD] FCH Azalia Controller
           driver: snd_hda_intel
           Card-2 Advanced Micro Devices [AMD/ATI] Wrestler HDMI Audio
           driver: snd_hda_intel
           Sound: Advanced Linux Sound Architecture v: k4.8.0-53-generic
Network:   Card-1: Ralink RT5390 Wireless 802.11n 1T/1R PCIe driver: rt2800pci
           IF: wlp1s0 state: up mac: 84:4b:f5:75:f3:68
           Card-2: Qualcomm Atheros AR8161 Gigabit Ethernet driver: alx
           IF: enp2s0 state: down mac: 50:46:5d:9b:53:4a
Drives:    HDD Total Size: 500.1GB (12.4% used)
           ID-1: /dev/sda model: ST500LM012_HN size: 500.1GB
Partition: ID-1: / size: 85G used: 55G (68%) fs: ext4 dev: /dev/sda5
           ID-2: swap-1 size: 3.85GB used: 0.00GB (0%) fs: swap dev: /dev/sda6
RAID:      No RAID devices: /proc/mdstat, md_mod kernel module present
Sensors:   System Temperatures: cpu: 79.0C mobo: N/A gpu: 82.0
           Fan Speeds (in rpm): cpu: 4100
Info:      Processes: 182 Uptime: 3:10 Memory: 1136.5/3534.9MB
           Client: Shell (bash) inxi: 2.2.35

and here's my grub info, maybe it can be useful:
Code:
GRUB_DEFAULT="0"
#GRUB_HIDDEN_TIMEOUT="0"
GRUB_HIDDEN_TIMEOUT_QUIET="true"
GRUB_TIMEOUT="10"
GRUB_DISTRIBUTOR="`lsb_release -i -s 2> /dev/null || echo Debian`"
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_backlight=video"
GRUB_CMDLINE_LINUX=""

EDIT: here's the output of glxinfo | less, maybe it can be useful: http://pasted.co/d7ffaed8

If there's more info that I can provide please let me know, thank you very much once again.
(This post was last modified: 2017-06-10 22:53 by pemartins.)
find quote
wsnipex Offline
Team-Kodi
Posts: 6,433
Joined: Jun 2011
Reputation: 166
Post: #23
Everything fine:
- hardware acceleration is working (via vdpau)
- your CPU is pretty old and low power, so if it is downclocked to low power states 30% CPU usage is normal.
find quote
pemartins Offline
Member
Posts: 66
Joined: Oct 2013
Reputation: 2
Post: #24
I'm glad all is working as expected, the cpu usage in the new nightly release is perfectly tolerable so it makes no difference in usage. It's within the line with cpu usage by other applications.

@wsnipex thank you so much for your help, I really appreciated it!
find quote
pemartins Offline
Member
Posts: 66
Joined: Oct 2013
Reputation: 2
Post: #25
(2017-06-09 10:11)da-anda Wrote:  oh pemartins, btw, would you be willing to test if the CPU usage issues are gone in recent nightly builds? There have been done some optimisations a couple days ago.

(2017-06-09 23:06)pemartins Wrote:  @da-anda I tested the latest nightly and I believe that the cpu issue is indeed solved: I used to have insane cpu usage, i.e. during video play it was normally above 110%, and in that nightly it was in the range between 30 and 60%. Excellent news indeed!

I wrote that the cpu issue was solved but I could now check that, despite it got better, it didn't get solved.

I went back to using Kodi 16.1 because in nightlys there's usually something not working as expected and I could still find a huge difference in cpu usage from 18 to 16.1. As an example I was streaming in 1080p in Kodi 16.1 with a cpu usage between 20 and 40% tops, usually around 20%. But in Kodi 18 I did not stream anything in 1080p, it was 720p tops, and the cpu usage was those mentioned values between 30 and 60%. So there is still a very significant difference.

One thing that can be of influence is that in advancedsettings.xml I have these settings:

Code:
    <gui>
        <algorithmdirtyregions>3</algorithmdirtyregions>
        <nofliptimeout>0</nofliptimeout>
    </gui>

and by checking just now Advancedsettings.xml (wiki) I could realise that nofliptimeout was removed from Kodi 17.
(This post was last modified: 2017-06-16 09:09 by pemartins.)
find quote
wsnipex Offline
Team-Kodi
Posts: 6,433
Joined: Jun 2011
Reputation: 166
Post: #26
are you sure that you compare apples with apples regarding CPU usage?
halfway modern CPUs(including yours) downclock automatically.
e.g. 50% CPU usage at 800Mhz is still less power draw then 50% at 2,4 GHz

Also note that CPU usage in kodi depends on many factors since lots of stuff is going on in the background.
- Addons, Scraping/Library update
- Video upscaling, deinterlacing
- Audio decoding of different formats, passthrough

The proper way to compare would be playing the same videos with the same settings and measuring full system powerdraw with a watt hour meter
(This post was last modified: 2017-06-16 09:51 by wsnipex.)
find quote
pemartins Offline
Member
Posts: 66
Joined: Oct 2013
Reputation: 2
Post: #27
Thank you very much for the help and the info once again.

I tried to reproduce the same environment running on the pc, the exact same things and installations running on Kodi as in the log file I posted previously, played the same streams I played before and the difference is there as mentioned. 16.1 is around 20% cpu usage, way below 18.

Basically what flags my attention is the fan firing up. Concerning Mhz and Ghz unfortunately I'm not able to provide any data on that, I totally lack the skills and knowledge to be able to be of any assistance... I've heard about cpu clocking before but that is like chinese to me. The same for power consumption. Sad
(This post was last modified: 2017-06-16 23:38 by pemartins.)
find quote
pemartins Offline
Member
Posts: 66
Joined: Oct 2013
Reputation: 2
Post: #28
Adding to what I just wrote, I believe I've found the problem. In Kodi 16.1 I removed the following line from my advancedsettings.xml:

Code:
        <nofliptimeout>0</nofliptimeout>

Ran Kodi and as I play a 1080p video I had just played which had around 20% cpu usage before I removed that line, now without that setting not only my cpu usage of kodi.bin fires up to 100% values, the streaming also becomes choppy.

So there it is, the problem must be the removing from Kodi 17 and above of nofliptimeout. Quoting Advancedsettings.xml#Removed_tags: (wiki)
Quote:2.12 Removed tags
...
<nofliptimeout> - Removed in v17
(This post was last modified: 2017-06-17 00:16 by pemartins.)
find quote
FernetMenta Offline
Team-Kodi Developer
Posts: 6,246
Joined: Jul 2010
Reputation: 146
Location: Munich
Post: #29
This is nonsense. nofliptimeout had a default value of 0 and algorithmdirtyregions a default value of 3. Means your entries in advanced settings were useless.
find quote
magao Offline
Senior Member
Posts: 184
Joined: Sep 2008
Reputation: 3
Post: #30
(2017-06-18 08:37)FernetMenta Wrote:  This is nonsense. nofliptimeout had a default value of 0 and algorithmdirtyregions a default value of 3. Means your entries in advanced settings were useless.

I thought nofliptimeout had a default value of 1000 early on, but I may be misremembering, or it may have changed later.

(2017-06-17 00:11)pemartins Wrote:  Adding to what I just wrote, I believe I've found the problem. In Kodi 16.1 I removed the following line from my advancedsettings.xml:

Code:
        <nofliptimeout>0</nofliptimeout>

Most graphics drivers will work with algorithmdirtyregions=1 or 2 these days (this thread prompted me to check on my Braswell NUC and it's fine with algorithmdirtyregions=1) so I recommend you try those and see how it goes.
(This post was last modified: 2017-06-19 03:40 by magao.)
find quote