Op ma 12 mrt 2012 12:57:07 schreef Alberto Villa:
> On Fri, Mar 9, 2012 at 10:02 PM, Alberto Villa <avi...@freebsd.org> wrote:
> > Thanks. I think that LooX's patch is part of the solution, but we also
> > need to increase those two limits.
>
> OK, I figured out what was the problem with Qt 4.7. LooX's patches
> don't work (also, one patches unused code). His problems went away
> because of this fix:
> http://qt.gitorious.org/qt/qt/commit/68f78ba/diffs
>
> Thus, kern.ipc.shm_allow_removed=1 is completely useless with Qt 4.8.
>
> LooX: for the record, the PR you referred to was fixed by adding
> XSync() because shmctl(IPC_RMID) was called right after XShmAttach(),
> and X.Org works asynchronously, so XSync() has to be called to be sure
> the segment has already been attached to when marked for removal. It
> took some time for me to understand this.
>
> Now an update on my Qt 4.8 test: so far I live fine with...
>
> kern.ipc.shmmni=1024
> kern.ipc.shmseg=1024
>
> ...set in loader.conf. I still have some repaint problems (window
> titles lag a bit when changing), but I won't give up until they're
> fixed.
OK, kern.ipc.shm_allow_removed=1 is gone and therefore back at 0 where it's
"supposed" to be.
I'm still on 4.7.4 (and will stay there until 4.8 hits the ports proper, due
to time constraints).
Setting shmmni and shmseg doesn't make a difference here.
Applying the patch from that git commit you mention, does. No matter what
sysctl setting I make, everything now works as it should. I also can't find
any difference in performance trying the various settings.
I hope you get the remaining 4.8 issue(s) fixed, but until then I can
recommend fixing the 'blank window'-problem by patching in that commit.
Putting the attached file in ${PORTSDIR}/x11-tookits/qt4-gui/files will do
just that.
--- ./src/gui/image/qnativeimage.cpp.orig 2012-03-12 13:30:21.000000000 +0100
+++ ./src/gui/image/qnativeimage.cpp 2012-03-12 13:32:39.000000000 +0100
@@ -178,15 +178,17 @@
if (ok) {
xshmimg->data = (char*)shmat(xshminfo.shmid, 0, 0);
xshminfo.shmaddr = xshmimg->data;
- if (shmctl(xshminfo.shmid, IPC_RMID, 0) == -1)
- qWarning() << "Error while marking the shared memory segment to be destroyed";
ok = (xshminfo.shmaddr != (char*)-1);
if (ok)
image = QImage((uchar *)xshmimg->data, width, height, format);
}
xshminfo.readOnly = false;
- if (ok)
+ if (ok) {
ok = XShmAttach(X11->display, &xshminfo);
+ XSync(X11->display, False);
+ if (shmctl(xshminfo.shmid, IPC_RMID, 0) == -1)
+ qWarning() << "Error while marking the shared memory segment to be destroyed";
+ }
if (!ok) {
qWarning() << "QNativeImage: Unable to attach to shared memory segment.";
if (xshmimg->data) {
_______________________________________________
kde-freebsd mailing list
kde-freebsd@kde.org
https://mail.kde.org/mailman/listinfo/kde-freebsd
See also http://freebsd.kde.org/ for latest information