Lenovo ThinkSmart View ROM/OS Development

BTW, here’s an easier way to disable hardware acceleration in Firefox:

  1. Start Firefox at least once to create the profile directory.
  2. Switch to the profile directory: cd ~/.mozilla/firefox/*.default-release
  3. Write to the settings file:
cat <<EOF >> user.js
user_pref("browser.preferences.defaultPerformanceSettings.enabled", false);
user_pref("layers.acceleration.disabled", true);
EOF
1 Like

What do you all use for remote administration of files on these devices?

vi seems to be the only option for a text editor which I hate with a passion!

WinSCP - I can’t work out the correct permissions to edit anything.

That worked thanks :slight_smile:

ssh, oh my zsh, byobu, micro. Pretty much mandatory in all linux work I do :slight_smile:

Sounds like you’ve been drinking :rofl:

1 Like

Having tested Firefox on PMOS, I’m not getting very good performance compared to Android. Really slow refresh and slow response to pressing buttons in an HA dashboard. On average 5-6 seconds to respond and slow dragging of maps etc.

Anyone else seen this?

Wauwsers!.. thanks everyone!.. I cant wait for the “simple” installation guide on this one…

I managed to get mine with a separate bootloader once… but had to flash it back for some reason… If this think would fully work with HA… it’s coming back on my desk :slight_smile:

I have found the following approach on one of the PMOS webpages. I was able to open Firefox in the kiosk mode with this and it is running. I was not able to compare the performance of the solution with turning off the acceleration yet but maybe you or someone else wants to fiddle around with it. First if you have applied Felix’ commands to disable hardware acceleration, undo that.

cd ~/.mozilla/firefox/*.default-release

cat <<EOF >> user.js
user_pref("browser.preferences.defaultPerformanceSettings.enabled", true);
user_pref("layers.acceleration.disabled", false);
EOF

Afterwards open the console on the device to start Firefox with
MESA_GLES_VERSION_OVERRIDE=2.0 firefox-esr -kiosk

@FelixKa thank you very much, again for the effort. Now the touchscreen is working like a charm! :slight_smile:

3 Likes

To undo the changes, In case you didn’t create your own, custom user.js in the Firefox profile, you can also simply delete it. It’s not there by default anyways.
rm ~/.mozilla/firefox/*.default-release/user.js

That’s a great hint! With hardware acceleration enabled I do get a noticeably better performance. It’s still not perfect, but we need to remember that this device only has 2GB of RAM.

2 Likes

I’ve done a short test and my initial impression was that removing the configuration using Felix’ command instead of “reverting it” with mine has a bigger positive impact on performance when using firefox with the override functionality described above.

Thanks again Felix for sharing!

Yeah now we’re talking. I tried this out with Chromium, comboed with some of the settings from the postmarket wiki. In /usr/share/applications/chromium.desktop I changed line 108 to:

Exec=env MESA_GLES_VERSION_OVERRIDE=2.0 /usr/bin/chromium-browser %U --enable-features=UseOzonePlatform --ozone-platform=wayland --start-maximized

Better performance than Firefox and comparable to Fully kiosk on Android 10. Not bad!

3 Likes

I sadly really have to go to sleep now but how did you install chromium? From the software center or via command line? Did you have enough free space to install it or did you get rid off other programs/apps first?

Will definitely try this tomorrow!

I installed from the cli with sudo apk add chromium but looks like it’s also listed in the software center. Going that route, be sure to use the straight “Chromium” and not “Chromium Web Browser” which is the flatpak version and not recommended.

I’ve reworked my partitions so I have 6.3G on root. I sent the info to Felix in hopes that he’d have some ideas on how to package that in for easier installs. This thread is already crazy long so didn’t want to muddy the waters, but happy to share with his blessing :smile:

1 Like

Another neat trick I just simply tried and it worked:
You can write lk2nd to flash from within Linux, no need to EDL it:
dd if=<path to lk2nd.img> of=/dev/disk/by-partlabel/boot

1 Like

It’s all a big happy mess :slight_smile: My intention is to eventually condense all our findings down on the postmarketOS Wiki, if they are universally relevant to the device.

And feel free to share your partitioning. I unfortunately haven’t gotten around to trying it yet. But I may look into it tonight, because I’m starting to hit the limits of my rootfs :sweat_smile:

Interested to hear what you have done with the partitions.
I’m hoping to get one of felix’s images tested on the Smart Display 8, but unfortunately the partitions on that device are smaller than the Thinksmart View so I can’t get it flashed.

Alright here we go: pmos-lenovo-cd-18781y-partitions.tar.gz. Start by extracting those files into a dir that has Felix’s 2 images with the “latest” filenames. We’ll be removing unused partitions like system & vendor so we need to relocate a few others. In EDL mode, this will read from the device and save locally:

edl r cache cache.img
edl r persist persist.img
edl r misc misc.img

Now you should be ready to flash. This uses qfil mode to write multiple partitions & the new partition table:

edl qfil rawprogram0.xml patch0.xml .

Don’t worry about missing file warnings for splash.img or recovery.img, I left those in if anyone wants to replace them as well.

I’ve been using linux for this, but in Windows it should be similar to Felix’s instructions using python3 edl commands. Let me know how it goes!

3 Likes

Maybe add a note that people should always keep safe and handy a full dump (edl rl --genxml myDump) of their device before attempting any of this :slight_smile:

3 Likes

Good call, worst case there’s the Rescue and Smart Assistant that I’ve definitely used more than once :laughing:

2 Likes

Good advice, quoted in the other thread :+1:

Thought you had a solution for that :wink:

1 Like