08-24-2023, 11:52 AM | #91 | |
Evangelist
Posts: 417
Karma: 6913952
Join Date: Aug 2013
Location: Hamden, CT
Device: Kindle Paperwhite (11th gen), Scribe
|
Quote:
Even without serial numbers, different monitors can be identified by the unique ID assigned at the time they were first connected, looking something like: Code:
DISPLAY\HWP309F\5&3960b6f0&1&UID773 |
|
08-24-2023, 11:56 AM | #92 |
Sigil Developer
Posts: 7,715
Karma: 5444398
Join Date: Nov 2009
Device: many
|
Understood, and Thank you. Unfortunately the current Qt code for Windows parses monitor EDID blocks and uses the serial number from that EDID block (taken from the registry for that path key) as a unique never changing identifier.
That is what is causing the bug here. |
Advert | |
|
08-24-2023, 12:32 PM | #93 |
Grand Sorcerer
Posts: 27,588
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
For once, I really can't fault Qt. Assuming serial numbers would be unique seems pretty safe to me. But then again... assuming social security numbers would always be unique got me into trouble back when I took a job writing scripts to massage patient data from numerous hospitals into one homogenous file. *shrug*
|
08-24-2023, 12:33 PM | #94 | ||
Groupie
Posts: 152
Karma: 474196
Join Date: Jan 2011
Location: Ottawa
Device: Kobo Aura H2O
|
Quote:
Code:
Debug: Primary Screen: "\\\\.\\DISPLAY1" "" "" Debug: geo : QRect(0,0 1920x1080) Debug: avail geo: QRect(0,0 1920x1040) Debug: devideRatio: 1 Debug: logical dpi: 96 96 Debug: physic dpi: 81.28 80.6824 Debug: All Screens Debug: Screen: 0 "\\\\.\\DISPLAY1" "" "" Debug: geo : QRect(0,0 1920x1080) Debug: avail geo: QRect(0,0 1920x1040) Debug: devideRatio: 1 Debug: logical dpi: 96 96 Debug: physic dpi: 81.28 80.6824 Debug: Screen: 1 "LG FHD" "LG Electronics" "16843009" Debug: geo : QRect(1920,0 1920x1080) Debug: avail geo: QRect(1920,0 1920x1040) Debug: devideRatio: 1 Debug: logical dpi: 96 96 Debug: physic dpi: 81.28 80.6824 I also tried a few methods to change the monitor numbers, including this one, but they would either not work at all, or revert after a PC restart. Quote:
In the meantime, I'll probably have to go back to 1.9.30 for the time being, but if there's anything else you'd like me to try at any point, let me know (by DM if you'd prefer to let this thread go stale). And in any case, I appreciate the help and for Sigil in general. |
||
08-24-2023, 12:43 PM | #95 |
Sigil Developer
Posts: 7,715
Karma: 5444398
Join Date: Nov 2009
Device: many
|
@Vanguard3000,
Please give us a day or two yet. I have an idea for a one line patch to the Qt windows plugin that DiapDealer is going to take a stab at building tonight. So hopefully tomorrow we may have a drop in replacement for the Qt Windows plugin that may fix things. It will require you setting *different* user friendly monitor names in the Windows control panel *before* starting up the debug version of Sigil with our updated qt windows plugin inside. The idea of the patch is to augment the serial number by appending the user friendly name to the end allowing the user to make even identical serial numbers effectively unique. If that works, we can officially include it in our Qt build patches for all future Sigil releases, until Qt gets around to fixing things themselves officially (if they ever do). So please hang on just a bit yet. You are they only one who can test if this fix will help or not. Last edited by KevinH; 08-24-2023 at 12:51 PM. |
Advert | |
|
08-24-2023, 03:07 PM | #96 |
Groupie
Posts: 152
Karma: 474196
Join Date: Jan 2011
Location: Ottawa
Device: Kobo Aura H2O
|
You got it! As I said, I'm happy to continue helping us both get through this. I mainly meant I'd be going back to 1.9.30 so I can get back to my actual ebook editing. But I'll switch back whenever you have a new thing for me to try.
I am a bit worried about the idea of using the FriendlyName key combined with the serial number, because at least in my case, that key didn't exist for me, and as far as I know it's not something that's exposed outside of the registry (maybe an extension like Powertoys would have an option to set this). So if this is the proposed fix, it'll (probably) work for me because I can do that, but your other users may not be as comfortable with the idea of ticking their registry. Maybe, if you're able to access other keys, the "Driver" key may be an option, as that inherently has the unique number after the slash: Code:
Left: {4d36e96e-e325-11ce-bfc1-08002be10318}\0003 Right: {4d36e96e-e325-11ce-bfc1-08002be10318}\0004 Last edited by Vanguard3000; 08-24-2023 at 03:18 PM. |
08-24-2023, 03:30 PM | #97 |
Sigil Developer
Posts: 7,715
Karma: 5444398
Join Date: Nov 2009
Device: many
|
I thought Windows 10/11 was able to set a Friendly Name for any device using regedit. If not, then this solution will not work. I did a search on giving a friendly name to your display monitor on windows and it comes up with many tutorials, so I thought that would be doable.
I understand this may not be a solution for everyone, but it only is needed with two identical monitors when both have exactly the same serial numbers in the edid block. This should be quite rare as edid serial numbers should always be unique, but in your case are not. This would be a stopgap solution for power users until Qt figures something out. |
08-24-2023, 03:37 PM | #98 |
Groupie
Posts: 152
Karma: 474196
Join Date: Jan 2011
Location: Ottawa
Device: Kobo Aura H2O
|
Yeah, you can in Regedit. My point was that going into the registry is a big ask for the end user, so my point was that it's not an ideal fix, even if it's the best you can do on your end for now.
|
08-24-2023, 03:53 PM | #99 |
Sigil Developer
Posts: 7,715
Karma: 5444398
Join Date: Nov 2009
Device: many
|
I was limited by what data the qt windows plugin had already gathered from the registry and the edid block. The device Friendly name was collected but not used and it was available in the routine in question and so it was that or force a complete reworking.
Let's please give this a try, as using regedit need only be done once and should stick across restarts. Hopefully, it will make this entire problem go away. If Qt does not provide a better fix in their LTS Qt 6.5.X, I will look into adding a more extensive solution that does not require a registry change. Hopefully this problem is very very rare. |
08-24-2023, 04:11 PM | #100 |
Sigil Developer
Posts: 7,715
Karma: 5444398
Join Date: Nov 2009
Device: many
|
Okay, DiapDealer was able to build the new qwindows.dll qt plugin.
To use it, download qwindows.dll.zip from: https://github.com/kevinhendricks/Bu...OnMac/releases then unzip it and use it to replace the qwindows.dll file that is inside the platforms folder of Sigil's program directory. You can back up the old one by renaming it just in case. Assuming you have set different Friendly names for each monitor, then set the debug environment variable and try a clean startup of the test Sigil build. It should create the debug.txt file. Please post it here. Hopefully your firendly names will be picked up in the serial number field. Then please try to see if the new version fixes the bug and if it survives a restart. I have my fingers crossed. Thanks! |
08-24-2023, 04:16 PM | #101 |
Groupie
Posts: 152
Karma: 474196
Join Date: Jan 2011
Location: Ottawa
Device: Kobo Aura H2O
|
Absolutely, I wasn't disparaging your idea as a temporary fix until Qt can change things on their end. I was just suggesting possible alternatives and context.
|
08-24-2023, 04:48 PM | #102 |
Sigil Developer
Posts: 7,715
Karma: 5444398
Join Date: Nov 2009
Device: many
|
Okay, we are on the same page then. I hope the posted qwindows.dll works.
I am surprised there are no opensource or free software tools to help users set device friendly names in a much easier manner. |
08-24-2023, 04:50 PM | #103 | |
Groupie
Posts: 152
Karma: 474196
Join Date: Jan 2011
Location: Ottawa
Device: Kobo Aura H2O
|
Quote:
Code:
Debug: Primary Screen: "LG FHD (1)" "LG Electronics" "16843009" Debug: geo : QRect(1920,0 1920x1080) Debug: avail geo: QRect(1920,0 1920x1040) Debug: devideRatio: 1 Debug: logical dpi: 96 96 Debug: physic dpi: 81.28 80.6824 Debug: All Screens Debug: Screen: 0 "LG FHD (1)" "LG Electronics" "16843009" Debug: geo : QRect(1920,0 1920x1080) Debug: avail geo: QRect(1920,0 1920x1040) Debug: devideRatio: 1 Debug: logical dpi: 96 96 Debug: physic dpi: 81.28 80.6824 Last edited by Vanguard3000; 08-24-2023 at 04:52 PM. |
|
08-24-2023, 05:29 PM | #104 |
Sigil Developer
Posts: 7,715
Karma: 5444398
Join Date: Nov 2009
Device: many
|
The serial number field is unchanged. That means that either no friendly name was found or by mistake you are not using the new qtwindows.dll.
Are you sure you replaced the one in the platforms folder inside the Sigil program folder? I checked and the name is supposed to be case sensitive, and camel-cased with no spaces. FriendlyName just as you used. That is very strange as your friendly names must be coming back as empty strings otherwise something would have been added to the end of the serial number. Have you tried restarting the machine so that it forces the new device properties to be read and used? Other than that, I am stumped. That should have worked. Hmm ... |
08-24-2023, 05:31 PM | #105 |
Sigil Developer
Posts: 7,715
Karma: 5444398
Join Date: Nov 2009
Device: many
|
Oh well. Thanks for testing it and reporting back. So much for that idea!
If we can not read the friendly name programmatically, then we are out of luck. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Sigil-1.9.20 Released | DiapDealer | Sigil | 12 | 01-28-2023 09:41 AM |
Sigil-0.9.12 Released | DiapDealer | Sigil | 194 | 03-15-2019 03:51 PM |
Sigil-0.9.11 Released | DiapDealer | Sigil | 37 | 02-18-2019 06:56 PM |
Sigil-0.8.900 released for testing - Wait for Sigil-0.8.901 | KevinH | Sigil | 106 | 10-04-2015 10:41 AM |
Sigil 0.6.0 Released | user_none | Sigil | 93 | 11-24-2012 06:50 PM |