WeTek Community Forum

several issues (frame-drops, shutdown-hangup and app crashing but generally impressed

redchiliredchili Posts: 13WeTek Community Member
dear community,

first i'd like to send a big THANKS to everyone involved at wetek for releasing such a nice box as the core. i'm pretty new to streaming-/internetenabled-TV and after being confused which product would suit my requirements (if any) i'm lucky to have found the wetek core.

shipping was blazing fast and arrived the next day (within europe).
while i havent had the chance to fully try all the features of the core my first impressions are quite positive. the build-quality of the box and the remote are quite ok and most things have been working as expected so far but some glitches remain, which i would like to report and ask advice about here.

after receiving my core i quickly upgraded to the latest build (WeTek OS 1.0.1) via online update (through sd-card) which went without any hassle.

when connecting the core to my hifi-system i experience some annoying ground-loop interference which seems odd as both systems are connected to the same ac/ground wall-plug. i might be able to solve this by adding a ground loop isolator to my setup but havent come across this in such extent so far when i connected other devices (laptop, audio-players, ...).

what seems more annoying is that i've repeatedly seen some frame-drops (blackouts) mostly during watching video-streams but also while listening to web-radio. when these drops happen the mostly last only for a glimpse but i've also seen very few lasting for almost a second and once a blackout during daydream that didn't recover at all (until i pulled the power-chord after minutes). during these longer frame-drops i notices some fine horizontal specks being visible which reminded me a bit of an empty part on a vhs-tape back in the day ;).
any ideas what might cause these? my display related settings were:
resolution: auto (-> 1080p 60hz)
auto-frame-rate-switch: on

i've now manually set it to 1080p 50hz to see if this brings any change.

some other issue appeared during putting the core into standby which repeatedly got stuck after switching the hdmi-signal off but the blue light stays on and the core won't respond to rc-commands nor button-presses on the core itself. everything back to normal after pulling the power chord for a while until the described behaviour appears again.

the last issue that i can think of right now is that of a streaming-app crashing constantly (might not be the core's fault?). the problematic app is from schoener-fernsehen.com and has been removed from some stores due to media-mafia-lobby-pressure as it seems but can still be downloaded via http://schoener-fernsehen.com/page/downloads . note that the app has not (yet?) been declared as illegal afaik but remains in the grey-app-market-corner. i'd love to use it as it offers streaming of plenty of germanys tv-channels (and others) with a breeze at a good price-point.
this app starts initially but crashed within the first 5-20 seconds without ever displaying any stream. settings within the app are also not reachable.
any ideas what might be the problem here?


thanks for any hints and support in advance,
greetings and a happy upcoming year 2016,
red

Comments

  • wrxtasywrxtasy Posts: 1,221WeTek Community Member
    Hi, If you are viewing TV in UK, Europe, NZ and Australia, I would hard select like you have done 1080p50Hz. This will prevent a lot of un-neccessary refresh rate switching when viewing 25/50fps TV.

    As for dropouts I would suggest experimenting with a Video Cache, as found here:
    http://kodi.wiki/view/HOW-TO:Modify_the_video_cache

    I used example #4 in that link. Save this to a plain text file called advancedsettings.xml
    Next put this on to a usb stick or sd card, walk over to the Core, insert, fire up Kodi and go to:

    System > File manager > Open up the Profile Directory on the right hand side window (this is actually the Kodi userdata directory)

    In the left window find the advancedsettings.xml file, now hit the Context button on the Remote control (under power button) and copy the file.
    Shutdown Kodi, and from this point on you may find smoother audio and video playback. :)
  • redchiliredchili Posts: 13WeTek Community Member
    cheers wrxtasy

    and thanks for that hint/link which i'll try soon.

    note that the temporary loss of the image (frame-drop/blackout) feels more like a hdmi-related issue than a caching one. forgive me for not pointing it out more clearly but what i also referred to a short temporary loss of the image also during listening to web-radio (while the sound plays uninterrupted).

    so whats still open from my side would be
    - the shutdown-issues described
    - constant crashing of schoener-fernsehen.com app (maybe its the apps fault but it would be interesting to see if others experience the same behaviour).

    greez,
    red
  • wrxtasywrxtasy Posts: 1,221WeTek Community Member
    Yes loss of Image and black screens is definitely a HDMI socket and/or cable related issue. Check all the connectors for debris. With digital displays they are either ON or OFF, there is no in between.

    For Shutdown issues, check the Android HDMI CEC settings. I've been having issues with the Core turning the TV back on again when I turn it off.
    I had to disable the HDMI TV On function in the TV's own settings to stop this from happening.

    This happens with all my AMLogic devices, its a common AMLogic HDMI CEC thing.
  • harenharen Posts: 97WeTek Community Member
    Regarding the app redchili posted, here is a log
    http://pastebin.com/kNwCc3v2
  • redchiliredchili Posts: 13WeTek Community Member
    some updates regarding my issues:
    redchili wrote: »
    [...]when connecting the core to my hifi-system i experience some annoying ground-loop interference which seems odd as both systems are connected to the same ac/ground wall-plug.[...]
    while the annoying groud-loop remains i've noticed that it is hardly noticeable if i pull the hdmi-cable out of the display which seems odd as no audio-signals over hdmi are being used. is there a setting to turn off audio-through-hdmi and might this help to reduce the ground-loop interference further?
    wrxtasy wrote: »
    Yes loss of Image and black screens is definitely a HDMI socket and/or cable related issue. Check all the connectors for debris. [...]
    connectors checked/clean without improvement until i replaced the hdmi-cable that came with the core by a spare quality hdmi-cable. no screen-flickering since then noticed icon_e_smile.gif seems the included cable is maybe not the most reliable type. confused.png
    wrxtasy wrote: »
    For Shutdown issues, check the Android HDMI CEC settings. [...]
    my shutdown issues seem to have another cause as i've tried to disable, re-enable and re-disable the CEC settings (my display doesn't have any setting for this) without bringing any change.
    but i noticed that the shutdown-issue is reproducible in the following ways:
    - play some audio-webstream through tune-in radio app and either pause or let the stream run while hitting the home-button on the remote followed by a long press on the remote's power-button followed by selecting 'shutdown' and confirming with 'ok'. the display then turns off but the core will stay active and hitting power again will bring back the launcher fully working.
    - play some tv-stream through kodi and hit the home-button on the remote followed by a long press on the remote's power-button followed by selecting 'shutdown' and confirming with 'ok'. same behaviour as above.

    maybe i have a different understanding of 'shutdown' but it seems that as long as there is some media-app active (although sent to background) a shutdown won't kill the app but only turn off the display.
    i would expect and value such behaviour on a short press on the power button to turn of the display if not needed (e.g. listening to web-radio) but on all operating systems i've worked with so far a shutdown command involves the killing of all running processes before shutting the system down.
    so i wonder: is this behaviour intended?
    haren wrote: »
    Regarding the app redchili posted, here is a log
    http://pastebin.com/kNwCc3v2
    thanks for the log, haren... any idea what to do with it? while i'm familiar with programming in general i must admit i don't have any decent knowledge of android-specific java programming.

    besides the issues described i am still very fond of the wetek core and consider it a highly recommendable product!

    cheers everyone,
    red
  • wrxtasywrxtasy Posts: 1,221WeTek Community Member
    Getting there it seems :)

    TIP: Hold down the 'Home" button (under microphone) to bring up the Active Apps screen. Then activate the Airmouse and Kill all Running Apps by pressing the X at the bottom of the screen.

    Its damn tricky with the Air Mouse I find, to activate it and hit the X first go.

    Now you should be able to power down without any problems.

    Feature request to Christian Troy regarding this. A simple little App called "Kill Em All" would be nice to easily accomplish this with the D-Pad and OK button and then shutdown the Core in sequence as well.

    Maybe there is an App or something on the Google Play Store already to do this.

  • redchiliredchili Posts: 13WeTek Community Member
    wrxtasy wrote:
    Getting there it seems :)
    yep, step by step.
    wrxtasy wrote:
    TIP: Hold down the 'Home" button (under microphone) to bring up the Active Apps screen. Then activate the Airmouse and Kill all Running Apps by pressing the X at the bottom of the screen.
    thanks! i figured that out already but to be honest, thats a no go for a simple task as turning of a device imho.
    i'd rather pull the dc-plug (i know, not recommended...) before i browse through the recent-apps list and kill every app that might keep the core from shutting down properly.

    what made me wonder is that i can't recall having seen such behaviour on any other android device (mostly mobile phones and tablets) i've had in my hands. those seem to simply kill all processes if 'shutdown' is selected.
    it might be a feature that was built into weteks firmware but i'm really wondering what the intended use-case may be for such behaviour.
    as stated before, having a quick way to just turn off a display while leaving background tasks running is a good idea but 'shutdown' should really shut the system down.
    wrxtasy wrote:
    Feature request to Christian Troy regarding this. A simple little App called "Kill Em All" would be nice to easily accomplish this with the D-Pad and OK button and then shutdown the Core in sequence as well.

    Maybe there is an App or something on the Google Play Store already to do this.

    i second that feature request but would additionally see that 'app' hard-linked in the power-off menu (long press on power-button, among 'restart' and 'shutdown') as 'kill all processes + shutdown' or 'real shutdown' as it seems a little unfortunate having to launch an app in order to bring a device down usability-wise to me.

    anyway, thanks a bunch for looking into this and helping me!
  • ChristianTroyChristianTroy Posts: 1,913WeTek Community Member, Developers
    You cannot call a task killer while shutting down, you should try to avoid rogue apps or turn them off properly because it's a bug of the app if it leaks a wakelock :)
  • zehnmzehnm Posts: 19WeTek Community Member
    I also vote again (and the last time ;-) for the force-shutdown feature. End users don't care about non-properly behaving apps. Android phones and tablets also just power off (at least mine).
    In the meantime I'll try to program a shutdown sequence on my Harmony remote to shutdown as many running apps as possible. Something like: long press HOME, 5 x DEL, POWER OFF
  • ChristianTroyChristianTroy Posts: 1,913WeTek Community Member, Developers
    What you are asking is not possible because unlike phone and tablets the shutdown is not a shutdown but just a trigger to screen off and then the kernel shuts it down, it's how it works on Amlogic.
    And the kernel to turn the device off must have no wake locks. And wake lock cannot be disabled because are needed. It's the offending app that must be fixed. It's the last time I say something about this ;)
  • redchiliredchili Posts: 13WeTek Community Member
    You cannot call a task killer while shutting down, you should try to avoid rogue apps or turn them off properly because it's a bug of the app if it leaks a wakelock :)
    I really do appreciate your efforts and outstanding support around the wetek core but blaming all sorts od other apps isn't going to do it for most users if you ask me.

    I'll need to re-test this but out of the top of my head I rememer also Kodi behaving in that way rendering it to a rogue app that is delivered with the core according to your definition.

    The shutdown issue is somewhat annoying but I guess I could live with it and work around the issue by pulling the power-chord but i'd really vote that that if 'shutdown' doesn't shutdown the system reliably it shouldn't be called shutdown for the sake of usability just as a fire-exit shouldn't be labeled fire-exit if you can't exit through it if there is a light turned on somewhere.

    As mentioned earlier, the screen-off functionality is something I consider useful but its misleading having to select shutdown in order to just turn of the screen imho.

    And of course these are details but take it serious or laugh about it, I as a user was quite confused by this behaviour.

    Still, thanks for joining the discussion and enlightening us about the (amlogic-specific) backgrounds of this issue!
  • wrxtasywrxtasy Posts: 1,221WeTek Community Member
    DO NOT go about pulling the Power Cord to shutdown the Core. That is a very good way to go about corrupting NAND memory or worse causing possible DRM issues. :(

    Would you yank a power cord out of a PC to shut it down ? NO. Same applies here.

    Use the proper method I have already given you to kill all Apps and then use proper Power shutdown method.
  • redchiliredchili Posts: 13WeTek Community Member
    wrxtasy wrote: »
    DO NOT go about pulling the Power Cord to shutdown the Core. That is a very good way to go about corrupting NAND memory or worse causing possible DRM issues. :(
    Thanks for the warning, I'm sorry to hear that there is obviously NO simple reliable and safe method to shut this device down.
    wrxtasy wrote: »
    Would you yank a power cord out of a PC to shut it down ? NO. Same applies here.
    Indeed I wouldn't do that with a PC but on a PC all running processes were killed on all OS i've ever used if i send a shutdown signal so such a rogue measure wouldn't be needed.
    Luckily, there is warranty ;)
    wrxtasy wrote: »
    Use the proper method I have already given you to kill all Apps and then use proper Power shutdown method.
    No offense but as Christian also indirectly confirmed 'proper Power shutdown method' is merely a turn-the-display-off-method that IMHO doesn't deserve to be called anything related to 'shutdown' as stated before.
    Guess you referring to the tip you gave in Post #7 of killing every app by using the airmouse one by one which seems to work but is a real hassle having to go through every time one want's to do a simple thing as turning off the core!?! I mean... there is even a dedicated button on both, remote and core itself which one would likely expect to do what it proclaims.

    Please forgive me for not shutting up and likely being somewhat provocative, this it not against you or your viewpoint but only my personal impression on that matter that i'd like to discuss here in order to find a possible solution.

    So back to a more solution-oriented approach: AFAIK there are 2 general types of wakelocks, partial ones and full ones.
    A good way to find out about apps that currently have wakelocks registered could be wakelockdetector by uzumapps (https://play.google.com/store/apps/d...kelockdetector). Sadly, this app seems not to be able to kill all (non-system) apps that have wakelocks registered by a simple click and i (yet) haven't found one that does.
    There are some reboot-apps some of which also offer a system shutdown but that likely triggers just the same screen-off that is already triggert through the power-button...

    Any ideas/hints welcome...
  • ChristianTroyChristianTroy Posts: 1,913WeTek Community Member, Developers
    when the display turns off the kernel and the bootloader perform the shutdown IF there is any app holding a wake lock so it's a shutdown but done internally by kernel and u-boot.

    Android is not dumb and if an app leaks a wakelock after it dies it removes the wakelock notifying something like "wakelock finalized without being released" so if you just let it there and wait if will go to sleep.

    There's always the Apple method "you're not holding it properly" aka turning the led red when the display goes off but I'd never do something like that because I wanna know for sure if I can unplug it safely without risking corruptions
  • redchiliredchili Posts: 13WeTek Community Member
    @Christian: Guess i understood your first line (not sure about line 2 and 3, see below...) but wonder why the kernel (and the bootloader) have no timeout for sigkill-ing unresponsive or wakelocking processes and get therefore obviously stuck in the shutdown-process.

    Do you mean by 'so if you just let it there and wait if will go to sleep' that one just needs to wait until some android-scheduler clears any left-over wakelocks without the need to manually kill all background-apps first???

    Regarding 'turning the LED red' : I fully agree that the color of the light doesn't matter as much as state of the system does and therefore the light should only signal 'standby' (or 'off') if the system is really in that state. Is that what you meant?

    Its (slowly) dawning on me that you may mean that the shutdown-process is in general polite enough to wait (forever if it needs to) for all tasks to end in order to not corrupt anything (say a download happening in the background). Is my understanding correct on this?
  • ChristianTroyChristianTroy Posts: 1,913WeTek Community Member, Developers
    because it's how wake lock works, you cannot know if it's been hold awake because it is doing some very important stuff (think about an app that is writing to a database, you free its wakelock and you corrupt the file, or play store doing background updates of the apps)

    the shutdown waits until all the wakelocks are cleared, in fact if you type from telnet "echo DoNotSleep > /sys/power/wake_lock" the device will never sleep until you remove that "DoNotSleep" wakelock
  • wrxtasywrxtasy Posts: 1,221WeTek Community Member
    TIP: You do not have to Kill Apps one by one hitting each X in the Top Right hand corner. The is an "X" middle bottom of the screen, for bulk slaughtering of running Apps !
  • ssh_errorssh_error Posts: 82WeTek Community Member
    wrxtasy wrote: »
    TIP: You do not have to Kill Apps one by one hitting each X in the Top Right hand corner. The is an "X" middle bottom of the screen, for bulk slaughtering of running Apps !

    I didn't know about that one. Thanks!
  • wrxtasywrxtasy Posts: 1,221WeTek Community Member
    It really is not that hard at all. Slaughter All running Apps if you are having issues, then short press of Power Button and Shutdown. Job done.

    That is Two extra remote button presses and only if you are having shutdown problems in the first place.
    I cannot be bothered with all that as the Core is such a low power consumption device, I just leave it on 24/7.
  • redchiliredchili Posts: 13WeTek Community Member
    because it's how wake lock works, you cannot know if it's been hold awake because it is doing some very important stuff (think about an app that is writing to a database, you free its wakelock and you corrupt the file, or play store doing background updates of the apps)

    the shutdown waits until all the wakelocks are cleared,[...]
    of course the wakelock mechanism doesn't provide any info for the reasons the wakelocks are held. So to clarify, by '[...]so if you just let it there and wait if will go to sleep' you didn't mean that one (user) just needs to wait until some android-scheduler clears any left-over wakelocks without the need to manually kill all background-apps before the device will finally shut down, right?
    [ ] yes [ ] no


    wrxtasy, thanks for the shortcut; I'll try and see, guess if i can avoid the airmouse to hit the bottom X and navigate there through simple button-presses i guess that should do.
    wrxtasy wrote: »
    [...]I cannot be bothered with all that as the Core is such a low power consumption device, I just leave it on 24/7.
    that may work for your specific setup but even if i'm not worried about the power-consumption of the core it wouldn't work in my case as my nas won't go to sleep if the core is still (passively) connected to it leading to annoying and unnecessary LED-blinking and fan-noise.
    Anyway, I'll try and see.
  • ChristianTroyChristianTroy Posts: 1,913WeTek Community Member, Developers
    no, but a properly written app won't hold a wakelock forever, if it does it's really a broken app!
  • redchiliredchili Posts: 13WeTek Community Member
    no, but a properly written app won't hold a wakelock forever, if it does it's really a broken app!
    hmmm, i partially agree ... but how does the app know it should release the wakelock because the system wants to shut down if its e.g. happily playing some web-radio stream while being sent to background (as i've written in post #6).

    for the sake of understanding let me paint a picture with this:
    as long as the system is on and say the user is watching some stored images its desired that the background app holds its lock to my understanding.

    now someone rings the doorbell and wants to pick me up so i'd like to turn off core + tv + sound + nas while being away and hit the remote's powerbutton to straight forward achieve my goal of having all devices shut down.

    would the app get notified by the kernel that it wants it to stop?
    as you probably figure i'm not too familiar with android-specific internals but i learned from other OSs that they use some clever signalling to either gracefully or (supposedly after some timeout) forcefully end all running processes.

    again, thanks for sharing your knowledge here, much appreciated!
  • ChristianTroyChristianTroy Posts: 1,913WeTek Community Member, Developers
    The app releases its wake lock when it has accomplished its task, it's part of the whole wake lock mechanism prevent the standby (or deep sleep on phones/tablets) to let it end that task.

    It's the same as when on Android phone the device does not enter deep sleep and you see marked it as "Active" in battery settings. On Amlogic TV boxes there is not shutdown, there is only standby (similar to deep sleep) states.

    What you ask depend on the app, let's make an example with Kodi: the way it is right now, it is not answering to a broadcast message that the device sends (called ACTION_SCREEN_OFF) that will be sent when the screen is turned off and any app in the foreground (because only system apps can receive that intent when are in the background) should stop what is doing and free the resources. Well Kodi ignores it and keeps playing, I notified it pointing them to my patch included in the modified Kodi posted in the pinned thread that fixes this behavior but I don't know if it will be included or not.
    This does not happen if you use an app that uses MediaPlayer APIs for playing a file because it's the system that already takes care of this (example turn off the device while using MX Player or the freshly posted WeTv)

    When you call the real shutdown it doesn't matter if any wake lock is pending because the device is being turned off for good. These TV boxes don't have a PMU so if you call the real shutdown in the default/stock implementation, it reboots once it has reached the state where the os says "hey dude, you can turn off now", commenting out that part in the kernel freezes the box, like the old PCs where you were seeing "You can turn off your computer now" because there was no ACPI back in time that was handling it, here is the same, and the very same reason why the device turns on when you plug the ac power cord in and you can't modify this behavior (or you could not turn it on at all)
Sign In or Register to comment.
© Copyright 2014 - Creative Dreams | Powered by Vanilla
All times are UTC