|
From: Rootbrian <roo...@ao...> - 2021-05-06 00:31:02
|
<html><head><style id="outgoing-font-settings">#response_container_BBPPID{font-family: initial; font-size:initial; color: initial;}</style></head><body style="background-color: rgb(255, 255, 255); background-image: initial; line-height: initial;"><div id="response_container_BBPPID" style="outline:none;" dir="auto" contenteditable="false"> <div name="BB10" id="BB10_response_div_BBPPID" dir="auto" style="width:100%;"> I recall using Windows newer than vista (6.0), such as 7 (6.1), reloading the device software on my devices, the USB selected suspend caused it to be stuck in a looped brick-state. Once I disabled it, there wasn't a single problem after that.</div><div name="BB10" id="BB10_response_div_BBPPID" dir="auto" style="width:100%;"><br></div><div name="BB10" id="BB10_response_div_BBPPID" dir="auto" style="width:100%;">The way Linux handles it is far better, and I doubt we could change anything in Windows, except to disable that setting altogether. The simulator probably won't be able to overcome it, unless I'm missing something.</div><div name="BB10" id="BB10_response_div_BBPPID" dir="auto" style="width:100%;"><br></div><div name="BB10" id="BB10_response_div_BBPPID" dir="auto" style="width:100%;">Since clean installing windows 10 (6.6.3), I forgot about that setting, and my Logitech attack 3 was suddenly not responding in the simulator, it caused me to crash the plane.</div> <div name="BB10" id="response_div_spacer_BBPPID" dir="auto" style="width:100%;"> <br style="display:initial"></div> <div id="blackberry_signature_BBPPID" name="BB10" dir="auto"> <div id="_signaturePlaceholder_BBPPID" name="BB10" dir="auto"><p dir="ltr">Sent from my BlackBerry key2 LE on freedom mobile 3G/LTE</p></div> </div></div><div id="_original_msg_header_BBPPID" dir="auto"> <table width="100%" style="border-spacing: 0px; display: table; outline: none;" contenteditable="false"><tbody><tr><td colspan="2" style="padding: initial; font-size: initial; text-align: initial;"> <div style="border-right: none; border-bottom: none; border-left: none; border-image: initial; border-top: 1pt solid rgb(181, 196, 223); padding: 3pt 0in 0in; font-family: Tahoma, "BB Alpha Sans", "Slate Pro"; font-size: 10pt;"> <div id="from"><b>From:</b> pr...@ro...</div><div id="sent"><b>Sent:</b> May 5, 2021 7:50 PM</div><div id="to"><b>To:</b> ja...@fl...; fli...@li...</div><div id="reply_to"><b>Reply to:</b> fli...@li...</div><div id="subject"><b>Subject:</b> Re: [Flightgear-devel] Solution approach Saitek/Logitech Panels in Windows Registry</div></div></td></tr></tbody></table> <br> </div><!--start of _originalContent --><div name="BB10" dir="auto" style="background-image: initial; line-height: initial; outline: none;" contenteditable="false"><div><div class="moz-cite-prefix">Am <a href="tel:05052021">05.05.2021</a> um 13:38 schrieb James
Turner:<br>
</div><blockquote type="cite"><br>
<div>
<blockquote type="cite" class="">
<div class="">On 5 May 2021, at 12:05, Pfeffer <<a href="mailto:pr...@ro..." class="">pr...@ro...</a>>
wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<p class="">finally the Saitek/Logitech radio and multi
panels work reliable in Windows :-)</p>
<p class="">The problem is "Enhanced Power Management" -
when disabled in the Windows registry the displays of the
panels work reliable.</p>
<p class="">There is a Windows PowerShell skript that does
it:<span class="Apple-converted-space"> </span><br class="">
</p>
<p class=""><a class="moz-txt-link-freetext" href="https://github.com/FKLaben/SaitekLogitechPanelFixer">https://github.com/FKLaben/SaitekLogitechPanelFixer</a></p>
<p class="">It sets "<span class="pl-s">EnhancedPowerManagementEnabled"
in<span class="Apple-converted-space"> </span></span>"<span class="pl-s">HKLM:\SYSTEM\CurrentControlSet\Enum\USB\<span class="pl-pds">"</span></span><span class="pl-k">+</span><span class="Apple-converted-space"> </span><span class="pl-smi">$device</span><span class="Apple-converted-space"> </span><span class="pl-k">+</span><span class="pl-s"><span class="pl-pds">"</span>\*\Device
Parameters<span class="pl-pds">" to zero. $device is
"VID_06A3&PID_0D06" for the multi panel and
"VID_06A3&PID_0D05" for the radio panel.<br class="">
</span></span></p>
<p class=""><span class="pl-s"><span class="pl-pds"><br class="">
</span></span></p>
<p class="">Is there a way that FlightGear sets this
registry value? - Or a way to disable "enhanced power
management" for certain USB-devices when FlightGear is
running?<br class="">
</p>
<br class="Apple-interchange-newline">
</div>
</blockquote>
</div>
<br class="">
<div class="">I’m kind of clueless about Windows: what does
Enhanced Power Management do?</div>
</blockquote><p>everything I know about USB and HID is, what I learned while
programming the Saitek panel's xmls and nasal for FlightGear. I
searched on the net: It seems that there is a protocol to send
devices into a power saving mode. It seems that this is usually
handled by the OS: in linux, there is
/sys/bus/usb/devices/.../power/control, see: <br>
</p><p><a class="moz-txt-link-freetext" href="https://www.kernel.org/doc/html/v4.16/driver-api/usb/power-management.html">https://www.kernel.org/doc/html/v4.16/driver-api/usb/power-management.html</a></p><p><br>
</p><blockquote type="cite">
<div class="">Writing to a registry is possible but kind of bad
for us to be doing it: if it’s needed for the devices to work,
why doesn’t the Saitek installer do it? Another way to ask the
same question: what are X-Plane and MSFS doing for this? Since
we don’t want to get into a Registry fight with them. <br>
</div>
</blockquote><p>X-Plane and MSFS2020 still work fine and they do not change the
registry entry back. If we do that - it should be done at
installation time. But this has the disadvantage that - if the
saitek panels are not connected at installation time - it cannot
be done then. hm.<br>
</p><p><br>
</p><blockquote type="cite">
<div class="">If the issue is the devices going into a power-save
mode, I’d guess we are missing sending some custom ‘wake up’
command (which would make sense), so would be best to discover
how we request a wake up for the duration of the session. Since
presumably when you exit FG you want the devices to sleep again,
and we don’t want to be modifying the registry each time you
launch+quit FG, that feels …. unwise.</div>
</blockquote><p>It seems to me that Linux defaults to not sending USB-devices
(except hubs) into power saving mode (see the <wbr><a href="http://kernel.org">kernel.org</a><wbr> link
above).</p><p>Windows (starting with Vista) defaults to sending USB devices
into power saving mode, see: <br>
</p><p><a class="moz-txt-link-freetext" href="https://docs.microsoft.com/en-us/windows-hardware/drivers/usbcon/usb-selective-suspend">https://docs.microsoft.com/en-us/windows-hardware/drivers/usbcon/usb-selective-suspend</a></p><p>Hmmm... according to the diagram in <br>
</p><p><a class="moz-txt-link-freetext" href="https://docs.microsoft.com/en-us/windows-hardware/drivers/usbcon/selective-suspend-in-usb-drivers-wdf">https://docs.microsoft.com/en-us/windows-hardware/drivers/usbcon/selective-suspend-in-usb-drivers-wdf</a>
<br>
</p><p>the device should automatically get unsuspended. Further reading
lets me guessing that the panels in fact get unsuspended, but only
for some milliseconds on order to receive the data (and this might
be the reason why the LEDs work without messing with the windoes
registry).<br>
</p><p>It seems to me that the WinUsb_SetPowerPolicy function (winusb.h)
could solve the problem the right way, see<br>
</p><p><a class="moz-txt-link-freetext" href="https://docs.microsoft.com/en-us/windows/win32/api/winusb/nf-winusb-winusb_setpowerpolicy">https://docs.microsoft.com/en-us/windows/win32/api/winusb/nf-winusb-winusb_setpowerpolicy</a><br>
</p><p>This way, the automatic power policy can be set at run time to
off (false), and can be reestablished (when the previous stat was
read before hand by WinUsb_GetPowerPolicy) on FlightGear's exit.</p><p>What do you think? - Will this solve the problem? - Can it be
done?<br>
</p><p><br>
</p><p>Best regards,</p><p> Pfeffer.<br>
</p><p><br>
</p><p><br>
</p></div>
<!--end of _originalContent --></div></body></html> |