Bug 484372 - Automatically switch playback device between external device and laptop on connect/disconnect
Summary: Automatically switch playback device between external device and laptop on co...
Status: REPORTED
Alias: None
Product: plasma-pa
Classification: Plasma
Component: general (show other bugs)
Version: 6.0.2
Platform: Arch Linux Linux
: NOR wishlist
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-03-24 09:08 UTC by filip.kendes1
Modified: 2024-03-24 11:04 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
01-laptop-playback-device (107.91 KB, image/png)
2024-03-24 10:55 UTC, filip.kendes1
Details
02-change-output-to-hdmi (107.44 KB, image/png)
2024-03-24 10:55 UTC, filip.kendes1
Details
03-disconnect-external-display-playback-device-disappeared (98.80 KB, image/png)
2024-03-24 10:56 UTC, filip.kendes1
Details
04-toggle-inactive-devices (107.22 KB, image/png)
2024-03-24 10:56 UTC, filip.kendes1
Details

Note You need to log in before you can comment on or make changes to this bug.
Description filip.kendes1 2024-03-24 09:08:32 UTC
SUMMARY
When laptop is connected to an external display with playback device to the one in the external display and we disconnect the external display, playback device gets disabled and hidden behind the "Show Inactive Devices" toggle. 

Can we, upon disconnection, change the playback device back to laptop? And in addition, remember the configuration between that external display and laptop so next time, if the playback device was the external display, change the playback automatically when that external display is connected to a laptop. or otherwise, keep the playback device on laptop.

I tested this with my work Macbook, and it works as I suggested. I'm not sure how windows laptops handle this.
I don't know how feasible this is. Please feel free to close this as Won't do if you want. Thank you.

STEPS TO REPRODUCE
1. Connect laptop to an external display (monitor or TV)
2. Change playback device to Digital Stereo (HDMI) output
3. Disconnect external display from laptop
4. Open Sound page in System Settings

OBSERVED RESULT
Playback device didn't switch back to laptop audio. Playback device is hidden behind the "Show Inactive Devices" toggle.
Note: Took me a long time to notice the toggle, I initially wanted to report a bug because I couldn't change the playback device after disconnecting the external display, but I just didn't see it was hidden.

EXPECTED RESULT
Upon disconnecting external display from the laptop do the following:
1. Set laptop audio as playback device
2. Remember the playback audio configuration between laptop/external display (Maybe not here, but somewhere)
    a) If playback audio was set to the external display, automatically switch to it when it's connected to laptop next time
    b) If playback audio was set to laptop, keep laptop audio when they're connected next time

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 6.0.2
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.2
Kernel Version: 6.8.1-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 4 × Intel® Core™ i5-7300HQ CPU @ 2.50GHz
Memory: 7.6 GiB of RAM
Graphics Processor: Mesa Intel® HD Graphics 630
Manufacturer: ASUSTeK COMPUTER INC.
Product Name: X580VD
System Version: 1.0

ADDITIONAL INFORMATION
Comment 1 filip.kendes1 2024-03-24 09:11:14 UTC
Please move the bug to a correct section. I wasn't sure where to report it.
Comment 2 filip.kendes1 2024-03-24 10:55:29 UTC
Created attachment 167689 [details]
01-laptop-playback-device
Comment 3 filip.kendes1 2024-03-24 10:55:48 UTC
Created attachment 167690 [details]
02-change-output-to-hdmi
Comment 4 filip.kendes1 2024-03-24 10:56:25 UTC
Created attachment 167691 [details]
03-disconnect-external-display-playback-device-disappeared
Comment 5 filip.kendes1 2024-03-24 10:56:47 UTC
Created attachment 167692 [details]
04-toggle-inactive-devices