Sound goes to laptop speaker after I plug in the headphones

As the titles says, even tho the headphones are recognized, the sound still goes to the laptop speakers. This happens every time I unplug them. To make them work again, I need to restart the laptop, but issue remains

System:
  Kernel: 5.18.12-arch1-1 arch: x86_64 bits: 64 compiler: gcc v: 12.1.0
    Desktop: KDE Plasma v: 5.25.3 tk: Qt v: 5.15.5 wm: kwin_x11 vt: 1 dm: SDDM
    Distro: EndeavourOS base: Arch Linux
Machine:
  Type: Laptop System: LENOVO product: 2350A26 v: ThinkPad T430
    serial: <superuser required> Chassis: type: 10 serial: <superuser required>
  Mobo: LENOVO model: 2350A26 serial: <superuser required>
    UEFI-[Legacy]: LENOVO v: G1ETC2WW (2.82 ) date: 08/07/2019
Battery:
  ID-1: BAT0 charge: 1.2 Wh (100.0%) condition: 1.2/94.0 Wh (1.3%)
    volts: 12.5 min: 10.8 model: SANYO 45N1173 type: Li-ion serial: <filter>
    status: full
CPU:
  Info: dual core model: Intel Core i5-3320M bits: 64 type: MT MCP
    smt: enabled arch: Ivy Bridge rev: 9 cache: L1: 128 KiB L2: 512 KiB
    L3: 3 MiB
  Speed (MHz): avg: 1450 high: 2005 min/max: 1200/3300 cores: 1: 1197
    2: 2005 3: 1303 4: 1296 bogomips: 20761
  Flags: avx ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
Graphics:
  Device-1: Intel 3rd Gen Core processor Graphics vendor: Lenovo driver: i915
    v: kernel arch: Gen7 ports: active: LVDS-1
    empty: DP-1, DP-2, DP-3, HDMI-A-1, HDMI-A-2, HDMI-A-3, VGA-1
    bus-ID: 00:02.0 chip-ID: 8086:0166 class-ID: 0300
  Device-2: Chicony thinkpad t430s camera type: USB driver: uvcvideo
    bus-ID: 1-1.6:5 chip-ID: 04f2:b2da class-ID: 0e02
  Display: x11 server: X.Org v: 21.1.4 compositor: kwin_x11 driver: X:
    loaded: modesetting unloaded: fbdev,vesa alternate: intel gpu: i915
    display-ID: :0 screens: 1
  Screen-1: 0 s-res: 1600x900 s-dpi: 96 s-size: 423x238mm (16.65x9.37")
    s-diag: 485mm (19.11")
  Monitor-1: LVDS-1 model: AU Optronics 0x213e res: 1600x900 hz: 60
    dpi: 132 size: 309x174mm (12.17x6.85") diag: 355mm (14") modes: 1600x900
  OpenGL: renderer: Mesa Intel HD Graphics 4000 (IVB GT2)
    v: 4.2 Mesa 22.1.3 direct render: Yes
Audio:
  Device-1: Intel 7 Series/C216 Family High Definition Audio vendor: Lenovo
    driver: snd_hda_intel v: kernel bus-ID: 1-1.2:6 bus-ID: 00:1b.0
    chip-ID: 047f:c008 chip-ID: 8086:1e20 class-ID: 0300 class-ID: 0403
  Device-2: Plantronics Audio 655 DSP type: USB
    driver: plantronics,snd-usb-audio,usbhid
  Sound Server-1: ALSA v: k5.18.12-arch1-1 running: yes
  Sound Server-2: PulseAudio v: 16.1 running: no
  Sound Server-3: PipeWire v: 0.3.55 running: yes
Network:
  Device-1: Intel 82579LM Gigabit Network vendor: Lenovo driver: e1000e
    v: kernel port: 6080 bus-ID: 00:19.0 chip-ID: 8086:1502 class-ID: 0200
  IF: enp0s25 state: down mac: <filter>
  Device-2: Intel Centrino Advanced-N 6205 [Taylor Peak] driver: iwlwifi
    v: kernel pcie: speed: 2.5 GT/s lanes: 1 bus-ID: 03:00.0 chip-ID: 8086:0085
    class-ID: 0280
  IF: wlan0 state: up mac: <filter>
Bluetooth:
  Device-1: Broadcom BCM20702 Bluetooth 4.0 [ThinkPad] type: USB
    driver: btusb v: 0.8 bus-ID: 1-1.4:4 chip-ID: 0a5c:21e6 class-ID: fe01
    serial: <filter>
  Report: rfkill ID: hci0 rfk-id: 3 state: down bt-service: disabled
    rfk-block: hardware: no software: no address: see --recommends
Drives:
  Local Storage: total: 465.76 GiB used: 157.39 GiB (33.8%)
  ID-1: /dev/sda vendor: Samsung model: SSD 860 EVO 500GB size: 465.76 GiB
    speed: 6.0 Gb/s type: SSD serial: <filter> rev: 4B6Q scheme: MBR
Partition:
  ID-1: / size: 457.38 GiB used: 157.39 GiB (34.4%) fs: ext4 dev: /dev/sda1
Swap:
  ID-1: swap-1 type: file size: 512 MiB used: 0 KiB (0.0%) priority: -2
    file: /swapfile
Sensors:
  System Temperatures: cpu: 49.0 C mobo: N/A
  Fan Speeds (RPM): cpu: 65535 fan-1: 3792 fan-2:
Info:
  Processes: 173 Uptime: 3h 3m wakeups: 2 Memory: 11.4 GiB
  used: 2.79 GiB (24.5%) Init: systemd v: 251 default: graphical Compilers:
  gcc: 12.1.0 Packages: pacman: 1069 Shell: Bash v: 5.1.16
  running-in: konsole inxi: 3.3.19

Are you not able to switch the sound device from the system tray? I often have issues with my HDMI switching to the internal speakers and just switch it this way

Oh, I am. Thanks. But that doesn’t really solve the issue. Why does that happen?

I really don’t know, sometimes I can go for weeks without it happening other times it can happen several times a day. It doesn’t really bother me too much so I haven’t really tried to look for any answers.

the first thing is to open up pavucontrol, it can handle almost all common issues with audio…