Closed Bug 911121 Opened 12 years ago Closed 7 years ago

[flatfish] USB/charger detection can not work

Categories

(Firefox OS Graveyard :: Hardware, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: viralwang, Assigned: johnchang1972)

References

Details

(Whiteboard: [flatfish][TCP=breakage][POVB])

Now it can only capture the USB/charger status once when boot up, no any update in plug in/out after boot up. However, when device boot up without cable, the battery icon will never change to charing states even adb shell already connected.
Blocks: flatfish
blocking-b2g: --- → koi+
Whiteboard: [Flatfish only]
Viral, are you working on this bug? thanks
Flags: needinfo?(vwang)
Target Milestone: --- → 1.2 C3(Oct25)
Just back to office today, working on this bug from now.
Flags: needinfo?(vwang)
Assignee: nobody → vwang
uevent from usb looks fine, we can get into BatteryUpdate but the icon on status bar not always working. It can be easily found the adb still working but the status bar didn't show charging (>50%) The weird part is that it could be showing charging when we firstly plug in usb cable, but charging icon could disappear in few seconds. (adb still working) For power adapter, it will be normal most of time (>80%). Need for more analysis.
I did a mistake in last comment. uevent for android_usb is correct but not for power_supply status we will receive power_supply event but found sys/class/power_supply/battery/status met some errors it changes between "Not charging" and "Charging" in few seconds when plug in usb. For gecko, it looks like we plug in and plug out continuously with few seconds interval. it could also be the reason why screen will turn on when usb cable attached. it just looks like plug in power_supply (include usb/adapter) when screen off.
so here's the result: since USB charging can only provide 0.5A power, if the power consumption is more than 0.5A, the status will become "Not charging", after screen off, it becomes "Charging" since the power consumption is less than 0.5A. Need to consult UX team about the behaviour we expect in tablet case with USB
Depends on: 928884
Whiteboard: [Flatfish only] → [Flatfish only][POVB]
Target Milestone: 1.2 C3(Oct25) → ---
hi jeff, this should be HW issue, there should be room to fine tune the power consumption. this kind of extreme power consumption case could be only happened in come corner case
Assignee: vwang → jeff.cy.chuang
Hi John, Please take care of this bug. Thank you
Assignee: jeff.cy.chuang → johnchang1972
I did a workaround in kernel driver for flatfish, let charging/not charging uevent sent out just once when USB power plugged in. But I think this issue and 928884 issue will be a common issue on tablet products which are charging by PC or any power which current is 500mA or less. because bigger LCD need more power to light up. my suggestion is we still need to consult UX team about the behaviour we expect in tablet case with USB
Hi John, UX team has some comments on bug 928884, could you please also give us some input like shall we separate power_supply and android_usb events? we would like to treat it as different cases and do different actions in UX design. Thanks.
blocking-b2g: koi+ → 1.3+
this is POVB and related to HW. this should not block developer release. change flag to ---
blocking-b2g: 1.3+ → ---
what is POVB? and since the USB/charger detection is working faithfully, maybe just let UX to define the behavior? and depends on 928884.
Hi John, I think the USB charging issue is fixed now. Could you please help to share how it works (in technical side) and we can have more discussion with UX team? I'm guessing the gecko only get uevent when USB/cable plug in/out, and just ignore the status change part. Is that right?
Flags: needinfo?(johnchang1972)
Hi Viral, It's not really a fix, just a work around. I changed PMIC kernel driver, let uevent of battery status (charging/not charging) send out just once in each time USB/charger plug-in . so that you won't see battery status looping charging -> not charging -> charging -> not charging ......
Flags: needinfo?(johnchang1972)
Blocks: 951005
Hi Viral, is there any further discussion about this issue?
Flags: needinfo?(vwang)
Hi John, Thanks for reminding. We would like to keep the idea about separating cable event and charging event so far. But there's no a clear target to complete it yet.
Flags: needinfo?(vwang)
Whiteboard: [Flatfish only][POVB] → [Flatfish only][TCP][POVB]
The same happens with the power charger using a Firefox OS 2.0 tablet.
From my point of view, this is a UX issue as with a 10in tablet device it is very likely that the current draw for device with screen + wifi on will go over 500mA which is all a std usb port can safely supply so the question is, with the battery actually slowly being drained should the user be shown a charging icon? My personal view would be no - the battery is *discharging* not charging, so no 'charging' icon should shown even if the device is drawing current from the usb connection. But again this is a UX question - nothing to do with hardware power management.
(In reply to Maksim Lin from comment #18) > From my point of view, this is a UX issue as with a 10in tablet device it is > very likely that the current draw for device with screen + wifi on will go > over 500mA which is all a std usb port can safely supply so the question is, > with the battery actually slowly being drained should the user be shown a > charging icon? In my case, the battery is actually charging because the white part of the battery icon slowly grows, so, as the battery is charging, the icon should show so.
(In reply to Gabriela [:gaby2300] from comment #19) > In my case, the battery is actually charging because the white part of the > battery icon slowly grows, so, as the battery is charging, the icon should > show so. agree, but UX senario of charging maybe need to do some change. when USB plugged in and PMU will change state to charging, then system will wake up and turn on display to notify user it's charging now, but as Maksim Lin say, it will draw current over 500mA, when the current is not enough for charging while system is up, then charging state will change to non-charging. when system suspend, the current will be enough for charging, charging state change to charging..... you will see, this will fall into a endless loop, tablet will turn on - turn off - turn on - turn off ....., if you just put it aside so, before UX do any change, this issue should leave as it now.
What about addressing cable events? For example, there should be an indication that the tablet is connected to a usb-port . Right now, there is no way to find out if the tablet is actually hooked to a computer( unless the user explicitly chooses to use usb-storage from settings)
My personal opinion is to remove this patch since this is only a workaround not a correct solution. Please refer to https://bugzilla.mozilla.org/show_bug.cgi?id=928884#c4 Gecko and Gaia layer should be able to implement this to get the expected result.
(In reply to Sam Lin from comment #22) > My personal opinion is to remove this patch since this is only a workaround > not a correct solution. > > Please refer to https://bugzilla.mozilla.org/show_bug.cgi?id=928884#c4 > > Gecko and Gaia layer should be able to implement this to get the expected > result. agree, this issue should leave as is, workaround will remove later.
I've tested this with my laptop and my desktop computer. My desktop computer charged the tablet while my laptop didn't.
(In reply to Andrew Truong [:feer56] from comment #24) > I've tested this with my laptop and my desktop computer. My desktop computer > charged the tablet while my laptop didn't. Hi, If you want to charge your tablet, our experience does not to do it from connecting to PC, neither laptop nor desktop. The reason why is that the tablet has a PMIC inside, the PMIC will detect the charging source. That means, If you do it to your PC, the PMIC will limit the charging current which is less than 500mA. Also, If you do this to your PC, the system will keep itself awake because the adbd will need it. Hence, the charging current will not be enough for the expectation.
(In reply to John Chang from comment #23) > (In reply to Sam Lin from comment #22) > > My personal opinion is to remove this patch since this is only a workaround > > not a correct solution. > > > > Please refer to https://bugzilla.mozilla.org/show_bug.cgi?id=928884#c4 > > > > Gecko and Gaia layer should be able to implement this to get the expected > > result. > > agree, this issue should leave as is, workaround will remove later. The workaround has been removed. The updated kernel is now available in the daily/stable build images. To retrieve the images, please visit https://www.dropbox.com/sh/b2py1btcwstqldl/AABblbq_csa1IHQwdvLdfptTa. Please also note that at least both boot.img and system.img are required to be flashed (by fastboot) into the Flatfish device.
Whiteboard: [Flatfish only][TCP][POVB] → [flatfish][TCP][POVB]
hi Viral, do you mind taking a quick look and see if this bug is now fixed? thanks
Flags: needinfo?(vwang)
Whiteboard: [flatfish][TCP][POVB] → [flatfish][TCP=breakage][POVB]
no, I can reproduce it in 20140725 build.
Flags: needinfo?(vwang)
See Also: → 998254
See Also: → 928884
Firefox OS is not being worked on
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.