googlevr / gvr-unity-sdk

Google VR SDK for Unity
http://developers.google.com/vr/unity/
Other
2.71k stars 1.09k forks source link

'double vision' or incorrect screen size is still an issue Samsun Galaxy S7 (WQHD) #942

Open whizzkid opened 6 years ago

whizzkid commented 6 years ago

Summary: On a samsung galaxy S7 you sometimes get the screen rendered as if your phone is too small. I've seen reports on this before. with the message that it's been solved, but I'm still getting it. I've had this problem in the past where a couple of screen resolution changes or reboots would fix it. then with gvr 1.110 I didnt have the problem for a while. Today it resurfaced again, upgraded to 1.150 but its still there.

Found using:

Steps to reproduce the issue:

  1. uncertain. it didnt happen for a while. and now it suddenly showed up again. (even on a 2nd phone where an old version of my app was installed suddenly showed this problem after having worked normally for months)

Workarounds: change screen resolution to FHD instead of WQHD (which was an earlier solution) changing back to WQHD and the problem is back again though...

Additional comments: example image attached.

screenshot_20180725-142751

moiseev7 commented 6 years ago

We experience the same issue with the small image on some phones.

Google VR SDK version: 1.150.0 Unity version: 2018.2.2f1 Device: Xiaomi Mi Max

image

fredsa commented 6 years ago

Please make sure you have scanner the viewer's QR code.

Also, make sure you're using a certified cardboard viewer as many non-certified viewers have incorrect viewer profiles. Known working viewers here: https://vr.google.com/cardboard/get-cardboard/

(Advanced tip) If you know the viewer's optical parameters, you can create a working QR code here: https://vr.google.com/cardboard/viewerprofilegenerator/

whizzkid commented 6 years ago

@fredsa This issue has nothing to do with the viewer being used. if that were the case, the image would be incorrect all the time. since this sometimes works and sometimes doesnt. and can usually (not always,which is also weird) be fixed by changing the resolution of the phone, this is something different completely.

please don't just skimread user reports and close issues without getting a reply. this issue is definitely NOT closed.

fredsa commented 6 years ago

@whizzkid What's the version of Google VR Services that's installed on the device?

Issues with the Samsung Galaxy S7 resolution (FHD/WQHD) were addressed in 1.10.170249286: https://github.com/googlevr/gvr-unity-sdk/issues/421#issuecomment-333904132

fredsa commented 6 years ago

@djirdjis Please file a new separate issue for your device. Please include the Unity version, Google VR SDK for Unity version and Google VR Services version installed on your device.

whizzkid commented 6 years ago

I've got 3 Galaxy S7's all with google vr services v 1.18.213676531 double checked the vr viewer profiles, the problem is there on google cardboard, google cardboard 2015 and our Owl glasses. on one phone everything worked like it should. the other showed the wrong view again. I took new screenshots, one with the cardboard profile and one with the cardboard owl profile.

owl cardboard

the 3rd phone was set to HD 1280x720 and showed a similar view but this time zoomed in more (although the borders at the left, top and right show that part of the app knows the actual screen size) dev2_hd

switching back to WQHD 2560x1440 made it look like this: dev2 wqhd google dev2 wqhd owl

haven't seen that one before :)

after a restart the screen was normal on that device again.

it's hard to test because the problem doesn't always appear. and it can sometimes (lately it's harder to fix than a couple of months) by switching between HD and WQHD and rebooting a couple of times.

I've managed to log some data with a correct and incorrect view:

I've logged the Screen.dpi, Screen.width and Screen.height, both times the device was set to: WQHD 2560x1440

correct view: DPI: 640 width 2560 height 1440

incorrect view: DPI: 480 width 1920 height 1080

fredsa commented 6 years ago

Thank you for the details, @whizzkid. Just so we can reproduce with the correct version, can you send the output of adb shell getprop ro.build.fingerprint?

Size and display density can be retrieved using adb shell wm size and adb shell wm density.

after a restart the screen was normal on that device again.

it's hard to test because the problem doesn't always appear. and it can sometimes (lately it's harder to fix than a couple of months) by switching between HD and WQHD and rebooting a couple of times.

IIRC from working on screen density issues a few months back, reproducing the problem after a device reboot can require that you lock the screen at least once (by pushing the power button) and then unlocking before launching your app.

So, a clean test with (hopefully) reproducible results would involve:

  1. Make sure Google VR Services is up to date (Use Play Store app to update). Check installed version with:
    • macOS: adb shell pm dump com.google.vr.vrcore | egrep -i versionName\|packages:
    • Windows: adb shell pm dump com.google.vr.vrcore | findstr /i "versionName packages:"
  2. Set screen resolution, either FHD or WQHD
  3. Reboot device
  4. Lock screen at least once (push power button)
  5. Unlock device
  6. Record screen size/density:
    • adb shell wm size
    • adb shell wm density
  7. Launch your app
  8. Take screenshot
fredsa commented 6 years ago

Also, can you include the output of adb shell dumpsys display | grep mBaseDisplayInfo?

fredsa commented 6 years ago

I just tried reproducing this on an S7 but wasn't able to using Unity 2017.4.13f1, Google VR SDK for Unity 1.170.0 and Google VR Services 1.18.213676531.

$ adb shell pm dump com.google.vr.vrcore | egrep -i versionName\|packages:
  Packages:
      versionName=1.18.213676531

Tried both FHD and WQHD resolutions.

Display info reported by the device:

$ adb shell dumpsys display | grep mBaseDisplayInfo
    mBaseDisplayInfo=DisplayInfo{"Built-in Screen", uniqueId "local:0", app 1440 x 2560, real 1440 x 2560, largest app 1440 x 2560, smallest app 1440 x 2560, mode 1, defaultMode 1, modes [{id=1, width=1440, height=2560, fps=60.000004}, {id=2, width=1080, height=1920, fps=60.000004}, {id=3, width=720, height=1280, fps=60.000004}], colorTransformId 1, defaultColorTransformId 1, supportedColorTransforms [{id=1, colorTransform=0}], hdrCapabilities android.view.Display$HdrCapabilities@9a9d70, rotation 0, density 640 (580.571 x 575.433) dpi, layerStack 0, appVsyncOff 0, presDeadline 17666666, type BUILT_IN, state ON, FLAG_SECURE, FLAG_SUPPORTS_PROTECTED_BUFFERS}
    mBaseDisplayInfo=DisplayInfo{"ActivityViewVirtualDisplay", uniqueId "virtual:android,1000,ActivityViewVirtualDisplay,0", app 1440 x 2560, real 1440 x 2560, largest app 1440 x 2560, smallest app 1440 x 2560, mode 4, defaultMode 4, modes [{id=4, width=1440, height=2560, fps=60.0}], colorTransformId 0, defaultColorTransformId 0, supportedColorTransforms [], hdrCapabilities null, rotation 0, density 640 (640.0 x 640.0) dpi, layerStack 0, appVsyncOff 0, presDeadline 16666666, type VIRTUAL, state ON, owner android (uid 1000), FLAG_VIRTUAL_SCREEN}
fredsa commented 6 years ago

If you can come up with steps to reproduce the issue, we're happy to take a closer look.

whizzkid commented 6 years ago

Ok, i've found a way to sorta reproduce it, although the problem doesn't normally occur like this because I never change resolution unless the VR-game bugs out first.

The screen also looks different now. If you look at the the position of the reticles compared to my screenshots before, they used to look like they were scaled from the bottom centre. This time they look like theyre both scaled from the bottom left.

str:

Screen looks like this: screenshot_20181018-135103

output of the commands you requested: Device: demo1

C:\Projects\startrekenen-vr\StartRekenenVR>adb shell pm dump com.google.vr.vrcore | findstr -i "versionName packages:" Packages: versionName=1.18.213676531

adb shell getprop ro.build.fingerprint samsung/heroltexx/herolte:7.0/NRD90M/G930FXXU1DQL4:user/release-keys

adb shell wm size Physical size: 1440x2560 Override size: 1080x1920

adb shell wm density Physical density: 640 Override density: 480

adb shell dumpsys display | findstr /i "mBaseDisplayInfo" mBaseDisplayInfo=DisplayInfo{"Built-in Screen", uniqueId "local:0", app 1440 x 2560, real 1440 x 2560, largest app 1440 x 2560, smallest app 1440 x 2560, mode 1, defaultMode 1, modes [{id=1, width=1440, height=2560, fps=59.0}], colorTransformId 1, defaultColorTransformId 1, supportedColorTransforms [{id=1, colorTransform=-22}], hdrCapabilities android.view.Display$HdrCapabilities@6be5966, rotation 0, density 640 (580.571 x 575.433) dpi, layerStack 0, appVsyncOff 0, presDeadline 17949152, type BUILT_IN, state ON, FLAG_SECURE, FLAG_SUPPORTS_PROTECTED_BUFFERS} mBaseDisplayInfo=DisplayInfo{"ActivityViewVirtualDisplay", uniqueId "virtual:android,1000,ActivityViewVirtualDisplay,7", app 1080 x 1920, real 1080 x 1920, largest app 1080 x 1920, smallest app 1080 x 1920, mode 9, defaultMode 9, modes [{id=9, width=1080, height=1920, fps=60.0}], colorTransformId 0, defaultColorTransformId 0, supportedColorTransforms [], hdrCapabilities null, rotation 0, density 480 (480.0 x 480.0) dpi, layerStack 0, appVsyncOff 0, presDeadline 16666666, type VIRTUAL, state ON, owner android (uid 1000), FLAG_VIRTUAL_SCREEN}

if you do it the other way around, the screen looks like this: screenshot_20181018-134515

output of the commands you requested: Device: demo1

adb shell pm dump com.google.vr.vrcore | findstr -i "versionName packages:" Packages: versionName=1.18.213676531

adb shell getprop ro.build.fingerprint samsung/heroltexx/herolte:7.0/NRD90M/G930FXXU1DQL4:user/release-keys

adb shell wm size Physical size: 1440x2560

adb shell wm density Physical density: 640

adb shell dumpsys display | findstr /i "mBaseDisplayInfo" mBaseDisplayInfo=DisplayInfo{"Built-in Screen", uniqueId "local:0", app 1440 x 2560, real 1440 x 2560, largest app 1440 x 2560, smallest app 1440 x 2560, mode 1, defaultMode 1, modes [{id=1, width=1440, height=2560, fps=59.0}], colorTransformId 1, defaultColorTransformId 1, supportedColorTransforms [{id=1, colorTransform=-22}], hdrCapabilities android.view.Display$HdrCapabilities@6be5966, rotation 0, density 640 (580.571 x 575.433) dpi, layerStack 0, appVsyncOff 0, presDeadline 17949152, type BUILT_IN, state ON, FLAG_SECURE, FLAG_SUPPORTS_PROTECTED_BUFFERS} mBaseDisplayInfo=DisplayInfo{"ActivityViewVirtualDisplay", uniqueId "virtual:android,1000,ActivityViewVirtualDisplay,4", app 1440 x 2560, real 1440 x 2560, largest app 1440 x 2560, smallest app 1440 x 2560, mode 6, defaultMode 6, modes [{id=6, width=1440, height=2560, fps=60.0}], colorTransformId 0, defaultColorTransformId 0, supportedColorTransforms [], hdrCapabilities null, rotation 0, density 640 (640.0 x 640.0) dpi, layerStack 0, appVsyncOff 0, presDeadline 16666666, type VIRTUAL, state ON, owner android (uid 1000), FLAG_VIRTUAL_SCREEN}

so its similar to the original problem, but not 100% :)

fredsa commented 6 years ago

Thank you for the steps and logs.

Unfortunately, I haven't been able to reproduce it, even if the steps you provided, on my device, although it's a slightly different device:

$ adb shell getprop ro.build.fingerprint
samsung/heroqlteuc/heroqlteatt:7.0/NRD90M/G930AUCU4BQA6:user/release-keys
fredsa commented 6 years ago

Another path for us to look into is the version of tools used to build your APK. Would be helpful if you could attach a test APK that you are able to reproduce the issue with.

Here's a version of HelloVR that I'm unable to reproduce the issue with: fredsa.aaa.apk.zip

whizzkid commented 6 years ago

reproduced with your app.

str: set screen resolution to wqhd

screenshot_20181022-094417_a gvrnew screenshot_20181022-094516_a gvrnew

So it's not my setup that's the problem :) and apparently also not a windows or mac issue.

But do note that this is not exactly the bug that occasionally appears and takes several reboots/res. switches to disappear. (that one seems to scale from the center instead of bottom left like this one) although they are probably closely related. (actual screen size and screen size used to render the left and right eye's view.) The UI overlay (back and settings icon) always seem to use the correct size though.

fredsa commented 6 years ago

Interesting. Thanks for checking. I'm unable to reproduce using your steps.

Wonder if the DPI override that's in place to fix issues on S7 is being applied to my device:

samsung/heroqlteuc/heroqlteatt:7.0/NRD90M/G930AUCU4BQA6:user/release-keys

but not your device:

samsung/heroltexx/herolte:7.0/NRD90M/G930FXXU1DQL4:user/release-keys
fredsa commented 6 years ago

As another datapoint, can you try uninstalling com.google.vr.vrcore and see if the same steps still reproduce the issue?

whizzkid commented 6 years ago

Uninstalled using adb uninstall com.google.vr.vrcore rebooted, I can still reproduce it every time.

fredsa commented 6 years ago

Thanks.

DesertEaglePWN commented 5 years ago

Has there been any update on this since October? I am currently doing development in Unreal with GoogleVR which I believe uses the Android SDK (https://github.com/googlevr/gvr-android-sdk) and am running into this same issue on Galaxy S7 devices. Switching to WQHD fixes the problem, but I can't always expect my users to change those settings.

mtommadich commented 5 years ago

I'm running into the same issue as whizzkid describes with my app on a razer phone. The issue occurs in any of the three resolutions 720p, 1080p, 1440p. I'm on Unity editor 2019.1.0f2 Personal with GoogleVRForUnity_1.200.0. I wasn't able to make it work on this phone. Strangely enough, the Unity splashscreen displays correctly, but my game looks as if the physical screen is too small for the rendered cardboard view.