Skip to content

[Bug] cardwired fails to start on 0.7.0 with Intel iGPU + NVIDIA dGPU (tokio worker timeout, D-Bus never registered) #23

@Dzejdies

Description

@Dzejdies

Describe the bug
cardwired.service fails to start on version 0.7.0-1 with Intel iGPU + NVIDIA dGPU configuration. The daemon detects both GPUs correctly but never registers its D-Bus name, causing systemd to kill it with result: timeout. A friend with the same OS, same AUR package version and build date, but different hardware (AMD HawkPoint + RTX 5060) has no issues on 0.7.0. Downgrading to 0.6.0 fixes the issue.

To Reproduce

  1. Install cardwire 0.7.0-1 on CachyOS (Arch-based) with Intel iGPU + NVIDIA dGPU
  2. Enable and start cardwired.service
  3. Service repeatedly fails with result: timeout

Expected behavior
cardwired.service should start successfully and register on D-Bus as com.github.opengamingcollective.cardwire.

Environment details

OS: CachyOS x86_64
Host: OMEN by HP Gaming Laptop 16-wd0xxx
Kernel: Linux 7.0.5-1-cachyos-bore
Shell: fish 4.7.1
WM: Hyprland 0.54.3 (Wayland)
CPU: 13th Gen Intel(R) Core(TM) i7-13620H (16) @ 4.90 GHz
GPU 1: NVIDIA GeForce RTX 4060 Max-Q / Mobile [Discrete]
GPU 2: Intel UHD Graphics @ 1.50 GHz [Integrated]
Memory: 31.03 GiB

Cardwire version: 0.7.0-1

cardwire list output

N/A - daemon fails to start

ls -la /dev/dri/by-path/

lrwxrwxrwx - root  pci-0000:00:02.0-card -> ../card1
lrwxrwxrwx - root  pci-0000:00:02.0-render -> ../renderD128
lrwxrwxrwx - root  pci-0000:01:00.0-card -> ../card2
lrwxrwxrwx - root  pci-0000:01:00.0-render -> ../renderD129

cardwired logs

cardwired[1297]: [INFO ] IOMMU not detected, reading pci devices using sysfs dir
cardwired[1297]: [INFO ] Successfully read renderD128 from sysfs for 0000:00:02.0
cardwired[1297]: [INFO ] Successfully read card1 from sysfs for 0000:00:02.0
cardwired[1297]: [INFO ] Successfully read renderD129 from sysfs for 0000:01:00.0
cardwired[1297]: [INFO ] Successfully read card2 from sysfs for 0000:01:00.0
cardwired[1297]: [INFO ] gpu Raptor Lake-P [UHD Graphics] id: 0 internal: 1, desktop: 1, connected: 1, total: 2, connected_internal: 1, connected_desktop: 0
cardwired[1297]: [INFO ] gpu AD107M [GeForce RTX 4060 Max-Q / Mobile] id: 1 internal: 0, desktop: 1, connected: 0, total: 1, connected_internal: 0, connected_desktop: 0
cardwired[1297]: [INFO ] applying this config: CardwireConfig { auto_apply_gpu_state: true, experimental_nvidia_block: true, battery_auto_switch: true }
systemd[1]: cardwired.service: start operation timed out. Terminating.
systemd[1]: cardwired.service: Failed with result 'timeout'.

Additional context

Using strace, the tokio-rt-worker thread writes mode.json (with "Integrated" on first run, "Manual" after reinstall) then waits on a futex with a 10-second timeout. After ETIMEDOUT it exits silently with code 0, without ever registering on D-Bus:

[pid 13994] prctl(PR_SET_NAME, "tokio-rt-worker") = 0
[pid 13994] openat(AT_FDCWD, "/var/lib/cardwire/mode.json", O_WRONLY|O_CREAT|O_TRUNC) = 24
[pid 13994] write(24, "{\n  \"mode\": \"Integrated\"\n}", 26) = 26
[pid 13994] futex(..., FUTEX_WAIT_PRIVATE, 1, {tv_sec=9, tv_nsec=999996356}) = -1 ETIMEDOUT
[pid 13994] exit(0)

Also, dbus-broker logs the following warning at startup:

Invalid group-name in com.github.opengamingcollective.cardwire.conf +10: group="sudo"

The sudo group does not exist on Arch-based systems. This is likely a separate minor bug worth fixing regardless.

Workaround: downgrade to 0.6.0 (git checkout b35b744 in the AUR repo, then makepkg -si).

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions