Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Camera issues #46

Closed
ApostolosB opened this issue Dec 18, 2019 · 59 comments
Closed

Camera issues #46

ApostolosB opened this issue Dec 18, 2019 · 59 comments

Comments

@ApostolosB
Copy link

As the title suggests. To rep:

Open the camera
Use two fingers to zoom.
Camera becomes unresponsive and the option to close the app or wait appears.

@MartinX3
Copy link

Depending on the source of the problem it may not be fixable now, since any further camera updates continue with the 4.14 kernel of SODP (which is used here)

@ApostolosB
Copy link
Author

@MartinX3 No problem. Hopefully the new kernel will be stable enough in the near future so we can update it. The camera isn't good (quality, speed) at the moment.

@MartinX3
Copy link

MartinX3 commented Dec 18, 2019

Depends on @rinigus :)
I don't know what is needed on the sailfish side to adapt the 4.14/10.0 sodp :)

I would say after the release of OEMv3 it is stable enough for AOSP to act as a daily driver

@rinigus
Copy link
Contributor

rinigus commented Dec 18, 2019

There are two issues. One of them is related to memory management problem which gets exposed by camera as in #30. With this problem I will ask for feedback at Sony AOSP channels, just have to prepare documented case which shows strange results when following kernel memory counters.

Second, is the camera support itself. As mentioned by @MartinX3, it requires newer kernel and drivers. I have hopes to use 4.14 on AOSP9 base. That will not require major porting effort for the new base. But, its surely not targeted by AOSP developers and I don't know if its possible.

If we need to shift to new AOSP base, it will take time. As mentioned earlier, I would first stabilize on AOSP9 and target issues on that. So, I'd prefer not to deal with new base right now.

@MartinX3
Copy link

AOSP9 and 4.14 (and 10 and 9.0) can work
Buuut is not official supported.
So help by sodp is sadly limited in that case.

@rinigus
Copy link
Contributor

rinigus commented Dec 18, 2019

Exactly. Well, in our case, support is mainly due to curiosity and wish to overcome technical challenges by the participants. But let's wait till 4.14 / AOSP10 normalizes and gets to the stable state. Then we can test and look how it works for us

@ApostolosB
Copy link
Author

The technical stuff its up to people that know what they are doing. I want the best possible supported solution (in terms of features supported on the phone) and i am willing to help with testing. Sadly this is all i can do.

@rinigus
Copy link
Contributor

rinigus commented Dec 18, 2019

@ApostolosB : try to use AdvancedCamera from openrepos. But yes, camera is not in the best shape right now.

@ApostolosB
Copy link
Author

ApostolosB commented Dec 18, 2019

Oh yeah forgot to mention my advanced camera experience. Advanced camera fucked up things and i think i had to restart the phone. After i started it i couldn't even use the main camera app.

I used Adv Cam. from the store. I'll start playing with openrepos once we have an "official" release.

@rinigus
Copy link
Contributor

rinigus commented Dec 18, 2019

Yes, right now, thread lightly when working with camera.

@ApostolosB
Copy link
Author

Interestingly this behavior is only present in the camera mode. In the video mode it works ok(ish). Slow but works.

@pagism
Copy link

pagism commented Dec 21, 2019

Same behaviour here with camera as Apostolos described. What I noticed is that camera app is somehow slow to start, slow to focus and default controls do not work as expected.

  • Auto White Balance is rather working but does not have enough range to adapt to? It works better with manual settings.
  • Exposure is also working but the range again is limited
  • Flash control is working OK
  • Timers are working
  • ISO control is NOT working, pictures seem to be taken at high ISO (3200?)

Installing Advance Camera make things worse actually.

@rinigus
Copy link
Contributor

rinigus commented Dec 21, 2019

As mentioned above, we can start looking closer into the camera after kernel update to 4.14. Right now, its close to what AOSP9 camera does and, as a result, we should not expect anything better in SFOS. As Linux 4.14 promises much better camera, I am planning to look into it when that's ready for daily use. Until that, its mainly survival on current camera

@MartinX3
Copy link

Daily use -> at the moment it is stable
But there are cosmetic issues in the bootanimation and vidc video playing is not perfect

@rinigus
Copy link
Contributor

rinigus commented Dec 21, 2019

I guess I will wait till the next round of binaries and stabilized as much as possible without glitches. We have few other things to fix as well, so better prioritize the time

@ApostolosB
Copy link
Author

The worst thing about the camera now is the focus performance. If stars align and it focuses right i get an OK pic. But that doesn't happen often. And its more obvious in an app like Codereader where you need the camera to focus on the barcode.

@MartinX3
Copy link

MartinX3 commented Dec 21, 2019

@rinigus please add sonyxperiadev/kernel#1921 as a workaround on 4.9 :)

(We have a similar one for 4.14, too, until it gets fixed in an OEM binary blob update sonyxperiadev/kernel#2118)

@rinigus
Copy link
Contributor

rinigus commented Dec 21, 2019

@MartinX3: Do you know if the workaround will be merged?

@MartinX3
Copy link

@rinigus good idea! I redirected it to the team :D

@MartinX3
Copy link

MartinX3 commented Dec 21, 2019

Aaaand merged!
sonyxperiadev/kernel#1921
<3

This will workaround focus problems as far as it is able to.

@rinigus
Copy link
Contributor

rinigus commented Dec 21, 2019

Will test it as soon as our build servers (OBS) will work again. They are today on strike, it seems.

@ApostolosB
Copy link
Author

One more thing i notice with the front camera is a red hue on the image you see on the screen when it starts. It sorts itself out after a bit. But i think i remember thins also when i was playing with aosp.

BTW features like burst mode/continuous shooting, choosing resolutions are things that need to be done in the SFOS camera and not on the aosp side right???

@rinigus
Copy link
Contributor

rinigus commented Dec 21, 2019

BTW features like burst mode/continuous shooting, choosing resolutions are things that need to be done in the SFOS camera and not on the aosp side right???

it has to be supported by AOSP first - not sure burst mode it. as for reso choosing, that should work already

@ApostolosB
Copy link
Author

Another word of warning. Video with the main camera (4k in something like 15 FPS -not good) seems to mess something up and you end up with a black screen. Restart required.

@MartinX3
Copy link

Yes. The camera driver is from April 2019
Kernel 4.14 has the one from November 2019.
The experience will be better with it.
The problems are already known or fixed. :)
@rinigus

@ApostolosB
Copy link
Author

@MartinX3 OK. I have no idea what is fixed or not. I just wanted to warn people. As for the way forward (aosp9 4.14 kerner or aosp10 or whatever) and when we move, its up to rinigus. I have no idea about stuff like that or the benefits, drawbacks and work needed for each.

@rinigus
Copy link
Contributor

rinigus commented Dec 21, 2019

As far as I understand, benefits are great in terms of camera. Sounds like we will have to use next AOSP base for it to work. There is an outside chance to scrape through with AOSP9 and kernel 4.14, but its surely will be just lucky if true as few other things were changed with 4.14.

As its a new base, a new port will be required. Right now, AOSP9 is the newest we have as a base for SFOS ports. I expect that work on AOSP10 will start and we could realistically work on adjusting our port in the middle of next year.

As for fix mentioned by @MartinX3 before for kernel 4.9, I haven't had a chance to check it, as OBS servers are not working properly. Admins will have to look into it, hence the delay.

I am going to rename the issue into more general "Camera issues", so readers could see the problems.

@rinigus rinigus changed the title Zooming in camera makes it unresponsive Camera issues Dec 21, 2019
@pagism
Copy link

pagism commented Jul 4, 2020

in previous release the camera had several issues, back then when i tried to use the Advanced Camera app, i had to reboot the phone and uninstall the app. This afternoon, rather accidentally i thought there was a new release of tge app and install it again. Surprisingly, it does not crash the phone and performs a lot better better than the default camera app.

@ApostolosB
Copy link
Author

Knowing the situation with the camera i am king of afraid to do anything related to it 🤣

But yeah the latest release -of the OS- is infinitely more stable than the previous one.

@rinigus
Copy link
Contributor

rinigus commented Jul 5, 2020

@MartinX3: great to hear! As far as I remember, 4.14 would require AOSP10 base, which SFOS is not supporting yet (would have to check the latest status, but I think so). Not sure when I will approach it. Camera is important, so we should switch to 4.14 eventually.

Meanwhile, @MartinX3, make sure it all works perfectly on AOSP :)

What is RPMh? https://android.googlesource.com/kernel/msm/+/android-7.1.0_r0.2/Documentation/arm/msm/rpm.txt ?

@MartinX3
Copy link

MartinX3 commented Jul 5, 2020

@rinigus
Aaand here is 4.14 for 9.0
https://github.com/sonyxperiadev/local_manifests/tree/android-9.0.0_r46a

Here I restored the buildability
https://github.com/MartinX3-AndroidDevelopment-OmniROM/vendor-qcom-opensource-interfaces/commits/MartinX3/omnirom-9.0_twrp-10.0

I needed it to compile twrp 9.0 with the 4.14 kernel, because the twrp 9.0 isn't buildable in 10 ROMs

Yeah, RPMh is the successor of RPM which got used on older SoCs
If I remember correctly it's used since the Snapdragon 845
Here a description
https://lwn.net/Articles/748981/

Have fun making experiments :D

@rinigus
Copy link
Contributor

rinigus commented Jul 6, 2020

@MartinX3, interesting. I will surely have to test it. Although, TWRP does not use camera blobs and is not a thorough test of AOSP9/4.14 hybrid. But interesting anyway!

@ApostolosB
Copy link
Author

Has the AOSP10 move need to be initiated by Jolla themselves or is something the port community can handle?

@rinigus
Copy link
Contributor

rinigus commented Jul 7, 2020

@ApostolosB - AOSP10 can be done by community. But the last few years, we had Jolla's lead through SFOS X program which ensured that we had a reference port. This year it is not there yet, as far as I can see. I keep an eye on what's happening on the porters channel, maybe should ask around.

@pagism
Copy link

pagism commented Jul 7, 2020

there is no recent roadmap updates from jolla lately, maybe they wait for the community to make a move first? i have the feeling they struggle with resources

@rinigus
Copy link
Contributor

rinigus commented Jul 8, 2020

I asked on sfos-porters channel if someone is working on aosp10 - no reply so far

@ApostolosB
Copy link
Author

The new forum is open. (https://forum.sailfishos.org/) Maybe we can have a topic there also.

@Thaodan
Copy link
Contributor

Thaodan commented Jul 14, 2020

@ApostolosB I put some work hybris-10 see my github profile. Still very early.

@Thaodan
Copy link
Contributor

Thaodan commented Jul 14, 2020

@rinigus I have a hybris patched kernel for kumano, you just have to add the hybris changes to the tama defconfigs.

@rinigus
Copy link
Contributor

rinigus commented Jul 15, 2020

Does that kernel work? But you are on AOSP10, right?

@Thaodan
Copy link
Contributor

Thaodan commented Jul 15, 2020

It does (tested by booting android with it).

@rinigus
Copy link
Contributor

rinigus commented Jul 24, 2020

I tested AOSP10 on Apollo (PixelExperience July 14, 2020 build, same day Sony binaries). Camera was tested with the included simple app and is still rather poor. Flash and image acquisition are not in sync. Without flash images could be better, but I am not 100% sure. Will have to test it further and check details.

Hopefully, the flash-image acquisition sync issue will be fixed at some time.

PS: Haven't checked with pure AOSP10 build as I got some strange reboots with it. Could be due to the switch from SFOS to AOSP (we have userdata in LVM, AOSP in ext2) and fastboot -w was failing on my PC. Have to look into it further when I get time and, if reproducible, report upstream.

@rinigus
Copy link
Contributor

rinigus commented Jul 24, 2020

There could be somewhat better ability to focus. And it seems to be more stable than on SFOS. On SFOS, sometimes camera crashes and you have to reboot to get it back. Not sure it was an issue for AOSP9. On AOSP10, no camera crashes experienced so far.

@pagism
Copy link

pagism commented Jul 24, 2020 via email

@MartinX3
Copy link

MartinX3 commented Jul 24, 2020

The A10 camera is much better than the A9 one and far more stable.
The 2 big issues left are a properly calibrated focus and the gcam support as far as I know.
I don't know how much low light handling can get improved.

@pagism
Copy link

pagism commented Jul 24, 2020 via email

@rinigus
Copy link
Contributor

rinigus commented Jul 24, 2020

@MartinX3: OK, maybe I would say it more than it is not worse in AOSP10 than in AOSP9. I guess I was expecting larger improvement as the room for improvement is significant. As mentioned above, it is better in focusing already and improved stability (but here I compared SFOS vs AOSP, could be SFOS induced). We still have out of sync flashlight (sonyxperiadev/bug_tracker#406).

Just made a video and ghosting has reduced (even hard to detect) on lower light conditions. AOSP9 is rather poor with huge ghosting when you move the camera.

Better focus calibration would be great as it is one of the major issues. As for low light, let's get normal light working first... GCam requires some kind of raw images access, right?

@pagism: well, not too bad in SFOS in general. On Onyx it was similar to Android. Here as well (to AOSP), just stock is way better

@MartinX3
Copy link

MartinX3 commented Jul 24, 2020

Camx kills the entire camera access until a restsrt because of a bug in the camera budget system

About raw images, i am not sure if they are not correct or my smartphone apps just dont properly open the dng files

@ApostolosB
Copy link
Author

While stability is important (having to reboot after using the camera is no fun) focus is also a big thing. Leaving photography outside it makes it suuuper difficult scan barcodes etc if it doesn't work right. A more "practical" issue.

@rinigus
Copy link
Contributor

rinigus commented Jul 26, 2020

@ApostolosB, well said. Indeed, we all want to get functional camera. It is just not trivial at this stage :)

@MartinX3
Copy link

For me the scanning of bar-/qrcodes got far better with the 4.14 kernel :)

@pagism
Copy link

pagism commented Jul 26, 2020 via email

@vaskas
Copy link

vaskas commented Dec 11, 2020

Hi guys, has anyone found a workaround for the stuck super-high ISO? Curiously the camera manages to take decent photos randomly - once in a blue moon the photos look like having the correct ISO. Which makes me think the setting is stuck in the auto mode, and the auto mode is not working correctly. Is there any way I can help test this with an XZ2?

@rinigus
Copy link
Contributor

rinigus commented Dec 11, 2020

Not much we can do on SFOS side as it is AOSP issue. As camera is better on AOSP10, it is planned to redo the port to AOSP10 base and, hopefully, we will get a better camera support on SFOS as well. Currently, I am mainly waiting for AOSP10 instructions to become available. As far as we know, Jolla is working on bringing AOSP10 support.

@pagism
Copy link

pagism commented Jun 28, 2021

Camera impressions on AOSP10 SFOS 4.1 using the default camera:

  • stable
  • back camera focus is hit and miss, mostly miss by a little bit, not possible to control
  • front camera very out of focus
  • controls awb, flash, delay, grids work, iso settings does not work

Using the advanced camera:

  • on manual focus results are better, focusing can be almost sharp
  • switching between cameras makes an adjustment noise, not clear it comes from the speaker or something else
  • front camera can focus (automatically) correctly
  • switching to back camera does not work, requires restarting of the app

@ApostolosB
Copy link
Author

Wouldn't it be better if we close this and open a new one for hybris10?

@pagism
Copy link

pagism commented Jun 28, 2021

fine with me, i do not know to tag issues, no permission i guess, please open a new issue and copy msg.

@rinigus
Copy link
Contributor

rinigus commented Jun 28, 2021

Closing. @pagism - if you can just make new issue I will tag it with hybris-10

@rinigus rinigus closed this as completed Jun 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants