New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alsa plugin errors after suspend #376

Closed
marksauter opened this Issue Jan 16, 2019 · 7 comments

Comments

Projects
None yet
4 participants
@marksauter
Copy link

marksauter commented Jan 16, 2019

The Alsa plugin produces an error after my computer suspends.
The error is displayed in the status bar: error: ExceptionInLinkedThread ThreadId 24 fd:11: hGetChar: end of file

Here's the Alsa portion of my config:

, Run Alsa "default" "Master"
	[ "--template", "Vol: <volume>% <status>"
	, "--Low",			"33"			-- units: %
	, "--High",		"66"			-- units: %
	, "--low",			"darkred"
	, "--normal",		"darkorange"
	, "--high",			"darkgreen"
	]

While I don't know what's causing the issue, I was wondering if there is a way to clear the error from the status bar?

@gagbo

This comment has been minimized.

Copy link

gagbo commented Jan 18, 2019

I confirm that I have the same bug, with a similar config :

            -- volume indicator
            , Run Alsa "default" "Master"
                 [ "-f", "", "-b", ""
                 , "-t", "<fc=#899299>Vol:</fc> <status><fc=#899299><volume>% <volumebar></fc>"
                 , "--"
                 , "-C", "#C0E550", "-c", "#E55C50"]

and a similar error : error: ExceptionInLinkedThread ThreadId 14 fd:15 hGetChar: end of file

@jaor

This comment has been minimized.

Copy link
Owner

jaor commented Jan 18, 2019

yes, the bug is very easy to reproduce. @DanielSchuessler implemented the Alsa monitor, so i would need his help here (I still use the Volume monitor, both for input and output volumes).

@jaor jaor added the bug label Jan 18, 2019

@DanielSchuessler

This comment has been minimized.

Copy link
Contributor

DanielSchuessler commented Jan 19, 2019

Hmm, doesn't reproduce on my box. Are you using systemctl suspend too?

The error message sounds like the alsactl process got terminated (the "file" that has ended being the pipe to alsactl). We could just have the plugin restart alsactl it in that case (with some rate limiting).

@gagbo

This comment has been minimized.

Copy link

gagbo commented Jan 19, 2019

I do use systemctl suspend. You can test it too I guess :

  1. open a terminal, run alsactl monitor and check that it works by playing with volumes
  2. open another terminal, and systemctl suspend (no privileges necessary)
  3. when I wake up from suspend the alsactl monitor job got terminated in the first terminal
@DanielSchuessler

This comment has been minimized.

Copy link
Contributor

DanielSchuessler commented Jan 19, 2019

The alsactl monitor keeps working for me after waking up, but I guess I can reproduce by terminating alsactl manually.

@jaor

This comment has been minimized.

Copy link
Owner

jaor commented Jan 27, 2019

I've just pushed @DanielSchuessler's fix for this problem... please, @gagbo, @marksauter let us know if it is working for you. Thanks!

@gagbo

This comment has been minimized.

Copy link

gagbo commented Jan 28, 2019

I'll try to test it in a VM soon, I moved back to polybar after this (mostly because hs took a lot of space and I did nothing else with it yet)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment