Lenovo ThinkSmart View ROM/OS Development

Ah nice. Would miss the fully functions though. I’m guessing there are other ways to turn the screen off/on?

Almost finished with the Himax touchscreen driver :slight_smile:
It works, just needs some more cleanups and I can probably post a test image tonight.

9 Likes

really amazing work on all this Felix! Do I understand you correctly and I need some kind of ‘special’ cable/soldering/breakout board to do the ‘always on’ device mode? Can you tell me what to get so I’ll be able to help you test?

It means it would have to be decided at Kernel compile time whether you want USB Host mode by default (i.e. without special cable) or if you want USB Device mode.
My thinking was that USB Host mode would probably be the more likely use-case for the normal user because USB Device mode is only really useful for debugging. In that case you’d only need a special cable if you want the device to show up as a networking device for postmarketOS debugging.
I’ll include that in the testing image tonight.

1 Like

Unfortunately, some recent changes on the Kernel have broken the way USB OTG works on this SoC.
So the testing image must wait until I get that sorted out…

4 Likes

I’m sure there are better ways, but to start I found that critical notifications will turn the screen back on. I have the wyoming-satellite working pretty well now (with local openwakeword). Added this to the startup command:

--detection-command "notify-send -u critical wakeup"

A minor downside is a bunch of stacked up notifications. Tried using --replace-id to keep it to one, but then only the first one wakes the screen.

I’m using the regular screen blanking to turn it back off, although I had to disable is-alsa-playing in /etc/sleep-inhibitor.conf for that to work while wyoming is running.

2 Likes

Couldn’t get the USB stuff to work tonight, so I’ll just publish a version that at least has something for the Himax folks to test:
pmos-lenovo-cd-18781y-testing-20240422.tar.xz

As per usual, username pmos, password 1234.

Note that you will want to flash the version of lk2nd that comes with this release to boot. Otherwise the Himax touchscreen driver will not be enabled in Linux.

This version has all the changes mentioned in the previous update: WiFi stability improvements, increased availability of RAM. I also implemented the cap at 177MHz (default is 200 MHz) for the SDIO bus that the downstream kernel has in place. It seems the Himax variant needs it, otherwise the WiFi card randomly disappears. Unfortunately it also shaves off almost 100Mbit/s in my iperf3 tests. But 160 MBit/s is still good enough on this device for me. I certainly prefer stability over max throughput here, especially since the device has comparatively tiny storage :stuck_out_tongue:
USB OTG might not work at all on this release, but the USB Gadget (i.e. ethernet device showing up) works. Tested this both on the Focaltech and Himax variant (courtesy of @mattmon, thanks again!) and it works fine on both.
On the Himax variant you may want to go in to the display settings and switch the scaling to 125% and then back to 100% to resolve the weird scaling issue.

Let me know how testing goes :slight_smile:
I don’t expect any weirdness from the Himax touch driver, as it is rather simple and doesn’t actually do that much other than pulling a few bytes over the I2C bus.

8 Likes

Out of interest, do you use the same tools to flash as the Android ROMs or something else?

Hi
It is some new version of alternative FW for this tablet ? How i can flash it ?

This new image is definitely working on the Himax models, although it still has some weird scaling issues; it looks like it defaults to 200% and some spillover still happens at the lock screen until after you turn it down.

Has your git repo for pmbootstrap been updated yet? I’m itching to make another SXMO image to try on these (I had sound issues with my last one, exacerbated by frequently-dropping WiFi).

Excellent work so far and thank you so much!

1 Like

Yes, with the files from my releases it’s usually simply:

edl w boot lk2nd.img
edl w userdata lenovo-cd-18781y-rootfs.img

This is a Linux based firmware. Not Android based, so no Android apps will function on this. For flashing instructions, see above.

Yeah, this seems to be a Phosh bug.

Just pushed the latest changes to my repo. It might be a bit messy as it’s still a work in progress, so I rebase and force push a lot at the moment. Sorry for that. I’m getting very close to having this upstreamed into pmOS properly :slight_smile:

Thanks for testing!

6 Likes

Thanks for that - I just got it flashed and working. Really impressed so far :slight_smile: Thanks for your hard work, much appreciated. Playing a bit more now…

1 Like

I see a few issues and wonder if this expected or you have seen:

  1. Display scaling - didn’t seem to persist after I set 100% although after a couple of tries, it seems to have stuck to 100%
  2. I can’t seem to delete an apps. In ‘software’ I get an error EDIT: restarted and the error is: Message recipient disconnected from message bus without replying
  3. keyboard is quite small and doesn’t take up the available horizontal space. It’s usable but a little tricky (maybe a double Jack Daniels would help steady my fingers!)
  4. Firefox as installed is very buggy graphically with boxes appearing and screen corruption. Tab headers are sometimes at the top, sometimes at the bottom. Seems a bit all over the place.

I really like it though - lots of promise :slight_smile:

Any thoughts on these? Thanks.

I will now begin the process of pushing all the changes for the drivers that I made to the upstream kernel. For that it would be good to have some testing from the community.

I would appreciate if people would be willing to provide me with Tested-by lines I can include in the patches I send to the Kernel mailing list. This is described here: submitting-patches.rst « process « Documentation - kernel/git/torvalds/linux.git - Linux kernel source tree
Note that it would have to include your real name and email address which will be visible in the Kernel commit log for eternity. It may also entail people contacting you at that email address in the future to test changes that touch areas that my patches enabled to work in the first place.

I basically need two areas tested:

  1. WiFi
    This should work as far as connecting to your wifi and having decent transfer speeds (I use iperf3 to measure) both RX/TX. There was an initial bug with WPA3 networks being slow (like 20 Mbit/s) but I fixed that. In my testing, on a 5GHz WiFi 5 network with 80MHz channel width, I generally see around 160 Mbit/s on average for both RX and TX.
    The following error is known to me, but I don’t know whether it can be fixed in the driver. It occurs after the Group Rekeying Interval set on your AP expires (the default is often 1hr) and causes the WiFi to reconnect, briefly losing connection. The following message can be observed in dmesg:

    [ 2756.310677] ath10k_sdio mmc1:0001:1: failed to install key for vdev 0 peer 76:ac:b9:67:85:bb: -110
    [ 2756.310720] wlan0: failed to set key (2, ff:ff:ff:ff:ff:ff) to hardware (-110)
    [ 2756.311492] wlan0: deauthenticating from 76:ac:b9:67:85:bb by local choice (Reason: 1=UNSPECIFIED)
    

    there may be a

    [ 2756.575288] ath10k_sdio mmc1:0001:1: Got RX ind from invalid peer: 101
    

    sprinkled in for good measure.

  2. Touchscreen
    The touchscreen should function normally and be reasonably accurate. Because it’s a capacitive in-cell type display there should be no need for manual calibration.

If you happen to be able to test any of these areas by the end of this week and are willing to provide that Tested-by line I’d be happy to include it in my patch submissions. If you don’t want your real name and email to be associated with your account on this forum you can also PM it to me.
The format should be like this: Tested-by: Felix Kaechele <[email protected]>

Also get an error installing apps “The name dev.Cogitri.apkPolKit2 was not provided by any .service files”

Yes, I’ve seen this. Seems to be Phosh bug.

Haven’t tested that yet. Sounds like a postmarketOS bug. They are switching the whole system to systemd right now, so that may be an effect of that.

I saw this when the scaling was not at 100%. At 100% the keyboard was the entire width of the screen and keys are almost the same size as my fingertips.

Yes, that’s a known one. Turning off hardware acceleration fixes this. It is kinda hard to do with how you can’t really see what you’re doing :stuck_out_tongue: The postmarketOS issue for this is here: Disable Use hardware acceleration when available (#56) · Issues · postmarketOS / mobile-config-firefox · GitLab

Haven’t seen this one myself. May be systemd related as well.

Is that a wait and see then?

I’ve tested at all the scaling sizes offered and the keyboard is always this size (or smaller):

I’ll try turning off hardware acceleration - is this in firefox settings I’m guessing?

oh, I did manage to install ungoogled-chromium but no keyboard displays at all.

On a positive note, I’ve seen no issues at all with touchscreen and accuracy etc :slight_smile:

I ran into this as well, checkout Phosh Screen Scaling. Basically you have to edit /usr/share/phosh/phoc.ini, I’m using:

[output:DSI-1]
scale = 1.25

Then if you do an apk upgrade that updates phosh you may have to do that again :man_shrugging:

2 Likes

Thanks will try that.

Have you also seen the display settings showing the wrong orientation? e.g. mine is sitting in portrait but the orientation shows landscape. Is that something to do with the way the screen is setup?

The resolution is also wrong - shown as 800x1280 (16:10) Unless i’m missing something, that should be 800x1280 (10:16) in portrait.