Service fails to start on systemctl start/enable --now cardwired.service due to a missing file.
See systemd logs as the most relevant information.
Environment details
System:
Kernel: 7.0.11-200.fc44.x86_64 arch: x86_64 bits: 64
Desktop: KDE Plasma v: 6.6.5 Distro: Fedora Linux 44 (KDE Plasma Desktop
Edition)
Machine:
Type: Laptop System: ASUSTeK product: ROG Zephyrus G15 GA503RW_GA503RW
Mobo: ASUSTeK model: GA503RW
Firmware: UEFI vendor: American Megatrends LLC. v: GA503RW.318
date: 04/19/2024
CPU:
Info: 8-core model: AMD Ryzen 7 6800HS with Radeon Graphics bits: 64
type: MT MCP cache: L2: 4 MiB
Graphics:
Device-1: NVIDIA GA104 [Geforce RTX 3070 Ti Laptop GPU] driver: nvidia
v: 595.80
Device-2: Advanced Micro Devices [AMD/ATI] Rembrandt [Radeon 680M]
driver: amdgpu v: kernel
Display: wayland server: X.org v: 1.21.1.23 with: Xwayland v: 24.1.12
compositor: kwin_wayland driver:
gpu: amdgpu,nv_platform,nvidia,nvidia-nvswitch resolution:
1: 1920x1080~75Hz 2: 2560x1440~240Hz
API: EGL v: 1.5 drivers: nvidia,radeonsi,swrast
platforms: gbm,wayland,x11,surfaceless,device
API: OpenGL v: 4.6.0 compat-v: 4.5 vendor: amd mesa v: 26.0.8 renderer: AMD
Radeon 680M (radeonsi rembrandt ACO DRM 3.64 7.0.11-200.fc44.x86_64)
API: Vulkan v: 1.4.341 drivers: radv,nvidia,llvmpipe surfaces: N/A
Info: Tools: api: clinfo, eglinfo, glxinfo, vulkaninfo
de: kscreen-console,kscreen-doctor gpu: gputop, intel_gpu_top, lsgpu,
nvidia-settings, nvidia-smi wl: wayland-info x11: xdriinfo, xdpyinfo,
xprop, xrandr
Cardwire version (cardwire --version): cardwire-cli 0.10.1
cardwire list output
ID NAME PCI RENDER CARD DEFAULT BLOCKED
-- ---- --- ------ ---- ------- -------
ls -la /dev/dri/by-path/
drwxr-xr-x. 2 root root 120 Jun 11 12:30 ./
drwxr-xr-x. 3 root root 140 Jun 11 12:30 ../
lrwxrwxrwx. 1 root root 8 Jun 11 12:30 pci-0000:01:00.0-card -> ../card0
lrwxrwxrwx. 1 root root 13 Jun 11 12:30 pci-0000:01:00.0-render -> ../renderD129
lrwxrwxrwx. 1 root root 8 Jun 11 12:30 pci-0000:07:00.0-card -> ../card1
lrwxrwxrwx. 1 root root 13 Jun 11 12:30 pci-0000:07:00.0-render -> ../renderD128
Systemd Logs
Jun 11 12:32:11 rog15 cardwired[7985]: [INFO ] IOMMU detected, reading pci devices using iommu dir
Jun 11 12:32:11 rog15 cardwired[7985]: [INFO ] Successfully read renderD129 from sysfs for 0000:01:00.0
Jun 11 12:32:11 rog15 cardwired[7985]: [INFO ] Successfully read card0 from sysfs for 0000:01:00.0
Jun 11 12:32:11 rog15 cardwired[7985]: [INFO ] Successfully read renderD128 from sysfs for 0000:07:00.0
Jun 11 12:32:11 rog15 cardwired[7985]: [INFO ] Successfully read card1 from sysfs for 0000:07:00.0
Jun 11 12:32:11 rog15 cardwired[7985]: [INFO ] gpu GA104 [Geforce RTX 3070 Ti Laptop GPU] id: 0 internal: 1, desktop: 2, connected: 1, total: 3, connected_internal: 0, connected_desktop: 1
Jun 11 12:32:11 rog15 cardwired[7985]: [INFO ] gpu Rembrandt [Radeon 680M] id: 1 internal: 1, desktop: 9, connected: 1, total: 10, connected_internal: 1, connected_desktop: 0
Jun 11 12:32:11 rog15 cardwired[7985]: thread 'main' (7985) panicked at crates/cardwire-daemon/src/analyzer/static_analysis.rs:48:77:
Jun 11 12:32:11 rog15 cardwired[7985]: called `Result::unwrap()` on an `Err` value: Io(Os { code: 2, kind: NotFound, message: "No such file or directory" })
Jun 11 12:32:11 rog15 cardwired[7985]: note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Jun 11 12:32:11 rog15 systemd-coredump[8018]: [🡕] Process 7985 (cardwired) of user 0 dumped core.
Additional context
To see what is going on I tried running the cardwired service under strace and I see that it is crashing after trying to open a desktop file
openat(AT_FDCWD, "/home/user/.local/share/applications/com.some.application.desktop", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
gettid() = 14999
write(2, "\nthread 'main' (14999) panicked "..., 215
thread 'main' (14999) panicked at crates/cardwire-daemon/src/analyzer/static_analysis.rs:48:77:
called `Result::unwrap()` on an `Err` value: Io(Os { code: 2, kind: NotFound, message: "No such file or directory" })
) = 215
It does appear as the .desktop file is indeed bad, as it is a symlink to a flatpak-derived desktop file that does not exist (not entirely sure what is going on as the application is working, but that's out of scope) so my question is:
- Why is cardwired listing my applications?
- Should this type of error be unrecoverable? It seems to me as it could just be signaled in the logs and skipped.
EDIT:
read through the repo and I see that the purpose of the analysis is for applying special rules to known applications. Seeing this I still think this should be a recoverable error.
Service fails to start on systemctl start/enable --now cardwired.service due to a missing file.
See systemd logs as the most relevant information.
Environment details
Cardwire version (
cardwire --version): cardwire-cli 0.10.1cardwire listoutputls -la /dev/dri/by-path/Systemd Logs
Additional context
To see what is going on I tried running the cardwired service under strace and I see that it is crashing after trying to open a desktop file
It does appear as the .desktop file is indeed bad, as it is a symlink to a flatpak-derived desktop file that does not exist (not entirely sure what is going on as the application is working, but that's out of scope) so my question is:
EDIT:
read through the repo and I see that the purpose of the analysis is for applying special rules to known applications. Seeing this I still think this should be a recoverable error.