Hi everyone,
It feels like this is the perfect tool to help me manage my set up (one desktop, one laptop and two screens), but I'm struggling to get this configured correctly. I'll set the scene with the configuration.
Desktop: Connected to a 32" AOC monitor (DP) and a 24" Dell monitor (HDMI)
Laptop: Connected - via a USB-C dock - to the same monitors. The 32" is connected via HDMI and the 24" via DP.
What I'm trying to do is to check if 7844:6868 is connected (my mouse), then connect both monitors to the respective PCs, but getting to a bit of an impasse.
Here are my config files:
Laptop:
usb_device = "7844:6868"
[monitor1]
monitor_id =
on_usb_connect = 0x12
[monitor2]
monitor_id =
on_usb_connect = 0xf0f
When checking the log, I see the following output:
12:34:32 [INFO] Configuration loaded ("C:\\Users\\LHA8713\\AppData\\Roaming\\display-switch\\display-switch.ini"): Configuration { usb_device: "7844:6868", input_sources: InputSources { on_usb_connect: None, on_usb_disconnect: None }, monitor1: Some(PerMonitorConfiguration { monitor_id: "", input_sources: InputSources { on_usb_connect: Some(Hdmi1(0x11)), on_usb_disconnect: None } }), monitor2: Some(PerMonitorConfiguration { monitor_id: "", input_sources: InputSources { on_usb_connect: Some(DisplayPort1(0xf)), on_usb_disconnect: None } }), monitor3: None, monitor4: None, monitor5: None, monitor6: None }
12:34:32 [INFO] Display 'Generic PnP Monitor' is currently set to Hdmi2(0x12)
12:34:32 [INFO] Display 'Generic PnP Monitor' is currently set to Custom(0xf0f)
I've updated the config to use the raw values per the documentation - so 0x12 is the HDMI output, and 0xf0f is the Custom input (i.e. DisplayPort is what I think is safe to assume).
Switching looks OK too in the log too, although I'm not seeing a reference to 0xf0f (the 2nd monitor) - first oddity.
12:45:50 [DEBUG] (1) display_switch::app: Detected device change. Added device: "046d:082d"
12:45:50 [DEBUG] (1) display_switch::app: Detected device change. Added device: "7844:6868"
12:45:50 [INFO] Monitored device ("7844:6868") is connected
12:45:50 [DEBUG] (1) display_switch::display_control: Setting display 'Generic PnP Monitor' to Hdmi2(0x12)
12:45:50 [INFO] Display 'Generic PnP Monitor' set to Hdmi2(0x12)
12:45:50 [DEBUG] (1) display_switch::display_control: Setting display 'Generic PnP Monitor' to Hdmi2(0x12)
12:45:50 [INFO] Display 'Generic PnP Monitor' set to Hdmi2(0x12)
Switching again (away) gives me this output:
12:47:55 [DEBUG] (1) display_switch::app: Detected device change. Removed device: "046d:c07d"
12:47:55 [DEBUG] (1) display_switch::app: Detected device change. Removed device: "046d:082d"
12:47:55 [DEBUG] (1) display_switch::app: Detected device change. Removed device: "7844:6868"
12:47:55 [INFO] Monitored device is ("7844:6868") is disconnected
12:47:55 [INFO] Display 'Generic PnP Monitor' is not configured to switch on USB disconnect
12:47:55 [INFO] Display 'Generic PnP Monitor' is not configured to switch on USB disconnect
12:47:55 [DEBUG] (1) display_switch::app: Detected device change. Removed device: "0bda:5411"
The desktop config is somewhat more problematic, I think.
The config looks like this:
usb_device = "7844:6868"
[monitor1]
monitor_id =
on_usb_connect = 0xf
[monitor2]
monitor_id =
on_usb_connect = 0x110f
Initial output - which is a little concerning - looks like this:
12:40:39 [INFO] Configuration loaded ("C:\\Users\\user\\AppData\\Roaming\\display-switch\\display-switch.ini"): Configuration { usb_device: "7844:6868", input_sources: InputSources { on_usb_connect: None, on_usb_disconnect: None }, monitor1: Some(PerMonitorConfiguration { monitor_id: "", input_sources: InputSources { on_usb_connect: Some(DisplayPort1(0xf)), on_usb_disconnect: None } }), monitor2: Some(PerMonitorConfiguration { monitor_id: "", input_sources: InputSources { on_usb_connect: Some(Custom(0x110f)), on_usb_disconnect: None } }), monitor3: None, monitor4: None, monitor5: None, monitor6: None }
12:40:39 [INFO] Display 'Generic PnP Monitor' is currently set to DisplayPort1(0xf)
12:40:39 [INFO] Display 'Generic PnP Monitor' is currently set to Custom(0x1111)
12:40:39 [ERROR] Failed to get current input for display 'GP102-A/2147881091:SVideo': Ddc(InvalidChecksum)
12:40:39 [INFO] Display 'GP102-A/2147881094:Lvds' is currently set to DisplayPort1(0xf)
Finally, this is what happens when I switch to the desktop:
12:47:52 [DEBUG] (1) display_switch::app: Detected device change. Added device: "0bda:0411"
12:47:52 [DEBUG] (1) display_switch::app: Detected device change. Added device: "0bda:5411"
12:47:53 [DEBUG] (1) display_switch::app: Detected device change. Added device: "7844:6868"
12:47:53 [INFO] Monitored device ("7844:6868") is connected
12:47:53 [DEBUG] (1) display_switch::display_control: Setting display 'Generic PnP Monitor' to DisplayPort1(0xf)
12:47:53 [INFO] Display 'Generic PnP Monitor' set to DisplayPort1(0xf)
12:47:53 [DEBUG] (1) display_switch::display_control: Setting display 'Generic PnP Monitor' to DisplayPort1(0xf)
12:47:53 [INFO] Display 'Generic PnP Monitor' set to DisplayPort1(0xf)
12:47:53 [DEBUG] (1) display_switch::display_control: Setting display 'GP102-A/2147881091:SVideo' to DisplayPort1(0xf)
12:47:53 [INFO] Display 'GP102-A/2147881091:SVideo' set to DisplayPort1(0xf)
12:47:53 [DEBUG] (1) display_switch::display_control: Setting display 'GP102-A/2147881094:Lvds' to DisplayPort1(0xf)
12:47:53 [INFO] Display 'GP102-A/2147881094:Lvds' set to DisplayPort1(0xf)
12:47:53 [DEBUG] (1) display_switch::app: Detected device change. Added device: "046d:082d"
12:47:53 [DEBUG] (1) display_switch::app: Detected device change. Added device: "046d:c07d"
And when I switch away from the desktop:
12:48:19 [DEBUG] (1) display_switch::app: Detected device change. Added device: "0000:0000"
12:48:19 [DEBUG] (1) display_switch::app: Detected device change. Removed device: "046d:c07d"
12:48:19 [DEBUG] (1) display_switch::app: Detected device change. Removed device: "0bda:5411"
12:48:19 [DEBUG] (1) display_switch::app: Detected device change. Removed device: "7844:6868"
12:48:19 [INFO] Monitored device is ("7844:6868") is disconnected
12:48:19 [INFO] Display 'Generic PnP Monitor' is not configured to switch on USB disconnect
12:48:19 [INFO] Display 'Generic PnP Monitor' is not configured to switch on USB disconnect
12:48:19 [INFO] Display 'GP102-A/2147881091:SVideo' is not configured to switch on USB disconnect
12:48:19 [INFO] Display 'GP102-A/2147881094:Lvds' is not configured to switch on USB disconnect
12:48:19 [DEBUG] (1) display_switch::app: Detected device change. Removed device: "0bda:0411"
12:48:19 [DEBUG] (1) display_switch::app: Detected device change. Removed device: "046d:082d"
Now the real weird part is that the monitors alternate.
For example, if I switch my input to the desktop, then the 32" shows my desktop, while the 24" shows my laptop's second screen. If I switch inputs to the laptop - the 32" shows my laptop's main screen, while the 24" shows my desktop's second screen.
I can't work out why, but I suspect it's somehow related to the error on the desktop (failing to get the checksum for the display). I'm at my wits end - any input would be highly appreciated.
I'm using 0.3.0.