haimgel / display-switch

Turn a $30 USB switch into a full-featured multi-monitor KVM switch
https://haim.dev/posts/2020-07-28-dual-monitor-kvm/
MIT License
2.87k stars 112 forks source link

Troubleshooting help #18

Closed hannesfostie closed 4 years ago

hannesfostie commented 4 years ago

Hi there!

When I came across your blog post I was happily surprised to find that I already had the exact usb switch you are using. After you added the CI build artifacts I decided to give this a go, but am running into some issues on MacOS.

For one, I don't see anything in the directory you mention where the logs should be. I even manually created the log directory, just in case. I do see display_switch in activity monitor and everything suggests it is in fact running when I log in.

The second issue is that when I run the program manually in order to see the output, it clearly shows my keyboard (the device on which to switch) being connected. I double checked the address and that looks good too. It shows that it tries to change monitors to the correct input... but nothing happens. I tried various input sources just to make sure, but none of them have any effect on the monitor itself. What could be the cause of this?

The only thing I could think of was some sort of compatibility issue. I'm on an Apple MBPr, with USB-C. I have a USB-C "dongle" that has classic USB ports as well as a hdmi port. Connected to that dongle are both the usb switch and the screens.

I understand you probably don't have the time to really help me debug this, but any directions you can think of would be much appreciated.

Thanks!

hannesfostie commented 4 years ago

Did a bit more messing around using a tool I found called ddcctl and what I noticed is that I could change the input source from my mac to be the Displayport that's connected to my windows PC, however I couldn't switch back. On the screen there was an error message (from my monitor itself) saying "Out of range". When I went into the menu on my monitor, it still showed my mac's Hdmi1 as the input source despite actually showing the image for DisplayPort 1. I had to select DP1 and then go back to HDMI1 to finally see the OSX image.

I'm not sure what this means but yea...

haimgel commented 4 years ago

When I went into the menu on my monitor, it still showed my mac's Hdmi1 as the input source despite actually showing the image for DisplayPort 1

This is pretty crazy! It smells like monitor firmware bug... Could you please share your monitor make/model?

About the log files: note that logging into file is implemented in the master, but if you're running 0.1.0 release then the logging on Mac is only into the system log and not into a log file.

For troubleshooting, I suggest running the app in a termninal and not under launchd, whatever you see on screen is the same what would end up in the logs.

kcorey commented 4 years ago

That ddccdl utility is quite cool, thanks!

If you're not seeing the logs, perhaps run through the installation instructions again?

After installation I had the logs showing up in: ~/Library/Logs/display-switch/display-switch.log

Interestingly, I found on my IIyama PL2779Q that I had to set the display multiple times in app.rs:

        display_control::switch_to(self.config.monitor_input);
        // Apparently, for my monitor (a iiyama PL2779Q) you have to yell
        display_control::switch_to(self.config.monitor_input);
        display_control::switch_to(self.config.monitor_input);

Also am on a MBPro, USB C with a dongle. The fix above seemed to sort things for me.

haimgel commented 4 years ago

This seems like two separate issues, one smells like DDC firmware issue, and the other is a duplicate of #21. I'm closing for now.