https://bugs.kde.org/show_bug.cgi?id=500828

--- Comment #12 from Seth <[email protected]> ---
(In reply to Nate Graham from comment #11)
> Thanks! Final question (I hope) before I dig into this: can you log into a
> new clean user account on the same computer, don't customize anything, and
> then replicate the issue by disabling the device in question using system
> settings?
> 
> If you can, please attach the same screenshot of the Audio Volume System
> Tray widget, but using the default visual style.
> 
> Also, please attach them rather than using imgur; it's blocked for all UK
> residents, which would impair their ability to help out with this issue.

Apologies, I was not aware of the imgur thing. The new user did not have this
issue. Only when I transferred over my plasma-org.kde.plasma.desktop-appletsrc
config file did the issue show up on the new user. 
Some slop analysis is below. 

- Default output is a USB Focusrite.
- Audio works and the sink is unmuted.
- Plasma still uses the “no preferred sink/muted” fallback icon.
- Restarting Plasma after audio initialization does not help.
- Forcing a real default-sink change immediately fixes the icon.

Plasma 6.7.4’s `PreferredDevice` constructor listens for future changes but
never reads the already-existing default sink.
https://invent.kde.org/plasma/plasma-pa/-/blob/v6.7.4/src/preferreddevice.cpp

The larger layout changes when the volume widget is instantiated. If it is
instantiated after the default-sink notification, it misses that notification
and remains null indefinitely.

Bug #521973 correctly identifies the null `PreferredDevice.sink`, but its
proposed generic-icon fallback would only hide the misleading icon. The likely
functional fix is initializing the values in the constructor:

```cpp
PreferredDevice::PreferredDevice(QObject *parent)
    : QObject(parent)
{
    auto server = PulseAudioQt::Context::instance()->server();

    connect(server, &PulseAudioQt::Server::defaultSinkChanged,
            this, &PreferredDevice::updatePreferredSink);
    connect(server, &PulseAudioQt::Server::defaultSourceChanged,
            this, &PreferredDevice::updatePreferredSource);

    updatePreferredSink();
    updatePreferredSource();
}
```

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to