On a desktop with two NVIDIA GPUs, when I use cardwire Manual mode to block one GPU, NVENC on the remaining unblocked GPU stops working. Any NVENC encoder fails with OpenEncodeSessionEx failed: unsupported device (2). After unblocking the GPU, the exact same command works again.
Blocking one GPU should only hide/disable that GPU. NVENC on the remaining unblocked (display) GPU should keep working, exactly as it does when no GPU is blocked.
Sep 08 05:14:18 ComingStudio systemd[1]: Starting Cardwire Daemon...
Sep 08 05:14:18 ComingStudio cardwired[2529]: [INFO ] IOMMU detected, reading pci devices using iommu dir
Sep 08 05:14:19 ComingStudio cardwired[2529]: [INFO ] Successfully resolved card1 and renderD128 for PCI 0000:01:00.0
Sep 08 05:14:19 ComingStudio cardwired[2529]: [INFO ] Successfully resolved card2 and renderD129 for PCI 0000:02:00.0
Sep 08 05:14:19 ComingStudio cardwired[2529]: [INFO ] gpu NVIDIA GeForce RTX 3070 id: 0 internal: 0, desktop: 4, connected: 0, total: 4, connected_internal: 0, connected_desktop: 0
Sep 08 05:14:19 ComingStudio cardwired[2529]: [INFO ] gpu NVIDIA GeForce GTX 1660 SUPER id: 1 internal: 0, desktop: 4, connected: 1, total: 4, connected_internal: 0, connected_desktop: 1
Sep 08 05:14:19 ComingStudio cardwired[2529]: [INFO ] inserting: 2529 into map
Sep 08 05:14:19 ComingStudio cardwired[2529]: [ERROR] (ignoring) failed to get inode for hwmon 0000:02:00.0: No such file or directory (os error 2)
Sep 08 05:14:19 ComingStudio cardwired[2529]: [WARN ] failed to get inode for /sys/class/backlight/nvidia_1: No such file or directory (os error 2)
Sep 08 05:14:19 ComingStudio cardwired[2529]: [ERROR] (ignoring) failed to get inode for backlight nvidia_1: No such file or directory (os error 2)
Sep 08 05:14:19 ComingStudio cardwired[2529]: [INFO ] blocking: 0000:01:00.0
Sep 08 05:14:19 ComingStudio cardwired[2529]: [ERROR] (ignoring) failed to get inode for hwmon 0000:01:00.0: No such file or directory (os error 2)
Sep 08 05:14:19 ComingStudio cardwired[2529]: [WARN ] failed to get inode for /sys/class/backlight/nvidia_0: No such file or directory (os error 2)
Sep 08 05:14:19 ComingStudio cardwired[2529]: [ERROR] (ignoring) failed to get inode for backlight nvidia_0: No such file or directory (os error 2)
Sep 08 05:14:19 ComingStudio cardwired[2529]: [INFO ] Switched to Manual
Sep 08 05:14:19 ComingStudio cardwired[2529]: [INFO ] write_command; command=Auth(Some(External), Some([48]))
Sep 08 05:14:19 ComingStudio cardwired[2529]: [INFO ] write_commands; commands=[Auth(Some(External), Some([48]))] extra_bytes=None
Sep 08 05:14:19 ComingStudio cardwired[2529]: [INFO ] read_command;
Sep 08 05:14:19 ComingStudio cardwired[2529]: [INFO ] read_commands; n_commands=1
Sep 08 05:14:19 ComingStudio cardwired[2529]: [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 08 05:14:19 ComingStudio cardwired[2529]: [INFO ] read_commands; n_commands=1
Sep 08 05:14:19 ComingStudio cardwired[2529]: [INFO ] start_object_server; started_event=Some(Event { listeners_notified: 0, listeners_total: 1 })
Sep 08 05:14:19 ComingStudio cardwired[2529]: [INFO ] obj_server_task;
Sep 08 05:14:19 ComingStudio cardwired[2529]: [INFO ] monitor_name_lost; name=org.opengamingcollective.cardwire
Sep 08 05:14:19 ComingStudio systemd[1]: Started Cardwire Daemon.
Sep 08 05:14:19 ComingStudio cardwired[2529]: [INFO ] write_command; command=Auth(Some(External), Some([48]))
Sep 08 05:14:19 ComingStudio cardwired[2529]: [INFO ] write_commands; commands=[Auth(Some(External), Some([48]))] extra_bytes=None
Sep 08 05:14:19 ComingStudio cardwired[2529]: [INFO ] read_command;
Sep 08 05:14:19 ComingStudio cardwired[2529]: [INFO ] read_commands; n_commands=1
Sep 08 05:14:19 ComingStudio cardwired[2529]: [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 08 05:14:19 ComingStudio cardwired[2529]: [INFO ] read_commands; n_commands=1
Sep 08 05:14:19 ComingStudio cardwired[2529]: [INFO ] start_object_server; started_event=Some(Event { listeners_notified: 0, listeners_total: 1 })
Sep 08 05:14:19 ComingStudio cardwired[2529]: [INFO ] obj_server_task;
Sep 08 05:14:19 ComingStudio cardwired[2529]: [INFO ] monitor_name_lost; name=net.hadess.SwitcherooControl
Sep 08 05:14:19 ComingStudio cardwired[2529]: [INFO ] Switcheroo DBus shim started successfully
Sep 08 05:14:19 ComingStudio cardwired[2529]: [INFO ] Daemon started succesfully
Sep 08 05:14:19 ComingStudio cardwired[2529]: [INFO ] write_command; command=Auth(Some(External), Some([48]))
Sep 08 05:14:19 ComingStudio cardwired[2529]: [INFO ] write_commands; commands=[Auth(Some(External), Some([48]))] extra_bytes=None
Sep 08 05:14:19 ComingStudio cardwired[2529]: [INFO ] read_command;
Sep 08 05:14:19 ComingStudio cardwired[2529]: [INFO ] read_commands; n_commands=1
Sep 08 05:14:19 ComingStudio cardwired[2529]: [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 08 05:14:19 ComingStudio cardwired[2529]: [INFO ] read_commands; n_commands=1
Sep 08 05:14:19 ComingStudio cardwired[2529]: [INFO ] {}; task_name="org.freedesktop.UPower proxy caching"
Sep 08 05:14:19 ComingStudio cardwired[2529]: [INFO ] successfully sent reset-failed on nvidia-powerd.service
Sep 08 05:14:19 ComingStudio cardwired[2529]: [INFO ] successfully sent start on nvidia-powerd.service
Sep 08 05:14:19 ComingStudio cardwired[2529]: [INFO ] NVIDIA GeForce GTX 1660 SUPER: Power state changed: D0
Sep 08 05:14:19 ComingStudio cardwired[2529]: [INFO ] NVIDIA GeForce RTX 3070: Power state changed: D0
Sep 08 05:14:21 ComingStudio cardwired[2529]: [INFO ] niri[1474] tried to access GPU 1 (blocked by cardwire)
Sep 08 05:14:21 ComingStudio cardwired[2529]: [INFO ] libvirtd[790] tried to access GPU 1 (blocked by cardwire)
Sep 08 05:14:21 ComingStudio cardwired[2529]: [INFO ] systemd-logind[654] tried to access GPU 1 (blocked by cardwire)
Sep 08 05:14:27 ComingStudio cardwired[2529]: [INFO ] dispatch_call; msg=Msg { type: MethodCall, serial: 2, sender: UniqueName(":1.118"), 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.118")), signature: Unit, unix_fds: None } }
Sep 08 05:14:27 ComingStudio cardwired[2529]: [INFO ] dispatch_call; msg=Msg { type: MethodCall, serial: 3, sender: UniqueName(":1.118"), path: ObjectPath("/org/opengamingcollective/cardwire/Gpu/1"), iface: InterfaceName("org.freedesktop.DBus.Properties"), member: MemberName("Set"), body: Structure(Dynamic { fields: [Str, Str, Variant] }), fds: [] } hdr=Header { primary: PrimaryHeader { endian_sig: Little, msg_type: MethodCall, flags: BitFlags<Flags>(0b0), protocol_version: 1, body_len: 64, serial_num: 3 }, fields: Fields { path: Some(ObjectPath("/org/opengamingcollective/cardwire/Gpu/1")), interface: Some(InterfaceName("org.freedesktop.DBus.Properties")), member: Some(MemberName("Set")), error_name: None, reply_serial: None, destination: Some(BusName::WellKnown("org.opengamingcollective.cardwire")), sender: Some(UniqueName(":1.118")), signature: Structure(Dynamic { fields: [Str, Str, Variant] }), unix_fds: None } }
Sep 08 05:14:27 ComingStudio cardwired[2529]: [ERROR] (ignoring) failed to get inode for hwmon 0000:01:00.0: No such file or directory (os error 2)
Sep 08 05:14:27 ComingStudio cardwired[2529]: [WARN ] failed to get inode for /sys/class/backlight/nvidia_0: No such file or directory (os error 2)
Sep 08 05:14:27 ComingStudio cardwired[2529]: [ERROR] (ignoring) failed to get inode for backlight nvidia_0: No such file or directory (os error 2)
Sep 08 05:14:27 ComingStudio cardwired[2529]: [INFO ] Set GPU NVIDIA GeForce RTX 3070 block=true
Describe the bug
On a desktop with two NVIDIA GPUs, when I use cardwire Manual mode to block one GPU, NVENC on the remaining unblocked GPU stops working. Any NVENC encoder fails with
OpenEncodeSessionEx failed: unsupported device (2). After unblocking the GPU, the exact same command works again.To Reproduce
cardwire gpu 1 --block(blocks the non-display GPU, the 3070) — Manual mode.CUDA_VISIBLE_DEVICES=0and with-c:v h264_nvenc.cardwire gpu 1 --unblock, the same ffmpeg command succeeds.Expected behavior
Blocking one GPU should only hide/disable that GPU. NVENC on the remaining unblocked (display) GPU should keep working, exactly as it does when no GPU is blocked.
Environment details
cardwired logs
Additional context