From owner-freebsd-x11@FreeBSD.ORG Wed Aug 8 02:16:01 2012 Return-Path: Delivered-To: freebsd-x11@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8D13A106564A for ; Wed, 8 Aug 2012 02:16:01 +0000 (UTC) (envelope-from sendtomatt@gmail.com) Received: from mail-pb0-f54.google.com (mail-pb0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id 5BEA18FC08 for ; Wed, 8 Aug 2012 02:16:01 +0000 (UTC) Received: by pbbrp2 with SMTP id rp2so658145pbb.13 for ; Tue, 07 Aug 2012 19:16:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:x-forwarded-message-id:content-type :content-transfer-encoding; bh=zIX61uMw9TaZ2d2Er6Zi5LMsO70ScxUHdHRCX2YdSfk=; b=lmhxklr3Lpt/X/SHeUvWn82VkfWvYkC5WAmVwYWfaNPtdeqwIVgRCMrOkp5evHj3Kf 0GAwrKVqqB/iL160Q41frgS0n+galN+c1wT/Sf8eBKCL4X2nJ3fKwkaUJ9YLu6Ce147s sfWnFOwRU8T6MK5axHLtyr8Srda/IN+n6kNLGjHcTevNP2Mtz+ov6cBcbYzHLmFDpTjy HySRJ1TSOBX3bNlNRL6Rhpv8HF+YK1+AKCOdchHzLZ36M6mQ+i81uXV/0FZI3wRKTMhw G1JI6KAQa1EtMzxa/zEZTFsnoITkjeFrTmZuRBSHqwa6c/gVrhP5NJXA9HVhn/QIzIO+ Kwbg== Received: by 10.68.138.166 with SMTP id qr6mr13364690pbb.69.1344392161118; Tue, 07 Aug 2012 19:16:01 -0700 (PDT) Received: from flatline.local (70-36-223-239.dsl.dynamic.sonic.net. [70.36.223.239]) by mx.google.com with ESMTPS id rs4sm8881386pbc.0.2012.08.07.19.15.59 (version=SSLv3 cipher=OTHER); Tue, 07 Aug 2012 19:16:00 -0700 (PDT) Message-ID: <5021CBD6.6010607@gmail.com> Date: Tue, 07 Aug 2012 19:15:50 -0700 From: matt User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:14.0) Gecko/20120731 Thunderbird/14.0 MIME-Version: 1.0 To: freebsd-x11@freebsd.org References: <5021CA0E.6080608@gmail.com> In-Reply-To: <5021CA0E.6080608@gmail.com> X-Forwarded-Message-Id: <5021CA0E.6080608@gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Problem with new Xorg, radeon & compiz/Kwin revisited X-BeenThere: freebsd-x11@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: X11 on FreeBSD -- maintaining and support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Aug 2012 02:16:01 -0000 A while back, I was having a strange issue with the new Xorg and compiz. In a nutshell, closing certain windows caused Xorg to exit on nasty signals. At the same time, a few users with Radeon cards were having issues with Kwin disabling opengl for no apparent reason. After some research, I had posted a patch seen in a debian mailing list as a possible solution, and it did indeed solve the immediate problem of crashing Xorg (and later I found out Kwin worked with OpenGL effects when the patch is applied). It was requested I file a PR but first investigate what issues such a patch might cause. I'm glad I waited, because there are a few. The medicine is a little worse than the disease. First, with Compiz & Xfce4, if X was told to shutdown while the previously affected programs (xfce4-terminal running under compiz & xfce4 was obvious), the machine would immediately reboot. This is obviously not good. So usually I would only logout after closing all windows (except Xfce4-panel and the root window). This would work, and the machine could be shut down from the TTY. Recently, I installed KDE4. I was so impressed that I was trying to use it as my "daily desktop". OpenGL Kwin was working fine. However, engaging the screen lock would reboot the machine, as well as the machine occasionally spontaneously rebooting. This was much worse than the above issue. The patch had one other odd effect, which was that Dri2 was disabled for some reason. I reverted the patch to xorg-server I had been running, and now Kwin will not start OpenGL mode, because it can't find an ARGBGLX visual. If Kwin is started alone, OpenGL suprisingly works. Xfce4+compiz crashes Xorg as before, however Dri2 is now enabled. The signal is a segfault at 0x0. AIGLX on/off have no effect. Here was the patch (I applied it manually looking at the file, the offsets are wrong for us): diff --git a/glx/glxdri.c b/glx/glxdri.c index 326f539..f6ef784 100644 --- a/glx/glxdri.c +++ b/glx/glxdri.c @@ -230,7 +230,7 @@ __glXDRIdrawableDestroy(__GLXdrawable *drawable) /* If the X window was destroyed, the dri DestroyWindow hook will * aready have taken care of this, so only call if pDraw isn't NULL. */ - if (drawable->pDraw != NULL) { + if (drawable->pDraw != NULL&& drawable->pDraw->type == DRAWABLE_WINDOW) { screen = (__GLXDRIscreen *) glxGetScreen(drawable->pDraw->pScreen); (*screen->core->destroyDrawable)(private->driDrawable); It seems like this shouldn't be having as much effect as it does. I can only guess the reboots are from memory problems resulting from lingering drawables? I can't explain the Dri2 interaction, nor can I explain Kwin's behavior (fairly new to KDE, last time I used it was last century :) ). For what it's worth, my driver is xf86-video-ati on a Radeon HD4650. I'm thoroughly confused by this problem and I'd welcome some help trying to solve the bug. Anyone else seeing problems with RV710 radeons and OpenGL compositing? Matt