-
Notifications
You must be signed in to change notification settings - Fork 162
feat(sound): redesign with separate device profiles page #1500
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
base: master
Are you sure you want to change the base?
Conversation
jacobgkau
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First, there's an overflow/sizing issue with the drop-down box on the Device Profiles page. By default, I had no profile selected (not even "Off"), which seems impossible. In that state, most of the drop-down items flowed out of the end of the window:
It seems like longer labels being selected allowed the drop-down to display more of its contents:
Separate issue, but after I selected "Off" as my profile, the device disappeared from the list, making it impossible to turn on again. The point of the "Off" option is to still show the device in the list while it's disabled, so that shouldn't happen.
|
Fixed the devices on the device profiles page disappearing when setting their profile to off. Which also fixes the device briefly disappearing when the device's nodes are replaced. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On the same machine as yesterday, I still had one of the devices not have any profile visibly selected at first, which shouldn't be possible:
Here is pw-dump from that system: pw-dump-oryp8.txt
If I set the device to "Off", it initially shows itself as "Off", but if I reboot, I end up in the same state as shown above (it boots up set to nothing instead of showing as set to "Off".)
|
I'm still also seeing menu items getting cut off at the edge of the window. Is that a libcosmic bug? Dropdown menus in other COSMIC apps seem to be able to run out the side of the window. |
|
It's a different dropdown widget. I will switch to it |
717e099 to
278f24d
Compare
|
The index of the selected profile on that Built-in Audio device should be fixed now |
|
On 8688b54 and oryp8, the profile of If I just boot (defaulting to I know some of this might be audio card weirdness that's outside the scope of COSMIC Settings, but does any of this sound like a COSMIC Settings thing? The two distinct problems are the default/last selected profile not being saved between sessions, and not being able to switch from the default to one of the others successfully without first selecting |
|
From @WatchMkr in Mattermost (posting here so it doesn't get lost)-- the design also calls for the device description to be prepended to the profile name when selecting an input/output device (e.g. |
|
Seems I'll need to add the different routes (ports) to the output/input dropdown lists. Pavucontrol puts those on a separate port dropdown. |
|
Not sure if you were ready for me to look at this again yet, but just to corroborate, on f787c83, I'm seeing the The other problems I mentioned before are still occurring. |
cdbd2a9 to
089d65e
Compare
jacobgkau
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
35e3127 still has reliability issues on oryp8.
If I set Built-in Audio's profile to Analog Stereo Duplex and then reboot, it defaults to Digital Surround 5.1 (IEC958/AC3) Output again.
If I change the profile to Analog Stereo Duplex, then both Output device and Input device show their only option as Built-in Audio, with no route name/description prepended. Changing the speaker volume with hotkeys doesn't work in this state.
If I change the profile to Analog Stereo Output, then Output device changes to Speakers - Built-in Audio, and the speaker hotkeys work. Alternatively, if I open up an app and start playing audio, then the Output device does not change, but the speaker hotkeys do start working.
|
What's the output of Based on the logic that I have, the most likely problem is that the node failed to parse. The node ID is required to set a default sink/source, and the route won't be added to the device name if a node isn't associated with it. |
| .info({ | ||
| let state = Rc::downgrade(&state); | ||
| move |info| { | ||
| if let Some(node) = Node::from_node(info) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is where the node is parsed. This could be wrapped with dbg!(Node::from_node(info)) to check if all nodes are getting parsed.
jacobgkau
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here is pw-dump after booting on 4a14492, defaulting to S/PDIF: oryp8-4a14492-default-spdif.txt
Here is pw-dump after changing the profile to Analog Stereo Duplex: oryp8-4a14492-duplex.txt
On 4a14492, the speaker hotkeys work immediately after changing the profile to Analog Stereo Duplex, but the Output device is only labeled Built-in Audio, while the Input device is labeled Speakers - Built-in Audio.
|
I think I see the issue |
|
Hoping this fixes the issue you're seeing. |
|
On c8880c8, I see This is what This is what it looks like after opening Sound Settings for the first time, with the hotkeys still not working: This is what it looks like after opening They look pretty similar, so I'm not sure the problem's in there. After replicating the issue again, I also tried opening up this branch and then manually restarting |
|
I looked around the Internet for random bug reports about this. There are some mixed results. Some mention that muting and unmuting may fix the device. Others report than changing the profile fixes it. One person mentioned needing to restart Pavucontrol's source code was quite cryptic to read through, but it doesn't seem to be doing anything special besides re-setting the current settings? So I added some wpctl calls to run |
|
If you run |
|
On 1b93fdf, when I opened the new settings page for the first time after messing up the profile with the old one, the repair defaulted it to having the device's profile set to However, when I rebooted the system, it defaulted to I'm attempting to compare the config using the |
|
Using Coming from the bad state, if I run The |
|
The profile is now being set with |
|
Still testing, but seems to be working better now. After recreating the broken state, the new version now switches profiles correctly (with hotkeys working immediately after the switch), and then loads the profile I switched to again on the next boot. |
jacobgkau
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I plug in headphones, the output device name doesn't update from Speakers - Built-in Audio to Headphones - Built-in Audio until I close and re-open Settings. Is it possible to make that refresh when the routes change? GNOME Settings had it update immediately.
|
Yeah I'll add that |
jacobgkau
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
83eecd5 didn't seem to work for that-- the text is still not updating until I close & re-open after plugging or unplugging headphones.
Another thing I noticed is that when I use the Pro Audio profile, all of the items in the output drop-down are the same (e.g. I have five drop-down items all labeled Built-in Audio). pavucontrol at least has numbers for each of them so they can be differentiated. It looks like pavucontrol displays the node.description, which shows up as e.g. Built-In Audio Pro, Built-in Audio Pro 3, Built-in Audio Pro 7, etc, instead of the ALSA card name.
|
Switched to using libpulse for monitoring active port changes, and I'm seeing it switch between Speakers and Headphones on my system. Checking the Pro Audio issue now. |
|
On ff15c0d, the active port change is working.
The speaker output actually being labeled Speakers is actually better than pavucontrol, but it still seems like it makes less sense for the rest to not have any identifiers. Again, it looks like we could get e.g. The
Would this be a cosmic-osd issue? |
|
Do you have a pw-dump with those devices on the pro audio profile? |
|
Yeah the confirm device pop-up may be a cosmic-osd issue. |
|
Here's a pw-dump while set to Pro Audio on oryp8: oryp8-pro-audio.txt |
jacobgkau
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pro Audio labels are showing up as expected now.
Last thing I'm noticing is an issue with the Balance setting. It works if I'm playing audio and I change it. However, it resets to the middle every time I adjust the volume (via hotkey or slider). It should probably be unaffected by volume changes (although some way to reset it might be nice, since its slider doesn't snap to the middle).
|
Finally resolved. I'll need ~15-30 minutes to get this ready to commit though. We will be able to get and set channel volumes and other parameters directly in cosmic-settings without needing libpulse, wpctl, or pw-cli now. Now that we're subscribing to pipewire for parameter updates, I can drop libpulse as a dependency. Updating the audio applet to share the same cosmic-settings library will ensure that our balance stays intact when using that as well. Changing the volume by shortcut uses wpctl though, which will overwrite the balance. I think we'll need to use cosmic-settings-daemon after this is merged to add an API for the shortcuts to use that preserves our balance. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The latest update (to 9c51fff) broke the test case upgrading from the current stable version. I'm back to having no volume hotkeys after changing the profile to Analog Stereo Duplex on the new version.
Also, dragging the slider to adjust the volume doesn't seem to work anymore. It's reflected in the COSMIC Settings interface, but not pavucontrol or the OSD, and adjusting the volume with the hotkeys resumes from wherever it was before, not from where I set it to in COSMIC Settings.



Closes #1325
Closes #1577
Closes pop-os/cosmic-epoch#655
Closes pop-os/cosmic-epoch#787
Closes pop-os/cosmic-epoch#946
Closes pop-os/cosmic-epoch#1001
Closes pop-os/cosmic-epoch#568
Closes pop-os/cosmic-epoch#1368
wpctl set-profile {{device-id}} {profile-index}}instead ofpactlwpctl set-default {{node-id}}- Enables using wpctl for setting card profiles, default sinks/sources, volume, and mute
- Significant performance and stability improvements
- Wireplumber state no longer gets corrupted