Re: Obvious and ALSA

2011-10-22 Thread Anurag Priyam
[+CC: dunz0r; tried to help me out on IRC with the same]

On Fri, Oct 21, 2011 at 6:46 PM, Julien Danjou jul...@danjou.info wrote:
 I just hit a bad bug. awesome would not start!

Oh my! Truck load of thanks JD :). I had been a victim of the same
since the last 2-3 days. Tried to debug it, but was totally off track.
What made debugging even more difficult for me was that awesome wasn't
logging anything  at all. So I wasn't sure what to ask on the mailing
list either.

Anyway, I understand awesome's code base and X a little better now.

 I discovered that this was caused by obvious.

FYI, vicious is affected by this too.

Thanks.

-- 
Anurag Priyam

-- 
To unsubscribe, send mail to awesome-devel-unsubscr...@naquadah.org.


Obvious and ALSA

2011-10-21 Thread Julien Danjou
Hi,

I just hit a bad bug. awesome would not start!

I discovered that this was caused by obvious. I use the volume_alsa
widget, which runs amixer. But I had pulseaudio installed. And doing a:

  xtrace amixer -c 0 -- get Master

showed that the pulseaudio plugin of alsa was run and tried to connect
to the X server to fetch some atoms.
The problem is that while startup, awesome is grabbing the X server.
Therefore, the awesome startup was totally blocked.

Removing pulseaudio resolved the problem for now, but I think we should
do something in obvious to avoid that, like unsetting the DISPLAY
environment variable.

WDYT?

-- 
Julien Danjou


pgpTkU4e6fqu6.pgp
Description: PGP signature


Re: Obvious and ALSA

2011-10-21 Thread Daniel Silverstone
On Fri, Oct 21, 2011 at 03:16:40PM +0200, Julien Danjou wrote:
 Removing pulseaudio resolved the problem for now, but I think we should
 do something in obvious to avoid that, like unsetting the DISPLAY
 environment variable.

Why not simply defer the first update of the widget to give awesome a chance to
finish starting up?

D.

-- 
Daniel Silverstone http://www.digital-scurf.org/
PGP mail accepted and encouraged.Key Id: 3CCE BABE 206C 3B69

-- 
To unsubscribe, send mail to awesome-devel-unsubscr...@naquadah.org.


Re: Obvious and ALSA

2011-10-21 Thread Julien Danjou
On Fri, Oct 21 2011, Daniel Silverstone wrote:

 On Fri, Oct 21, 2011 at 03:16:40PM +0200, Julien Danjou wrote:
 Removing pulseaudio resolved the problem for now, but I think we should
 do something in obvious to avoid that, like unsetting the DISPLAY
 environment variable.

 Why not simply defer the first update of the widget to give awesome a chance 
 to
 finish starting up?

Why not, I'm just not sure it's easier. :)

-- 
Julien Danjou


pgprIJz97akBR.pgp
Description: PGP signature


Re: Obvious and ALSA

2011-10-21 Thread Uli Schlachter
On 21.10.2011 15:16, Julien Danjou wrote:
 I just hit a bad bug. awesome would not start!
 
 I discovered that this was caused by obvious. I use the volume_alsa
 widget, which runs amixer. But I had pulseaudio installed. And doing a:
 
   xtrace amixer -c 0 -- get Master
 
 showed that the pulseaudio plugin of alsa was run and tried to connect
 to the X server to fetch some atoms.
 The problem is that while startup, awesome is grabbing the X server.
 Therefore, the awesome startup was totally blocked.
 
 Removing pulseaudio resolved the problem for now, but I think we should
 do something in obvious to avoid that, like unsetting the DISPLAY
 environment variable.
 
 WDYT?

That problem is relatively common. I only ever saw it happening due to 
pulseaudio.

In other news, you have a great timing. Let's look at the recent git history for
the master branch:

commit bf76b3842b92922b8d3fa23a105d9e9b1aad521c
Author: Uli Schlachter psyc...@znc.in
Date:   Wed Oct 19 15:11:11 2011 +0200

Ungrab the server before parsing the config

This moves the loading of the rc.lua and managing of pre-existing clients to
after we ungrab the server during startup. To make sure we have no races 
with
clients which start up parallel to awesome, we do the QueryTree for all the
clients that we have to manage before the ungrab, but start managing the 
clients
only after the ungrab.

This means that we have already selected our event mask on the root window 
in
scan() and thus received an UnmapNotify event when we reparent windows into 
a
frame window. This has the effect that we immediately unmanage the client 
again,
whoops.

To fix this, we grab the server again and remove our event mask on the root
window again while we reparent.

This should hopefully fix all cases where we deadlock during startup because
pulseaudio wants to talk to the X server, but is being ignored because we 
have
the server grabbed while at the same time we are waiting for pulseaudio.

Signed-off-by: Uli Schlachter psyc...@znc.in

To make this perfect, this just needs someone to port it to the 3.4 branch. That
won't be me since I don't have the necessary stuff for that since quite a long 
time.

That shouldn't actually be too hard. I don't think the patch would apply
cleanly, but if someone fixes that up bad hand *and actually tests the result*,
stuff should be working smoothly. Thinking about it, I'm not sure if all that
patch is even necessary in 3.4. 3.4 isn't a reparenting WM and thus it wouldn't
get an UnmapNotify due to the reparent which should make the hack in client.c
unnecessary...

@jd: Are you on the 3.4 branch or is your git clone just too old? Did I break
your config badly enough to make you switch to 3.4? :-)

Uli

-- 
Do you know that books smell like nutmeg or some spice from a foreign land?
  -- Faber in Fahrenheit 451

-- 
To unsubscribe, send mail to awesome-devel-unsubscr...@naquadah.org.


Re: Obvious and ALSA

2011-10-21 Thread Julien Danjou
On Fri, Oct 21 2011, Uli Schlachter wrote:

 @jd: Are you on the 3.4 branch or is your git clone just too old? Did I break
 your config badly enough to make you switch to 3.4? :-)

Yeah, I'm on 3.4 for a long time now. :)

-- 
Julien Danjou


pgpuD11oBLIWw.pgp
Description: PGP signature


Re: Obvious and ALSA

2011-10-21 Thread Gregor Best
On Fri, Oct 21, 2011 at 04:11:01PM +0200, Uli Schlachter wrote:
 [...]
 That problem is relatively common. I only ever saw it happening due to 
 pulseaudio.
 
 In other news, you have a great timing. Let's look at the recent git history 
 for
 the master branch:
 [...]

 [...]
 To make this perfect, this just needs someone to port it to the 3.4 branch. 
 That
 won't be me since I don't have the necessary stuff for that since quite a 
 long time.
 [...]

Hmm, so that would solve the problem for the git head. Nice :)
I guess I'll have to maintain a branch with v3.4.10 specific patches
(such as unsetting DISPLAY) soon...

-- 
Gregor Best


pgpEZ8O3AX4YK.pgp
Description: PGP signature