You are not logged in.

#1 2011-06-18 16:26:43

disnesquick
Member
Registered: 2011-02-17
Posts: 9

[SOLVED]Vicious.register with volume control causes Awesome to hang

Hi all,

Since I performed a system upgrade, I have a strange problem, whereby calling vicious.register on the type "vicious.widgets.volume" causes the entire window system to hang indefinitely. This is the offending code.

volbar = awful.widget.progressbar()
volbar:set_width(10)
volbar:set_height(18)
volbar:set_vertical(true)
volbar:set_background_color("#1a1918")
volbar:set_color("#ff6500")
volbar:set_gradient_colors({ "#1a1918", "#60801f", "#9acd32" })
--vicious.register(volbar, vicious.widgets.volume,function (widgets, args)
--                                 if args[1] == 0 or args[2] == "♩" then
--                                   volicon.image = image(beautiful.mute_icon)
--                                   return args[1]
--                               else
--                                   volicon.image = image(beautiful.volume_icon)
--                                   return args[1]
--                               end
--                           end,  2, "Master")

on the other hand, registering a memory monitor is fine:

 -- Initialize widget
memwidget = awful.widget.progressbar()
-- Progressbar properties
memwidget:set_width(8)
memwidget:set_height(10)
memwidget:set_vertical(true)
memwidget:set_background_color("#494B4F")
memwidget:set_border_color(nil)
memwidget:set_color("#AECF96")
memwidget:set_gradient_colors({ "#AECF96", "#88A175", "#FF5656" })
-- Register widget
vicious.register(memwidget, vicious.widgets.mem, "$1", 13) 

both bits of code worked fined before I updated but now its that vicious.register command that kills the entire windowing system.
has anyone else encountered the same thing before? I've seen a few references to the problem but nothing in the way of solutions.

Thanks a lot, folks!

Last edited by disnesquick (2011-06-19 09:35:56)

Offline

#2 2011-06-19 03:08:31

JackH79
Member
From: Australia
Registered: 2009-06-18
Posts: 663
Website

Re: [SOLVED]Vicious.register with volume control causes Awesome to hang

Could it be related to this problem?

Offline

#3 2011-06-19 03:15:32

anrxc
Member
From: Croatia
Registered: 2008-03-22
Posts: 835
Website

Re: [SOLVED]Vicious.register with volume control causes Awesome to hang

If a subprocess hangs your awesome will hang. That's how it is.

What your widget is doing is executing "amixer get Master", and that appears to hang now. What happens if you execute it from a terminal emulator?


You need to install an RTFM interface.

Offline

#4 2011-06-19 09:35:37

disnesquick
Member
Registered: 2011-02-17
Posts: 9

Re: [SOLVED]Vicious.register with volume control causes Awesome to hang

Yup, that was it. A problem with amixer.
Interestingly, amixer DOESN'T hang from the shell  nor when called from my XF86AudioRaiseVolume or XF86AudioLowerVolume hooks. It only hangs when called in vicious. I changed the vicious code to "amixer -c0 get Master" and everything is now rosy.

Thanks for the help folks!

Offline

#5 2011-06-20 03:35:07

anrxc
Member
From: Croatia
Registered: 2008-03-22
Posts: 835
Website

Re: [SOLVED]Vicious.register with volume control causes Awesome to hang

No need for changes, just pass "Master -c0" as your widget argument wink

Last edited by anrxc (2011-06-20 03:35:27)


You need to install an RTFM interface.

Offline

Board footer

Powered by FluxBB