Skip to content

[Bug]: cardwired failed to start during boot, runs normally afterwords #262

Description

@k4lizen

Distribution

arch

Kernel Version

7.1.8-arch1-3

Cardwire Version

cardwire-cli 0.12.2 from arch pkgs

Cardwire GPU list

{
  "0": {
    "id": 0,
    "name": "Intel",
    "pci": "0000:00:02.0",
    "render": 129,
    "card": 2,
    "default": true,
    "discrete": false,
    "virtual_gpu": false,
    "available": true,
    "vendor": "Intel",
    "driver": "i915",
    "blocked": false,
    "launchable": true,
    "nvidia": false,
    "nvidia_minor": "none"
  },
  "1": {
    "id": 1,
    "name": "NVIDIA GeForce RTX 3050 Laptop GPU",
    "pci": "0000:01:00.0",
    "render": 128,
    "card": 1,
    "default": false,
    "discrete": true,
    "virtual_gpu": false,
    "available": true,
    "vendor": "Nvidia",
    "driver": "nvidia",
    "blocked": true,
    "launchable": false,
    "nvidia": true,
    "nvidia_minor": "0"
  }
}

Describe the bug

When my PC boots, I see "cardwired deamon failed to start" printed by systemd. After my system comes up,
I see that the service is running.

Expected vs Actual Behavior

I expect it to not fail during bootup, or wait for everything required to come up before starting its magic rather than relying on systemd restarting it.

Cardwire Daemon Logs

-- Boot b1c630b96bc44d91b926138f32159cd8 --
Sep 23 15:27:08 pandora systemd[1]: Starting Cardwire Daemon...
Sep 23 15:27:08 pandora cardwired[683]: [WARN ] IOMMU not detected, reading pci devices using sysfs dir
Sep 23 15:27:09 pandora cardwired[683]: [INFO ] Successfully resolved card2 and renderD129 for PCI 0000:00:02.0
Sep 23 15:27:09 pandora cardwired[683]: [WARN ] Intel: EGL discrete check failed: EGL driver found the device but doesn't support querying GPU type
Sep 23 15:27:09 pandora cardwired[683]: [WARN ] DRM nodes (card/render) for PCI 0000:01:00.0 not fully ready, attempt 1/10, retrying in 500ms...
Sep 23 15:27:09 pandora cardwired[683]: [INFO ] Successfully resolved card1 and renderD128 for PCI 0000:01:00.0
Sep 23 15:27:09 pandora cardwired[683]: [WARN ] NVIDIA GeForce RTX 3050 Laptop GPU: EGL discrete check failed: EGL driver found the device but doesn't support querying GPU type
Sep 23 15:27:09 pandora cardwired[683]: [INFO ] gpu Intel id: 0 internal: 1, desktop: 1, connected: 1, total: 2, connected_internal: 1, connected_desktop: 0
Sep 23 15:27:09 pandora cardwired[683]: [INFO ] gpu NVIDIA GeForce RTX 3050 Laptop GPU id: 1 internal: 0, desktop: 1, connected: 0, total: 1, connected_internal: 0, connected_desktop: 0
Sep 23 15:27:09 pandora cardwired[683]: [INFO ] inserting: 683 into map
Sep 23 15:27:09 pandora cardwired[683]: [ERROR] Couldn't set mode to Integrated, Integrated and Smart modes require a offload discrete GPU (not supported on desktops where the discrete GPU is the primary display)
Sep 23 15:27:09 pandora cardwired[683]: [ERROR] failed to apply mode at startup: fdo error: org.freedesktop.DBus.Error.NotSupported: Couldn't set mode to Integrated, Integrated and Smart modes require a offload discrete GPU (not supported on desktops where the discrete GPU is the primary display), switching to hybrid...
Sep 23 15:27:09 pandora cardwired[683]: [ERROR] (ignoring) failed to get inode for hwmon 0000:00:02.0: IO Error: No such file or directory (os error 2)
Sep 23 15:27:09 pandora cardwired[683]: [ERROR] (ignoring) failed to get inode for hwmon 0000:01:00.0: IO Error: No such file or directory (os error 2)
Sep 23 15:27:09 pandora cardwired[683]: [WARN ] failed to get inode for /dev/nvidia0: No such file or directory (os error 2)
Sep 23 15:27:09 pandora cardwired[683]: [ERROR] failed to get inode for nvidia0: IO Error: No such file or directory (os error 2)
Sep 23 15:27:09 pandora cardwired[683]: Error: FdoError(Failed("IO Error: No such file or directory (os error 2)"))
Sep 23 15:27:10 pandora systemd[1]: cardwired.service: Main process exited, code=exited, status=1/FAILURE
Sep 23 15:27:10 pandora systemd[1]: cardwired.service: Failed with result 'exit-code'.
Sep 23 15:27:10 pandora systemd[1]: Failed to start Cardwire Daemon.
Sep 23 15:27:10 pandora systemd[1]: cardwired.service: Consumed 402ms CPU time over 1.522s wall clock time, 177.5M memory peak.
Sep 23 15:27:15 pandora systemd[1]: cardwired.service: Scheduled restart job, restart counter is at 1.
Sep 23 15:27:15 pandora systemd[1]: Starting Cardwire Daemon...
Sep 23 15:27:15 pandora cardwired[1141]: [WARN ] IOMMU not detected, reading pci devices using sysfs dir
Sep 23 15:27:15 pandora cardwired[1141]: [INFO ] Successfully resolved card2 and renderD129 for PCI 0000:00:02.0
Sep 23 15:27:15 pandora cardwired[1141]: [WARN ] Intel: EGL discrete check failed: EGL driver found the device but doesn't support querying GPU type
Sep 23 15:27:15 pandora cardwired[1141]: [INFO ] Successfully resolved card1 and renderD128 for PCI 0000:01:00.0
Sep 23 15:27:15 pandora cardwired[1141]: [WARN ] NVIDIA GeForce RTX 3050 Laptop GPU: EGL discrete check failed: EGL driver found the device but doesn't support querying GPU type
Sep 23 15:27:15 pandora cardwired[1141]: [INFO ] gpu Intel id: 0 internal: 1, desktop: 1, connected: 1, total: 2, connected_internal: 1, connected_desktop: 0
Sep 23 15:27:15 pandora cardwired[1141]: [INFO ] gpu NVIDIA GeForce RTX 3050 Laptop GPU id: 1 internal: 0, desktop: 1, connected: 0, total: 1, connected_internal: 0, connected_desktop: 0
Sep 23 15:27:15 pandora cardwired[1141]: [INFO ] inserting: 1141 into map
Sep 23 15:27:15 pandora cardwired[1141]: [ERROR] Couldn't set mode to Integrated, Integrated and Smart modes require a offload discrete GPU (not supported on desktops where the discrete GPU is the primary display)
Sep 23 15:27:15 pandora cardwired[1141]: [ERROR] failed to apply mode at startup: fdo error: org.freedesktop.DBus.Error.NotSupported: Couldn't set mode to Integrated, Integrated and Smart modes require a offload discrete GPU (not supported on desktops where the discrete GPU is the primary display), switching to hybrid...
Sep 23 15:27:15 pandora cardwired[1141]: [ERROR] (ignoring) failed to get inode for hwmon 0000:00:02.0: IO Error: No such file or directory (os error 2)
Sep 23 15:27:15 pandora cardwired[1141]: [ERROR] (ignoring) failed to get inode for hwmon 0000:01:00.0: IO Error: No such file or directory (os error 2)
Sep 23 15:27:15 pandora cardwired[1141]: [WARN ] failed to get inode for /dev/nvidia0: No such file or directory (os error 2)
Sep 23 15:27:15 pandora cardwired[1141]: [ERROR] failed to get inode for nvidia0: IO Error: No such file or directory (os error 2)
Sep 23 15:27:15 pandora cardwired[1141]: Error: FdoError(Failed("IO Error: No such file or directory (os error 2)"))
Sep 23 15:27:16 pandora systemd[1]: cardwired.service: Main process exited, code=exited, status=1/FAILURE
Sep 23 15:27:16 pandora systemd[1]: cardwired.service: Failed with result 'exit-code'.
Sep 23 15:27:16 pandora systemd[1]: Failed to start Cardwire Daemon.
Sep 23 15:27:21 pandora systemd[1]: cardwired.service: Scheduled restart job, restart counter is at 2.
Sep 23 15:27:21 pandora systemd[1]: Starting Cardwire Daemon...
Sep 23 15:27:21 pandora cardwired[2297]: [WARN ] IOMMU not detected, reading pci devices using sysfs dir
Sep 23 15:27:21 pandora cardwired[2297]: [INFO ] Successfully resolved card2 and renderD129 for PCI 0000:00:02.0
Sep 23 15:27:21 pandora cardwired[2297]: [WARN ] Intel: EGL discrete check failed: EGL driver found the device but doesn't support querying GPU type
Sep 23 15:27:21 pandora cardwired[2297]: [INFO ] Successfully resolved card1 and renderD128 for PCI 0000:01:00.0
Sep 23 15:27:21 pandora cardwired[2297]: [INFO ] gpu Intel id: 0 internal: 1, desktop: 1, connected: 1, total: 2, connected_internal: 1, connected_desktop: 0
Sep 23 15:27:21 pandora cardwired[2297]: [INFO ] gpu NVIDIA GeForce RTX 3050 Laptop GPU id: 1 internal: 0, desktop: 1, connected: 0, total: 1, connected_internal: 0, connected_desktop: 0
Sep 23 15:27:21 pandora cardwired[2297]: [INFO ] inserting: 2297 into map
Sep 23 15:27:21 pandora cardwired[2297]: [ERROR] (ignoring) failed to get inode for hwmon 0000:01:00.0: IO Error: No such file or directory (os error 2)
Sep 23 15:27:21 pandora cardwired[2297]: [WARN ] failed to get inode for /sys/class/backlight/nvidia_0: No such file or directory (os error 2)
Sep 23 15:27:21 pandora cardwired[2297]: [ERROR] (ignoring) failed to get inode for backlight nvidia_0: IO Error: No such file or directory (os error 2)
Sep 23 15:27:21 pandora cardwired[2297]: [INFO ] Switched to Integrated
Sep 23 15:27:21 pandora cardwired[2297]: [INFO ] write_command; command=Auth(Some(External), Some([48]))
Sep 23 15:27:21 pandora cardwired[2297]: [INFO ] write_commands; commands=[Auth(Some(External), Some([48]))] extra_bytes=None
Sep 23 15:27:21 pandora cardwired[2297]: [INFO ] read_command;
Sep 23 15:27:21 pandora cardwired[2297]: [INFO ] read_commands; n_commands=1
Sep 23 15:27:21 pandora cardwired[2297]: [INFO ] write_commands; commands=[NegotiateUnixFD, Begin] extra_bytes=Some([108, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 109, 0, 0, 0, 1, 1, 111, 0, 21, 0, 0, 0, 47, 111, 114, 103, 47, 102, 114, 101, 101, 100, 101, 115, 107, 116, 111, 112, 47, 68, 66, 117, 115, 0, 0, 0, 2, 1, 115, 0, 20, 0, 0, 0, 111, 114, 103, 46, 102, 114, 101, 101, 100, 101, 115, 107, 116, 111, 112, 46, 68, 66, 117, 115, 0, 0, 0, 0, 3, 1, 115, 0, 5, 0, 0, 0, 72, 101, 108, 108, 111, 0, 0, 0, 6, 1, 115, 0, 20, 0, 0, 0, 111, 114, 103, 46, 102, 114, 101, 101, 100, 101, 115, 107, 116, 111, 112, 46, 68, 66, 117, 115, 0, 0, 0, 0])
Sep 23 15:27:21 pandora cardwired[2297]: [INFO ] read_commands; n_commands=1
Sep 23 15:27:21 pandora cardwired[2297]: [INFO ] start_object_server; started_event=Some(Event { listeners_notified: 0, listeners_total: 1 })
Sep 23 15:27:21 pandora cardwired[2297]: [INFO ] obj_server_task;
Sep 23 15:27:21 pandora cardwired[2297]: [INFO ] monitor_name_lost; name=org.opengamingcollective.cardwire
Sep 23 15:27:21 pandora cardwired[2297]: [INFO ] write_command; command=Auth(Some(External), Some([48]))
Sep 23 15:27:21 pandora cardwired[2297]: [INFO ] write_commands; commands=[Auth(Some(External), Some([48]))] extra_bytes=None
Sep 23 15:27:21 pandora cardwired[2297]: [INFO ] read_command;
Sep 23 15:27:21 pandora cardwired[2297]: [INFO ] read_commands; n_commands=1
Sep 23 15:27:21 pandora cardwired[2297]: [INFO ] write_commands; commands=[NegotiateUnixFD, Begin] extra_bytes=Some([108, 1, 0, 1, 0, 0, 0, 0, 5, 0, 0, 0, 109, 0, 0, 0, 1, 1, 111, 0, 21, 0, 0, 0, 47, 111, 114, 103, 47, 102, 114, 101, 101, 100, 101, 115, 107, 116, 111, 112, 47, 68, 66, 117, 115, 0, 0, 0, 2, 1, 115, 0, 20, 0, 0, 0, 111, 114, 103, 46, 102, 114, 101, 101, 100, 101, 115, 107, 116, 111, 112, 46, 68, 66, 117, 115, 0, 0, 0, 0, 3, 1, 115, 0, 5, 0, 0, 0, 72, 101, 108, 108, 111, 0, 0, 0, 6, 1, 115, 0, 20, 0, 0, 0, 111, 114, 103, 46, 102, 114, 101, 101, 100, 101, 115, 107, 116, 111, 112, 46, 68, 66, 117, 115, 0, 0, 0, 0])
Sep 23 15:27:21 pandora cardwired[2297]: [INFO ] read_commands; n_commands=1
Sep 23 15:27:21 pandora cardwired[2297]: [INFO ] start_object_server; started_event=Some(Event { listeners_notified: 0, listeners_total: 1 })
Sep 23 15:27:21 pandora cardwired[2297]: [INFO ] obj_server_task;
Sep 23 15:27:21 pandora cardwired[2297]: [INFO ] monitor_name_lost; name=net.hadess.SwitcherooControl
Sep 23 15:27:21 pandora cardwired[2297]: [INFO ] Switcheroo DBus shim started successfully
Sep 23 15:27:21 pandora cardwired[2297]: [INFO ] Daemon started succesfully
Sep 23 15:27:21 pandora systemd[1]: Started Cardwire Daemon.
Sep 23 15:27:21 pandora cardwired[2297]: [INFO ] write_command; command=Auth(Some(External), Some([48]))
Sep 23 15:27:21 pandora cardwired[2297]: [INFO ] write_commands; commands=[Auth(Some(External), Some([48]))] extra_bytes=None
Sep 23 15:27:21 pandora cardwired[2297]: [INFO ] read_command;
Sep 23 15:27:21 pandora cardwired[2297]: [INFO ] read_commands; n_commands=1
Sep 23 15:27:21 pandora cardwired[2297]: [INFO ] write_commands; commands=[NegotiateUnixFD, Begin] extra_bytes=Some([108, 1, 0, 1, 0, 0, 0, 0, 11, 0, 0, 0, 109, 0, 0, 0, 1, 1, 111, 0, 21, 0, 0, 0, 47, 111, 114, 103, 47, 102, 114, 101, 101, 100, 101, 115, 107, 116, 111, 112, 47, 68, 66, 117, 115, 0, 0, 0, 2, 1, 115, 0, 20, 0, 0, 0, 111, 114, 103, 46, 102, 114, 101, 101, 100, 101, 115, 107, 116, 111, 112, 46, 68, 66, 117, 115, 0, 0, 0, 0, 3, 1, 115, 0, 5, 0, 0, 0, 72, 101, 108, 108, 111, 0, 0, 0, 6, 1, 115, 0, 20, 0, 0, 0, 111, 114, 103, 46, 102, 114, 101, 101, 100, 101, 115, 107, 116, 111, 112, 46, 68, 66, 117, 115, 0, 0, 0, 0])
Sep 23 15:27:21 pandora cardwired[2297]: [INFO ] read_commands; n_commands=1
Sep 23 15:27:21 pandora cardwired[2297]: [INFO ] {}; task_name="org.freedesktop.UPower proxy caching"
Sep 23 15:27:22 pandora cardwired[2297]: [INFO ] Intel: Power state changed: D0
Sep 23 15:27:22 pandora cardwired[2297]: [INFO ] NVIDIA GeForce RTX 3050 Laptop GPU: Power state changed: D0
Sep 23 15:27:35 pandora cardwired[2297]: [INFO ] NVIDIA GeForce RTX 3050 Laptop GPU: Power state changed: D3Cold
Sep 23 15:27:36 pandora cardwired[2297]: [INFO ] firefox[2362] tried to access GPU 1 (blocked by cardwire)
Sep 23 15:27:36 pandora cardwired[2297]: [INFO ] systemd-logind[688] tried to access GPU 1 (blocked by cardwire)
Sep 23 15:27:50 pandora cardwired[2297]: [INFO ] browser 4 rdd[2495] tried to access GPU 1 (blocked by cardwire)
Sep 23 15:27:55 pandora cardwired[2297]: [INFO ] NVIDIA GeForce RTX 3050 Laptop GPU: Power state changed: D0
Sep 23 15:28:03 pandora cardwired[2297]: [INFO ] kitty[3036] tried to access GPU 1 (blocked by cardwire)
Sep 23 15:28:17 pandora cardwired[2297]: [INFO ] NVIDIA GeForce RTX 3050 Laptop GPU: Power state changed: D3Cold
Sep 23 15:31:16 pandora cardwired[2297]: [INFO ] kitty[3765] tried to access GPU 1 (blocked by cardwire)
Sep 23 15:31:39 pandora cardwired[2297]: [INFO ] dispatch_call; msg=Msg { type: MethodCall, serial: 2, sender: UniqueName(":1.78"), path: ObjectPath("/org/opengamingcollective/cardwire"), iface: InterfaceName("org.opengamingcollective.cardwire.Manager"), member: MemberName("Status"), fds: [] } hdr=Header { primary: PrimaryHeader { endian_sig: Little, msg_type: MethodCall, flags: BitFlags<Flags>(0b0), protocol_version: 1, body_len: 0, serial_num: 2 }, fields: Fields { path: Some(ObjectPath("/org/opengamingcollective/cardwire")), interface: Some(InterfaceName("org.opengamingcollective.cardwire.Manager")), member: Some(MemberName("Status")), error_name: None, reply_serial: None, destination: Some(BusName::WellKnown("org.opengamingcollective.cardwire")), sender: Some(UniqueName(":1.78")), signature: Unit, unix_fds: None } }
Sep 23 15:31:39 pandora cardwired[2297]: [INFO ] dispatch_call; msg=Msg { type: MethodCall, serial: 3, sender: UniqueName(":1.78"), path: ObjectPath("/org/opengamingcollective/cardwire"), iface: InterfaceName("org.freedesktop.DBus.ObjectManager"), member: MemberName("GetManagedObjects"), fds: [] } hdr=Header { primary: PrimaryHeader { endian_sig: Little, msg_type: MethodCall, flags: BitFlags<Flags>(0b0), protocol_version: 1, body_len: 0, serial_num: 3 }, fields: Fields { path: Some(ObjectPath("/org/opengamingcollective/cardwire")), interface: Some(InterfaceName("org.freedesktop.DBus.ObjectManager")), member: Some(MemberName("GetManagedObjects")), error_name: None, reply_serial: None, destination: Some(BusName::WellKnown("org.opengamingcollective.cardwire")), sender: Some(UniqueName(":1.78")), signature: Unit, unix_fds: None } }
Sep 23 15:31:39 pandora cardwired[2297]: [INFO ] dispatch_call; msg=Msg { type: MethodCall, serial: 4, sender: UniqueName(":1.78"), path: ObjectPath("/org/opengamingcollective/cardwire/Gpu/1"), iface: InterfaceName("org.opengamingcollective.cardwire.Gpu"), member: MemberName("GetDevice"), fds: [] } hdr=Header { primary: PrimaryHeader { endian_sig: Little, msg_type: MethodCall, flags: BitFlags<Flags>(0b0), protocol_version: 1, body_len: 0, serial_num: 4 }, fields: Fields { path: Some(ObjectPath("/org/opengamingcollective/cardwire/Gpu/1")), interface: Some(InterfaceName("org.opengamingcollective.cardwire.Gpu")), member: Some(MemberName("GetDevice")), error_name: None, reply_serial: None, destination: Some(BusName::WellKnown("org.opengamingcollective.cardwire")), sender: Some(UniqueName(":1.78")), signature: Unit, unix_fds: None } }
Sep 23 15:31:39 pandora cardwired[2297]: [INFO ] dispatch_call; msg=Msg { type: MethodCall, serial: 5, sender: UniqueName(":1.78"), path: ObjectPath("/org/opengamingcollective/cardwire/Gpu/0"), iface: InterfaceName("org.opengamingcollective.cardwire.Gpu"), member: MemberName("GetDevice"), fds: [] } hdr=Header { primary: PrimaryHeader { endian_sig: Little, msg_type: MethodCall, flags: BitFlags<Flags>(0b0), protocol_version: 1, body_len: 0, serial_num: 5 }, fields: Fields { path: Some(ObjectPath("/org/opengamingcollective/cardwire/Gpu/0")), interface: Some(InterfaceName("org.opengamingcollective.cardwire.Gpu")), member: Some(MemberName("GetDevice")), error_name: None, reply_serial: None, destination: Some(BusName::WellKnown("org.opengamingcollective.cardwire")), sender: Some(UniqueName(":1.78")), signature: Unit, unix_fds: None } }

LLM Output

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Projects

  • Status
    Backlog

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions