11-13-2018 01:33 AM
First of all, thank you for investigating the issue. There were a number of issues involving sensors around the 1709 update with multiple manufacturers. HP had issues with their accelerometer software after the update and Intel had some issues with the auto-brightness that I recall having to deal with. Each time, the manufacturer (not Microsoft) had to update their component that connected to the sensors to resolve the issue. I also had to some code updates to software I'd written that read sensor data.
I just wrote a quick program to monitor the sensor data from the brightness sensor and there seems to be "nothing wrong" from the data stream. Even with both auto-keyboard and auto-brightness on, the sensor is still reporting the lux change correctly. So, as a developer, I'd say that the issue isn't with the sensor API or Windows service. That tells me that the sensor messages aren't being blocked by anything from the system itself.
BUT, didn't you say that both auto-brightness and keyboard works fine in the X1Y1 and X1Y3? If the 1st and 3rd gen uses the same Intel Sensor Solution (or one older and the other a newer version of the hardware), then it wouldn't make sense that it'd be a Windows issue...
To me, it seems to all point fingers at something in whatever method that Lenovo has implemented to auto-enable the keyboard backlight. That seems to not be a BIOS function as many other manufacturers have done. I'm presuming that it is a combination of Vantage and one of the drivers, as you can't even enable the auto-keyboard brightness in hardware via Fn-Space until you've installed Vantage, the Intel Sensor Solution, and possibly the hotkey driver.
Yes, I'd agree that it was probably broken by a Microsoft change, as I've had to deal with many a stupid change that they've implemented for absolutely no good reason. But, I've also had to debug, and fix, these issues on my end because Microsoft doesn't care about functional problems on their end. They are more worried about catering to the mass consumer and "improving" Windows with seeming little care for the core functions of the OS.
Obviously, I can't debug Vantage, as I don't have the source or symbols to do so. As a developer, I'd say that "there's nothing wrong with the Windows side", as the sensor stream is still reporting correctly. It seems to be something from the keyboard auto-brightness that's interpreting the data. With the Intel Gfx driver working correctly no matter what state the keyboard is in, I'd venture to say that their driver is working correctly now. It also had some issues when the 1709 update came out, but Intel released a driver update that resolved it.
It looks like there were some others who noticed this issue a while back when 1709 was released, but nobody ever responded:
I'm afraid that logically, and from past experience, it's going to be up to the manufacturer/developer (Lenovo in this case) to fix this issue by debugging the components of Vantage that drive the auto-kb brightness and fixing/updating to match any API changes...especially if the newer Windows builds work fine with both older and newer hardware.
11-13-2018 08:06 AM
Forgetting about the auto keyboard backlight for a bit... are you able to get auto screen brightness working?
Currently I am testing a "clean" Windows 10 image without any Vantage or System Interface Foundation. Just Win10 with drivers for chipset, sensor, and graphics. The auto screen brightness works in Win10 1703 and doesn't work in newer versions. Note that keyboard backlight does not work because I haven't installed hotkeys, Vantage, System Interface Foundation, or anything else. So the keyboard backlight is completely out of the picture, but the automatic display brightness which is implemented by Windows is still not working.
To fix Win10, replace the broken sensor-related files with the ones from 1703.
11-13-2018 08:16 AM
The auto-brightness works fine, in 1709, 1803, and 1809, but when I tested 1809 (which I've since pulled during test deployments due to massive bugs throughout the system in enterprise situations), the auto-brightness checkbox in the UWP settings panel doesn't show up. Going into Power Options and manually enabling "Adaptive Brightness" does get the driver to work fine.
I just tested it again in 1803 with the newest 18.104.22.16874 driver and it too works fine.
With the keyboard, I'm assuming the following is the list needed from 1703:
I wonder, though, what effect hammering in those files will have on other sensors in the system...
11-13-2018 09:22 AM
OK, we are seeing different things. I can't get automatic screen brightness to work in 1709 or 1803, unless I patch with the 1703 files.
I have the "change brightness automatically" checked in Settings -> System -> Display. I have also "Enable adaptive brightness" set to On in Advanced Power Settings -> Display. How did you get this working?
11-13-2018 09:36 AM
I didn't do anything special. It was a bare metal install as I was building a restore procedure paper. Install newest chipset with -OVERALL flag, Sensor Solution driver, NIC, WLAN, BT, WWAN. Reboot. Install SIO, SGX, TB. Then I installed APS with SIF. Finally installed VGA driver. I think the APS software may have something to do with it as rotation won't work without it. Then, GHOST'd the image as a barebone. After return from imaging, I installed the remaining drivers and all Windows Updates. Imaged again as baseline. So far, the only thing that doesn't work is having both Auto Bright and KB at the same time.
I didn't use any of the Lenovo drivers unless they were required or only one available. Mostly newest Intel drivers that I could find.
I used the following:
TB: 1.02.32 (22.214.171.124)
WWAN: Lenovo drivers, but patched with newest ROM of SWI9X30C_02.30.03.00
Synaptics TP: 126.96.36.199
Wacom Wintab: 188.8.131.52
Synaptics FP: windows update version
Conexant audio: Lenovo
Hotkey: Lenovo (184.108.40.206)
Power mgmt: 1.67.14.07
11-13-2018 10:19 AM - edited 11-13-2018 10:40 AM
Alright, so I finally got a VM for 1703 installed, patched to the newest 15063.1446, pulled the sens*.* files, and got the keyboard AND screen auto working. It only took one file: SensorService.dll. Stopped the service, dumped ownership and permissions, copied the 10.0.15063.1155 version of the lib in, restarted service, and it's all working. So it seems that something has changed since that version of the dll, but Lenovo hasn't updated their code to keep up with the API update...
But, there's another bug that I forgot about which still exists and has since day one...try this one:
Put the unit into tablet mode, turn to any orientation other than the "laptop/notebook" one (try a portrait mode), then Lock Rotation. Return to notebook mode. The driver does the right thing by disabling the Rotation Lock toggle for laptop mode, but the driver forgot to return to the proper rotation first. You have to return to tablet, unlock "Rotation Lock", set the rotation correctly for notebook, then go back to laptop mode.
The Fujitsu units (using the same Intel driver) that I have here and am also building images for lock out the Lock Rotation toggle, but also automatically return the screen orientation to the proper one for desktop on it's own.
11-13-2018 10:38 AM
So, I've found a side effect of hammering in the SensorService.dll ... the built-in Windows 10 Maps must be looking for a specific API call that only exists in the newer version of the lib when the location tracking mode is on *with compass*. It works fine if only the location icon is clicked once (map always north, location icon points to the direction you're facing). If the location button is clicked again (direction you are facing is always north, map rotates as you do), the program commits suicide and dies. Debugging it seems to point to a missing lib call.
It looks like you're gonna have to figure out what call changed between the 1703 and 1709 sensorservice.dll file that the SIF/Vantage libs are calling to get this fixed.
BTW, it looks like the keyboard backlight turns off/on at 60lux? Does that sound right?
11-13-2018 11:28 AM
I still don't understand what "Lenovo code" needs to be updated. I'm not using any "Lenovo code" and still the auto display brightness doesn't work unless I patch the OS files. I've now installed all of the Lenovo drivers, Vantage, SIF. Disabled the automatic keyboard backlight and still automatic display brightness doesn't work. For me to help you, I need to be able to (1) see auto display brightness working, and then (2) install some "Lenovo code" to see it stop working. But I'm stuck at that first step and can't find any explanation for it except that 1709+ broke it, and I proved this by finding the specific files that broke it. I thought maybe this problem was unique to OLED display, but I have tried 2 different units, one with OLED and the other without. But automatic display brightness doesn't work on either of them, once 1709+ is installed.
Can you tell me minimum driver set to make automatic display brightness work on 1709/1803?
E.g. start with clean-install OS from Microsoft ISO, then install driver X, Y, Z, etc. Also where to get them because it looks like you aren't using the Lenovo versions from support website.
11-13-2018 11:42 AM
"Lenovo code" = applications produced by Lenovo, i.e. Vantage, SIF, etc. to interact with Windows, downloaded from Lenovo Support downloads.
I did the base install the first time with drivers downloaded directly from Lenovo to validate that everything works. Then, I started to update drivers to newer versions. The procedure I listed previously WAS from bare metal, Microsoft ISO non-modified, and installed to a new 970Pro NvME. As I said before, this was to produce a bare metal install paper for my staff to follow when doing fresh installs, so no special tricks or hacks.
This is with 1803. The previous test install was with 1709 and worked fine also. The first driver tested was Intel 220.127.116.1170 - worked correctly. Newest version is the current 18.104.22.16874 - works correctly. All drivers in between have worked fine also.
Most drivers can be downloaded from Intel beta or station-drivers.com. I've listed the procedure in one of the above replies.
11-13-2018 12:27 PM - edited 11-13-2018 01:02 PM
I just went and grabbed another unit so that I can smoke it for a fresh install. Here's the step-by-step to get the auto-brightness working:
1. Boot from Win1803_x64 USB (Microsoft MCT) // also works with Win1709_x64 from the MCT
2. Choose Win10 Pro
3. Click "Install"
4. Shift-F10 to access command prompt. Use diskpart to 'Clean' NvME.
5. Choose cleaned disk for install, press Next
6. Let Windows install and restart
7. Disable Cortana, disable all telemetry, use Local Acct
8. Copy Intel Chipset 10.1.17833.8098 "setupchipset.exe" to desktop. Run from command prompt with -OVERALL option. Do not reboot.
9. Install Lenovo PM driver 1.67.14.07
10. Install Lenovo APS 22.214.171.124 driver. Do not reboot.
11. Install Intel Sensor Solution 126.96.36.19929 from Lenovo
12. Install Intel Sensor Solution 188.8.131.5223 on top
13. Patch Intel Sensor Hub from 184.108.40.20635 using ISH.inf (right-click, install) - optional, works without this too
14. Install Intel VGA 220.127.116.1174 from "igxpin.exe"
Right click on desktop, choose Display Settings, be sure "Change brightness automatically when lighting changes" is checked. Hit ALS with flashlight - screen brightens
* - Italicized/underlined items are downloaded from station - drivers