Code Monkey home page Code Monkey logo

Comments (7)

haimgel avatar haimgel commented on May 13, 2024 1

@B0rax yeah, there was a bug in "check for unique monitor names" logic. Please re-try, I've pushed a fix to Master.

from display-switch.

phit avatar phit commented on May 13, 2024

mh I just found this https://www.eightforums.com/threads/tutorial-how-to-change-device-names-in-device-manager.15321/
maybe using that to change the name will work, I'll try tomorrow morning and report back

from display-switch.

phit avatar phit commented on May 13, 2024

that did not work, it seems to use the driver description and not the device name

grafik

from display-switch.

haimgel avatar haimgel commented on May 13, 2024

I think these are two separate problems:

  1. The app is not adaptive enough to deal with display names that are not unique.
  2. The app is not using the "true" display name on Windows when the "generic" display driver is in use.

I've pushed a quick commit to deal with problem 1 above: I added some logic to add a numeric index to the names if they are not unique, e.g. you'll get "Generic PnP monitor #1", "Generic PnP monitor #2", etc. Which is not great, but will allow you to target the right monitor with just "1" and "2" as the "monitor_id" in the config, if the index is stable.

I'll see what can be done about problem 2 later, will need to do some experimentation on Windows. Meanwhile, could you please run the following command from PowerShell:

Get-WmiObject -Query "Select * FROM WMIMonitorID" -Namespace root\wmi

(this would give an indication if Windows has any additional info about these monitors).

from display-switch.

phit avatar phit commented on May 13, 2024

Output: https://gist.github.com/phit/71549439133f4ba38687405f3dba67fd

The index appears to be stable, at least in the device manager, but I actually found some drivers for the older of the two, so one has a name now. However I only installed it on one of my PCs so far, I'll check in a couple hours on my other PC if your workaround works, I assume I'm not the only person that has never installed any display specific drivers.

Now I'm running into a bunch of other issues with the displays, but I'll make separate issues for that if its not the monitors DDC implementations fault (which it probably is).

from display-switch.

B0rax avatar B0rax commented on May 13, 2024

With this new commit it is still not working for me.
From the log file:

08:06:56 [INFO] Display 'Generic PnP Monitor' is currently set to Hdmi1(0x11)
08:06:56 [INFO] Display 'Generic PnP Monitor' is currently set to DisplayPort1(0xf)
08:07:11 [DEBUG] (1) display_switch::app: Detected device change. Removed device: "05e3:0612"
08:07:11 [INFO] Monitored device is ("05e3:0612") is disconnected
08:07:11 [INFO] Display 'Generic PnP Monitor' is not configured to switch on USB disconnect
08:07:11 [INFO] Display 'Generic PnP Monitor' is not configured to switch on USB disconnect

My config file looks like this:

  usb_device = "05E3:0612"
  
[monitor1]
  monitor_id = 1
  on_usb_connect = "Hdmi1"
  on_usb_disconnect = "DisplayPort1"

[monitor2]
  monitor_id = 2
  on_usb_connect = "DisplayPort1"
  on_usb_disconnect = "Hdmi1"

from display-switch.

B0rax avatar B0rax commented on May 13, 2024

That worked! Thank you 👍

from display-switch.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.