question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Wrong volume displayed in Volume widget

See original GitHub issue

The issue:

Qtile version: 0.22.1

A wrong volume (volume of Mic) is displayed for my device when using the Volume widget. The correct value should be the volume of Playback. The reason is that when running amixer sget command, the output is shown as below:

Simple mixer control 'Headset',0
  Capabilities: pvolume cvolume cvolume-joined pswitch pswitch-joined cswitch cswitch-joined
  Playback channels: Front Left - Front Right
  Capture channels: Mono
  Limits: Playback 0 - 50 Capture 0 - 30
  Mono: Capture 24 [80%] [-6.00dB] [on]
  Front Left: Playback 16 [32%] [-34.00dB] [on]
  Front Right: Playback 16 [32%] [-34.00dB] [on]

As we can see, the Capture volume is printed first. But according to the code here, it only tries to find the first percentage value. So this widget shows the Mic volume instead of the playback volume.

I think the solution is to filter out the line with Capture from the output or only keep the lines with Playback before processing it. I can open a PR if you think it’s a good approach.

Required:

  • I have searched past issues to see if this bug has already been reported.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:12 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
m-colcommented, Oct 28, 2022

We can leave it for now and wait until others come reporting the issue in which case we may as well generalise. Unless you’d prefer we fix the issue so you don’t have to use a custom command - that’s up to you.

0reactions
DCsunsetcommented, Oct 28, 2022

ooh yeah good idea. We could try this. If you’re happy with your solution then that’s great, but if anyone else comes and reads this coming across the same issue we can see if we can put together a generalised solution

Sure. Should I reopen the issue or just leave it closed?

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Solve Volume control not working problem in Windows ...
1. Restart your computer and check if your sound device is working without the error. · 2. If you are using an external...
Read more >
Fix Volume Control stuck on the top left corner of the screen
If the volume control doesn't disappear after a few seconds then the only possible solution is to restart your system but even after...
Read more >
iOS 13 Bug - Volume Control Indicator Keeps Popping Up
Now, the volume control indicator keeps popping up randomly no matter what I'm doing. It appears on the screen for a second, disappears, ......
Read more >
Volume Bar struck on the top left of the desktop screen on ...
I turned on my Lenovo computer on a few days ago and saw that the volume icon was on the top left of...
Read more >
FIX!!! How To Dismiss Windows 10 Media Volume Control Pop ...
To Disable Media Volume Control Pop-up, Open the Google Chrome browser and type the following text in the address bar: chrome://flags/#hardware- ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found