Audio on headphones not working after plugging in another audio device

Hi,

Yesterday was my first time installing linux and I have a problem with my audio. When I plug the headphones to the mini-jack input at the back of the motherboard it works just fine until I also plug the speakers with the jack input at the front of my PC case. When I do that the speakers work normally but when I change the source back to headphones no sound comes out. They start working again when I unplug the speakers.
The kernel version I run: 5.15.32
Below is the response I get after typing inxi -v7azy into the terminal.

System:
  Kernel: 5.15.32-1-MANJARO arch: x86_64 bits: 64 compiler: gcc v: 11.2.0
    parameters: BOOT_IMAGE=/boot/vmlinuz-5.15-x86_64
    root=UUID=36091d95-4dbd-4549-9f05-00ee3e8be138 rw quiet apparmor=1
    security=apparmor udev.log_priority=3
  Desktop: KDE Plasma v: 5.24.4 tk: Qt v: 5.15.3 wm: kwin_x11 vt: 1 dm: SDDM
    Distro: Manjaro Linux base: Arch Linux
Machine:
  Type: Desktop Mobo: ASRock model: Z170 Gaming K4
    serial: <superuser required> UEFI: American Megatrends v: P1.90
    date: 09/18/2015
Battery:
  Message: No system battery data found. Is one present?
Memory:
  RAM: total: 23.43 GiB used: 2.74 GiB (11.7%)
  RAM Report:
    permissions: Unable to run dmidecode. Root privileges required.
CPU:
  Info: model: Intel Core i5-6600K bits: 64 type: MCP arch: Skylake-S
    family: 6 model-id: 0x5E (94) stepping: 3 microcode: 0xEC
  Topology: cpus: 1x cores: 4 smt: <unsupported> cache: L1: 256 KiB
    desc: d-4x32 KiB; i-4x32 KiB L2: 1024 KiB desc: 4x256 KiB L3: 6 MiB
    desc: 1x6 MiB
  Speed (MHz): avg: 3900 min/max: 800/3900:4200 scaling:
    driver: intel_pstate governor: powersave cores: 1: 3900 2: 3900 3: 3900
    4: 3900 bogomips: 28009
  Flags: 3dnowprefetch abm acpi adx aes aperfmperf apic arat
    arch_capabilities arch_perfmon art avx avx2 bmi1 bmi2 bts clflush clflushopt
    cmov constant_tsc cpuid cpuid_fault cx16 cx8 de ds_cpl dtes64 dtherm dts
    epb ept ept_ad erms est f16c flexpriority flush_l1d fma fpu fsgsbase fxsr
    ht hwp hwp_act_window hwp_epp hwp_notify ibpb ibrs ida intel_pt invpcid
    invpcid_single lahf_lm lm mca mce md_clear mmx monitor movbe mpx msr mtrr
    nonstop_tsc nopl nx pae pat pbe pcid pclmulqdq pdcm pdpe1gb pebs pge pln
    pni popcnt pse pse36 pti pts rdrand rdseed rdtscp rep_good sdbg sep smap
    smep ss ssbd sse sse2 sse4_1 sse4_2 ssse3 stibp syscall tm tm2 tpr_shadow
    tsc tsc_adjust tsc_deadline_timer vme vmx vnmi vpid x2apic xgetbv1 xsave
    xsavec xsaveopt xsaves xtopology xtpr
  Vulnerabilities:
  Type: itlb_multihit status: KVM: VMX disabled
  Type: l1tf
    mitigation: PTE Inversion; VMX: conditional cache flushes, SMT disabled
  Type: mds mitigation: Clear CPU buffers; SMT disabled
  Type: meltdown mitigation: PTI
  Type: spec_store_bypass
    mitigation: Speculative Store Bypass disabled via prctl and seccomp
  Type: spectre_v1
    mitigation: usercopy/swapgs barriers and __user pointer sanitization
  Type: spectre_v2 mitigation: Retpolines, IBPB: conditional, IBRS_FW,
    STIBP: disabled, RSB filling
  Type: srbds mitigation: Microcode
  Type: tsx_async_abort mitigation: TSX disabled
Graphics:
  Device-1: NVIDIA GM204 [GeForce GTX 970] vendor: eVga.com. driver: nvidia
    v: 510.60.02 alternate: nouveau,nvidia_drm pcie: gen: 3 speed: 8 GT/s
    lanes: 16 bus-ID: 01:00.0 chip-ID: 10de:13c2 class-ID: 0300
  Device-2: Sunplus Innovation Streaming Webcam type: USB
    driver: snd-usb-audio,uvcvideo bus-ID: 1-14:6 chip-ID: 1bcf:2283
    class-ID: 0102 serial: <filter>
  Display: x11 server: X.Org v: 1.21.1.3 compositor: kwin_x11 driver: X:
    loaded: nvidia gpu: nvidia display-ID: :0 screens: 1
  Screen-1: 0 s-res: 1920x1080 s-dpi: 90 s-size: 542x301mm (21.34x11.85")
    s-diag: 620mm (24.41")
  Monitor-1: DP-4 res: 1920x1080 hz: 60 dpi: 90
    size: 544x303mm (21.42x11.93") diag: 623mm (24.52") modes: N/A
  OpenGL: renderer: NVIDIA GeForce GTX 970/PCIe/SSE2
    v: 4.6.0 NVIDIA 510.60.02 direct render: Yes
Audio:
  Device-1: Intel 100 Series/C230 Series Family HD Audio vendor: ASRock
    driver: snd_hda_intel v: kernel bus-ID: 00:1f.3 chip-ID: 8086:a170
    class-ID: 0403
  Device-2: NVIDIA GM204 High Definition Audio vendor: eVga.com.
    driver: snd_hda_intel v: kernel pcie: gen: 3 speed: 8 GT/s lanes: 16
    bus-ID: 01:00.1 chip-ID: 10de:0fbb class-ID: 0403
  Device-3: Sunplus Innovation Streaming Webcam type: USB
    driver: snd-usb-audio,uvcvideo bus-ID: 1-14:6 chip-ID: 1bcf:2283
    class-ID: 0102 serial: <filter>
  Sound Server-1: ALSA v: k5.15.32-1-MANJARO running: yes
  Sound Server-2: JACK v: 1.9.20 running: no
  Sound Server-3: PulseAudio v: 15.0 running: no
  Sound Server-4: PipeWire v: 0.3.49 running: yes
Network:
  Device-1: Qualcomm Atheros Killer E2400 Gigabit Ethernet vendor: ASRock
    driver: alx v: kernel pcie: gen: 1 speed: 2.5 GT/s lanes: 1 port: d000
    bus-ID: 06:00.0 chip-ID: 1969:e0a1 class-ID: 0200
  IF: enp6s0 state: up speed: 1000 Mbps duplex: full mac: <filter>
  IP v4: <filter> type: dynamic noprefixroute scope: global
    broadcast: <filter>
  IP v6: <filter> type: noprefixroute scope: link
  WAN IP: <filter>
Bluetooth:
  Message: No bluetooth data found.
Logical:
  Message: No logical block device data found.
RAID:
  Message: No RAID data found.
Drives:
  Local Storage: total: 4.75 TiB used: 1.62 TiB (34.0%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Corsair model: Force MP510
    size: 894.25 GiB block-size: physical: 512 B logical: 512 B speed: 31.6 Gb/s
    lanes: 4 type: SSD serial: <filter> rev: ECFM22.5 temp: 35.9 C scheme: GPT
  ID-2: /dev/sda maj-min: 8:0 model: IRIDIUM PRO size: 223.57 GiB
    block-size: physical: 512 B logical: 512 B speed: 6.0 Gb/s type: SSD
    serial: <filter> rev: 01.7 scheme: GPT
  ID-3: /dev/sdb maj-min: 8:16 vendor: A-Data model: SU800 size: 953.87 GiB
    block-size: physical: 512 B logical: 512 B speed: 6.0 Gb/s type: SSD
    serial: <filter> rev: 4A scheme: MBR
  ID-4: /dev/sdc maj-min: 8:32 vendor: Seagate model: ST1000DM003-1SB102
    size: 931.51 GiB block-size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s
    type: HDD rpm: 7200 serial: <filter> rev: CC43 scheme: MBR
  ID-5: /dev/sdd maj-min: 8:48 type: USB vendor: Toshiba model: MQ04UBD200
    size: 1.82 TiB block-size: physical: 512 B logical: 512 B type: HDD
    rpm: 5400 serial: <filter> scheme: MBR
  Message: No optical or floppy data found.
Partition:
  ID-1: / raw-size: 223.27 GiB size: 218.71 GiB (97.96%)
    used: 13.49 GiB (6.2%) fs: ext4 dev: /dev/sda2 maj-min: 8:2 label: N/A
    uuid: 36091d95-4dbd-4549-9f05-00ee3e8be138
  ID-2: /boot/efi raw-size: 300 MiB size: 299.4 MiB (99.80%)
    used: 292 KiB (0.1%) fs: vfat dev: /dev/sda1 maj-min: 8:1 label: NO_LABEL
    uuid: 6C7D-E687
  ID-3: /run/media/akip/4E3698C03698AA8B raw-size: 893.62 GiB
    size: 893.62 GiB (100.00%) used: 291.96 GiB (32.7%) fs: ntfs
    dev: /dev/nvme0n1p3 maj-min: 259:3 label: N/A uuid: 4E3698C03698AA8B
  ID-4: /run/media/akip/SSD 1000 raw-size: 953.87 GiB
    size: 953.87 GiB (100.00%) used: 687.31 GiB (72.1%) fs: ntfs dev: /dev/sdb1
    maj-min: 8:17 label: SSD 1000 uuid: 9A00068800066C17
  ID-5: /run/media/akip/TOSHIBA EXT raw-size: 1.82 TiB
    size: 1.82 TiB (100.00%) used: 327.58 GiB (17.6%) fs: ntfs dev: /dev/sdd1
    maj-min: 8:49 label: TOSHIBA EXT uuid: B06E2E676E2E2696
  ID-6: /run/media/akip/daneHDD raw-size: 931.51 GiB
    size: 931.51 GiB (100.00%) used: 334.67 GiB (35.9%) fs: ntfs dev: /dev/sdc1
    maj-min: 8:33 label: daneHDD uuid: 72FECF3DFECEF7FD
Swap:
  Alert: No swap data was found.
Unmounted:
  ID-1: /dev/nvme0n1p1 maj-min: 259:1 size: 529 MiB fs: ntfs label: N/A
    uuid: 44561021561015F0
  ID-2: /dev/nvme0n1p2 maj-min: 259:2 size: 100 MiB fs: vfat label: N/A
    uuid: 4E1D-B8E7
USB:
  Hub-1: 1-0:1 info: Hi-speed hub with single TT ports: 16 rev: 2.0
    speed: 480 Mb/s chip-ID: 1d6b:0002 class-ID: 0900
  Hub-2: 1-6:2 info: Genesys Logic Hub ports: 4 rev: 2.0 speed: 480 Mb/s
    power: 100mA chip-ID: 05e3:0608 class-ID: 0900
  Device-1: 1-7:3 info: Corsair Gaming GLAIVE RGB Mouse type: Mouse,HID
    driver: corsair,usbhid interfaces: 2 rev: 2.0 speed: 12 Mb/s power: 300mA
    chip-ID: 1b1c:1b34 class-ID: 0300 serial: <filter>
  Device-2: 1-8:4 info: Corsair K95 RGB Platinum Keyboard [RGP0056]
    type: Keyboard,HID driver: hid-generic,usbhid interfaces: 2 rev: 2.0
    speed: 12 Mb/s power: 500mA chip-ID: 1b1c:1b2d class-ID: 0300
    serial: <filter>
  Device-3: 1-9:5 info: Microsoft Xbox One S Controller
    type: <vendor specific> driver: xpad interfaces: 3 rev: 2.0 speed: 12 Mb/s
    power: 500mA chip-ID: 045e:02ea class-ID: ff00 serial: <filter>
  Device-4: 1-14:6 info: Sunplus Innovation Streaming Webcam
    type: Video,Audio driver: snd-usb-audio,uvcvideo interfaces: 4 rev: 2.0
    speed: 480 Mb/s power: 500mA chip-ID: 1bcf:2283 class-ID: 0102
    serial: <filter>
  Hub-3: 2-0:1 info: Super-speed hub ports: 10 rev: 3.0 speed: 5 Gb/s
    chip-ID: 1d6b:0003 class-ID: 0900
  Device-1: 2-6:2 info: Toshiba America EXTERNAL_USB type: Mass Storage
    driver: usb-storage interfaces: 1 rev: 3.0 speed: 5 Gb/s power: 896mA
    chip-ID: 0480:0901 class-ID: 0806 serial: <filter>
Sensors:
  System Temperatures: cpu: 43.0 C pch: 46.5 C mobo: N/A gpu: nvidia
    temp: 44 C
  Fan Speeds (RPM): N/A gpu: nvidia fan: 0%
Info:
  Processes: 212 Uptime: 11m wakeups: 0 Init: systemd v: 250 tool: systemctl
  Compilers: gcc: 11.2.0 clang: 13.0.1 Packages: pacman: 1201 lib: 330
  flatpak: 0 Shell: Zsh v: 5.8.1 default: Bash v: 5.1.16 running-in: konsole
  inxi: 3.3.15

Is there a way to get the headphones to work while speakers are connected?
I’m completely new to linux so I would appreciate it if you could explain in simple terms what I should do.
Thanks in advance!

Hello,

This might come handy PipeWire - ArchWiki
Not ideal, but from what i gathered there is a bug report regarding the issue you mentioned 440536 – Allow playing a stream on multiple outputs