So postmarketos solved wifi issues? Thats already a big improvement.
Yes, Iâve had units on for many months with postmarketos and no wifi drops.
Awesome, too bad this fix cant be applied to lineage. Will make it a winter project to flash the devices with postmarketos. I just want to use them for playing audio notifications around the house like a doorbell etc, and for showing a home assistant dashboard.
Edit: what is a good guide to installing a kiosk for a home assistant dashboard?
after installing the latest postmarketos edge, it seems its still a fairly old version. more then 800 packages could be upgraded. i had to, to install and use chromium. But now every other app, such as console, even the settings app, no longer function.
I could simply reflash the device, but then how do i install chromium? its dependancyâs are incompatible because too old.
edit: sorry to reply to you dzmiller, didnât mean to.
Guide into installing pmos on a thinksmart and using it for home assistant:
Stuff have been quite time consuming to figure out, but together with the help here and Gemini, I have been able to write a guide for anyone new who wishes to try PMOS.
Versus android (lineageos) performance takes quite a hit, but there is no issue with wifi anymore. If only we could fix wifi on android⌠I would estimate that android is around 50% to 75% faster in performance then pmos so take that in mind, but wifi has been rock solid under pmos. I should also note that 1440p and 4k video streams also work under pmos with advanced camera card, even though a bit laggy, very usable. I also tried firefox as a browser on pmos and works really buggy. there is also a Remote Assist Display integration (GitHub - michelle-avery/remote-assist-display-integration: A remotely controllable Home Assistant display) with pmos app, but its much laggier and slower then chromium.
First, some notes:
- on one of my 6 thinksmart devices, i flashed 4 now with pmos. out of 4, only one functioned with the latest lk2nd (boot) image for the boot drive. the others did not have touch screen functionality, until i flashed a older boot image from june 2024, thats available on @FelixKaâs page as well: thinksmart
- the first time i upgraded all packages, all apps were broken, even the settings app was not working anymore. i could have done something wrong, but be sure to follow the upgrade instructions exact. You can always flash in EDL mode again, so there isnât a huge risk involved.
- All the instructions are made to be able to play any audio file on the device using squeezelite, to wake the device up with the volume up key, and to make chromium work the best as it can for home assistant.
- use winscp in sftp mode, not scp.
- we are deleting squeezelite services because a issue with the audio drivers that took a long time figuring out.
- Make sure you have music assistant as add-on or have something so the your squeezelite can connect to your server.
- Volume is extremely low, at least with using music assistant, on a new squeezelite instance. manually increase the volume in home assistant. then the volume can be normalised/maximised.
- Experiment included to store cookies in chromium. so far, chromium suffers from having its password to home assistant deleted after a power loss. not always. but sometimes. Iâl let you guys know if this effect is lasting and working.
- You need files that i generated with Gemini (AI of google). just 7kb worth of scripts: https://www.sendspace.com/file/wp937a
Please tag me if the above link expired. The folders in there are the locations of where the scripts go, if you replace the dot with a â/â. - You can make shell scripts for home assistant that ssh into your lenovo thinksmart and turn the backlight on/off if motion is detected for example. You can also make one that kills chromium and restarts it if home assistant is restarted or frigate restarted, etc. Ask gemini to help with that if needed!
For example, i quote Djagatahel: - Chromium is not remembering login at all times. when cutting power and re-inserting, at random times the login window and cookies are gone. you have to login again, and add the device to browser-mod again. very frustrating. if anyone has a fix, im all ears.
- On some of these devices i still seem to lose wifi. when i turn the screen on, it says i have to enter credentials for wifi. i then click enter as the password has been filled in already, and it does not reconnect. disabling and enabling wifi doesnât work either, it doesnât auto-connect. i have to go to the wifi menu and click my wifi name, then it immediately connects again. Potential fix below in the guide.
Similar to how he is using
echo {{ level }} > /sys/class/backlight/backlight/brightnessto set the brightness level, you can useecho 1 | sudo tee /sys/class/backlight/backlight/bl_powerto turn off the display completely,0turns it back on.
Guide:
Follow the guide in the first post from FelixKa. when your touch screen is not funcitoning, do the part under âFlash PMOSâ again, with a older lk2nd file. lk2nd-lenovo-cd-18781y-20240628.img is what i advice.
Update all packages with user pmos:
sudo apk update
sudo apk upgrade --available
Give root user a pw: (warning: first have to give pw for user pmos because sudo)
sudo passwd root
Allow root to ssh in /etc/ssh/sshd_config:
sudo vi /etc/ssh/sshd_config
Now find the PermitRootLogin line, remove the # and change to PermitRootLogin yes.
Then press escape and write: â:wqâ then hit enter to save the file.
Now reboot:
sudo reboot
You can now login as root on winscp with your set root password.
Change hostname file. Open it at /etc/hostname. This makes it easier to find the device if you have multiple.
Disable screen timeout, screen lock in settings app in privacy & security and in power menu.
Make the display size 149% for best display.
Edit the file /usr/share/applications/mobi.phosh.Shell.desktop
At the exec part, near the bottom, needs â-Uâ at the end of that line to skip boot screen and go straight to home menu. So: Exec=/usr/libexec/phosh -U
Install chromium:
apk add chromium
rm -fr /home/pmos/.local/share/keyrings/
Install squeezelite:
wget -O - http://www.sodface.com/repo/sodface-pub-key.tar.gz | sudo tar xzvf - -C /etc/apk/keys
Add the repo url to somewhere in /etc/apk/repositories: http://www.sodface.com/repo
Then:
apk update (if this fails, execute the wget -O ....... command again above)
apk add squeezelite
rm -f /etc/init.d/squeezelite
rm -f /etc/conf.d/squeezelite
Copy start_squeezelite.sh script to /home/pmos, then edit the file to change the player name and the IP address of your server.
Now:
chown pmos:pmos /home/pmos/start_squeezelite.sh
chmod +x /home/pmos/start_squeezelite.sh
Copy the two desktop files to home/pmos/.config/autostart
Now, copy usr/local/bin files, and the init.d script for volume up wake-up, chmod them for execute permission (right click it, properties. click all âexecuteâ options), then:
apk add evtest
apk add coreutils
apk add gawk
chmod +x /etc/init.d/backlight-monitor
rc-update add backlight-monitor default
Edit /etc/sudoers file: add the line
"
root ALL=(ALL) NOPASSWD: /usr/bin/tee /sys/class/backlight/backlight/bl_power
"
Then:
rc-service backlight-monitor start
Make sure the service works:
rc-service backlight-monitor status
Once you got that working, execute the following to disable the screen dimming after a minute. Even with power settings to dimming disabled, it will still dim your screen. The following command prevents that.
Make sure you are logged in as user pmos. âsu - pmosâ will do that if you are currently root.
dbus-launch dconf write /org/gnome/settings-daemon/plugins/power/idle-brightness 100
To make sure the device boots with around maximum brightness, we are copying the file from /etc.local.d to /etc/local.d/backlight-max-at.start
Chmod it for execute permissions and then you can reboot with maximum brightness.
Change the url of your HA dashboard at the end of the line in start-dashboard then copy it to /usr/bin.
Execute the commands for the profile folder:
mkdir -p /usr/local/share/chromium-ha-profile
chown -R pmos:pmos /usr/local/share/chromium-ha-profile
Chmod it for execute permission. (right click it, properties. click all âexecuteâ options)
Then remove any weird characters in the text file windows could have made, so it executes reliably:
sed -i 's/\r$//' /usr/bin/start-dashboard
To get the microphone working in chromium (for two-way audio etc), i had to execute the following steps. Be sure to be logged in as user pmos, you can do that as root with:
su - pmos
Then, execute vi ~/.profile. I couldnât seem to do this in winscp.
A large text editor opens in the console.
Copy paste the following into the editor:
if [ -z "$XDG_RUNTIME_DIR" ]; then
export XDG_RUNTIME_DIR="/run/user/$(id -u)"
fi
Then hit escape, then write â:wqâ which means âwrite quitâ then enter.
Wifi fix:
See above notes why this can be needed:
Copy downloaded files from usr/local/bin/ to the same directory on your thinksmart running pmos, be sure to chmod for execute permission. Then do the same for wifi-monitor in /etc/init.d/ to /etc/init.d/
After that, execute:
rc-update add wifi-monitor default
rc-service wifi-monitor start
The above wifi fix has been tested and works. it pings the router at 192.168.1.1 (change if you have a other IP thats always online) and if not pingable for 4 times it drops wifi and then reconnects.
Now reboot the tablet and it should all work hopefully!
When chromium starts for the first time, you have to set a keyring password. enter any key, then delete it again, for no password. then chromium home opens. just close it again, then either reboot again, or execute start-dashboard from the console app.
Great guide but⌠my TSV with LOS hasnât any problem with WiFi. I have it near my router though so it may be thatâs the reason
Bah, one annoyance over all these devices with pmos is that chromium sometimes deletes cookies for the device. Then i have to login again(the saved password is always wrong) and then have to re-register the device in browser mod.
This happens usually when i cut power and put power back in.
On another device i cant get the microphone working, maybe its broke and needs warrenty.
EDIT: I even made a script that copies all chromium userfiles away, and deleted everything and copies it back when restarting. but even then, i am presented with the login screen again often. so strange and annoying.
EDIT2: Unfortunately, i also note wifi trouble on these devices now. Although way less common then i had it on android.
Added a note in the guide:
On some of these devices i still seem to lose wifi. when i turn the screen on, it says i have to enter credentials for wifi. i then click enter as the password has been filled in already, and it does not reconnect. disabling and enabling wifi doesnât work either, it doesnât auto-connect. i have to go to the wifi menu and click my wifi name, then it immediately connects again. I already made a fix in the guide that will force disconnect and reconnect to wlan and works.
If anyone has a idea how to fix chromium cookies storing or a alternative browser that works well with home assistant im all earsâŚ!
The biggest issue i have with these devices!
Is there a link to the new release anywhere @FelixKa ? also if I am already running PMOS is there upgrade guides?
Did you tried tweaking your WiFi router settings?
Separate SSID with for example
2.4 ghz
Wpa2 personal
40hz
Channel 11
Are you using an single wifi ap or router?
i want one device to go back to lineageos, but i dont seem to be able to?
I followed the instructions but im only getting the boot screen of lineageos. android is not started. is there something im missing?
Is there a way to get back to fully stock again?
I tried the windows âsoftware fixâ app from lenovo but thats not working.
EDIT: Got it fixed by deleting and re-downloading fresh files/instructions.
I think im moving all my 6 devices away again from pmos and back into lineage lol. see if wifi remains working with screensaver instead of screen off.
I got postmarket os installed but canât get audio - I only have âDummy Outputâ as the speaker. Any hints on getting audio to work?
I also canât get it to auto-unlock at boot and not prompt for passcode, I already tried adding /usr/libexec/phosh -U to /usr/share/applications/mobi.phosh.Shell.desktop with no luck and disabling auto lock in settings GUI.
Help! ![]()
Does the latest postmarketOS edge + Phosh have sound support? Not working, also tried stable. Is the only one with working audio your latest image from Feb? Thanks!
following my instructions, i had audio working on literary all of the devices.
You used the older image, yeah? Not the latest Edge which I was hoping for.
Any chromium freezing issues in PMOS for you? Iâve been testing the stable/edge PMOS and my HA dashboard froze the browser after a few hours, whereas Lineage didnât freeze with same dashboard (but had horrible wifi dropping issues like everyone else has mentioned hah).
I really just want stable wifi so was hoping PMOS would help but not if itâs less performant ![]()
i used a older image but update all the available packages in the instructions.
Gotcha. Iâll give that a try, turns out my HA dashboard froze Phosh entirely, thought it was just chromium but having to force reboot it as display froze. Hopefully just a one-time fluke but if not, might have to go back to Lineage and deal with the wifi issues it has
Hey there, sorry for the longer absence here.
Two notes:
- The sound driver is currently not included in the Kernel release that is in the pmOS Edge releases. I was preparing a version of the driver to send upstream but it looks like TI is working towards a driver where I only need to add a few lines to make it go with the TI5782M in the TSV.
- The WiFi issues seem to be a firmware issue, so we canât really fix it. It relates mostly to group rekeying. When that happens the firmware stops responding to attempts of the WPA supplicant to install the new keys. This leads to a full disconnection and re-association which in some setups may cause the TSV not to be able to reconnect at all.
The upstream vendor driver (qcacld) has the same issue as ath10k, which we use on pmOS. Unless Qualcomm fixes this in firmware (extremely unlikely as this chipset is only used in automotive and TV use cases adn given Qualcommâs current level of engagement in ath10k development) weâll likely never see a fix for it.
Iâll try to get that sound driver into the pmOS kernel soon. I have significant work commitments until late November, so my time is a bit constrained at the moment.
Hey @FelixKa. Thanks for the updates.
To your point about the WiFi issue⌠Iâm very curious about your summary, as Iâve only had issues on my LineageOS TSVs, and never on my PMOS ones. The PMOS ones have been rock solid, they neither drop, and even if they did and I didnât notice, they never get into a state where they canât recover.
Iâm not exactly sure, but I believe the wpa_supplicant on pmOS is just better in handling the disconnection scenario than whatever version or setting Android ships with. But I donât have any depth of knowledge of the Android WiFi stack, so I canât really speak to that.
The manifestation of the issue on pmOS is the loss of connectivity for about a second every 30-60 minutes (in my case, my GTK interval is set to 1h) which is not noticeable unless you use any realtime services, such as unbuffered livestreams (e.g. cameras).
The problem is actually in the removal of the key. The driver runs into a timeout when deleting the old key from the hardware. Because of that the wpa_supplicant assumes that the old key material is still active in the hardware and will issue a full re-association to return to a defined state with valid key material.
I had really really hoped this patch would be the fix for this issue: [PATCH ath-current v2] wifi: ath10k: Fix connection after GTK rekeying
But it doesnât seem to be the case. I still have this issue, even with the patch applied.