Is this the perfect standalone tablet for HA?

Ah, so I’m not crazy… at least not for this reason. I can’t reproduce the sleep/wake issue reported either.

This is on a freshly flashed unit, with the screen timeout configured in settings, and using the HA app.

That said, there are some minor differences between the various roms lenovo has released, with the later ones having:

  1. additional kernel modules related to the lcd backlight
  2. Qualcomm’s CABL disabled in build.prop
    (Content aware back light)

Nearby motion of the device itself or another device?

Another device. A couple of motion sensors that are in the vicinity.

1 Like

Which model are you referring to?

Wait a minute… we’re all using the same ROM we downloaded from the link in the first post, but only some of us have screen off issues?
That doesn’t sound like a kernel issue; we’re all on the same kernel. That sounds like a hardware revision.

Check your labels, please. On the bottom corner of the triangle stand, at the far right side of the sticker label, you’ll have a manufacturing date. What is it?

Mine is 2021-12-09. I don’t see anything else on the label that could help identify hardware versions…

For mine, the Mfg date is 2021-03-19. In the OS settings, my screen timeout is set to 5 minutes. The HA app setting “Keep screen on” is off (not sure if it matters). The other thing is to keep track of the app that’s running, mine is the HA app. (I saw folks mention Wallpanel, Fully Kiosk, etc.)

It’s definitely a software issue. Please help me reproduce it so I can fix it.

I’ve seen it happen with the HA app too. I just can’t seem to induce the behavior when I want to, so I can look for the cause.

Need to know the magic combo of software and configuration that causes the screen to stay awake.

So I was able to get the screen to stay awake by last interacting with the virtual soft keys and leaving them visible. The virtual keys have remained visible despite me enabling the setting to have them auto hide after 5 seconds. After going back to the launcher, and relaunching HA app, the display was able to sleep again. Not sure this is the cause, but might be a clue…

Update: And now the screen seems to be staying awake without the virtual keys involved, so I guess I’m seeing some of the issues of mysterious origin others are seeing as well.

The source code suggests there are 5 screens that are supported on the platform. Reasonably, only three of these are actual candidates since the other two are 1920x1200, not 1280x800 like our devices have.

To check which panel you have in your screen you can adb shell into the device and run dmesg | grep "Panel Name". You should get either boyift8201, JD9365 Starry or hx83100a.

2 Likes

I have

mdss_dsi_panel_init: Panel Name = boyift8201 800p video mode dsi panel

(figured it was worth giving the full line, just in case)

Also FWIW “steps to reproduce” on my device:

  1. Follow instructions in post 1, including virtualsoftkeys, wallpaper/gallery, but don’t change boot animation.
  2. Install HA app.
  3. Set screen timeout to 15s in system settings.
  4. Observe problem

Happy to reflash etc as necessary, this device is only for HA at the moment.

Some notes from poking around in adb shell:

CD-18781Y:/ $  cat /sys/power/wake_lock
PowerManagerService.Display PowerManagerService.WakeLocks
CD-18781Y:/ $ echo "PowerManagerService.Display" > /sys/power/wake_unlock                                                                                      
CD-18781Y:/ $ echo "PowerManagerService.WakeLocks" > /sys/power/wake_unlock 
# Device still won't time out to go to sleep.
CD-18781Y:/ $ echo "mem" > /sys/power/state                                                                                                                      
# Device successfully sleeps and can be woken.
CD-18781Y:/ $ dumpsys deviceidle force-idle deep
Unable to go deep idle; not enabled
CD-18781Y:/ $ dumpsys deviceidle force-idle light                                                                                                                
Unable to go light idle; stopped at ACTIVE
CD-18781Y:/ $ dumpsys deviceidle force-inactive                                                                                                                  
Light state: ACTIVE, deep state: ACTIVE
# Device still won't time out to go to sleep
CD-18781Y:/ $ dumpsys deviceidle enabled light                                                                                                                   
0
CD-18781Y:/ $ dumpsys deviceidle enabled deep                                                                                                                    
0
CD-18781Y:/ $ dumpsys deviceidle enable light                                                                                                                    
Light idle mode enable
CD-18781Y:/ $ dumpsys deviceidle enabled light                                                                                                               
1
CD-18781Y:/ $ dumpsys deviceidle enable deep                                                                                                                     
Deep idle mode enabled
CD-18781Y:/ # dumpsys deviceidle enabled deep   
1
# Screen still won't time out to go to sleep.
CD-18781Y:/ $ echo "mem" > /sys/power/state                                                                                                                      
# Device still won't time out to go to sleep.

I’m not an android developer; I have no idea what these values normally look like (are those normal wakelocks?) apart from what’s in the AOSP doco. But it’s interesting that

  • idle mode doesn’t make a difference to sleep.
  • removing wakelocks doesn’t make a difference.
  • sometimes I can trigger sleep with /sys/power/state (which is how AOSP doco says Android does it), but sometimes ZE GOGGLES, ZEY DO NAHSING.

Here’s what dmesg has to say on that failed echo "mem" > /sys/power/state call:

[42841.916164] PM: suspend entry 2024-01-29 10:03:57.976069816 UTC
[42841.916196] PM: Syncing filesystems ... done.
[42841.972494] ueventd: firmware: loading 'a506_zap.mdt' for '/devices/virtual/firmware/a506_zap.mdt'
[42841.977606] ueventd: loading /devices/virtual/firmware/a506_zap.mdt took 5ms
[42841.982049] ueventd: firmware: loading 'venus.mdt' for '/devices/virtual/firmware/venus.mdt'
[42841.984421] ueventd: loading /devices/virtual/firmware/venus.mdt took 3ms
[42841.989349] ueventd: firmware: loading 'bdwlan30.bin' for '/devices/virtual/firmware/bdwlan30.bin'
[42841.994355] ueventd: loading /devices/virtual/firmware/bdwlan30.bin took 5ms
[42842.002325] ueventd: firmware: loading 'qwlan30.bin' for '/devices/virtual/firmware/qwlan30.bin'
[42842.007823] ueventd: firmware: loading 'wlan/qca_cld/WCNSS_qcom_cfg.ini' for '/devices/virtual/firmware/wlan!qca_cld!WCNSS_qcom_cfg.ini'
[42842.012231] ueventd: loading /devices/virtual/firmware/wlan!qca_cld!WCNSS_qcom_cfg.ini took 5ms
[42842.015741] ueventd: firmware: loading 'adsp.mdt' for '/devices/virtual/firmware/adsp.mdt'
[42842.019983] ueventd: loading /devices/virtual/firmware/adsp.mdt took 4ms
[42842.023935] ueventd: firmware: loading 'otp30.bin' for '/devices/virtual/firmware/otp30.bin'
[42842.027312] ueventd: firmware: loading 'modem.mdt' for '/devices/virtual/firmware/modem.mdt'
[42842.028027] ueventd: loading /devices/virtual/firmware/otp30.bin took 4ms
[42842.032545] ueventd: loading /devices/virtual/firmware/modem.mdt took 6ms
[42842.036236] ueventd: loading /devices/virtual/firmware/qwlan30.bin took 34ms
[42842.037703] Freezing user space processes ... (elapsed 0.009 seconds) done.
[42842.047380] Freezing remaining freezable tasks ... (elapsed 0.004 seconds) done.
[42842.052316] Suspending console(s) (use no_console_suspend to debug)
[42842.072390] HIFsuspendwow TODO
[42842.079754] msm-dwc3 7000000.ssusb: Abort PM suspend!! (USB is outside LPM)
[42842.079778] dpm_run_callback(): platform_pm_suspend+0x0/0x58 returns -16
[42842.079787] PM: Device 7000000.ssusb failed to suspend: error -16
[42842.079795] PM: Some devices failed to suspend, or early wake event detected
[42842.086078] R0: [irq/62-mmc1][11:03:58.146000]  wlan: [0:F :WDA] WOW wakeup host event received (reason: UNSPECIFIED(-1)) for vdev 0
[42842.090539] PM: resume of devices complete after 10.727 msecs
[42842.096747] Restarting tasks ... done.
[42842.106813] Abort: Some devices failed to suspend, or early wake event detected
[42842.106942] PM: suspend exit 2024-01-29 10:03:58.166868670 UTC

I read that dmesg output to mean that my USB ADB connection is what’s blocking suspend. But why did it work the first time??? No idea and it drives me nuts

I restarted the device and plugged into USB, and it went to sleep just fine. The same two services are present in wake_lock, even while it’s sleeping.

Oh, and input keyevent KEYCODE_POWER works fine to turn off the screen. It’s just the timeout that sucks.

also while the screen is off:

CD-18781Y:/ $ dumpsys power |grep Wake                                                                                                                           
  mWakefulness=Awake

Which tells me it’s not actually sleeping, just screen off, and I’ve been barking up the wrong tree.

So FWIW:

                                                                                                                     
CD-18781Y:/ # dumpsys power
POWER MANAGER (dumpsys power)

Power Manager State:
  Settings power_manager_constants:
    no_cached_wake_locks=true
  mDirty=0x0
  mWakefulness=Awake
  mWakefulnessChanging=false
  mIsPowered=true
  mPlugType=2
  mBatteryLevel=50
  mBatteryLevelWhenDreamStarted=0
  mDockState=0
  mStayOn=false
  mProximityPositive=false
  mBootCompleted=true
  mSystemReady=true
  mHalAutoSuspendModeEnabled=false
  mHalInteractiveModeEnabled=true
  mWakeLockSummary=0x1
  mNotifyLongScheduled=+5s905ms
  mNotifyLongDispatched=-1m12s53ms
  mNotifyLongNextCheck=(none)
  mUserActivitySummary=0x1
  mRequestWaitForNegativeProximity=false
  mSandmanScheduled=false
  mSandmanSummoned=false
  mLowPowerModeEnabled=false
  mBatteryLevelLow=false
  mLightDeviceIdleMode=false
  mDeviceIdleMode=false
  mDeviceIdleWhitelist=[1000, 1001, 2000, 10008, 10009, 10062]
  mDeviceIdleTempWhitelist=[]
  mLastWakeTime=282193 (85923 ms ago)
  mLastSleepTime=358603 (9513 ms ago)
  mLastUserActivityTime=368051 (65 ms ago)
  mLastUserActivityTimeNoChangeLights=33238 (334878 ms ago)
  mLastInteractivePowerHintTime=368051 (65 ms ago)
  mLastScreenBrightnessBoostTime=0 (368116 ms ago)
  mScreenBrightnessBoostInProgress=false
  mDisplayReady=true
  mHoldingWakeLockSuspendBlocker=true
  mHoldingDisplaySuspendBlocker=true

Settings and Configuration:
  mDecoupleHalAutoSuspendModeFromDisplayConfig=false
  mDecoupleHalInteractiveModeFromDisplayConfig=false
  mWakeUpWhenPluggedOrUnpluggedConfig=true
  mWakeUpWhenPluggedOrUnpluggedInTheaterModeConfig=false
  mTheaterModeEnabled=false
  mSuspendWhenScreenOffDueToProximityConfig=true
  mDreamsSupportedConfig=true
  mDreamsEnabledByDefaultConfig=true
  mDreamsActivatedOnSleepByDefaultConfig=false
  mDreamsActivatedOnDockByDefaultConfig=false
  mDreamsEnabledOnBatteryConfig=true
  mDreamsBatteryLevelMinimumWhenPoweredConfig=-1
  mDreamsBatteryLevelMinimumWhenNotPoweredConfig=15
  mDreamsBatteryLevelDrainCutoffConfig=5
  mDreamsEnabledSetting=false
  mDreamsActivateOnSleepSetting=true
  mDreamsActivateOnDockSetting=true
  mDozeAfterScreenOffConfig=true
  mLowPowerModeSetting=false
  mAutoLowPowerModeConfigured=false
  mAutoLowPowerModeSnoozing=false
  mMinimumScreenOffTimeoutConfig=10000
  mMaximumScreenDimDurationConfig=7000
  mMaximumScreenDimRatioConfig=0.20000005
  mScreenOffTimeoutSetting=15000
  mSleepTimeoutSetting=-1
  mMaximumScreenOffTimeoutFromDeviceAdmin=2147483647 (enforced=false)
  mStayOnWhilePluggedInSetting=0
  mScreenBrightnessSetting=102
  mScreenAutoBrightnessAdjustmentSetting=0.64746094
  mScreenBrightnessModeSetting=0
  mScreenBrightnessOverrideFromWindowManager=-1
  mUserActivityTimeoutOverrideFromWindowManager=-1
  mUserInactiveOverrideFromWindowManager=false
  mTemporaryScreenBrightnessSettingOverride=-1
  mTemporaryScreenAutoBrightnessAdjustmentSettingOverride=NaN
  mDozeScreenStateOverrideFromDreamManager=0
  mDozeScreenBrightnessOverrideFromDreamManager=-1
  mScreenBrightnessSettingMinimum=10
  mScreenBrightnessSettingMaximum=255
  mScreenBrightnessSettingDefault=102
  mScreenBrightnessForVrSettingDefault=86
  mScreenBrightnessForVrSetting=86
  mDoubleTapWakeEnabled=false
  mIsVrModeEnabled=false

Sleep timeout: -1 ms
Screen off timeout: 15000 ms
Screen dim duration: 5000 ms

UID states (changing=false changed=false):
  UID 1000:   ACTIVE  count=1 state=0
  UID 1001:   ACTIVE  count=0 state=0
  UID 1002:   ACTIVE  count=0 state=6
  UID 1037: INACTIVE  count=0 state=17
  UID u0a3: INACTIVE  count=0 state=17
  UID u0a9: INACTIVE  count=0 state=17
  UID u0a10: INACTIVE  count=0 state=17
  UID u0a14: INACTIVE  count=0 state=13
  UID u0a24:   ACTIVE  count=0 state=0
  UID u0a36: INACTIVE  count=0 state=17
  UID u0a43:   ACTIVE  count=0 state=7
  UID u0a44: INACTIVE  count=0 state=17
  UID u0a49: INACTIVE  count=0 state=17
  UID u0a53:   ACTIVE  count=0 state=6
  UID u0a57:   ACTIVE  count=0 state=2
  UID u0a58: INACTIVE  count=0 state=8
  UID u0a59: INACTIVE  count=0 state=17
  UID u0a60:   ACTIVE  count=0 state=3
  UID u0a61: INACTIVE  count=0 state=17
  UID u0a62:   ACTIVE  count=1 state=2
  UID u0i0:   ACTIVE  count=0 state=2

Looper state:
  Looper (PowerManagerService, tid 29) {4263d71}
    Message 0: { when=+5s902ms what=4 target=com.android.server.power.PowerManagerService$PowerManagerHandler }
    Message 1: { when=+9s932ms what=1 target=com.android.server.power.PowerManagerService$PowerManagerHandler }
    Message 2: { when=+3m26s89ms callback=com.android.server.power.PowerManagerService$4 target=com.android.server.power.PowerManagerService$PowerManagerHandler }
    (Total messages: 3, polling=true, quitting=false)

Wake Locks: size=2
  PARTIAL_WAKE_LOCK              '*job*/io.homeassistant.companion.android.minimal/androidx.work.impl.background.systemjob.SystemJobService' ACQ=-5m27s855ms LONG (uid=1000 pid=1198 ws=WorkSource{10062})
  PARTIAL_WAKE_LOCK              'WorkManager: ProcessorForegroundLck' ACQ=-5m27s670ms LONG (uid=10062 pid=2597)

Suspend Blockers: size=4
  PowerManagerService.WakeLocks: ref count=1
  PowerManagerService.Display: ref count=1
  PowerManagerService.Broadcasts: ref count=0
  PowerManagerService.WirelessChargerDetector: ref count=0

Display Power: state=ON

Battery saver policy
  Settings battery_saver_constants
  value: null

  vibration_disabled=true
  animation_disabled=true
  fullbackup_deferred=true
  keyvaluebackup_deferred=true
  firewall_disabled=false
  datasaver_disabled=true
  adjust_brightness_disabled=false
  adjust_brightness_factor=0.5
  gps_mode=1

Wireless Charger Detector State:
  mGravitySensor=null
  mPoweredWirelessly=false
  mAtRest=false
  mRestX=0.0, mRestY=0.0, mRestZ=0.0
  mDetectionInProgress=false
  mDetectionStartTime=0 (never)
  mMustUpdateRestPosition=false
  mTotalSamples=0
  mMovingSamples=0
  mFirstSampleX=0.0, mFirstSampleY=0.0, mFirstSampleZ=0.0
  mLastSampleX=0.0, mLastSampleY=0.0, mLastSampleZ=0.0
1 Like

Update to my screen-off issue.
I had previously said that the screen would not go off only when Home Assistant was running. It does. The screen will not turn off when I am running the Frigate add-on to Home Assistant.

Which is pretty much what I want since I am using the ThinkSmart to monitor my outside cameras. If I exit Frigate to the Home Assistant home screen, the screen does turn off.

My unit with screen off issue is mfg date 2021-12-10.

Interesting that the weight on the box us higher than the weight on older models:
2021-12-10 is 1.52kg
2021-04-23 is 1.49kg.

Very interesting post from @deadman96385
I got only one device and its already in use with Teams and Others firmware but if someone wants to give it a try…

https://xdaforums.com/t/guide-root-unlocking-and-improving-your-lenovo-thinksmart-view-cd-18781y.4584033/post-89303829

1 Like

If anybody wants…

I’ll upload a prehacked version of the “latest” rom from the XDA thread.

The later roms are built from the exact same source as the rom in this thread, there is very little difference.

Advantages of the later rom:

  • later android security patch level
  • possibly fixed screen wake issue, though that’s unconfirmed

Disadvantages of the later rom:

  • user variant, no system root, less functionality
  • it’s not “flash and dash”, you have to do most of the hacking yourself

I’ve been using it to try and track down the screen wake issue.

EDIT: it is a very interesting post. I’ll have a go at flashing a gsi

Hi all, brand new to HA (but coming from Hubitat & ST) and picked up a couple of ThinkSmart Views based on this thread. I was able to flash based on @stevemann’s very helpful instructions after re-purposing a laptop and installing Ubuntu. Everything appeared to be working but my wifi on both is dying after a few hours. I’ve installed Fully Kiosk and am running a SharpTools dashboard with a couple of tiles that auto-refresh every 15 minutes. However, after a few hours the network connection dies on both devices.

Edited to add: network/wifi will come back after a restart.

Any ideas?

I’ve been trying to get the GSI images to load, and haven’t had luck. Would love to get your image and see how you did it. From what I found these units should be able to fit up to v11 (build v313) going to v12 they only provided ab images and they are too large to flash.

I can press the physical volume button on my screen, and it will go to sleep. Then it wakes up, and stays awake, until I press the physical button.

Repeat, over and over.

I use this to wake it on camera motion.

I also have this problem with my unit. Happens once every couple of days for me. I’m very interested in the newer android version ROM for both this and the screen issue. The device really IS fantastic.