Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Ascend G300 - camera not working and scaling UI

150 views
Skip to first unread message

orl...@gmail.com

unread,
Aug 21, 2013, 7:23:57 AM8/21/13
to
Hello guys, i am trying to port ascend g300 to firefox os, but i have problem with video and camera.

there is adb logcat log: http://pastebin.com/PQNwteVa

second problem what i have is, that UI is too small...I am using 1.1.0hd branches of gaia and gecko and i have in .userconfig:

export HIDPI=1
export GAIA_OPTIMIZE=1
export GAIA_DEV_PIXELS_PER_PX=2
export NOFTU=1
export PRODUCTION=1


Am I missing something?

BTW: If there is any useful export command, you can of course give me some advice about it :)

thx for answers!

Alexandre Lissy

unread,
Aug 21, 2013, 7:48:48 AM8/21/13
to dev...@lists.mozilla.org
Le 21/08/2013 13:23, orl...@gmail.com a écrit :
> Hello guys, i am trying to port ascend g300 to firefox os, but i have problem with video and camera.
>
> there is adb logcat log: http://pastebin.com/PQNwteVa

Gecko segfaults, what is the "problem" that you are seeing ?

>
> second problem what i have is, that UI is too small...I am using 1.1.0hd branches of gaia and gecko and i have in .userconfig:
>
> export HIDPI=1
> export GAIA_OPTIMIZE=1
> export GAIA_DEV_PIXELS_PER_PX=2
> export NOFTU=1
> export PRODUCTION=1

HIDPI is not used anymore.

According to http://www.gsmarena.com/huawei_ascend_g300-4594.php, this
device is 233ppi, like Nexus S. So you should be using
GAIA_DEV_PIXELS_PER_PX=1.5

GAIA_OPTIMIZE is already enabled in production mode.

>
>
> Am I missing something?
>
> BTW: If there is any useful export command, you can of course give me some advice about it :)
>
> thx for answers!
> _______________________________________________
> dev-b2g mailing list
> dev...@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-b2g
>

orl...@gmail.com

unread,
Aug 21, 2013, 8:04:49 AM8/21/13
to
Dne středa, 21. srpna 2013 13:48:48 UTC+2 Alexandre Lissy napsal(a):
Problem is crashing camera and video player after launch

It looks like this bug: https://bugzilla.mozilla.org/show_bug.cgi?id=882481

an

unread,
Aug 21, 2013, 9:51:13 AM8/21/13
to
I've used 'export GAIA_DEV_PIXELS_PER_PX=1.5' on that phone with no effect (the device is 240dpi). My only solution to have decent UI was to change the font size from 10 to 14 or 16px in all system apps. The icons are still small but the UI looks a lot better and is usable. The more burning issues that I found with that device were the power button not waking up the phone and too low sound level. I used the port on Modaco.com with v1.1.0hd gaia and gecko.
Hope someone finds some fixes for these soon otherwise I may just buy a ZTE Open on Ebay :)

orl...@gmail.com

unread,
Aug 21, 2013, 10:13:43 AM8/21/13
to
Dne středa, 21. srpna 2013 15:51:13 UTC+2 an napsal(a):
Yeah I am using forked Dazzozo b2g and manifests, changing font-size was mine idea at modaco :P

I think there must me something what we overlooked, when nexus etc, have UI scaled...

Btw: I didn't have problem with waking phone or low sound level

Alexandre Lissy

unread,
Aug 21, 2013, 10:17:32 AM8/21/13
to dev...@lists.mozilla.org
> Yeah I am using forked Dazzozo b2g and manifests, changing font-size was mine idea at modaco :P
>
> I think there must me something what we overlooked, when nexus etc, have UI scaled...
>
> Btw: I didn't have problem with waking phone or low sound level

Can you test with master ? I did not checked gecko-18 with HD since at
least two weeks on Nexus S: latest successfull HEAD I can recommend for
gecko 18 with HD (v1.1.0hd) is bfb440d5c23e7c7a97eb906136808f0d2b783d73.

orl...@gmail.com

unread,
Aug 22, 2013, 5:36:57 AM8/22/13
to
Dne středa, 21. srpna 2013 16:17:32 UTC+2 Alexandre Lissy napsal(a):
Result is exactly same as before, except of performance, mobile seems slower than before. So what can I do for track this issue?

Alexandre Lissy

unread,
Aug 22, 2013, 5:41:21 AM8/22/13
to dev...@lists.mozilla.org
I'm starting to wonder what problem you exactly have. Could you post
pictures ?

orl...@gmail.com

unread,
Aug 22, 2013, 6:03:43 AM8/22/13
to

Alexandre Lissy

unread,
Aug 22, 2013, 6:08:22 AM8/22/13
to dev...@lists.mozilla.org
No, it's not good, you are right.

Could you check the behavior of
https://mxr.mozilla.org/mozilla-central/source/widget/gonk/nsWindow.cpp#538
? Using gdb or printf, whether what suits you best.

In your case, you should go through the 1.5 case.

Alexandre Lissy

unread,
Aug 22, 2013, 6:13:24 AM8/22/13
to dev...@lists.mozilla.org
> No, it's not good, you are right.
>
> Could you check the behavior of
> https://mxr.mozilla.org/mozilla-central/source/widget/gonk/nsWindow.cpp#538
> ? Using gdb or printf, whether what suits you best.

printf_stderr() + adb logcat I meant

>
> In your case, you should go through the 1.5 case.
>

orl...@gmail.com

unread,
Aug 22, 2013, 6:22:14 AM8/22/13
to
Dne čtvrtek, 22. srpna 2013 12:13:24 UTC+2 Alexandre Lissy napsal(a):
Can you please be little specific? I am not familiar with gdb or adb logcat with printf_stderr(), thanks

Alexandre Lissy

unread,
Aug 22, 2013, 6:26:32 AM8/22/13
to dev...@lists.mozilla.org
Le 22/08/2013 12:22, orl...@gmail.com a écrit :
>
> Can you please be little specific? I am not familiar with gdb or adb logcat with printf_stderr(), thanks

What's the result of the function, mainly.

orl...@gmail.com

unread,
Aug 22, 2013, 6:31:08 AM8/22/13
to
Dne čtvrtek, 22. srpna 2013 12:26:32 UTC+2 Alexandre Lissy napsal(a):
> Le 22/08/2013 12:22, orl...@gmail.com a écrit :
>
> >
>
> > Can you please be little specific? I am not familiar with gdb or adb logcat with printf_stderr(), thanks
>
>
>
> What's the result of the function, mainly.

well it's impossible for me to do it with gdb so i tried

mihairu@lois:~/GIT/B2G$ adb logcat | grep dpi
I/msm7x27a.gralloc( 103): width = 76 mm (160.421051 dpi)
I/msm7x27a.gralloc( 103): height = 127 mm (160.000000 dpi)

anything else is out of my knowledge :)

Alexandre Lissy

unread,
Aug 22, 2013, 6:36:37 AM8/22/13
to dev...@lists.mozilla.org
If this is what gecko reads too, then no wonder why it fails. Is it the
real size of your screen ?

>
> anything else is out of my knowledge :)

Can't you just add some printf_stderr() statements ?!

Alexandre Lissy

unread,
Aug 22, 2013, 6:43:18 AM8/22/13
to dev...@lists.mozilla.org
Le 22/08/2013 12:31, orl...@gmail.com a écrit :
Could you grep on "msm7x27a.gralloc" instead ?

>
> anything else is out of my knowledge :)

orl...@gmail.com

unread,
Aug 22, 2013, 6:58:12 AM8/22/13
to
Dne čtvrtek, 22. srpna 2013 12:43:18 UTC+2 Alexandre Lissy napsal(a):
mihairu@lois:~/GIT/B2G$ adb logcat | grep msm7x27a.gralloc
E/msm7x27a.gralloc( 103): We support 3 buffers
I/msm7x27a.gralloc( 103): using (fd=14)
I/msm7x27a.gralloc( 103): id = msmfb30_90000
I/msm7x27a.gralloc( 103): xres = 480 px
I/msm7x27a.gralloc( 103): yres = 800 px
I/msm7x27a.gralloc( 103): xres_virtual = 480 px
I/msm7x27a.gralloc( 103): yres_virtual = 2400 px
I/msm7x27a.gralloc( 103): bpp = 32
I/msm7x27a.gralloc( 103): r = 24:8
I/msm7x27a.gralloc( 103): g = 16:8
I/msm7x27a.gralloc( 103): b = 8:8
I/msm7x27a.gralloc( 103): width = 76 mm (160.421051 dpi)
I/msm7x27a.gralloc( 103): height = 127 mm (160.000000 dpi)
I/msm7x27a.gralloc( 103): refresh rate = 60.00 Hz

Alexandre Lissy

unread,
Aug 22, 2013, 7:07:38 AM8/22/13
to dev...@lists.mozilla.org
Le 22/08/2013 12:58, orl...@gmail.com a écrit :
> mihairu@lois:~/GIT/B2G$ adb logcat | grep msm7x27a.gralloc
> E/msm7x27a.gralloc( 103): We support 3 buffers
> I/msm7x27a.gralloc( 103): using (fd=14)
> I/msm7x27a.gralloc( 103): id = msmfb30_90000
> I/msm7x27a.gralloc( 103): xres = 480 px
> I/msm7x27a.gralloc( 103): yres = 800 px
> I/msm7x27a.gralloc( 103): xres_virtual = 480 px
> I/msm7x27a.gralloc( 103): yres_virtual = 2400 px
> I/msm7x27a.gralloc( 103): bpp = 32
> I/msm7x27a.gralloc( 103): r = 24:8
> I/msm7x27a.gralloc( 103): g = 16:8
> I/msm7x27a.gralloc( 103): b = 8:8
> I/msm7x27a.gralloc( 103): width = 76 mm (160.421051 dpi)
> I/msm7x27a.gralloc( 103): height = 127 mm (160.000000 dpi)
> I/msm7x27a.gralloc( 103): refresh rate = 60.00 Hz

according to http://www.gsmarena.com/huawei_ascend_g300-4594.php,
Dimensions 122.5 x 63 x 10.5 mm (4.82 x 2.48 x 0.41 in)

So how could we have a screen that is 76mm on a 63mm device ?

Check line 223 of
https://android.googlesource.com/platform/hardware/libhardware/+/froyo/modules/gralloc/framebuffer.cpp

I think you are falling into this case. Can you check:
adb shell ls -al /system/lib/hw/hwcomposer*.so

And also provide the full adb logcat log. I'd suspect hwcomposer is not
working in your case (disabled or because it is HWC1.0).

If that's the case, then you could just hack the nsWindow.cpp code I
linked earlier, and force the return value of 1.5. If you can try it
asap, that would help confirming the issue.

orl...@gmail.com

unread,
Aug 22, 2013, 7:30:06 AM8/22/13
to
Dne čtvrtek, 22. srpna 2013 13:07:38 UTC+2 Alexandre Lissy napsal(a):
logcat: https://docs.google.com/file/d/0B-IujfCUmgOwYkg3MFp0M1VlR1U/edit?usp=sharing

$ adb shell ls -al /system/lib/hw/hwcomposer*.so
-rw-r--r-- root root 14148 2013-08-22 09:33 hwcomposer.msm7x27a.so

i try to hardcode 1.5 value...

Michal Orlík

unread,
Aug 22, 2013, 7:32:39 AM8/22/13
to
Dne čtvrtek, 22. srpna 2013 13:07:38 UTC+2 Alexandre Lissy napsal(a):
$ adb shell ls -al /system/lib/hw/hwcomposer*.so
-rw-r--r-- root root 14148 2013-08-22 09:33 hwcomposer.msm7x27a.so

logcat log: https://docs.google.com/file/d/0B-IujfCUmgOwYkg3MFp0M1VlR1U/edit?usp=sharing

I will try compile with hardcoded 1.5 value

Alexandre Lissy

unread,
Aug 22, 2013, 7:37:37 AM8/22/13
to dev...@lists.mozilla.org
It does not looks like this is the full logcat from the boot.

>
> I will try compile with hardcoded 1.5 value

Michal Orlík

unread,
Aug 22, 2013, 7:55:52 AM8/22/13
to
Dne čtvrtek, 22. srpna 2013 13:37:37 UTC+2 Alexandre Lissy napsal(a):
https://docs.google.com/file/d/0B-IujfCUmgOwcVphaVoyS2dSNjQ/edit?usp=sharing

Michal Orlík

unread,
Aug 22, 2013, 7:57:45 AM8/22/13
to
Dne čtvrtek, 22. srpna 2013 13:55:52 UTC+2 Michal Orlík napsal(a):
It should be...I did adb reboot and then adb logcat to file

Michal Orlík

unread,
Aug 22, 2013, 8:54:16 AM8/22/13
to
Dne čtvrtek, 22. srpna 2013 13:57:45 UTC+2 Michal Orlík napsal(a):
hardcoded it works awesome...could be camera issue related to this too? its video driver problem i assume.

Alexandre Lissy

unread,
Aug 22, 2013, 8:57:21 AM8/22/13
to dev...@lists.mozilla.org
Le 22/08/2013 14:54, Michal Orlík a écrit :
>> It should be...I did adb reboot and then adb logcat to file
>
> hardcoded it works awesome...could be camera issue related to this too? its video driver problem i assume.

What's the issue with the camera ?

Are you using ICS or JellyBean ?

Michal Orlík

unread,
Aug 22, 2013, 8:59:25 AM8/22/13
to
Dne čtvrtek, 22. srpna 2013 14:57:21 UTC+2 Alexandre Lissy napsal(a):
> Le 22/08/2013 14:54, Michal Orl�k a �crit :
>
> >> It should be...I did adb reboot and then adb logcat to file
>
> >
>
> > hardcoded it works awesome...could be camera issue related to this too? its video driver problem i assume.
>
>
>
> What's the issue with the camera ?
>
>
>
> Are you using ICS or JellyBean ?

I am using ICS base...well camera shutdown after launch, same is with video player, first logcat in first post here is with camera error

Alexandre Lissy

unread,
Aug 22, 2013, 9:02:53 AM8/22/13
to dev...@lists.mozilla.org
I don't think it's related, and I don't see any trace of crash of the
camera in the logs. You'll have to investigate where it comes from.

Vadim Rutkovsky

unread,
Aug 22, 2013, 1:22:39 PM8/22/13
to Alexandre Lissy, dev...@lists.mozilla.org
Hi guys,

2013/8/22 Alexandre Lissy <ali...@mozilla.com>

> > I am using ICS base...well camera shutdown after launch, same is with
> video player, first logcat in first post here is with camera error
>
> I don't think it's related, and I don't see any trace of crash of the
> camera in the logs. You'll have to investigate where it comes from.
>
Here's the adb output I've got after camera app has crashed -
http://pastebin.com/Bxb9cAiC. Buttons are displayed, but preview doesn't
show up

--
Vadim Rutkovsky

Alexandre Lissy

unread,
Aug 22, 2013, 2:44:39 PM8/22/13
to Vadim Rutkovsky, dev...@lists.mozilla.org
Le 22/08/2013 19:22, Vadim Rutkovsky a écrit :
> Hi guys,
>
> 2013/8/22 Alexandre Lissy <ali...@mozilla.com <mailto:ali...@mozilla.com>>
>
> > I am using ICS base...well camera shutdown after launch, same is
> with video player, first logcat in first post here is with camera error
>
> I don't think it's related, and I don't see any trace of crash of the
> camera in the logs. You'll have to investigate where it comes from.
>
> Here's the adb output I've got after camera app has crashed -
> http://pastebin.com/Bxb9cAiC. Buttons are displayed, but preview doesn't
> show up

Thanks, looks like the same issue I reproduce on gecko master with at
least Inari, so it's not related to your Ascend work :)

>
> --
> Vadim Rutkovsky

sontu...@gmail.com

unread,
Nov 28, 2013, 1:44:04 AM11/28/13
to
Hi, I am testing camera on APC Rock 8950, but cannot get camera preview from USB Webcam. I got this log which suggests something related to camera size.
===========================================
W/CameraHardware( 409):
W/CameraHardware( 409): start waiting ..........
I/AwesomePlayer( 409): setDataSource_l('/system/media/audio/ui/VideoRecord.ogg')
W/CameraFactory( 409): camera_get_camera_info: id = 0
W/CameraHardware( 409): setPreviewWindow: current: 0x0 -> new: 0xca0988
E/GeckoConsole( 318): Content JS ERROR at app://camera.gaiamobile.org/gaia_build_defer_index.js:77 in Camera.selectThumbnailSize: Error while selecting thumbnail size. There are no thumbnail sizes that match the ratio of the selected picture size: {"width":640,"height":480}
W/V4L2Camera( 409):
W/V4L2Camera( 409):
W/V4L2Camera( 409): V4L2Camera::setCameraid = 196609
W/CameraHardware( 409): int android::CameraHardware::inPreviewThread(): return from wait
F/libc ( 409): Fatal signal 11 (SIGSEGV) at 0x40fc0c00 (code=1)
I/DEBUG ( 75): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
I/DEBUG ( 75): Build fingerprint: 'unknown'
I/DEBUG ( 75): pid: 409, tid: 497 >>> /system/bin/mediaserver <<<
I/DEBUG ( 75): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 40fc0c00

===========================================

You guy have any idea? This is result of command: adb shell logcat | grep .gralloc . I am using Gaia tablet version.
============================================
I/gralloc ( 71): wmt.gralloc.param=[16]
I/gralloc ( 71): using (fd=12)
I/gralloc ( 71): id = gefb
I/gralloc ( 71): xres = 1280 px
I/gralloc ( 71): yres = 720 px
I/gralloc ( 71): xres_virtual = 1280 px
I/gralloc ( 71): yres_virtual = 2160 px
I/gralloc ( 71): bpp = 16
I/gralloc ( 71): r = 11:5
I/gralloc ( 71): g = 5:6
I/gralloc ( 71): b = 0:5
I/gralloc ( 71): width = 203 mm (160.157639 dpi)
I/gralloc ( 71): height = 114 mm (160.421051 dpi)
I/gralloc ( 71): refresh rate = 59.95 Hz
============================================

Thanks.

Sotaro Ikeda

unread,
Nov 28, 2013, 12:30:12 PM11/28/13
to sontu...@gmail.com, dev...@lists.mozilla.org
Hi

B2G's camera expect android camera hal. From the following error log, the USB Webcam seems not support android camera hal.

>E/GeckoConsole( 318): Content JS ERROR at app://camera.gaiamobile.org/gaia_build_defer_index.js:77 in Camera.selectThumbnailSize: Error while selecting thumbnail size. There are no thumbnail sizes that match the ratio of the selected picture size: {"width":640,"height":480}

sotaro

sontu...@gmail.com

unread,
Nov 28, 2013, 10:57:22 PM11/28/13
to
Hi Sotaro Ikeda,
Sorry, I'm not really understand. What do mean by saying "android camera hal"? Is that libcamera_client and libcameraservice of Android or lib camera hal from vendor?
Could you more clarify on this too :"the USB Webcam seems not support android camera hal"

Many thanks.

Sotaro Ikeda

unread,
Nov 29, 2013, 2:23:41 PM11/29/13
to sontu...@gmail.com, dev...@lists.mozilla.org

I mean "camera hal from vendor". You can check the camera hal's position in the following diagaram.
https://github.com/sotaroikeda/firefox-diagrams/blob/master/dom/dom_camera_FirefoxOS_1_1.pdf?raw=true

The following is a link to another diagrams.
https://github.com/sotaroikeda/firefox-diagrams/wiki/Firefox-Diagrams


I re-read your log. From the following, android media server seems crashed because of segmentation fault after CameraHardware::inPreviewThread() was called.
At first, you might better to analyze it like using GDB.

> W/CameraHardware( 409): int android::CameraHardware::inPreviewThread(): return from wait
> F/libc ( 409): Fatal signal 11 (SIGSEGV) at 0x40fc0c00 (code=1)
> I/DEBUG ( 75): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
> I/DEBUG ( 75): Build fingerprint: 'unknown'
> I/DEBUG ( 75): pid: 409, tid: 497 >>> /system/bin/mediaserver <<<
> I/DEBUG ( 75): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 40fc0c00

sotaro

----- Original Message -----
From: sontu...@gmail.com
To: dev...@lists.mozilla.org
Sent: Thursday, November 28, 2013 10:57:22 PM
Subject: Re: [b2g] Ascend G300 - camera not working and scaling UI

Philip Wright

unread,
Dec 1, 2013, 5:06:15 PM12/1/13
to
On Wednesday, 21 August 2013 12:23:57 UTC+1, Michal Orlík wrote:
> Hello guys, i am trying to port ascend g300 to firefox os, but i have problem with video and camera.
>
>
>
> there is adb logcat log: http://pastebin.com/PQNwteVa
>
>
>
> second problem what i have is, that UI is too small...I am using 1.1.0hd branches of gaia and gecko and i have in .userconfig:
>
>
>
> export HIDPI=1
>
> export GAIA_OPTIMIZE=1
>
> export GAIA_DEV_PIXELS_PER_PX=2
>
> export NOFTU=1
>
> export PRODUCTION=1
>
>
>
>
>
> Am I missing something?
>
>
>
> BTW: If there is any useful export command, you can of course give me some advice about it :)
>
>
>
> thx for answers!

Hi,

It may be worth looking here: http://www.modaco.com/topic/359564-b2g-firefox-os-for-the-huawei-ascend-g300-rom-last-updated-0612/

Also, the developer Dazzozo is available to speak to on irc.freenode.net channel #huawei-g300

sontu...@gmail.com

unread,
Dec 1, 2013, 11:27:11 PM12/1/13
to
Hi Sotaro,

They are very useful diagrams. Many thanks.

About my error, I found out that it relates to preview size. When I make hard code for preview size 640x480, it worked very well. So I guess I can modify camera.js to make the Camera app work.

Thanks again. :)
0 new messages