Intel VAAPI howto with Leia v18 nightly based on Ubuntu 18.04 server - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33) +--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111) +---- Forum: Linux (https://forum.kodi.tv/forumdisplay.php?fid=52) +---- Thread: Intel VAAPI howto with Leia v18 nightly based on Ubuntu 18.04 server (/showthread.php?tid=231955) Pages:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
|
RE: Intel VAAPI howto with Krypton v17 based on Ubuntu 16.04 server - theghost3131 - 2017-12-17 It's working thank you very much for you patience and time. I didn't know that a new library to replace X11 was created... RE: Intel VAAPI howto with Krypton v17 based on Ubuntu 16.04 server - camelreef - 2017-12-18 (2017-12-17, 16:27)fritsch Wrote: @camelreef I just came home and tested the complete sample on my ASRock J4205. No problems at all. I use intel driver + DRI3 + a drm-tip kernel from some time ago. I am starting to think that something else on your system (running next to kodi) causes your issue by either blocking the CPU or even causing interference - DVB card? Some server process acting up?Well, the box is used for 3 things: Kodi, Roon server (well-behave in my experience, but I will give it a go with the service turned off) and Samba. I've cleaned-up a few other things that were running by default and knew I would not need (lxcf, snapd...). Here is a ps -ef: http://paste.ubuntu.com/26210536/ Hardware-wise, it's just the NUC (CPU, RAM, SSD) and an external USB3 HDD. I'll put a 4K movie on the SSD, and get the somewhat CPU-hungry NTFS out of the way. But when I test the live nightly LibreELEC, it's the same disk and mount... mesa: 17.3.0~git20171212+17.3.49a612d1-0ubuntu0ricotz~17.10.1 xserver-xorg-video-intel: 2:2.99.917+git20170309-0ubuntu1 kernel: 4.14.5 mainline xserver: 1.19.5-0ubuntu2 vainfo: Intel i965 driver for Intel® Kaby Lake - 1.8.3 Files are local, but on an NTFS mount No pass-through enabled I kept playing/testing/logging this weekend, with the same results. Also, that 15mn sample became a bit too short once I added the xorg-edgers PPA and other things, as the artefacts started showing after 30-40mn... Hence the switch to a full length movie, and my family getting very tired of Wonder Woman! Wasn't it a crane in Karate Kid? On a side note, the TV it's should be plugged into is a Sony Android TV. Guess what, Play Store -> Kody 17. I've tried it, pointed at the Samba share, perfect play of Wonder Woman 4K HDR... I have a fall back solution. Not one I would like to implement, though, as it would involve playing with ARC and such... But it works! RE: Intel VAAPI howto with Krypton v17 based on Ubuntu 16.04 server - fritsch - 2017-12-18 What does this wpa_supplicant do? It does not scan for networks and "shortly" replaces the default route or something? RE: Intel VAAPI howto with Krypton v17 based on Ubuntu 16.04 server - camelreef - 2017-12-18 (2017-12-18, 21:35)fritsch Wrote: What does this wpa_supplicant do? It does not scan for networks and "shortly" replaces the default route or something?It's used for the Wi-Fi connection and associated crypto. Sure, it can scan, and potentially mess-up the network connection (though that has been fixed a while ago). But the files are local, on an external USB3 HDD, access as a local filesystem, not Samba, and thus should be unaffected RE: Intel VAAPI howto with Krypton v17 based on Ubuntu 16.04 server - camelreef - 2017-12-18 (2017-12-18, 21:19)camelreef Wrote:(2017-12-17, 16:27)fritsch Wrote: I am starting to think that something else on your system (running next to kodi) causes your issue by either blocking the CPU or even causing interference - DVB card? Some server process acting up?Well, the box is used for 3 things: Kodi, Roon server (well-behave in my experience, but I will give it a go with the service turned off) and Samba. I've cleaned-up a few other things that were running by default and knew I would not need (lxcf, snapd...). I did a test with Roon server stopped. Same result, artefacts after 30-40mn. Now doing a test with the movie file on the SSD, ext4 FS, and the external USB3 drive unmounted. RE: Intel VAAPI howto with Krypton v17 based on Ubuntu 16.04 server - camelreef - 2017-12-18 (2017-12-18, 21:56)camelreef Wrote: Now doing a test with the movie file on the SSD, ext4 FS, and the external USB3 drive unmounted.If I told you that I am more than an hour in the movie, and no artefact yet... Would you believe it? Hmmm... I'll need more than one sample to make the statistic valid. ntfs-3g is CPU hungry, as a FUSE thing, and sometimes gets into a diminishing perfs ceiling for writing. It may have the same issue for reading... It may be that LibreELEC is using the kernel driver that is read-only. Well, if that's it, I'll make the FS ext4 and be done with it! I'll lose the ability to use the drive on Windows machines to load content, it will have all to be through the network share, which is acceptable to me. More when I have more than 1 sample, and when I have taken a look at the NTFS driver used in LibreELEC. RE: Intel VAAPI howto with Krypton v17 based on Ubuntu 16.04 server - fritsch - 2017-12-18 I most of the time compile kernels / or kodi next to playing videos ... RE: Intel VAAPI howto with Krypton v17 based on Ubuntu 16.04 server - camelreef - 2017-12-18 (2017-12-18, 22:57)fritsch Wrote: I most of the time compile kernels / or kodi next to playing videos ...And I am sure that it works. Here is my current theory: the artefacts are not linked to mesa, libva, X, CPU or GPU, but I/O perfs from the external USB HDD using a user-space driver for the file system. Sourcing files from a drive using the ntfs-3g fuse driver works until it hits a rapidly lowering performance ceiling, and then not enough data gets streamed for decoding, and I get artefacts. I will take a look at the ntfs driver used in LibreELEC. I'm betting on the read-only but performant kernel driver instead of the FUSE ntfs-3g. I also have a spare USB3 external HDD that I can format in ext4 or NTFS, and test with kernel and FUSE drivers for NTFS. That would be quite en tangent as far as root cause is concerned, but there is credibility in my current path! RE: Intel VAAPI howto with Krypton v17 based on Ubuntu 16.04 server - camelreef - 2017-12-19 (2017-12-18, 23:14)camelreef Wrote:(2017-12-18, 22:57)fritsch Wrote: I most of the time compile kernels / or kodi next to playing videos ...And I am sure that it works. My first test involved leaving the system as-is, but mounting that NTFS partition on the external USB3 HDD using the read-only kernel driver. No artefacts whatsoever! (but probably played the wrong movie or not long enough, see below) With that positive result in the bag, I booted the live LibreELEC stick and checked what it it using. I was surprised to see it use ntfs-3g too! Code: ntfs-3g 2017.3.23 external FUSE 29 - Third Generation NTFS DriverConfiguration type 7, XATTRS are on, POSIX ACLS are on Ubuntu 17.10 uses Code: ntfs-3g 2016.2.22AR.2 integrated FUSE 28 - Third Generation NTFS DriverConfiguration type 7, XATTRS are on, POSIX ACLS are on And that's a big enough difference... I've manually installed ntfs-3g, libntfs-3g and libgrcypt20 from future Ubuntu 18.04/Bionic and got this: Code: ntfs-3g 2017.3.23 integrated FUSE 28 - Third Generation NTFS DriverConfiguration type 7, XATTRS are on, POSIX ACLS are on I hoped that updating the ntfs-3g version would be enough, and that the integrated/external FUSE 28/29 would not make a difference. I also reverted to stock 4.13 kernel and purged the xorg-edgers PPA. I still have the VA-API PPA and the intel driver for X. I played again! And.... Artefacts... FUSE appears to make a difference, ntfs-3g is not enough... At least within the framework of my theory. I've reverted libntfs-3g, ntfs-3f and libcrypt20 back to stock. Next test! I take a spare USB3 HDD, partition from scratch, ext3 file system, mount, copy the shapely Wonder Woman on it, add a source in Kodi, play! And... No artefacts! Ah, but another movie with more movements is giving me artefacts... I'm not too passionate about switching filesystem and lose OS portability for that external hard drive... Something else hit me too: the Kodi on the TV played perfect 4K without artefacts, from the same hard drive, same NTFS filesystem, same old-ish ntfs-3g, same OS, same machine, with the added complexity of a Samba share and a Wi-Fi network!!!! Hmmmm..... What if Kodi buffered things differently for network filesystems than it does for local filesystems? A quick Google, and there I land: http://kodi.wiki/view/HOW-TO%3AModify_the_video_cache Oh oh! Cache values that I can play with! I also have plenty of CPU and RAM sitting pretty but idle... So here I go with caching all, bigger read factor and 1 GB of RAM cache (3 GB of RAM used) Code: <advancedsettings> And nope... no go, artefacts quickly arrive. a memory size of 0 to cache to disk (hoping that it uses the OS SSD) changes nothing. Here is a debug log, just in case (yes, I've switched movie, that one has issues arriving more rapidly than the other) I've also tried creating a source going through the local Samba server (hey, it worked for the TV...). Artefacts... I've re-added the xorg-edges PPA, artefacts. I've re-added 4.14.5 mainline kernel... Artefacts... I was sure that I was on to something! Darn! Am I missing something around the cache settings? Am I on the wrong path altogether? What is LibreELEC doing that I am not doing on this install? (let me check again with Kingsman 1 is it really plays without artefacts, I'm starting to doubt everything...) RE: Intel VAAPI howto with Krypton v17 based on Ubuntu 16.04 server - camelreef - 2017-12-19 (2017-12-19, 04:40)camelreef Wrote: What is LibreELEC doing that I am not doing on this install? (let me check again with Kingsman 1 is it really plays without artefacts, I'm starting to doubt everything...)I've tried again with Kingsman 1, off the NTFS partition on the USB3 HDD. Perfect, no artefacts. LibreELEC rules! I want the same result on my Ubuntu! RE: Intel VAAPI howto with Krypton v17 based on Ubuntu 16.04 server - fritsch - 2017-12-19 Where did you post your Debug Log again, when you were pressing "some key" while those artefacts appeared? RE: Intel VAAPI howto with Krypton v17 based on Ubuntu 16.04 server - camelreef - 2017-12-19 (2017-12-19, 08:35)fritsch Wrote: Where did you post your Debug Log again, when you were pressing "some key" while those artefacts appeared?Didn't I post it? Doesn't sound like it. I'll get one going tomorrow morning, after a good night of sleep, and when the TV is free again. See you in a few hours! RE: Intel VAAPI howto with Krypton v17 based on Ubuntu 16.04 server - camelreef - 2017-12-19 (2017-12-19, 08:35)fritsch Wrote: Where did you post your Debug Log again, when you were pressing "some key" while those artefacts appeared?Good morning from Seattle! I woke up, grabbed a coffee, got in front of the Kodi, set debugging on, restarted Kodi, played Kingsman 1, and artefacts galore from the very beginning. "D" key used at each appearance of artefacts. With a special guests of white lines at the bottom of the screen.
And then I remembered the drm debug from the kernel. So in I go setting Grub for it, reboot, and play Kingsman again. This time is was perfect to my eyes for at least 15mn, before artefacts appeared.
Both times:
I do not like the fact that two different plays, with only a change in kernel logging and a reboot in-between, made playback crap out differently... If there is anything else I can try, log, etc., just ask. RE: Intel VAAPI howto with Krypton v17 based on Ubuntu 16.04 server - fritsch - 2017-12-19 The "ds" clearly show that whatever happened is totally unknown to kodi - nothing in the log. No resync, nothing - absolutely nothing. Now - try - as asked some weeks before: Set your resolution to 1080p, play the same video again, let it scale down with "bilinear" scaling. Same artefacts? RE: Intel VAAPI howto with Krypton v17 based on Ubuntu 16.04 server - camelreef - 2017-12-19 (2017-12-19, 18:06)fritsch Wrote: The "ds" clearly show that whatever happened is totally unknown to kodi - nothing in the log. No resync, nothing - absolutely nothing.I know, nada in the logs, it's not good... How do I hard set to 1080p? |