System lockup when connecting Corsair Void headset (corsair_void_battery_add_work_handler)

Hi all,
I narrowed down my recent system freezes and lockups to my corsair void headset. When connecting the dongle, everything seems normal, but when I turn on the headset and it connects to the dongle, my system locks up. Journalctl doesn’t even register this bug, but dmesg luckily does, so here are some console outputs.

dmesg --level=err+
[    1.448710] [    T543] hub 8-0:1.0: config failed, hub doesn't have any ports! (err -19)
[  106.999647] [    T799] BUG: unable to handle page fault for address: 0000000000004020
[  106.999655] [    T799] #PF: supervisor read access in kernel mode
[  106.999658] [    T799] #PF: error_code(0x0000) - not-present page
[  109.756599] [      C9] BUG: scheduling while atomic: irq/87-xhci_hcd/742/0x00000102
[  151.543245] [      C0] BUG: workqueue lockup - pool cpus=9 node=0 flags=0x0 nice=0 stuck for 44s!
[  182.198610] [      C0] BUG: workqueue lockup - pool cpus=9 node=0 flags=0x0 nice=0 stuck for 75s!
[  213.057680] [      C0] BUG: workqueue lockup - pool cpus=9 node=0 flags=0x0 nice=0 stuck for 106s!
[  243.310944] [      C0] BUG: workqueue lockup - pool cpus=9 node=0 flags=0x0 nice=0 stuck for 136s!
[  273.558226] [      C0] BUG: workqueue lockup - pool cpus=9 node=0 flags=0x0 nice=0 stuck for 166s!
[  303.683745] [      C0] BUG: workqueue lockup - pool cpus=9 node=0 flags=0x0 nice=0 stuck for 196s!
[  334.058038] [      C0] BUG: workqueue lockup - pool cpus=9 node=0 flags=0x0 nice=0 stuck for 227s!
[  364.466251] [      C0] BUG: workqueue lockup - pool cpus=9 node=0 flags=0x0 nice=0 stuck for 257s!
[  394.905528] [      C0] BUG: workqueue lockup - pool cpus=9 node=0 flags=0x0 nice=0 stuck for 287s!
[  425.051603] [      C0] BUG: workqueue lockup - pool cpus=9 node=0 flags=0x0 nice=0 stuck for 318s!
[  455.549877] [      C0] BUG: workqueue lockup - pool cpus=9 node=0 flags=0x0 nice=0 stuck for 348s!
[  486.056133] [      C0] BUG: workqueue lockup - pool cpus=9 node=0 flags=0x0 nice=0 stuck for 379s!
[  516.230413] [      C0] BUG: workqueue lockup - pool cpus=9 node=0 flags=0x0 nice=0 stuck for 409s!
[  546.610678] [      C0] BUG: workqueue lockup - pool cpus=9 node=0 flags=0x0 nice=0 stuck for 439s!
[  577.550921] [      C0] BUG: workqueue lockup - pool cpus=9 node=0 flags=0x0 nice=0 stuck for 470s!
[  607.962183] [      C0] BUG: workqueue lockup - pool cpus=9 node=0 flags=0x0 nice=0 stuck for 500s!
[  638.051815] [      C0] BUG: workqueue lockup - pool cpus=9 node=0 flags=0x0 nice=0 stuck for 531s!
[  668.266971] [      C0] BUG: workqueue lockup - pool cpus=9 node=0 flags=0x0 nice=0 stuck for 561s!
[  698.464268] [      C0] BUG: workqueue lockup - pool cpus=9 node=0 flags=0x0 nice=0 stuck for 591s!
[  728.809515] [      C0] BUG: workqueue lockup - pool cpus=9 node=0 flags=0x0 nice=0 stuck for 621s!
dmesg --level=warn+
[    0.839601] [      T1] systemd[1]: /usr/lib/systemd/system/plymouth-start.service:15: Unit uses KillMode=none. This is unsafe, as it disables systemd's process lifecycle management for the service. Please update the service to use a safer KillMode=, such as 'mixed' or 'control-group'. Support for KillMode=none is deprecated and will eventually be removed.
[    1.307979] [    T138] nvme nvme0: missing or invalid SUBNQN field.
[    1.448710] [    T543] hub 8-0:1.0: config failed, hub doesn't have any ports! (err -19)
[    4.102018] [      T1] systemd[1]: /usr/lib/systemd/system/plymouth-start.service:15: Unit uses KillMode=none. This is unsafe, as it disables systemd's process lifecycle management for the service. Please update the service to use a safer KillMode=, such as 'mixed' or 'control-group'. Support for KillMode=none is deprecated and will eventually be removed.
[    4.405751] [    T958] ACPI Warning: SystemIO range 0x0000000000000B00-0x0000000000000B08 conflicts with OpRegion 0x0000000000000B00-0x0000000000000B0F (\GSA1.SMBI) (20240827/utaddress-204)
[    4.773556] [   T1019] usb 7-1.4: Warning! Unlikely big volume range (=32767), cval->res is probably wrong.
[    4.774088] [   T1019] usb 7-1.4: [6] FU [PCM Playback Volume] ch = 2, val = -32767/0/1
[    4.806586] [   T1019] usb 7-1.4: Warning! Unlikely big volume range (=32767), cval->res is probably wrong.
[    4.807058] [   T1019] usb 7-1.4: [5] FU [Mic Capture Volume] ch = 2, val = -32767/0/1
[    5.223610] [    T147] kauditd_printk_skb: 37 callbacks suppressed
[    5.928924] [   T1468] nvme nvme0: using unchecked data buffer
[    9.950698] [   T2530] warning: `kdeconnectd' uses wireless extensions which will stop working for Wi-Fi 7 hardware; use nl80211
[   25.418408] [   T1128] Bluetooth: hci0: HCI Enhanced Setup Synchronous Connection command is advertised, but not supported.
[   25.757399] [   T1450] Bluetooth: hci0: Invalid LTK for 50:8e:49:dc:2b:4a
[  106.999647] [    T799] BUG: unable to handle page fault for address: 0000000000004020
[  106.999655] [    T799] #PF: supervisor read access in kernel mode
[  106.999658] [    T799] #PF: error_code(0x0000) - not-present page
[  106.999665] [    T799] Oops: Oops: 0000 [#1] PREEMPT SMP NOPTI
[  106.999669] [    T799] CPU: 9 UID: 0 PID: 799 Comm: kworker/9:2 Not tainted 6.13.1-1-default #1 openSUSE Tumbleweed aecab2fb601a0aa0a459c99dfb6b0df70b26249d
[  106.999674] [    T799] Hardware name: Gigabyte Technology Co., Ltd. B650 AORUS ELITE AX/B650 AORUS ELITE AX, BIOS F31 08/14/2024
[  106.999676] [    T799] Workqueue: events corsair_void_battery_add_work_handler [hid_corsair_void]
[  106.999684] [    T799] RIP: 0010:internal_create_group+0x4a/0x4c0
[  106.999690] [    T799] Code: 28 31 c0 48 85 ff 0f 84 b2 00 00 00 48 8b 47 30 48 89 fd 41 89 f5 48 89 d3 85 f6 0f 84 94 00 00 00 48 85 c0 0f 84 29 04 00 00 <48> 83 7b 20 00 0f 84 f7 00 00 00 48 8d 74 24 20 48 8d 54 24 24 48
[  106.999692] [    T799] RSP: 0018:ffffa31c41543ca8 EFLAGS: 00010282
[  106.999695] [    T799] RAX: ffff93629483e4c8 RBX: 0000000000004000 RCX: 0000000000000000
[  106.999698] [    T799] RDX: 0000000000004000 RSI: 0000000000000000 RDI: ffff9362213b4838
[  106.999700] [    T799] RBP: ffff9362213b4838 R08: ffff9362213b4800 R09: ffff936200289310
[  106.999701] [    T799] R10: ffff936281da24a8 R11: 00000000ffffffff R12: ffff9362213b4838
[  106.999703] [    T799] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
[  106.999705] [    T799] FS:  0000000000000000(0000) GS:ffff93691e480000(0000) knlGS:0000000000000000
[  106.999708] [    T799] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  106.999710] [    T799] CR2: 0000000000004020 CR3: 000000047be38000 CR4: 0000000000f50ef0
[  106.999712] [    T799] PKRU: 55555554
[  106.999714] [    T799] Call Trace:
[  106.999717] [    T799]  <TASK>
[  106.999720] [    T799]  ? __die_body.cold+0x19/0x26
[  106.999724] [    T799]  ? page_fault_oops+0x132/0x2a0
[  106.999728] [    T799]  ? srso_alias_return_thunk+0x5/0xfbef5
[  106.999732] [    T799]  ? security_kernfs_init_security+0x3c/0x100
[  106.999736] [    T799]  ? srso_alias_return_thunk+0x5/0xfbef5
[  106.999739] [    T799]  ? exc_page_fault+0x73/0x170
[  106.999743] [    T799]  ? asm_exc_page_fault+0x26/0x30
[  106.999749] [    T799]  ? internal_create_group+0x4a/0x4c0
[  106.999752] [    T799]  ? internal_create_group+0x330/0x4c0
[  106.999755] [    T799]  ? kernfs_add_one+0x141/0x150
[  106.999759] [    T799]  internal_create_groups+0x42/0xa0
[  106.999763] [    T799]  device_add+0x316/0x890
[  106.999768] [    T799]  __power_supply_register.part.0+0x238/0x430
[  106.999774] [    T799]  corsair_void_battery_add_work_handler+0x87/0xd0 [hid_corsair_void 90511d8a0e75560114ac84856eac9039ce4e74a2]
[  106.999778] [    T799]  ? srso_alias_return_thunk+0x5/0xfbef5
[  106.999781] [    T799]  process_one_work+0x17b/0x330
[  106.999786] [    T799]  worker_thread+0x2ce/0x3f0
[  106.999789] [    T799]  ? __pfx_worker_thread+0x10/0x10
[  106.999792] [    T799]  kthread+0xcf/0x100
[  106.999795] [    T799]  ? __pfx_kthread+0x10/0x10
[  106.999798] [    T799]  ret_from_fork+0x31/0x50
[  106.999801] [    T799]  ? __pfx_kthread+0x10/0x10
[  106.999804] [    T799]  ret_from_fork_asm+0x1a/0x30
[  106.999810] [    T799]  </TASK>
[  106.999811] [    T799] Modules linked in: hid_corsair_void uhid rfcomm cmac algif_hash algif_skcipher af_alg af_packet snd_seq_dummy snd_hrtimer snd_seq wireguard libchacha20poly1305 chacha_x86_64 poly1305_x86_64 curve25519_x86_64 libcurve25519_generic libchacha ip6_udp_tunnel udp_tunnel nft_fib_inet nft_fib_ipv4 nft_fib_ipv6 nft_fib nft_reject_inet nf_reject_ipv4 nf_reject_ipv6 nft_reject nft_ct nft_chain_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 qrtr bnep ext4 nls_iso8859_1 nls_cp437 mbcache vfat jbd2 fat intel_rapl_msr amd_atl snd_hda_codec_realtek intel_rapl_common snd_hda_codec_generic snd_hda_scodec_component mt7921e mt7921_common mt792x_lib snd_hda_codec_hdmi mt76_connac_lib mt76 snd_hda_intel snd_intel_dspcfg edac_mce_amd snd_intel_sdw_acpi snd_usb_audio btusb mac80211 snd_hda_codec snd_usbmidi_lib btrtl snd_ump kvm_amd btintel snd_hda_core snd_rawmidi btbcm libarc4 snd_hwdep snd_seq_device btmtk kvm r8169 snd_pcm gigabyte_wmi wmi_bmof cfg80211 realtek snd_timer bluetooth pcspkr mdio_devres snd i2c_piix4 mc
[  106.999889] [    T799]  k10temp i2c_smbus rfkill libphy soundcore thermal tiny_power_button joydev amd_3d_vcache button nvme_fabrics nvme_keyring loop fuse efi_pstore dm_mod configfs dmi_sysfs hid_generic usbhid sr_mod cdrom amdgpu ahci libahci libata crct10dif_pclmul crc32_pclmul polyval_clmulni polyval_generic amdxcp ghash_clmulni_intel i2c_algo_bit sd_mod sha512_ssse3 xhci_pci drm_ttm_helper sha256_ssse3 ttm scsi_dh_emc sha1_ssse3 xhci_hcd drm_exec scsi_dh_rdac gpu_sched scsi_dh_alua aesni_intel drm_suballoc_helper sg drm_buddy gf128mul crypto_simd nvme drm_display_helper scsi_mod usbcore cryptd ccp nvme_core cec scsi_common sp5100_tco rc_core nvme_auth video wmi btrfs blake2b_generic xor raid6_pq br_netfilter bridge stp llc nf_tables libcrc32c crc32c_intel msr i2c_dev ip6_tables nfnetlink efivarfs ip_tables x_tables
[  106.999966] [    T799] CR2: 0000000000004020
[  106.999969] [    T799] ---[ end trace 0000000000000000 ]---
[  106.999971] [    T799] RIP: 0010:internal_create_group+0x4a/0x4c0
[  106.999974] [    T799] Code: 28 31 c0 48 85 ff 0f 84 b2 00 00 00 48 8b 47 30 48 89 fd 41 89 f5 48 89 d3 85 f6 0f 84 94 00 00 00 48 85 c0 0f 84 29 04 00 00 <48> 83 7b 20 00 0f 84 f7 00 00 00 48 8d 74 24 20 48 8d 54 24 24 48
[  106.999976] [    T799] RSP: 0018:ffffa31c41543ca8 EFLAGS: 00010282
[  106.999979] [    T799] RAX: ffff93629483e4c8 RBX: 0000000000004000 RCX: 0000000000000000
[  106.999981] [    T799] RDX: 0000000000004000 RSI: 0000000000000000 RDI: ffff9362213b4838
[  106.999983] [    T799] RBP: ffff9362213b4838 R08: ffff9362213b4800 R09: ffff936200289310
[  106.999985] [    T799] R10: ffff936281da24a8 R11: 00000000ffffffff R12: ffff9362213b4838
[  106.999987] [    T799] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
[  106.999988] [    T799] FS:  0000000000000000(0000) GS:ffff93691e480000(0000) knlGS:0000000000000000
[  106.999991] [    T799] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  106.999992] [    T799] CR2: 0000000000004020 CR3: 000000047be38000 CR4: 0000000000f50ef0
[  106.999994] [    T799] PKRU: 55555554
[  109.756599] [      C9] BUG: scheduling while atomic: irq/87-xhci_hcd/742/0x00000102
[  109.756608] [      C9] Modules linked in: hid_corsair_void uhid rfcomm cmac algif_hash algif_skcipher af_alg af_packet snd_seq_dummy snd_hrtimer snd_seq wireguard libchacha20poly1305 chacha_x86_64 poly1305_x86_64 curve25519_x86_64 libcurve25519_generic libchacha ip6_udp_tunnel udp_tunnel nft_fib_inet nft_fib_ipv4 nft_fib_ipv6 nft_fib nft_reject_inet nf_reject_ipv4 nf_reject_ipv6 nft_reject nft_ct nft_chain_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 qrtr bnep ext4 nls_iso8859_1 nls_cp437 mbcache vfat jbd2 fat intel_rapl_msr amd_atl snd_hda_codec_realtek intel_rapl_common snd_hda_codec_generic snd_hda_scodec_component mt7921e mt7921_common mt792x_lib snd_hda_codec_hdmi mt76_connac_lib mt76 snd_hda_intel snd_intel_dspcfg edac_mce_amd snd_intel_sdw_acpi snd_usb_audio btusb mac80211 snd_hda_codec snd_usbmidi_lib btrtl snd_ump kvm_amd btintel snd_hda_core snd_rawmidi btbcm libarc4 snd_hwdep snd_seq_device btmtk kvm r8169 snd_pcm gigabyte_wmi wmi_bmof cfg80211 realtek snd_timer bluetooth pcspkr mdio_devres snd i2c_piix4 mc
[  109.756687] [      C9]  k10temp i2c_smbus rfkill libphy soundcore thermal tiny_power_button joydev amd_3d_vcache button nvme_fabrics nvme_keyring loop fuse efi_pstore dm_mod configfs dmi_sysfs hid_generic usbhid sr_mod cdrom amdgpu ahci libahci libata crct10dif_pclmul crc32_pclmul polyval_clmulni polyval_generic amdxcp ghash_clmulni_intel i2c_algo_bit sd_mod sha512_ssse3 xhci_pci drm_ttm_helper sha256_ssse3 ttm scsi_dh_emc sha1_ssse3 xhci_hcd drm_exec scsi_dh_rdac gpu_sched scsi_dh_alua aesni_intel drm_suballoc_helper sg drm_buddy gf128mul crypto_simd nvme drm_display_helper scsi_mod usbcore cryptd ccp nvme_core cec scsi_common sp5100_tco rc_core nvme_auth video wmi btrfs blake2b_generic xor raid6_pq br_netfilter bridge stp llc nf_tables libcrc32c crc32c_intel msr i2c_dev ip6_tables nfnetlink efivarfs ip_tables x_tables
[  109.756765] [      C9] CPU: 9 UID: 0 PID: 742 Comm: irq/87-xhci_hcd Tainted: G      D            6.13.1-1-default #1 openSUSE Tumbleweed aecab2fb601a0aa0a459c99dfb6b0df70b26249d
[  109.756771] [      C9] Tainted: [D]=DIE
[  109.756773] [      C9] Hardware name: Gigabyte Technology Co., Ltd. B650 AORUS ELITE AX/B650 AORUS ELITE AX, BIOS F31 08/14/2024
[  109.756775] [      C9] Call Trace:
[  109.756779] [      C9]  <IRQ>
[  109.756783] [      C9]  dump_stack_lvl+0x5a/0x80
[  109.756790] [      C9]  __schedule_bug.cold+0x42/0x4e
[  109.756794] [      C9]  __schedule+0xff1/0x1340
[  109.756799] [      C9]  ? xhci_queue_bulk_tx+0x456/0xa20 [xhci_hcd c128a4a577d2e36fbd699c6ae3e06acd00823824]
[  109.756814] [      C9]  ? evdev_pass_values.part.0+0x180/0x230
[  109.756818] [      C9]  ? srso_alias_return_thunk+0x5/0xfbef5
[  109.756823] [      C9]  schedule+0x27/0xf0
[  109.756825] [      C9]  schedule_preempt_disabled+0x15/0x30
[  109.756828] [      C9]  __mutex_lock.constprop.0+0x361/0x680
[  109.756832] [      C9]  ? srso_alias_return_thunk+0x5/0xfbef5
[  109.756834] [      C9]  ? queue_work_on+0x65/0x70
[  109.756842] [      C9]  corsair_void_raw_event+0xfd/0x27d [hid_corsair_void 90511d8a0e75560114ac84856eac9039ce4e74a2]
[  109.756847] [      C9]  __hid_input_report+0x127/0x1f0
[  109.756852] [      C9]  hid_input_report+0x15/0x20
[  109.756856] [      C9]  hid_irq_in+0x184/0x1b0 [usbhid 5d990cbc11d3ba9ba1496235c3a4cb474b5f49e8]
[  109.756863] [      C9]  __usb_hcd_giveback_urb+0x9d/0x120 [usbcore f71ebfb9e144097777e884de563f810ee80dfbab]
[  109.756878] [      C9]  usb_giveback_urb_bh+0xb1/0x140 [usbcore f71ebfb9e144097777e884de563f810ee80dfbab]
[  109.756890] [      C9]  process_one_work+0x17b/0x330
[  109.756894] [      C9]  bh_worker+0x1bc/0x210
[  109.756898] [      C9]  tasklet_hi_action+0x13/0x30
[  109.756901] [      C9]  handle_softirqs+0xd4/0x280
[  109.756905] [      C9]  do_softirq.part.0+0x3b/0x60
[  109.756908] [      C9]  </IRQ>
[  109.756910] [      C9]  <TASK>
[  109.756911] [      C9]  __local_bh_enable_ip+0x60/0x70
[  109.756914] [      C9]  irq_forced_thread_fn+0x74/0x80
[  109.756918] [      C9]  irq_thread+0x189/0x2c0
[  109.756921] [      C9]  ? __pfx_irq_forced_thread_fn+0x10/0x10
[  109.756925] [      C9]  ? __pfx_irq_thread_dtor+0x10/0x10
[  109.756928] [      C9]  ? __pfx_irq_thread+0x10/0x10
[  109.756931] [      C9]  kthread+0xcf/0x100
[  109.756934] [      C9]  ? __pfx_kthread+0x10/0x10
[  109.756937] [      C9]  ret_from_fork+0x31/0x50
[  109.756940] [      C9]  ? __pfx_kthread+0x10/0x10
[  109.756943] [      C9]  ret_from_fork_asm+0x1a/0x30
[  109.756949] [      C9]  </TASK>
[  151.543245] [      C0] BUG: workqueue lockup - pool cpus=9 node=0 flags=0x0 nice=0 stuck for 44s!
[  182.198610] [      C0] BUG: workqueue lockup - pool cpus=9 node=0 flags=0x0 nice=0 stuck for 75s!
[  213.057680] [      C0] BUG: workqueue lockup - pool cpus=9 node=0 flags=0x0 nice=0 stuck for 106s!
[  243.310944] [      C0] BUG: workqueue lockup - pool cpus=9 node=0 flags=0x0 nice=0 stuck for 136s!
[  273.558226] [      C0] BUG: workqueue lockup - pool cpus=9 node=0 flags=0x0 nice=0 stuck for 166s!
[  303.683745] [      C0] BUG: workqueue lockup - pool cpus=9 node=0 flags=0x0 nice=0 stuck for 196s!
[  334.058038] [      C0] BUG: workqueue lockup - pool cpus=9 node=0 flags=0x0 nice=0 stuck for 227s!
[  364.466251] [      C0] BUG: workqueue lockup - pool cpus=9 node=0 flags=0x0 nice=0 stuck for 257s!
[  394.905528] [      C0] BUG: workqueue lockup - pool cpus=9 node=0 flags=0x0 nice=0 stuck for 287s!
[  425.051603] [      C0] BUG: workqueue lockup - pool cpus=9 node=0 flags=0x0 nice=0 stuck for 318s!
[  455.549877] [      C0] BUG: workqueue lockup - pool cpus=9 node=0 flags=0x0 nice=0 stuck for 348s!
[  486.056133] [      C0] BUG: workqueue lockup - pool cpus=9 node=0 flags=0x0 nice=0 stuck for 379s!
[  516.230413] [      C0] BUG: workqueue lockup - pool cpus=9 node=0 flags=0x0 nice=0 stuck for 409s!
[  546.610678] [      C0] BUG: workqueue lockup - pool cpus=9 node=0 flags=0x0 nice=0 stuck for 439s!
[  577.550921] [      C0] BUG: workqueue lockup - pool cpus=9 node=0 flags=0x0 nice=0 stuck for 470s!
[  607.962183] [      C0] BUG: workqueue lockup - pool cpus=9 node=0 flags=0x0 nice=0 stuck for 500s!
[  638.051815] [      C0] BUG: workqueue lockup - pool cpus=9 node=0 flags=0x0 nice=0 stuck for 531s!
[  668.266971] [      C0] BUG: workqueue lockup - pool cpus=9 node=0 flags=0x0 nice=0 stuck for 561s!
[  698.464268] [      C0] BUG: workqueue lockup - pool cpus=9 node=0 flags=0x0 nice=0 stuck for 591s!
[  728.809515] [      C0] BUG: workqueue lockup - pool cpus=9 node=0 flags=0x0 nice=0 stuck for 621s!

Full dmesg (only gets interesting after line 1618):
https://paste.opensuse.org/pastes/737aeb159cf3

The cause of this bug might be related to my script, which automatically switches my sound output to the headset whenever I connect it. But I removed it from auto starting ever since I noticed the problem and yet, it still persists.

headset-ctrl.sh
#!/bin/bash
sleep 3
cat /proc/bus/input/devices  | grep -P '^[NH]: ' | paste - - | grep -i 'corsair' | grep -o 'event.*' | while read -r event ; do
    stdbuf -oL sudo evtest "/dev/input/$event" | {
        battery=0
        on=0
        while IFS= read -r line
        do
            #printf "$line\n"
            _val0=$(grep 'code 40' <<< "$line")
            _val1=$(grep -o 'value .*' <<< "$_val0")
            power=$(grep -o '[0-9]*' <<< "$_val1")
            if [ $(($battery)) -eq 0 ]
            then
                battery=$power
            fi
            if [ -n "$power" ]
            then
                #printf "$battery\n"
                if [ $(($power)) -gt 0 ] && [ $(($on)) -eq 0 ]
                then
                    prev_sink=$(wpctl inspect @DEFAULT_AUDIO_SINK@ | grep -im1 'node.description' | grep -o '".*"' | cut -d '"' -f2)
                    #printf 'on\n'
                    notify-send -a 'Headset Control' "Headset eingeschaltet" "Der Batterie-Status beträgt noch $battery%"
                    #headsetcontrol -u
                    sudo /usr/local/bin/headsetcontrol -s 120 -l 0
                    sink=$(wpctl status | grep -i 'vol:' | grep -im1 'CORSAIR VOID ELITE' | grep -ow '.[0-9][0-9]')
                    wpctl set-default $sink
                    on=1
                fi
                if [ $(($power)) -eq 0 ] && [ $(($on)) -eq 1 ]
                then
                    #printf 'off\n'
                    notify-send -a 'Headset Control' "Headset ausgeschaltet" "Der Batterie-Status beträgt noch $battery%"
                    sink=$(wpctl status | grep -i 'vol:' | grep -im1 "$prev_sink" | grep -ow '.[0-9][0-9]')
                    wpctl set-default $sink
                    on=0
                fi
                battery=$power
            fi
        done
    } &
done

I have no idea how to debug this further, please help :sweat_smile:

I just reinstalled Slowroll on my laptop (long story) and now I also get the bug there as well, when I previously didn’t. I’m beginning to think this might be a kernel bug, though I do not know the exact kernel version where the bug first appeared.

Pobably related to 1236843 – [Kernel 6.13.1] System freeze when plugging Corsair Void USB dongle. Kernel 6.13.1 from Kernel:stable contains the fix:

Mi Feb 12 2025 jslaby@suse.cz
HID: corsair-void: Update power supply values with a unified
work handler (bsc#1236843).
HID: corsair-void: Initialise memory for psy_cfg (bsc#1236843).
HID: corsair-void: Add missing delayed work cancel for headset
status (bsc#1236843).
commit fda61c9

1 Like

Thank you, I must have overlooked that bug report when I located the problem and searched for it. Glad it already got addressed. Gotta love the speed of open source :smiley:

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.