Bug 1305389 - xawtv segfaults at startup
xawtv segfaults at startup
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: xawtv (Show other bugs)
23
Unspecified Unspecified
unspecified Severity high
: ---
: ---
Assigned To: Dmitry Butskoy
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-02-07 17:40 EST by Stas Sergeev
Modified: 2016-03-06 21:56 EST (History)
3 users (show)

See Also:
Fixed In Version: xawtv-3.103-8.fc23 xawtv-3.103-8.el7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-02-26 02:23:09 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
the fix (2.25 KB, application/mbox)
2016-02-07 17:40 EST, Stas Sergeev
no flags Details
log (20.70 KB, text/plain)
2016-02-10 16:08 EST, Stas Sergeev
no flags Details
The real fix (a kernel patch) (2.02 KB, patch)
2016-02-11 10:05 EST, Hans de Goede
no flags Details | Diff
new log (42.81 KB, text/plain)
2016-02-14 13:42 EST, Stas Sergeev
no flags Details
[PATCH] saa7134: Fix bytesperline not being set correctly for planar formats (2.02 KB, patch)
2016-02-14 14:24 EST, Hans de Goede
no flags Details | Diff

  None (edit)
Description Stas Sergeev 2016-02-07 17:40:13 EST
Created attachment 1122042 [details]
the fix

Description of problem:
On f23 xawtv doesn't start.

Version-Release number of selected component (if applicable):
The one from f23.

How reproducible:
easily

Steps to Reproduce:
1. start xawtv

Actual results:
coredump

Expected results:
video

Additional info:
I made a quick fix.
Attached
Comment 1 Dmitry Butskoy 2016-02-07 18:16:57 EST
It seems that you use xawtv with "v4l2" driver, but the default is "libv4l" driver.

Whether the issue exists with libv4l as well? (ie. "xawtv -D libv4l")
Comment 2 Stas Sergeev 2016-02-09 15:37:06 EST
$ xawtv -D libv4l
This is xawtv-3.103, running on Linux/x86_64 (4.3.4-300.fc23.x86_64)
xinerama 0: 1280x1024+0+0
vid-open-auto: using analog TV device /dev/video0
WARNING: No DGA direct video mode for this display.
WARNING: keeping fbuf pitch at: 5120, as no base addr was detected
WARNING: couldn't find framebuffer base address, try manual
         configuration ("v4l-conf -a <addr>")
v4l2: WARNING: framebuffer base address mismatch
v4l2: me=(nil) v4l=(nil)
Alsa devices: cap: hw:2,0 (/dev/video0), out: default
Ошибка сегментирования (core dumped)
Comment 3 Dmitry Butskoy 2016-02-09 15:42:50 EST
> v4l2: WARNING: framebuffer base address mismatch
> v4l2: me=(nil) v4l=(nil)

Well, what if "xawtv -D v4l2"? And "xawtv -D help"?
Comment 4 Stas Sergeev 2016-02-09 15:46:27 EST
$ xawtv -D v4l2
This is xawtv-3.103, running on Linux/x86_64 (4.3.4-300.fc23.x86_64)
xinerama 0: 1280x1024+0+0
vid-open-auto: using analog TV device /dev/video0
WARNING: No DGA direct video mode for this display.
WARNING: keeping fbuf pitch at: 5120, as no base addr was detected
WARNING: couldn't find framebuffer base address, try manual
         configuration ("v4l-conf -a <addr>")
v4l2: WARNING: framebuffer base address mismatch
v4l2: me=(nil) v4l=(nil)
Alsa devices: cap: hw:2,0 (/dev/video0), out: default
Ошибка сегментирования (core dumped)


$ xawtv -D help
This is xawtv-3.103, running on Linux/x86_64 (4.3.4-300.fc23.x86_64)
xinerama 0: 1280x1024+0+0
Available drivers: libv4l v4l2
no video grabber device available


Please note that drv0-v4l2.tmpl.c has this:
---
#ifdef USE_LIBV4L
#include <libv4l2.h>

#define PLUGIN_NAME "libv4l"
#else
#define PLUGIN_NAME "v4l2"
#endif /* USE_LIBV4L */
---

So I am a bit surprised the help displays both.
Comment 5 Dmitry Butskoy 2016-02-09 15:59:12 EST
The idea of using the libv4l library (from v4l-utils) was intended for all such cases (ie. when origin xawtv cannot work with some formats properly).

Could you please discover whether such a fix can be implemented in libv4l code -- that way it would be a system-wide fix (not for xawtv only)...
Comment 6 Stas Sergeev 2016-02-09 16:19:12 EST
Lets involve Hans de Goede <hdegoede@redhat.com> as an
author of the libv4l2 support.

So as I can see, the code only does the things like this:

#ifdef USE_LIBV4L
    rc = v4l2_ioctl(h->fd, VIDIOC_S_FMT, &h->fmt_v4l2);
#else
    rc = ioctl(h->fd, VIDIOC_S_FMT, &h->fmt_v4l2);
#endif

Which means that the libv4l2 involvement simply doesn't
change a tiny bit. I can't see any non-trivial libv4l2
use in that code, that could affect the bug anyhow. That
is, even if libv4l2 have some advanced handling of planar
formats, it is not used here. As such, fixing libv4l2 will
not help, and whether or not does it have any bugs,
is unknown and does not matter for our problem.
Comment 7 Hans de Goede 2016-02-10 04:45:33 EST
Hi Stas,

Can you reproduce the bug like this please:

LIBV4L2_LOG_FILENAME=/tmp/log xawtv

And then attach the generated /tmp/log here ?

Also please run:

xvinfo

And also attach or copy/paste the output here.

The new multi-planar API has its own formats, the old planar formats are defined as having everything in one contiguous buffer (first the y plane, then immediately after that the u plane and then the v plane), so they should work, actually I'm using xawtv with:

blit: 416x312/[12 bit YUV 4:2:0 (planar)] => Xvideo

Myself and that works fine.

Regards,

Hans
Comment 8 Hans de Goede 2016-02-10 04:46:24 EST
p.s.

Also it would be good to get the output of:

xawtv -v 1

Both with and without (until it crashes) your patch
Comment 9 Stas Sergeev 2016-02-10 05:22:57 EST
Hi Hans, thanks for explanations.
I can't provide the logs right now (maybe later),
but I can tell you exactly where the crash happen,
which may be enough too.
v4l2_setformat() does this:
---
    switch (fmt->fmtid) {
        case VIDEO_YUV422P:
          fmt->bytesperline *= 2;
          break;
        case VIDEO_YUV420P:
          fmt->bytesperline = fmt->bytesperline * 3 / 2;
          break;
    }
---

But v4l2_start_streaming() mmaps the buffers of
size h->buf_v4l2[i].length, which is just for one
plane, AFAICS. The size for blitting is however
evaluated as
---
        h->buf_me[i].size = h->buf_me[i].fmt.bytesperline *
            h->buf_me[i].fmt.height;
---
which is then larger because of the setformat adjustment.

> The new multi-planar API has its own formats, the old planar formats are
> defined as having everything in one contiguous buffer (first the y plane,
> then immediately after that the u plane and then the v plane), so they should
> work
That's what I was actually googling for before doing the
patch, but found this:
https://linuxtv.org/downloads/v4l-dvb-apis/planar-apis.html
---
Multi-planar API calls can handle all single-planar formats as well (as long as they are passed in multi-planar API structures), while the single-planar API cannot handle multi-planar formats.
---
So from that I concluded the handling of planar formats
should be disabled. Since you seem to contradict to this
doc, it would be nice to get the doc updated too, to make
it clear how to use the planar formats with non-planar api.
Comment 10 Hans de Goede 2016-02-10 05:51:49 EST
Hi,

(In reply to Stas Sergeev from comment #9)
> Hi Hans, thanks for explanations.
> I can't provide the logs right now (maybe later),
> but I can tell you exactly where the crash happen,
> which may be enough too.
> v4l2_setformat() does this:
> ---
>     switch (fmt->fmtid) {
>         case VIDEO_YUV422P:
>           fmt->bytesperline *= 2;
>           break;
>         case VIDEO_YUV420P:
>           fmt->bytesperline = fmt->bytesperline * 3 / 2;
>           break;
>     }
> ---
> 
> But v4l2_start_streaming() mmaps the buffers of
> size h->buf_v4l2[i].length, which is just for one
> plane, AFAICS.

No, for non multi-planar planar formats (so with all components  in one contigues buffer / plane) the
buffer length is for all compontents.

> The size for blitting is however
> evaluated as
> ---
>         h->buf_me[i].size = h->buf_me[i].fmt.bytesperline *
>             h->buf_me[i].fmt.height;
> ---
> which is then larger because of the setformat adjustment.

It should not be larger then buf_v4l2[i].length, buf_v4l2[i].length should
for e.g. VIDEO_YUV420P be (minimum): "width * height * 3 / 2"

But you can easily check this by adding a couple of printf-s in the right place.

And when then planar format is emulated by libv4l2 (rather then being provided
directly by the hw) then this is enforced like this:

void v4lconvert_fixup_fmt(struct v4l2_format *fmt)
{
        switch (fmt->fmt.pix.pixelformat) {
...
        case V4L2_PIX_FMT_YUV420:
        case V4L2_PIX_FMT_YVU420:
                fmt->fmt.pix.bytesperline = fmt->fmt.pix.width;
                fmt->fmt.pix.sizeimage = fmt->fmt.pix.width * fmt->fmt.pix.height * 3 / 2;
                break;
        }
}

And v4l2_buffer.length gets set to fmt->fmt.pix.sizeimage rounded UP to a multiple of the systems memory page size.

So if your printf shows your right, then the kernel driver for your tv device is providing V4L2_PIX_FMT_YUV420 / tV4L2_PIX_FMT_YVU420 itself, and is behaving badly when the fmt is set to one of the old "single-plane" FourCC codes.

> > The new multi-planar API has its own formats, the old planar formats are
> > defined as having everything in one contiguous buffer (first the y plane,
> > then immediately after that the u plane and then the v plane), so they should
> > work
> That's what I was actually googling for before doing the
> patch, but found this:
> https://linuxtv.org/downloads/v4l-dvb-apis/planar-apis.html
> ---
> Multi-planar API calls can handle all single-planar formats as well (as long
> as they are passed in multi-planar API structures), while the single-planar
> API cannot handle multi-planar formats.
> ---
> So from that I concluded the handling of planar formats
> should be disabled. Since you seem to contradict to this
> doc, it would be nice to get the doc updated too, to make
> it clear how to use the planar formats with non-planar api.

You quoted the wrong bit, that page also says: "Those formats use a separate set of FourCC codes."
and xawtv uses the old fourcc codes. It cannot be that the way buffers for the old FourCC codes are handled has changed and now require using the new multi-lplanar API because that would be a kernel API break and that is a big no no. So we need to dig a little deeper and figure out what exactly is going on here.

Regards,

Hans
Comment 11 Stas Sergeev 2016-02-10 06:17:15 EST
> But you can easily check this by adding a couple of printf-s in the
> right place.
I already did.
I'll post the exact values later.

> You quoted the wrong bit, that page also says: "Those formats use
> a separate set of FourCC codes."
Does this mean there are "old planar formats" that are
compatible with both APIs, and "new planar formats" that
are compatible with the new API only? I really think the
doc should be made much clear at that place.
Comment 12 Hans de Goede 2016-02-10 06:22:07 EST
(In reply to Stas Sergeev from comment #11)
> > But you can easily check this by adding a couple of printf-s in the
> > right place.
> I already did.
> I'll post the exact values later.

Ok.

> > You quoted the wrong bit, that page also says: "Those formats use
> > a separate set of FourCC codes."
> Does this mean there are "old planar formats" that are
> compatible with both APIs, and "new planar formats" that
> are compatible with the new API only? I really think the
> doc should be made much clear at that place.

Yes that it what it means.
Comment 13 Stas Sergeev 2016-02-10 15:10:19 EST
diff --git a/libng/plugins/drv0-v4l2.tmpl.c b/libng/plugins/drv0-v4l2.tmpl.c
index 2cbd34b..38fc8f1 100644
--- a/libng/plugins/drv0-v4l2.tmpl.c
+++ b/libng/plugins/drv0-v4l2.tmpl.c
@@ -983,6 +983,7 @@ v4l2_start_streaming(struct v4l2_handle *h, int buffers)
        h->buf_me[i].fmt  = h->fmt_me;
        h->buf_me[i].size = h->buf_me[i].fmt.bytesperline *
            h->buf_me[i].fmt.height;
+fprintf(stderr, "map %#x but size %#zx\n", h->buf_v4l2[i].length,h->buf_me[i].size);
 #ifndef USE_LIBV4L
        h->buf_me[i].data = mmap(NULL, h->buf_v4l2[i].length,
 #else /* USE_LIBV4L */



And the output is:
---
Alsa devices: cap: hw:2,0 (/dev/video0), out: default
map 0x28800 but size 0x3cc00
map 0x28800 but size 0x3cc00
map 0x28800 but size 0x3cc00
map 0x28800 but size 0x3cc00
---
Comment 14 Hans de Goede 2016-02-10 15:39:04 EST
Ok, what hardware is this with, what is the width/height and original unmodified fmt.bytesperline ? Also that /tmp/log from a debug run would be really useful.
Comment 15 Stas Sergeev 2016-02-10 15:46:32 EST
> Ok, what hardware is this with
saa7134

> what is the width/height and original unmodified fmt.bytesperline ?
diff --git a/libng/plugins/drv0-v4l2.tmpl.c b/libng/plugins/drv0-v4l2.tmpl.c
index 2cbd34b..80813bd 100644
--- a/libng/plugins/drv0-v4l2.tmpl.c
+++ b/libng/plugins/drv0-v4l2.tmpl.c
@@ -983,6 +983,7 @@ v4l2_start_streaming(struct v4l2_handle *h, int buffers)
        h->buf_me[i].fmt  = h->fmt_me;
        h->buf_me[i].size = h->buf_me[i].fmt.bytesperline *
            h->buf_me[i].fmt.height;
+fprintf(stderr, "map %#x but size %#zx\n", h->buf_v4l2[i].length,h->buf_me[i].size);
 #ifndef USE_LIBV4L
        h->buf_me[i].data = mmap(NULL, h->buf_v4l2[i].length,
 #else /* USE_LIBV4L */
@@ -1125,6 +1126,7 @@ retry:
     fmt->width        = h->fmt_v4l2.fmt.pix.width;
     fmt->height       = h->fmt_v4l2.fmt.pix.height;
     fmt->bytesperline = h->fmt_v4l2.fmt.pix.bytesperline;
+fprintf(stderr, "w %#x h %#x b %#x\n", fmt->width, fmt->height, fmt->bytesperline);
     /* struct v4l2_format.fmt.pix.bytesperline is bytesperline for the
        main plane for planar formats, where as we want it to be the total
        bytesperline for all planes */


And the output is:
---
Alsa devices: cap: hw:2,0 (/dev/video0), out: default
w 0x180 h 0x120 b 0x240
w 0x180 h 0x120 b 0x240
map 0x28800 but size 0x3cc00
map 0x28800 but size 0x3cc00
w 0x180 h 0x120 b 0x240
map 0x28800 but size 0x3cc00
map 0x28800 but size 0x3cc00
---

> Also that /tmp/log from a debug run would be really useful.
Wait on.
Comment 16 Stas Sergeev 2016-02-10 16:08 EST
Created attachment 1122936 [details]
log

the log
Comment 17 Stas Sergeev 2016-02-11 08:44:50 EST
Anything else to attach?
Comment 18 Hans de Goede 2016-02-11 09:43:30 EST
(In reply to Stas Sergeev from comment #17)
> Anything else to attach?

Nope, this is a driver bug:

w 0x180 h 0x120 b 0x240

So width = 0x180 / 384 as is seen in the log, but bytesperline gets set to 0x240 / 576 which is 1.5 * width, which is wrong, see:

https://linuxtv.org/downloads/v4l-dvb-apis/pixfmt.html#v4l2-pix-format

Which says:

"__u32	bytesperline" <snip> "When the image format is planar the bytesperline value applies to the first plane" while what the driver here is setting is the bytesperline of all 3 planes added together.

Please try this xawtv change to work around this:

--- a/libng/plugins/drv0-v4l2.tmpl.c
+++ b/libng/plugins/drv0-v4l2.tmpl.c
@@ -1149,6 +1149,10 @@ retry:
          fmt->bytesperline *= 2;
          break;
        case VIDEO_YUV420P:
+   if (fmt->bytesperline == fmt->width * 3 / 2) {
+       fprintf(stderr, "kernel driver bug byteyperline should be the bytesperline of the first plane!\n");
+       break;
+   }
          fmt->bytesperline = fmt->bytesperline * 3 / 2;
          break;
     }
Comment 19 Hans de Goede 2016-02-11 10:05 EST
Created attachment 1123175 [details]
The real fix (a kernel patch)

Hi,

And here is a kernel patch fixing the real culprit rather then working around it. Can you please build a kernel with this, test an unmodified xawtv and confirm that this kernel patch fixes things?

Regards,

Hans

p.s.

Please also do test the xawtv patch I will likely add that as a workaround for now.
Comment 20 Stas Sergeev 2016-02-11 15:34:32 EST
Your kernel patch has a missing semicolon,
but other than that it works fine:

---
Alsa devices: cap: hw:2,0 (/dev/video0), out: default
w 0x180 h 0x120 b 0x480
w 0x180 h 0x120 b 0x480
map 0x51000 but size 0x51000
map 0x51000 but size 0x51000
---

The second patch works too.

Thanks!
Comment 21 Hans de Goede 2016-02-14 10:44:51 EST
Hi,

(In reply to Stas Sergeev from comment #20)
> Your kernel patch has a missing semicolon,

Oops, sorry.

> but other than that it works fine:
> 
> ---
> Alsa devices: cap: hw:2,0 (/dev/video0), out: default
> w 0x180 h 0x120 b 0x480
> w 0x180 h 0x120 b 0x480
> map 0x51000 but size 0x51000
> map 0x51000 but size 0x51000

That does  not look right,  that should be:

w 0x180 h 0x120 b 0x180

So for some reason xawtv it choosing a V4L2_PIX_FMT_BGR24 / V4L2_PIX_FMT_RGB24 as source format
rather then using the V4L2_PIX_FMT_YUV420 format it as using before... Did you make any other changes, e.g. maybe change from xorg to a wayland session or the other wayaround, or maybe switch from xf86-video-intel to xf86-video-modesetting or the other way around ?

You can see what input format xawtv is using by running "xawtv -v 1" and then look for a line like this:

blit: 384x288/[12 bit YUV 4:2:0 (planar)] => Xvideo

This line is like what it likely was saying when you hit the segfault, the numbers from your latest test run with the new patched kernel driver point to another input format being used in that test run, it would be good if you can reproduce using a 12 bit YUV input format like before.

Typically xawtv will pick this input format when used with the xorg modesetting driver + glamor video
acceleration.

Thanks for testing.

Regards,

Hans
Comment 22 Stas Sergeev 2016-02-14 10:55:52 EST
Yes, the patched kernel was tested with
user modesetting (aka vesa) because I've
yet to figure how to get KMS to work with
it. Will try again...
Comment 23 Stas Sergeev 2016-02-14 13:00:06 EST
OK, I don't know why am I getting the
blank screen when enabling KMS in self-compiled
kernel. But it turned out, if I blindly log in
and start X, then the picture appears, I only can't
switch back to console... So I was able to test your
patch with kms after all:

Alsa devices: cap: hw:2,0 (/dev/video0), out: default
w 0x180 h 0x120 b 0x240
kernel driver bug byteyperline should be the bytesperline of the first plane!
w 0x180 h 0x120 b 0x180
map 0x28800 but size 0x28800
map 0x28800 but size 0x28800


Interesting: the numbers now match what you want,
but the "bug" message from your other patch is still
here. So I'd say your kernel patch doesn't help. Checking...
no, works fine even with unpatched xawtv.
Hmm, then I guess your xawtv patch wrong.
Comment 24 Hans de Goede 2016-02-14 13:30:52 EST
Hi,

Thanks for the testing, the first log line:

w 0x180 h 0x120 b 0x240

Still looks wrong though, I wonder were it is coming from, can you run:

LIBV4L2_LOG_FILENAME=/tmp/log xawtv -v 1

And attach both /tmp/log and the output generated to the terminal here?

Thanks & Regards,

Hans
Comment 25 Stas Sergeev 2016-02-14 13:42 EST
Created attachment 1127045 [details]
new log

This is xawtv-3.103, running on Linux/x86_64 (4.5.0-rc2-00345-g2c62bd2)
xinerama 0: 1280x1024+0+0
vid-open-auto: using analog TV device /dev/video0
WARNING: No DGA direct video mode for this display.
WARNING: keeping fbuf pitch at: 5120, as no base addr was detected
WARNING: couldn't find framebuffer base address, try manual
         configuration ("v4l-conf -a <addr>")
v4l2: WARNING: framebuffer base address mismatch
v4l2: me=(nil) v4l=(nil)
Alsa devices: cap: hw:2,0 (/dev/video0), out: default
w 0x180 h 0x120 b 0x240
w 0x180 h 0x120 b 0x180
map 0x28800 but size 0x28800
map 0x28800 but size 0x28800
w 0x180 h 0x120 b 0x180
map 0x28800 but size 0x28800
map 0x28800 but size 0x28800
w 0x180 h 0x120 b 0x180
w 0x180 h 0x120 b 0x600
map 0x6c000 but size 0x6c000
[stas@lin2 ~]$ xawtv
This is xawtv-3.103, running on Linux/x86_64 (4.5.0-rc2-00345-g2c62bd2)
xinerama 0: 1280x1024+0+0
vid-open-auto: using analog TV device /dev/video0
WARNING: No DGA direct video mode for this display.
WARNING: keeping fbuf pitch at: 5120, as no base addr was detected
WARNING: couldn't find framebuffer base address, try manual
         configuration ("v4l-conf -a <addr>")
v4l2: WARNING: framebuffer base address mismatch
v4l2: me=(nil) v4l=(nil)
Alsa devices: cap: hw:2,0 (/dev/video0), out: default
w 0x180 h 0x120 b 0x240
kernel driver bug byteyperline should be the bytesperline of the first plane!
w 0x180 h 0x120 b 0x180
map 0x28800 but size 0x28800
map 0x28800 but size 0x28800
w 0x180 h 0x120 b 0x180
map 0x28800 but size 0x28800
map 0x28800 but size 0x28800
w 0x180 h 0x120 b 0x180
w 0x180 h 0x120 b 0x600
map 0x6c000 but size 0x6c000
[stas@lin2 ~]$ rm /tmp/log
[stas@lin2 ~]$ LIBV4L2_LOG_FILENAME=/tmp/log xawtv -v 1
This is xawtv-3.103, running on Linux/x86_64 (4.5.0-rc2-00345-g2c62bd2)
visual: id=0x21 class=4 (TrueColor), depth=24
visual: id=0x22 class=5 (DirectColor), depth=24
visual: id=0x2f5 class=4 (TrueColor), depth=24
visual: id=0x2f6 class=4 (TrueColor), depth=24
visual: id=0x2f7 class=4 (TrueColor), depth=24
visual: id=0x2f8 class=4 (TrueColor), depth=24
visual: id=0x2f9 class=4 (TrueColor), depth=24
visual: id=0x2fa class=4 (TrueColor), depth=24
visual: id=0x2fb class=4 (TrueColor), depth=24
visual: id=0x2fc class=4 (TrueColor), depth=24
visual: id=0x2fd class=4 (TrueColor), depth=24
visual: id=0x2fe class=4 (TrueColor), depth=24
visual: id=0x2ff class=4 (TrueColor), depth=24
visual: id=0x300 class=4 (TrueColor), depth=24
visual: id=0x301 class=4 (TrueColor), depth=24
visual: id=0x302 class=4 (TrueColor), depth=24
visual: id=0x303 class=4 (TrueColor), depth=24
visual: id=0x304 class=4 (TrueColor), depth=24
visual: id=0x305 class=4 (TrueColor), depth=24
visual: id=0x306 class=4 (TrueColor), depth=24
visual: id=0x307 class=4 (TrueColor), depth=24
visual: id=0x308 class=4 (TrueColor), depth=24
visual: id=0x309 class=4 (TrueColor), depth=24
visual: id=0x30a class=4 (TrueColor), depth=24
visual: id=0x30b class=4 (TrueColor), depth=24
visual: id=0x30c class=4 (TrueColor), depth=24
visual: id=0x30d class=4 (TrueColor), depth=24
visual: id=0x30e class=4 (TrueColor), depth=24
visual: id=0x30f class=4 (TrueColor), depth=24
visual: id=0x310 class=4 (TrueColor), depth=24
visual: id=0x311 class=4 (TrueColor), depth=24
visual: id=0x312 class=4 (TrueColor), depth=24
visual: id=0x313 class=4 (TrueColor), depth=24
visual: id=0x314 class=4 (TrueColor), depth=24
visual: id=0x315 class=4 (TrueColor), depth=24
visual: id=0x316 class=4 (TrueColor), depth=24
visual: id=0x317 class=4 (TrueColor), depth=24
visual: id=0x318 class=4 (TrueColor), depth=24
visual: id=0x319 class=4 (TrueColor), depth=24
visual: id=0x31a class=4 (TrueColor), depth=24
visual: id=0x31b class=4 (TrueColor), depth=24
visual: id=0x31c class=4 (TrueColor), depth=24
visual: id=0x31d class=4 (TrueColor), depth=24
visual: id=0x31e class=4 (TrueColor), depth=24
visual: id=0x31f class=4 (TrueColor), depth=24
visual: id=0x320 class=4 (TrueColor), depth=24
visual: id=0x321 class=4 (TrueColor), depth=24
visual: id=0x322 class=4 (TrueColor), depth=24
visual: id=0x323 class=4 (TrueColor), depth=24
visual: id=0x324 class=4 (TrueColor), depth=24
visual: id=0x325 class=4 (TrueColor), depth=24
visual: id=0x326 class=4 (TrueColor), depth=24
visual: id=0x327 class=4 (TrueColor), depth=24
visual: id=0x328 class=4 (TrueColor), depth=24
visual: id=0x329 class=4 (TrueColor), depth=24
visual: id=0x32a class=4 (TrueColor), depth=24
visual: id=0x32b class=4 (TrueColor), depth=24
visual: id=0x32c class=4 (TrueColor), depth=24
visual: id=0x32d class=4 (TrueColor), depth=24
visual: id=0x32e class=4 (TrueColor), depth=24
visual: id=0x32f class=4 (TrueColor), depth=24
visual: id=0x330 class=4 (TrueColor), depth=24
visual: id=0x331 class=4 (TrueColor), depth=24
visual: id=0x332 class=4 (TrueColor), depth=24
visual: id=0x333 class=4 (TrueColor), depth=24
visual: id=0x334 class=4 (TrueColor), depth=24
visual: id=0x335 class=4 (TrueColor), depth=24
visual: id=0x336 class=4 (TrueColor), depth=24
visual: id=0x337 class=4 (TrueColor), depth=24
visual: id=0x338 class=4 (TrueColor), depth=24
visual: id=0x339 class=4 (TrueColor), depth=24
visual: id=0x33a class=4 (TrueColor), depth=24
visual: id=0x33b class=4 (TrueColor), depth=24
visual: id=0x33c class=4 (TrueColor), depth=24
visual: id=0x33d class=4 (TrueColor), depth=24
visual: id=0x33e class=4 (TrueColor), depth=24
visual: id=0x33f class=4 (TrueColor), depth=24
visual: id=0x340 class=4 (TrueColor), depth=24
visual: id=0x341 class=4 (TrueColor), depth=24
visual: id=0x342 class=4 (TrueColor), depth=24
visual: id=0x343 class=4 (TrueColor), depth=24
visual: id=0x344 class=4 (TrueColor), depth=24
visual: id=0x345 class=4 (TrueColor), depth=24
visual: id=0x346 class=4 (TrueColor), depth=24
visual: id=0x347 class=4 (TrueColor), depth=24
visual: id=0x348 class=4 (TrueColor), depth=24
visual: id=0x349 class=4 (TrueColor), depth=24
visual: id=0x34a class=4 (TrueColor), depth=24
visual: id=0x34b class=4 (TrueColor), depth=24
visual: id=0x34c class=4 (TrueColor), depth=24
visual: id=0x34d class=4 (TrueColor), depth=24
visual: id=0x34e class=4 (TrueColor), depth=24
visual: id=0x34f class=4 (TrueColor), depth=24
visual: id=0x350 class=4 (TrueColor), depth=24
visual: id=0x351 class=4 (TrueColor), depth=24
visual: id=0x352 class=4 (TrueColor), depth=24
visual: id=0x353 class=4 (TrueColor), depth=24
visual: id=0x354 class=4 (TrueColor), depth=24
visual: id=0x355 class=4 (TrueColor), depth=24
visual: id=0x356 class=4 (TrueColor), depth=24
visual: id=0x357 class=4 (TrueColor), depth=24
visual: id=0x358 class=4 (TrueColor), depth=24
visual: id=0x359 class=4 (TrueColor), depth=24
visual: id=0x35a class=4 (TrueColor), depth=24
visual: id=0x35b class=4 (TrueColor), depth=24
visual: id=0x35c class=4 (TrueColor), depth=24
visual: id=0x35d class=4 (TrueColor), depth=24
visual: id=0x35e class=4 (TrueColor), depth=24
visual: id=0x35f class=4 (TrueColor), depth=24
visual: id=0x360 class=4 (TrueColor), depth=24
visual: id=0x361 class=4 (TrueColor), depth=24
visual: id=0x362 class=4 (TrueColor), depth=24
visual: id=0x363 class=4 (TrueColor), depth=24
visual: id=0x364 class=4 (TrueColor), depth=24
visual: id=0x365 class=4 (TrueColor), depth=24
visual: id=0x366 class=4 (TrueColor), depth=24
visual: id=0x367 class=4 (TrueColor), depth=24
visual: id=0x368 class=4 (TrueColor), depth=24
visual: id=0x369 class=4 (TrueColor), depth=24
visual: id=0x36a class=4 (TrueColor), depth=24
visual: id=0x36b class=4 (TrueColor), depth=24
visual: id=0x36c class=4 (TrueColor), depth=24
visual: id=0x36d class=4 (TrueColor), depth=24
visual: id=0x36e class=4 (TrueColor), depth=24
visual: id=0x36f class=4 (TrueColor), depth=24
visual: id=0x370 class=4 (TrueColor), depth=24
visual: id=0x371 class=4 (TrueColor), depth=24
visual: id=0x372 class=4 (TrueColor), depth=24
visual: id=0x373 class=4 (TrueColor), depth=24
visual: id=0x374 class=4 (TrueColor), depth=24
visual: id=0x375 class=4 (TrueColor), depth=24
visual: id=0x376 class=4 (TrueColor), depth=24
visual: id=0x377 class=4 (TrueColor), depth=24
visual: id=0x378 class=4 (TrueColor), depth=24
visual: id=0x379 class=4 (TrueColor), depth=24
visual: id=0x37a class=4 (TrueColor), depth=24
visual: id=0x37b class=4 (TrueColor), depth=24
visual: id=0x37c class=4 (TrueColor), depth=24
visual: id=0x37d class=4 (TrueColor), depth=24
visual: id=0x37e class=4 (TrueColor), depth=24
visual: id=0x37f class=4 (TrueColor), depth=24
visual: id=0x380 class=4 (TrueColor), depth=24
visual: id=0x381 class=4 (TrueColor), depth=24
visual: id=0x382 class=4 (TrueColor), depth=24
visual: id=0x383 class=4 (TrueColor), depth=24
visual: id=0x384 class=4 (TrueColor), depth=24
visual: id=0x385 class=4 (TrueColor), depth=24
visual: id=0x386 class=4 (TrueColor), depth=24
visual: id=0x387 class=4 (TrueColor), depth=24
visual: id=0x388 class=4 (TrueColor), depth=24
visual: id=0x389 class=4 (TrueColor), depth=24
visual: id=0x38a class=4 (TrueColor), depth=24
visual: id=0x38b class=4 (TrueColor), depth=24
visual: id=0x38c class=4 (TrueColor), depth=24
visual: id=0x38d class=4 (TrueColor), depth=24
visual: id=0x38e class=4 (TrueColor), depth=24
visual: id=0x38f class=4 (TrueColor), depth=24
visual: id=0x390 class=4 (TrueColor), depth=24
visual: id=0x391 class=4 (TrueColor), depth=24
visual: id=0x392 class=4 (TrueColor), depth=24
visual: id=0x393 class=4 (TrueColor), depth=24
visual: id=0x394 class=4 (TrueColor), depth=24
visual: id=0x395 class=4 (TrueColor), depth=24
visual: id=0x396 class=4 (TrueColor), depth=24
visual: id=0x397 class=4 (TrueColor), depth=24
visual: id=0x398 class=4 (TrueColor), depth=24
visual: id=0x399 class=4 (TrueColor), depth=24
visual: id=0x39a class=4 (TrueColor), depth=24
visual: id=0x39b class=4 (TrueColor), depth=24
visual: id=0x39c class=4 (TrueColor), depth=24
visual: id=0x39d class=4 (TrueColor), depth=24
visual: id=0x39e class=4 (TrueColor), depth=24
visual: id=0x39f class=4 (TrueColor), depth=24
visual: id=0x3a0 class=4 (TrueColor), depth=24
visual: id=0x3a1 class=4 (TrueColor), depth=24
visual: id=0x3a2 class=4 (TrueColor), depth=24
visual: id=0x3a3 class=4 (TrueColor), depth=24
visual: id=0x3a4 class=4 (TrueColor), depth=24
visual: id=0x3a5 class=4 (TrueColor), depth=24
visual: id=0x3a6 class=4 (TrueColor), depth=24
visual: id=0x3a7 class=4 (TrueColor), depth=24
visual: id=0x3a8 class=4 (TrueColor), depth=24
visual: id=0x3a9 class=4 (TrueColor), depth=24
visual: id=0x3aa class=4 (TrueColor), depth=24
visual: id=0x3ab class=4 (TrueColor), depth=24
visual: id=0x3ac class=4 (TrueColor), depth=24
visual: id=0x3ad class=4 (TrueColor), depth=24
visual: id=0x3ae class=4 (TrueColor), depth=24
visual: id=0x3af class=4 (TrueColor), depth=24
visual: id=0x3b0 class=4 (TrueColor), depth=24
visual: id=0x3b1 class=4 (TrueColor), depth=24
visual: id=0x3b2 class=4 (TrueColor), depth=24
visual: id=0x3b3 class=4 (TrueColor), depth=24
visual: id=0x3b4 class=4 (TrueColor), depth=24
visual: id=0x3b5 class=4 (TrueColor), depth=24
visual: id=0x3b6 class=4 (TrueColor), depth=24
visual: id=0x3b7 class=4 (TrueColor), depth=24
visual: id=0x3b8 class=4 (TrueColor), depth=24
visual: id=0x3b9 class=4 (TrueColor), depth=24
visual: id=0x3ba class=4 (TrueColor), depth=24
visual: id=0x3bb class=4 (TrueColor), depth=24
visual: id=0x3bc class=4 (TrueColor), depth=24
visual: id=0x3bd class=4 (TrueColor), depth=24
visual: id=0x3be class=4 (TrueColor), depth=24
visual: id=0x3bf class=4 (TrueColor), depth=24
visual: id=0x3c0 class=4 (TrueColor), depth=24
visual: id=0x3c1 class=4 (TrueColor), depth=24
visual: id=0x3c2 class=4 (TrueColor), depth=24
visual: id=0x3c3 class=4 (TrueColor), depth=24
visual: id=0x3c4 class=4 (TrueColor), depth=24
visual: id=0x3c5 class=4 (TrueColor), depth=24
visual: id=0x3c6 class=4 (TrueColor), depth=24
visual: id=0x3c7 class=4 (TrueColor), depth=24
visual: id=0x3c8 class=4 (TrueColor), depth=24
visual: id=0x3c9 class=4 (TrueColor), depth=24
visual: id=0x3ca class=4 (TrueColor), depth=24
visual: id=0x3cb class=4 (TrueColor), depth=24
visual: id=0x3cc class=4 (TrueColor), depth=24
visual: id=0x3cd class=4 (TrueColor), depth=24
visual: id=0x3ce class=4 (TrueColor), depth=24
visual: id=0x3cf class=4 (TrueColor), depth=24
visual: id=0x3d0 class=4 (TrueColor), depth=24
visual: id=0x3d1 class=4 (TrueColor), depth=24
visual: id=0x3d2 class=4 (TrueColor), depth=24
visual: id=0x3d3 class=4 (TrueColor), depth=24
visual: id=0x3d4 class=4 (TrueColor), depth=24
visual: id=0x3d5 class=4 (TrueColor), depth=24
visual: id=0x3d6 class=4 (TrueColor), depth=24
visual: id=0x3d7 class=4 (TrueColor), depth=24
visual: id=0x3d8 class=4 (TrueColor), depth=24
visual: id=0x3d9 class=4 (TrueColor), depth=24
visual: id=0x3da class=4 (TrueColor), depth=24
visual: id=0x3db class=4 (TrueColor), depth=24
visual: id=0x3dc class=4 (TrueColor), depth=24
visual: id=0x3dd class=4 (TrueColor), depth=24
visual: id=0x3de class=4 (TrueColor), depth=24
visual: id=0x3df class=4 (TrueColor), depth=24
visual: id=0x3e0 class=4 (TrueColor), depth=24
visual: id=0x3e1 class=4 (TrueColor), depth=24
visual: id=0x3e2 class=4 (TrueColor), depth=24
visual: id=0x3e3 class=5 (DirectColor), depth=24
visual: id=0x3e4 class=5 (DirectColor), depth=24
visual: id=0x3e5 class=5 (DirectColor), depth=24
visual: id=0x3e6 class=5 (DirectColor), depth=24
visual: id=0x3e7 class=5 (DirectColor), depth=24
visual: id=0x3e8 class=5 (DirectColor), depth=24
visual: id=0x3e9 class=5 (DirectColor), depth=24
visual: id=0x3ea class=5 (DirectColor), depth=24
visual: id=0x3eb class=5 (DirectColor), depth=24
visual: id=0x3ec class=5 (DirectColor), depth=24
visual: id=0x3ed class=5 (DirectColor), depth=24
visual: id=0x3ee class=5 (DirectColor), depth=24
visual: id=0x3ef class=5 (DirectColor), depth=24
visual: id=0x3f0 class=5 (DirectColor), depth=24
visual: id=0x3f1 class=5 (DirectColor), depth=24
visual: id=0x3f2 class=5 (DirectColor), depth=24
visual: id=0x3f3 class=5 (DirectColor), depth=24
visual: id=0x3f4 class=5 (DirectColor), depth=24
visual: id=0x3f5 class=5 (DirectColor), depth=24
visual: id=0x3f6 class=5 (DirectColor), depth=24
visual: id=0x3f7 class=5 (DirectColor), depth=24
visual: id=0x3f8 class=5 (DirectColor), depth=24
visual: id=0x3f9 class=5 (DirectColor), depth=24
visual: id=0x3fa class=5 (DirectColor), depth=24
visual: id=0x3fb class=5 (DirectColor), depth=24
visual: id=0x3fc class=5 (DirectColor), depth=24
visual: id=0x3fd class=5 (DirectColor), depth=24
visual: id=0x3fe class=5 (DirectColor), depth=24
visual: id=0x3ff class=5 (DirectColor), depth=24
visual: id=0x400 class=5 (DirectColor), depth=24
visual: id=0x401 class=5 (DirectColor), depth=24
visual: id=0x402 class=5 (DirectColor), depth=24
visual: id=0x403 class=5 (DirectColor), depth=24
visual: id=0x404 class=5 (DirectColor), depth=24
visual: id=0x405 class=5 (DirectColor), depth=24
visual: id=0x406 class=5 (DirectColor), depth=24
visual: id=0x407 class=5 (DirectColor), depth=24
visual: id=0x408 class=5 (DirectColor), depth=24
visual: id=0x409 class=5 (DirectColor), depth=24
visual: id=0x40a class=5 (DirectColor), depth=24
visual: id=0x40b class=5 (DirectColor), depth=24
visual: id=0x40c class=5 (DirectColor), depth=24
visual: id=0x40d class=5 (DirectColor), depth=24
visual: id=0x40e class=5 (DirectColor), depth=24
visual: id=0x40f class=5 (DirectColor), depth=24
visual: id=0x410 class=5 (DirectColor), depth=24
visual: id=0x411 class=5 (DirectColor), depth=24
visual: id=0x412 class=5 (DirectColor), depth=24
visual: id=0x413 class=5 (DirectColor), depth=24
visual: id=0x414 class=5 (DirectColor), depth=24
visual: id=0x415 class=5 (DirectColor), depth=24
visual: id=0x416 class=5 (DirectColor), depth=24
visual: id=0x417 class=5 (DirectColor), depth=24
visual: id=0x418 class=5 (DirectColor), depth=24
visual: id=0x419 class=5 (DirectColor), depth=24
visual: id=0x41a class=5 (DirectColor), depth=24
visual: id=0x41b class=5 (DirectColor), depth=24
visual: id=0x41c class=5 (DirectColor), depth=24
visual: id=0x41d class=5 (DirectColor), depth=24
visual: id=0x41e class=5 (DirectColor), depth=24
visual: id=0x41f class=5 (DirectColor), depth=24
visual: id=0x420 class=5 (DirectColor), depth=24
visual: id=0x421 class=5 (DirectColor), depth=24
visual: id=0x422 class=5 (DirectColor), depth=24
visual: id=0x423 class=5 (DirectColor), depth=24
visual: id=0x424 class=5 (DirectColor), depth=24
visual: id=0x425 class=5 (DirectColor), depth=24
visual: id=0x426 class=5 (DirectColor), depth=24
visual: id=0x427 class=5 (DirectColor), depth=24
visual: id=0x428 class=5 (DirectColor), depth=24
visual: id=0x429 class=5 (DirectColor), depth=24
visual: id=0x42a class=5 (DirectColor), depth=24
visual: id=0x42b class=5 (DirectColor), depth=24
visual: id=0x42c class=5 (DirectColor), depth=24
visual: id=0x42d class=5 (DirectColor), depth=24
visual: id=0x42e class=5 (DirectColor), depth=24
visual: id=0x42f class=5 (DirectColor), depth=24
visual: id=0x430 class=5 (DirectColor), depth=24
visual: id=0x431 class=5 (DirectColor), depth=24
visual: id=0x432 class=5 (DirectColor), depth=24
visual: id=0x433 class=5 (DirectColor), depth=24
visual: id=0x434 class=5 (DirectColor), depth=24
visual: id=0x435 class=5 (DirectColor), depth=24
visual: id=0x436 class=5 (DirectColor), depth=24
visual: id=0x437 class=5 (DirectColor), depth=24
visual: id=0x438 class=5 (DirectColor), depth=24
visual: id=0x439 class=5 (DirectColor), depth=24
visual: id=0x43a class=5 (DirectColor), depth=24
visual: id=0x43b class=5 (DirectColor), depth=24
visual: id=0x43c class=5 (DirectColor), depth=24
visual: id=0x43d class=5 (DirectColor), depth=24
visual: id=0x43e class=5 (DirectColor), depth=24
visual: id=0x43f class=5 (DirectColor), depth=24
visual: id=0x440 class=5 (DirectColor), depth=24
visual: id=0x441 class=5 (DirectColor), depth=24
visual: id=0x442 class=5 (DirectColor), depth=24
visual: id=0x443 class=5 (DirectColor), depth=24
visual: id=0x444 class=5 (DirectColor), depth=24
visual: id=0x445 class=5 (DirectColor), depth=24
visual: id=0x446 class=5 (DirectColor), depth=24
visual: id=0x447 class=5 (DirectColor), depth=24
visual: id=0x448 class=5 (DirectColor), depth=24
visual: id=0x449 class=5 (DirectColor), depth=24
visual: id=0x44a class=5 (DirectColor), depth=24
visual: id=0x44b class=5 (DirectColor), depth=24
visual: id=0x44c class=5 (DirectColor), depth=24
visual: id=0x44d class=5 (DirectColor), depth=24
visual: id=0x44e class=5 (DirectColor), depth=24
visual: id=0x44f class=5 (DirectColor), depth=24
visual: id=0x450 class=5 (DirectColor), depth=24
visual: id=0x451 class=5 (DirectColor), depth=24
visual: id=0x452 class=5 (DirectColor), depth=24
visual: id=0x453 class=5 (DirectColor), depth=24
visual: id=0x454 class=5 (DirectColor), depth=24
visual: id=0x455 class=5 (DirectColor), depth=24
visual: id=0x456 class=5 (DirectColor), depth=24
visual: id=0x457 class=5 (DirectColor), depth=24
visual: id=0x458 class=5 (DirectColor), depth=24
visual: id=0x459 class=5 (DirectColor), depth=24
visual: id=0x45a class=5 (DirectColor), depth=24
visual: id=0x45b class=5 (DirectColor), depth=24
visual: id=0x45c class=5 (DirectColor), depth=24
visual: id=0x45d class=5 (DirectColor), depth=24
visual: id=0x45e class=5 (DirectColor), depth=24
visual: id=0x45f class=5 (DirectColor), depth=24
visual: id=0x460 class=5 (DirectColor), depth=24
visual: id=0x461 class=5 (DirectColor), depth=24
visual: id=0x462 class=5 (DirectColor), depth=24
visual: id=0x463 class=5 (DirectColor), depth=24
visual: id=0x464 class=5 (DirectColor), depth=24
visual: id=0x465 class=5 (DirectColor), depth=24
visual: id=0x466 class=5 (DirectColor), depth=24
visual: id=0x467 class=5 (DirectColor), depth=24
visual: id=0x468 class=5 (DirectColor), depth=24
visual: id=0x469 class=5 (DirectColor), depth=24
visual: id=0x46a class=5 (DirectColor), depth=24
visual: id=0x46b class=5 (DirectColor), depth=24
visual: id=0x46c class=5 (DirectColor), depth=24
visual: id=0x46d class=5 (DirectColor), depth=24
visual: id=0x46e class=5 (DirectColor), depth=24
visual: id=0x46f class=5 (DirectColor), depth=24
visual: id=0x470 class=5 (DirectColor), depth=24
visual: id=0x471 class=5 (DirectColor), depth=24
visual: id=0x472 class=5 (DirectColor), depth=24
visual: id=0x473 class=5 (DirectColor), depth=24
visual: id=0x474 class=5 (DirectColor), depth=24
visual: id=0x475 class=5 (DirectColor), depth=24
visual: id=0x476 class=5 (DirectColor), depth=24
visual: id=0x477 class=5 (DirectColor), depth=24
visual: id=0x478 class=5 (DirectColor), depth=24
visual: id=0x479 class=5 (DirectColor), depth=24
visual: id=0x47a class=5 (DirectColor), depth=24
visual: id=0x47b class=5 (DirectColor), depth=24
visual: id=0x47c class=5 (DirectColor), depth=24
visual: id=0x47d class=5 (DirectColor), depth=24
visual: id=0x47e class=5 (DirectColor), depth=24
visual: id=0x47f class=5 (DirectColor), depth=24
visual: id=0x480 class=5 (DirectColor), depth=24
visual: id=0x481 class=5 (DirectColor), depth=24
visual: id=0x482 class=5 (DirectColor), depth=24
visual: id=0x483 class=5 (DirectColor), depth=24
visual: id=0x484 class=5 (DirectColor), depth=24
visual: id=0x485 class=5 (DirectColor), depth=24
visual: id=0x486 class=5 (DirectColor), depth=24
visual: id=0x487 class=5 (DirectColor), depth=24
visual: id=0x488 class=5 (DirectColor), depth=24
visual: id=0x489 class=5 (DirectColor), depth=24
visual: id=0x48a class=5 (DirectColor), depth=24
visual: id=0x48b class=5 (DirectColor), depth=24
visual: id=0x48c class=5 (DirectColor), depth=24
visual: id=0x48d class=5 (DirectColor), depth=24
visual: id=0x48e class=5 (DirectColor), depth=24
visual: id=0x48f class=5 (DirectColor), depth=24
visual: id=0x490 class=5 (DirectColor), depth=24
visual: id=0x491 class=5 (DirectColor), depth=24
visual: id=0x492 class=5 (DirectColor), depth=24
visual: id=0x493 class=5 (DirectColor), depth=24
visual: id=0x494 class=5 (DirectColor), depth=24
visual: id=0x495 class=5 (DirectColor), depth=24
visual: id=0x496 class=5 (DirectColor), depth=24
visual: id=0x497 class=5 (DirectColor), depth=24
visual: id=0x498 class=5 (DirectColor), depth=24
visual: id=0x499 class=5 (DirectColor), depth=24
visual: id=0x49a class=5 (DirectColor), depth=24
visual: id=0x49b class=5 (DirectColor), depth=24
visual: id=0x49c class=5 (DirectColor), depth=24
visual: id=0x49d class=5 (DirectColor), depth=24
visual: id=0x49e class=5 (DirectColor), depth=24
visual: id=0x49f class=5 (DirectColor), depth=24
visual: id=0x4a0 class=5 (DirectColor), depth=24
visual: id=0x4a1 class=5 (DirectColor), depth=24
visual: id=0x4a2 class=5 (DirectColor), depth=24
visual: id=0x4a3 class=5 (DirectColor), depth=24
visual: id=0x4a4 class=5 (DirectColor), depth=24
visual: id=0x4a5 class=5 (DirectColor), depth=24
visual: id=0x4a6 class=5 (DirectColor), depth=24
visual: id=0x4a7 class=5 (DirectColor), depth=24
visual: id=0x4a8 class=5 (DirectColor), depth=24
visual: id=0x4a9 class=5 (DirectColor), depth=24
visual: id=0x4aa class=5 (DirectColor), depth=24
visual: id=0x4ab class=5 (DirectColor), depth=24
visual: id=0x4ac class=5 (DirectColor), depth=24
visual: id=0x4ad class=5 (DirectColor), depth=24
visual: id=0x4ae class=5 (DirectColor), depth=24
visual: id=0x4af class=5 (DirectColor), depth=24
visual: id=0x4b0 class=5 (DirectColor), depth=24
visual: id=0x4b1 class=5 (DirectColor), depth=24
visual: id=0x4b2 class=5 (DirectColor), depth=24
visual: id=0x4b3 class=5 (DirectColor), depth=24
visual: id=0x4b4 class=5 (DirectColor), depth=24
visual: id=0x4b5 class=5 (DirectColor), depth=24
visual: id=0x4b6 class=5 (DirectColor), depth=24
visual: id=0x4b7 class=5 (DirectColor), depth=24
visual: id=0x4b8 class=5 (DirectColor), depth=24
visual: id=0x4b9 class=5 (DirectColor), depth=24
visual: id=0x4ba class=5 (DirectColor), depth=24
visual: id=0x4bb class=5 (DirectColor), depth=24
visual: id=0x4bc class=5 (DirectColor), depth=24
visual: id=0x4bd class=5 (DirectColor), depth=24
visual: id=0x4be class=5 (DirectColor), depth=24
visual: id=0x4bf class=5 (DirectColor), depth=24
visual: id=0x4c0 class=5 (DirectColor), depth=24
visual: id=0x4c1 class=5 (DirectColor), depth=24
visual: id=0x4c2 class=5 (DirectColor), depth=24
visual: id=0x4c3 class=5 (DirectColor), depth=24
visual: id=0x4c4 class=5 (DirectColor), depth=24
visual: id=0x4c5 class=5 (DirectColor), depth=24
visual: id=0x4c6 class=5 (DirectColor), depth=24
visual: id=0x4c7 class=5 (DirectColor), depth=24
visual: id=0x4c8 class=5 (DirectColor), depth=24
visual: id=0x4c9 class=5 (DirectColor), depth=24
visual: id=0x4ca class=5 (DirectColor), depth=24
visual: id=0x4cb class=5 (DirectColor), depth=24
visual: id=0x4cc class=5 (DirectColor), depth=24
visual: id=0x4cd class=5 (DirectColor), depth=24
visual: id=0x4ce class=5 (DirectColor), depth=24
visual: id=0x4cf class=5 (DirectColor), depth=24
visual: id=0x4d0 class=5 (DirectColor), depth=24
visual: id=0x4d1 class=5 (DirectColor), depth=24
visual: id=0x9c class=4 (TrueColor), depth=32
x11: color depth: 24 bits, 3 bytes - pixmap: 4 bytes
x11: color masks: red=0x00ff0000 green=0x0000ff00 blue=0x000000ff
x11: server byte order: little endian
x11: client byte order: little endian
check if the X-Server is local ... * ok (unix socket)
main: dga extention...
DGA version 2.0
main: xinerama extention...
xinerama 0: 1280x1024+0+0
main: xvideo extention [video]...
Xvideo: 1 adaptors available.
Xvideo: GLAMOR Textured Video: input image, ports 137-152
Xvideo: no usable video port found
main: xvideo extention [image]...
blit: xv: 0x32315659 (YV12) planar
blit: xv: 0x30323449 (I420) planar [ok: 12 bit YUV 4:2:0 (planar)]
main: init main window...
main: install signal handlers...
main thread [pid=11498]
main: open grabber device...
x11: 1280x1024, 32 bit/pixel, 0 byte/scanline
vid-open-auto: trying: /dev/video0... 
Using libv4l plugin
v4l2: device caps: 7, required 6
v4l2: open
v4l2: device info:
  saa7134 4.5.0 / Avermedia AVerTV Studio 307 @ PCI:0000:04:06.0
v4l2: device min size 48x32
vid-open-auto: using analog TV device /dev/video0
vid-open-auto: success, using: /dev/video0
vid-open: closing dev to run v4lconf
v4l2: close
v4l-conf: using X11 display :1
dga: version 2.0
WARNING: No DGA direct video mode for this display.
mode: 1280x1024, depth=24, bpp=32, bpl=5120, base=unknown
WARNING: keeping fbuf pitch at: 5120, as no base addr was detected
WARNING: couldn't find framebuffer base address, try manual
         configuration ("v4l-conf -a <addr>")
/dev/video0 [v4l2]: configuration done
got sigchild
waitpid: Нет дочерних процессов
vid-open: re-opening dev after v4lconf
Using libv4l plugin
v4l2: device caps: 7, required 0
v4l2: open
v4l2: device info:
  saa7134 4.5.0 / Avermedia AVerTV Studio 307 @ PCI:0000:04:06.0
v4l2: device min size 48x32
vid-open: re-open ok
v4l2: WARNING: framebuffer base address mismatch
v4l2: me=(nil) v4l=(nil)
Alsa devices: cap: hw:2,0 (/dev/video0), out: default
main: checking wm...
wmhooks: netwm state above
wmhooks: netwm state fullscreen
main: creating windows ...
main: init frequency tables ...
freq: reading /usr/share/xawtv/Index.map
main: read config file ...
freq: newtab 16
freq: reading /usr/share/xawtv/secam-russia.list
freq: reading /usr/share/xawtv/oirt-i-iii.list
freq: reading /usr/share/xawtv/oirt-sl-sh.list
freq: reading /usr/share/xawtv/oirt-h.list
freq: reading /usr/share/xawtv/uhf.list
xt: checking for randr extention ...
xrandr: 1280x1024 1280x960 1152x864 1024x768 960x720 928x696 896x672 832x624 800x600 700x525 640x512 640x480 720x400 640x400 576x432 640x350 512x384 416x312 400x300 320x240 360x200 320x200 320x175
xt: checking for vidmode extention ...
VidMode  version 2.2
  available video mode(s): 1280x1024 1280x1024 1280x960 1152x864 1024x768 1024x768 1024x768 1024x768 1024x768 1024x768 960x720 928x696 928x696 896x672 896x672 832x624 800x600 800x600 800x600 800x600 800x600 800x600 800x600 800x600 800x600 800x600 800x600 700x525 700x525 640x512 640x512 640x512 640x480 640x480 640x480 640x480 640x480 640x480 640x480 640x480 640x480 640x480 720x400 720x400 640x400 576x432 640x350 512x384 512x384 512x384 512x384 416x312 400x300 400x300 400x300 400x300 400x300 320x240 320x240 320x240 320x240 360x200 320x200 320x175
xt: checking for lirc ...
do_connect: could not connect to socket
connect: Нет такого файла или каталога
lirc: no infrared remote support available
xt: checking for joystick ...
xt: checking for midi ...
xt: adding kbd hooks ...
main: mapping main window ...
main: window min size 64x48
main: initialize hardware ...
v4l2:   tuner cap: STEREO LANG1 LANG2
v4l2:   tuner rxs: MONO STEREO
v4l2:   tuner cur: STEREO
main: parse config file ...
alsa: starting copying alsa stream from hw:2,0 to default
xt: handle_pending:  start ...
gd: init
blit: init
blit: gl: init
alsa: Capture min rate is 32000
alsa: Capture max rate is 32000
alsa: Playback min rate is 1
alsa: Playback max rate is 192000
alsa: Will search a common rate between 32000 and 32000
alsa: Using Rate 32000
alsa: capture periods range between 4 and 1024. Want: 2
alsa: capture period time range between 500 and 512000. Want: 15000
alsa: playback periods range between 3 and 1024. Want: 8
alsa: playback period time range between 1000 and 10922688. Want: 15000
alsa: capture period set to 4 periods of 15000 time
alsa: playback period set to 8 periods of 15000 time
alsa: Negociated configuration:
  stream       : PLAYBACK
  access       : RW_INTERLEAVED
  format       : S16_LE
  subformat    : STD
  channels     : 2
  rate         : 32000
  exact rate   : 32000 (32000/1)
  msbits       : 16
  buffer_size  : 3840
  period_size  : 480
  period_time  : 15000
  tstamp_mode  : NONE
  tstamp_type  : GETTIMEOFDAY
  period_step  : 1
  avail_min    : 480
  period_event : 0
  start_threshold  : 1920
  stop_threshold   : 3840
  silence_threshold: 0
  silence_size : 0
  boundary     : 8646911284551352320
  stream       : CAPTURE
  access       : RW_INTERLEAVED
  format       : S16_LE
  subformat    : STD
  channels     : 2
  rate         : 32000
  exact rate   : 32000 (32000/1)
  msbits       : 16
  buffer_size  : 1920
  period_size  : 480
  period_time  : 15000
  tstamp_mode  : NONE
  tstamp_type  : MONOTONIC
  period_step  : 1
  avail_min    : 480
  period_event : 0
  start_threshold  : 480
  stop_threshold   : 1920
  silence_threshold: 0
  silence_size : 0
  boundary     : 8646911284551352320
alsa: Parameters are 32000Hz, S16_LE, 2 channels
alsa: Set bitrate to 32000, buffer size is 1920
alsa: stream started from hw:2,0 to default (32000 Hz, buffer delay = 60,00 ms)
blit: gl: DRI=Yes
blit: gl: texture max size: 16384
blit: resize 384x288
gd: config 384x288 win=160005f
blit: gl: extention GL_EXT_bgra is available
blit: gl: extention GL_EXT_bgra is available
w 0x180 h 0x120 b 0x240
kernel driver bug byteyperline should be the bytesperline of the first plane!
v4l2: new capture params (384x288, YU12, 165888 byte)
setformat: 12 bit YUV 4:2:0 (planar) (384x288): ok
grabdisplay: using "12 bit YUV 4:2:0 (planar)"
xt: handle_pending:  ... done
cmd: "setfreqtab" "russia"
freq: newtab 16
cmd: "capture" "grabdisplay"
gd: start [15]
w 0x180 h 0x120 b 0x180
v4l2: new capture params (384x288, YU12, 165888 byte)
setformat: 12 bit YUV 4:2:0 (planar) (384x288): ok
map 0x28800 but size 0x28800
v4l2: buf 0: video-cap 0x0+165888, used 0
map 0x28800 but size 0x28800
v4l2: buf 1: video-cap 0x29000+165888, used 0
cmd: "setchannel" "R2"
alsa: stream stopped
gd: stop
v4l2: buf 0: video-cap 0x0+165888, used 165888
v4l2: buf 1: video-cap 0x29000+165888, used 165888
v4l2: freq: 59,250
gd: start [15]
w 0x180 h 0x120 b 0x180
v4l2: new capture params (384x288, YU12, 165888 byte)
setformat: 12 bit YUV 4:2:0 (planar) (384x288): ok
map 0x28800 but size 0x28800
v4l2: buf 0: video-cap 0x0+165888, used 0
map 0x28800 but size 0x28800
v4l2: buf 1: video-cap 0x29000+165888, used 0
main: known station tuned, not changing
xt: enter main event loop... 
expose count=0
v4l2: start ts=3717460647000
blit: 384x288/[12 bit YUV 4:2:0 (planar)] => Xvideo
alsa: starting copying alsa stream from hw:2,0 to default
alsa: Capture min rate is 32000
alsa: Capture max rate is 32000
alsa: Playback min rate is 1
alsa: Playback max rate is 192000
alsa: Will search a common rate between 32000 and 32000
alsa: Using Rate 32000
alsa: capture periods range between 4 and 1024. Want: 2
alsa: capture period time range between 500 and 512000. Want: 15000
alsa: playback periods range between 3 and 1024. Want: 8
alsa: playback period time range between 1000 and 10922688. Want: 15000
alsa: capture period set to 4 periods of 15000 time
alsa: playback period set to 8 periods of 15000 time
alsa: Negociated configuration:
  stream       : PLAYBACK
  access       : RW_INTERLEAVED
  format       : S16_LE
  subformat    : STD
  channels     : 2
  rate         : 32000
  exact rate   : 32000 (32000/1)
  msbits       : 16
  buffer_size  : 3840
  period_size  : 480
  period_time  : 15000
  tstamp_mode  : NONE
  tstamp_type  : GETTIMEOFDAY
  period_step  : 1
  avail_min    : 480
  period_event : 0
  start_threshold  : 1920
  stop_threshold   : 3840
  silence_threshold: 0
  silence_size : 0
  boundary     : 8646911284551352320
  stream       : CAPTURE
  access       : RW_INTERLEAVED
  format       : S16_LE
  subformat    : STD
  channels     : 2
  rate         : 32000
  exact rate   : 32000 (32000/1)
  msbits       : 16
  buffer_size  : 1920
  period_size  : 480
  period_time  : 15000
  tstamp_mode  : NONE
  tstamp_type  : MONOTONIC
  period_step  : 1
  avail_min    : 480
  period_event : 0
  start_threshold  : 480
  stop_threshold   : 1920
  silence_threshold: 0
  silence_size : 0
  boundary     : 8646911284551352320
alsa: Parameters are 32000Hz, S16_LE, 2 channels
alsa: Set bitrate to 32000, buffer size is 1920
alsa: stream started from hw:2,0 to default (32000 Hz, buffer delay = 60,00 ms)
v4l2:   tuner cap: STEREO LANG1 LANG2
v4l2:   tuner rxs: MONO STEREO
v4l2:   tuner cur: STEREO
keypad: timeout
Comment 26 Stas Sergeev 2016-02-14 13:44:26 EST
Over-copied a bit.
The above terminal copy/paste occasionally
contains output from 2 invocations. The log
should be fine though.
Comment 27 Stas Sergeev 2016-02-14 13:47:21 EST
Actually even from 3...
Here's the relevant part:

gd: config 384x288 win=160005f
blit: gl: extention GL_EXT_bgra is available
blit: gl: extention GL_EXT_bgra is available
w 0x180 h 0x120 b 0x240
kernel driver bug byteyperline should be the bytesperline of the first plane!
v4l2: new capture params (384x288, YU12, 165888 byte)
setformat: 12 bit YUV 4:2:0 (planar) (384x288): ok
grabdisplay: using "12 bit YUV 4:2:0 (planar)"
xt: handle_pending:  ... done
cmd: "setfreqtab" "russia"
freq: newtab 16
cmd: "capture" "grabdisplay"
gd: start [15]
w 0x180 h 0x120 b 0x180
v4l2: new capture params (384x288, YU12, 165888 byte)
setformat: 12 bit YUV 4:2:0 (planar) (384x288): ok
map 0x28800 but size 0x28800
v4l2: buf 0: video-cap 0x0+165888, used 0
map 0x28800 but size 0x28800
v4l2: buf 1: video-cap 0x29000+165888, used 0
Comment 28 Hans de Goede 2016-02-14 14:22:25 EST
Hi,

Thanks for the quick response. From the log:

VIDIOC_S_FMT app requesting: YU12
request == VIDIOC_S_FMT
  pixelformat: YU12 384x288
  field: 3 bytesperline: 576 imagesize: 165888
  colorspace: 1, priv: feedcafe
result == 0

This corresponds to the first S_FMT call made and the driver bug logging in xawtv, and for some reason on the first s_fmt call it seems the driver still has the bug  ... ?  So looking at things it seems the xawtv workaround is doing the right thing, and I need to dig a little deeper into the driver...

Got it, in saa7134_try_fmt_vid_cap my patch did:

        if (dev->fmt->planar)
                f->fmt.pix.bytesperline = f->fmt.pix.width;
        else
                f->fmt.pix.bytesperline = ...

Which should be:

        if (fmt->planar)
                f->fmt.pix.bytesperline = f->fmt.pix.width;
        else
                f->fmt.pix.bytesperline = ...

As it should check if the fmt being tried is planar, not the current active format.

I'll attach a new version, much obliged if you could test that one.

Regards,

Hans
Comment 29 Hans de Goede 2016-02-14 14:24 EST
Created attachment 1127072 [details]
[PATCH] saa7134: Fix bytesperline not being set correctly for planar formats
Comment 30 Stas Sergeev 2016-02-14 14:41:26 EST
Alsa devices: cap: hw:2,0 (/dev/video0), out: default
w 0x180 h 0x120 b 0x180
w 0x180 h 0x120 b 0x180
map 0x28800 but size 0x28800
map 0x28800 but size 0x28800
w 0x180 h 0x120 b 0x180
map 0x28800 but size 0x28800
map 0x28800 but size 0x28800


Looks good.
Comment 31 Hans de Goede 2016-02-14 15:09:55 EST
(In reply to Stas Sergeev from comment #30)
> Alsa devices: cap: hw:2,0 (/dev/video0), out: default
> w 0x180 h 0x120 b 0x180
> w 0x180 h 0x120 b 0x180
> map 0x28800 but size 0x28800
> map 0x28800 but size 0x28800
> w 0x180 h 0x120 b 0x180
> map 0x28800 but size 0x28800
> map 0x28800 but size 0x28800
> 
> 
> Looks good.

Yep, thanks. I've send the kernel patch upstream.

As for the xawtv workaround, it seems that upstream already has a better workaround in place:

https://git.linuxtv.org/xawtv3.git/commit/?id=c69289c5c11e7a65d99db91e8ee38c0e58212c51

Which it seems that I've commited, so I should have remembered about that one ... Anyways it is good to have fixed the real culprit.

I also have some other fixes pending:

https://git.linuxtv.org/hgoede/xawtv3.git/

I'll create an updated package with these fixes soon.
Comment 32 Stas Sergeev 2016-02-14 15:16:27 EST
A better work-around?
To my taste its worse than even my initial
work-around. :) (which at least noted that the
problem is with planar formats) And the work-around
you attached here, looks much more reasonable too.
Of course its up to you to judge.
Comment 33 Fedora Update System 2016-02-16 03:53:02 EST
xawtv-3.103-8.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-42b50ba79d
Comment 34 Hans de Goede 2016-02-16 04:01:19 EST
(In reply to Stas Sergeev from comment #32)
> A better work-around?
> To my taste its worse than even my initial
> work-around. :)

You're sort of right, the advantage of this workaround is that it is good to do the check for using the smallest buffer size for the memcpy regardless of this specific bug, so we do not need to mark it as a workaround for a specific kernel bug and then remove it later on, like e.g. :

https://git.linuxtv.org/hgoede/xawtv3.git/commit/?id=033d4af24e572741d0ab4f6064f01665395c38f9

p.s.

I noticed in bug 1155784 that you've also tried tvtime in the past and did not like it because it did not have a working digital sound loopback, so you got no audio. This has been fixed a while ago and recently I've synced the code with xawtv making it as good as the xawtv sound support. So you should give tvtime-1.0.8-4.fc23 (currently in updates testing) a try. I myself really like the deinterlacing it does, and it works better with 16:9 shows (goto output configuration -> apply matte -> 16:9)
Comment 35 Stas Sergeev 2016-02-16 06:25:16 EST
> so we do not need to mark it as a workaround for a specific
> kernel bug and then remove it later on
I actually prefer the strategy of adding the driver-specific
work-arounds and remove later on. :) The result is cleaner code.
In this particular case when the blitter knows "better" than its
caller what size is to blit, I wonder what will happen if it
blits the part of the planar buffer. I think the result will be
quite wrong. So IMHO this work-around it good to avoid the crash,
but it doesn't guarantee the correct results, while your new
work-around definitely does.

Its definitely good to know that you moved tvtime forward!
I should definitely give it another try now.
However, xawtv's sound support is not free of troubles too,
its just something that at least works.
See for example this bug:
https://bugzilla.redhat.com/show_bug.cgi?id=1090652
Also there is some pulseaudio bug that prevents it from
properly handling underflow events exactly with xawtv.
If with some CPU or HDD activity xawtv creates underruns,
the sound eventually starts to crackle forever. Sometimes this
can be cured by xawtv's mute/unmute or restart, but sometimes
only "killall pulseaudio" helps getting it back to the sane state
(all other sound clients continue to work fine in a mean time).
Since this happens for something like 10 years without any
hope of an improvement, this moved me permanently to the pa-haters
camp. :) Maybe I need to investigate this situation a bit deeper and
bugreport too...
Comment 36 Fedora Update System 2016-02-16 20:47:07 EST
xawtv-3.103-8.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-4682d02fde
Comment 37 Fedora Update System 2016-02-17 01:28:05 EST
xawtv-3.103-8.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-42b50ba79d
Comment 38 Hans de Goede 2016-02-17 08:13:38 EST
(In reply to Stas Sergeev from comment #35)
> Its definitely good to know that you moved tvtime forward!
> I should definitely give it another try now.
> However, xawtv's sound support is not free of troubles too,
> its just something that at least works.
> See for example this bug:
> https://bugzilla.redhat.com/show_bug.cgi?id=1090652

Hmm, pulseaudio should only open that if some app is actually
trying to record audio and the device is marked as the
default capture device, having your tvcard as the default
audio capture device is a bit weird.

Also did you have an app recording sound open ?

Known culprits which always keep record devices
busy are pavucontrol and skype

> Also there is some pulseaudio bug that prevents it from
> properly handling underflow events exactly with xawtv.
> If with some CPU or HDD activity xawtv creates underruns,
> the sound eventually starts to crackle forever. Sometimes this
> can be cured by xawtv's mute/unmute or restart, but sometimes
> only "killall pulseaudio" helps getting it back to the sane state
> (all other sound clients continue to work fine in a mean time).
> Since this happens for something like 10 years without any
> hope of an improvement, this moved me permanently to the pa-haters
> camp. :) Maybe I need to investigate this situation a bit deeper and
> bugreport too...

By default xawtv aims for the quite low latency of 50 ms, so it has only a 50 ms buffer. This may be not enough on some systems. Try specifying a higher latency, using the -alsa-latency cmdline option. If this helps you can make it permanent using ~/.xawtv:

[global]
alsa_latency=150

Being able to make this permanent actually is part of the changes in the last Fedora build, as I needed this myself when using an external usb audio output device  :)

For tvtime run:
tvtime-configure -z150

To permantly set a different latency / buffersize.
Comment 39 Stas Sergeev 2016-02-17 08:20:58 EST
> Known culprits which always keep record devices
> busy are pavucontrol and skype
Hmm, maybe the problem was pavucontrol itself.
I'll need to re-visit this bug later.
I'll re-open it if it is still valid for me.
I wonder why pavucontrol opens alsa though.
Shouldn't it use just the PA API?

> buffer. This may be not enough on some systems. Try specifying a
> higher latency,
Thanks, I'll try that work-around, and it will likely make
things more reliable. However, as I said, when the bug happens,
the crackling and distortion becomes permanent. So at best higher
latency will reduce the chances of getting into that state.
I'll also see if it is possible to reliably reproduce that
with some SIGSTOP/SIGCONT tricks.
Comment 40 Fedora Update System 2016-02-21 01:21:54 EST
xawtv-3.103-8.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-4682d02fde
Comment 41 Fedora Update System 2016-02-26 02:23:06 EST
xawtv-3.103-8.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.
Comment 42 Fedora Update System 2016-03-06 21:56:50 EST
xawtv-3.103-8.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.