Lenovo ThinkSmart View ROM/OS Development

There is, actually.

Can you do the following on your device, via SSH:

If not yet connected to WiFi do the following:

$ nmcli d wifi connect YOUR_SSID password YOUR_WIFI_PASSWORD

then:

$ sudo apk add libgpiod
$ sudo gpioset --mode=wait 0 95=1 100=1

And tell me if there is any sort of reaction from your display to that. I don’t expect it to initialize, but maybe the backlight will come on.

GPIO95 is supposed to be backlight enable, GPIO100 is supposed to be display external VDD power enable.

Hit Enter to exit gpioset after testing.

In order to test to see if the backlight is turning on, I turned off the light in my room and I observed that my screen is running at something like 1% brightness. I couldn’t actually tell the difference between off and what it shows without a pitch black room. I can see a clock but don’t seem to be able to interact with anything.

However, I observed no change from the gpioset command.

Thanks for testing.
I have built a kernel that should enable GPIOs 95 and 100 together with the display, so hopefully we get a full initialization and backlight.

I believe it can be installed like this:

$ wget https://felix.kaechele.ca/projects/thinksmart/linux-lenovo-cd-18781y-6.7.5_p20240228220822-r0.apk
$ apk add linux-lenovo-cd-18781y-6.7.5_p20240228220822-r0.apk
$ reboot

On another note: I sent the patch for the WiFi driver upstream. Let’s see if it will get accepted :face_with_peeking_eye:

2 Likes

I did those commands, got no errors, and the screen is still dim. If there’s anything further I can do, let me know.

Let’s see if the new kernel actually did something.
GPIO 95 should be output active-high and GPIO 100 should now have a function name assigned:

$ sudo gpioinfo
[...]
line  95:      unnamed       unused  output  active-high
[...]
line 100:      unnamed "panel-vdd-regulator" output active-high [used]
[...]

Also, what is your output for this?

$ sudo gpioget 0 95
$ sudo gpioget 0 100

I’d expect it to either be 1 or gpioget: error reading GPIO values: Resource busy.

We can also check whether we can set screen brightness:

$ sudo su -
# cd /sys/class/backlight/backlight
# cat max_brightness > brightness

That should set the screen to maximum brightness. If that works then it means we at least should have backlight working, just need to figure out how to make it come up at a sensible value out of the box.

If that doesn’t work I’ll have to dig a bit deeper into the original device tree configuration to look at other options.

gpioinfo

lenovo-cd-18781y:~$ sudo gpioinfo | grep -E "(100|95)"
        line  95:      unnamed  "backlight"  output  active-high [used]
        line 100:      unnamed "panel-vdd-regulator" output active-high [used]

gpiogets:

lenovo-cd-18781y:~$ sudo gpioget 0 95
gpioget: error reading GPIO values: Resource busy
lenovo-cd-18781y:~$ sudo gpioget 0 100
gpioget: error reading GPIO values: Resource busy

I got no change from the brightness setting that I can see on my screen.

1 Like

Thanks for testing! I will check a few more things that I think could be the issue. But it’ll have to wait until tomorrow.

1 Like

Here are two more kernels to try:

Testing changes to the WLED setup:
https://felix.kaechele.ca/projects/thinksmart/linux-lenovo-cd-18781y-6.7.5_p20240229215516-r0-wled.apk

Testing WLED + Panel VDD/Backlight GPIOs:
https://felix.kaechele.ca/projects/thinksmart/linux-lenovo-cd-18781y-6.7.5_p20240229220153-r0-gpio.apk

Thanks!

The top one seems to have brightened up my screen: https://felix.kaechele.ca/projects/thinksmart/linux-lenovo-cd-18781y-6.7.5_p20240229215516-r0-wled.apk

Great work! Thank you so much!

The “slide to unlock” text is half-off the bottom of the screen and I don’t seem to actually be able to slide to unlock, however. Is this expected? Should I be using keyboard/mouse?

I’m a bit new to PMOS here.

Edit: Dmesg output: Pastefy

Interesting. So that model also doesn’t really need the GPIOs set up, I assume. What was missing was the 4th LED string in the WLED configuration.

The display output doesn’t look quite right to me. Somehow your screen output also seems to be using a larger scaling setting than mine.
For comparison, here’s what it looks like for me:

As for the touchscreen not working: That’s the one I wasn’t sure about whether the mainline driver would support it.
It seems that it doesn’t. From your dmesg:

[   11.582407] Himax-hx83112b-TS 2-0048: Unknown product id: 0
[   11.582560] Himax-hx83112b-TS: probe of 2-0048 failed with error -22

Let me see if I can build the driver they have in the open source kernel tree for pmOS.

In the meantime, if you want to use a Bluetooth mouse and/or keyboard you can set them up from ssh like this:

$ sudo service bluetooth start
$ sudo modprobe uhid
$ bluetoothctl
[bluetooth]# scan on
[bluetooth]# pair 00:11:22:33:44:55

Hit Ctrl-D to exit after pairing. You should then have a working keyboard/mouse. If not, check the docs over at pmOS: Bluetooth - postmarketOS

1 Like

Took a quick stab at the Touchscreen driver. No surprise: It won’t build on a modern Kernel. It also has some Android powersave specifics built in unconditionally that don’t exist on mainline Kernels.

Interestingly, the manufacturer’s GitHub has the chipset that’s supported in mainline listed with its own driver as well: HimaxSoftware · GitHub
That would explain why that driver probably won’t work with this chip.

In this case I might have to write a driver for the touchscreen based on what’s in mainline and the GPLv2 sources from the manufacturer.

12 Likes

Felix… you’re amazing - thankyou so much for your dedication here…

1 Like

Thanks for your kind words. It means a lot to me when people appreciate the work I do.

12 Likes

@mattmon I might have to take you up on the offer to help me get that other panel variant to me. I don’t think I can do enough testing for the touchscreen driver without the actual hardware present.
Happy to replace it for you with another one off eBay.

I do believe that these two variants we’ve seen so far are the two that exist for the ThinkSmart View. The other ones mentioned in the GPL code drop seem to be related to the Smart Display 8 and 10 versions.

Now that I pretty much understand the Lenovo GPL source code changes pretty well, I’m almost certain this would work just fine on the Smart Display variants as well if I add in all the panel drivers. There is one more touchscreen variant (Goodix) for those though, so I don’t know if that’d work. But I’m mainly focused on the ThinkSmart View at this point, because the Smart Display devices are not as cheap or readily available. But if anyone would like to test it on those other devices the builds for the ThinkSmart View should mostly work as-is.

Is that the Lenovo SD-X701B ? - may be able to give it a try on that model if so.

Yes. Any of the SD-8501F/SD-X701B/SD-X501F devices should work, I believe.

Make sure that you do a full dump of your flash (edl rl dumps --genxml) before trying anything, just in case.

1 Like

Thanks, great job getting this stuff going - have been following this thread with excitement :laughing:

Out of interest is the Smart Display 8 the same in terms of specs to the Thinksmart View? They look almost identical externally.

Yes, they are almost identical.
See this post I made a few days ago: Lenovo ThinkSmart View ROM/OS Development - #82 by FelixKa

1 Like

I have so much work this days, but as soon as I’m free in about a week, I will try to install it on my Smart Display 10" :slight_smile:

Any news will post here, really love the device itself but the native OS is outdated (in many ways like not having an updated WebView, so some glitches here and there)

Ah yes - half asleep! I even remember reading that post now… :rofl:

I will try and get my hands on a SD 8 & 10 and give it a whirl and report back how it goes.