7" LCD Display not working with Android Things

3

it's me again with a Android Things question

This time I want to connect a 7" display via HDMI and USB to my Raspberry Pi 3 (running with Android Things 0.5.1)
Here the link to display: 7" HDMI LCD (C)

I also followed the instruction on the manual and added the lines to the config.txt which is located in the root of my sd-card

max_usb_current=1
hdmi_group=2
hdmi_mode=1
hdmi_mode=87
hdmi_cvt 1024 600 60 6 0 0 0
hdmi_drive=1

Then I plug in the display. It's definitely on! But the display only shows a black screen.

My config.txt

I attached my complete config.txt, maybe I'm missing something. And again: I only added the lines shown above

kernel=u-boot-dtok.bin
framebuffer_depth=16

# Prevent the firmware from loading HAT overlays now that we handle pin muxing.
# ourselves. See:
# https://www.raspberrypi.org/documentation/configuration/device-tree.md#part3.4
dtoverlay=

dtparam=i2c_arm=on
dtparam=spi=on
dtparam=audio=on

# pwm and I2S are mutually-exclusive since they share hardware clocks.
dtoverlay=pwm-2chan-with-clk,pin=18,func=2,pin2=13,func2=4
dtoverlay=generic-i2s

start_x=1

# Tell U-boot to always use the "serial0" interface for the console, which is
# set to whichever uart (uart0 or uart1) is set to the header pins. This doesn't
# interfere with the uart selected for Bluetooth.
dtoverlay=chosen-serial0

# Enable skip-init on the UART interfaces, so U-Boot doesn't attempt to
# re-initialize them.
dtoverlay=rpi-uart-skip-init

# Add pin devices to the system for use by the runtime pin configuration driver.
dtoverlay=runtimepinconfig
dtoverlay=uart1
dtoverlay=bcm2710-rpi-3-b-spi0-pin-reorder

# Tell the I2S driver to use the cprman clock.
dtoverlay=bcm2710-rpi-3-b-i2s-use-cprman

# Uncomment to disable serial port on headers, use GPIO14 and GPIO15
# as gpios and to allow the core_freq to change at runtime.
enable_uart=1
core_freq=400

# Enable hardware graphics acceleration.
dtoverlay=vc4-kms-v3d,cma-256
mask_gpu_interrupt0=0x400
avoid_warnings=2

# Support official RPi display.
dtoverlay=i2c-rtc,ds3231
dtoverlay=rpi-ft5406
hdmi_force_hotplug=1
hdmi_drive=2

# Support custom Waveshare 7inch display
max_usb_current=1
hdmi_group=2
hdmi_mode=87
hdmi_cvt 1024 600 60 6 0 0 0
hdmi_drive=1

I also checked some other questions like this one
But I'm not seeing more information there :(

A minor update

I also contacted the manufacturer support. As soon I have more information I will add it here

Another update

I just received an email from the manufacturer's support:

Yes, it can. However, during the test. With only long HDMI cable such as 1m the LCD could display with new version android things. We don't find the reason.

I just looked into the logcat. As far as I understand it correct, the system tries to connect with the TouchScreen, but has no driver for it.

also these lines look interesting, but I really don't get the problem :(

09-19 17:18:00.630 170-261/? E/hwc-gl-worker: Failed to make image from target buffer: EGL_BAD_PARAMETER
09-19 17:18:00.630 170-261/? E/hwc-gl-worker: Composite failed because of failed framebuffer
09-19 17:18:00.630 170-261/? E/hwc-drm-display-compositor: Failed to pre-composite layers
09-19 17:18:00.630 170-261/? E/hwc-drm-display-compositor: Failed to pre-composite for squash all composition -22
09-19 17:18:00.631 170-261/? E/hwc-platform-drm-generic: Failed to close gem handle 0 -1

here the complete logcat:

--------- beginning of system
09-19 17:17:56.447 311-430/system_process D/UsbHostManager: Added device UsbDevice[mName=/dev/bus/usb/001/004,mVendorId=3823,mProductId=5,mClass=0,mSubclass=0,mProtocol=0,mManufacturerName=WaveShare,mProductName=WaveShare Touchscreen,mVersion=2.0,mSerialNumber=2016-11-06,mConfigurations=[
                    UsbConfiguration[mId=1,mName=null,mAttributes=192,mMaxPower=250,mInterfaces=[
                    UsbInterface[mId=0,mAlternateSetting=0,mName=null,mClass=3,mSubclass=0,mProtocol=0,mEndpoints=[
                    UsbEndpoint[mAddress=129,mAttributes=3,mMaxPacketSize=64,mInterval=1]]]]
09-19 17:17:56.473 311-326/system_process I/ActivityManager: Start proc 1277:com.android.mtp/u0a7 for broadcast com.android.mtp/.UsbIntentReceiver
09-19 17:17:56.501 311-372/system_process E/EventHub: could not get driver version for /dev/input/mouse0, Not a typewriter
09-19 17:17:56.509 1277-1277/? W/zygote: Using default instruction set features for ARM CPU variant (generic) using conservative defaults
09-19 17:17:56.551 1277-1284/? I/zygote: Debugger is no longer active
09-19 17:17:56.644 311-372/system_process D/EventHub: No input device configuration file found for device 'WaveShare WaveShare Touchscreen'.
09-19 17:17:56.644 311-372/system_process I/EventHub: New device: id=1, fd=186, path='/dev/input/event0', name='WaveShare WaveShare Touchscreen', classes=0x80000014, configuration='', keyLayout='', keyCharacterMap='', builtinKeyboard=false, wakeMechanism=EPOLLWAKEUP, usingClockIoctl=true
09-19 17:17:56.645 311-372/system_process I/InputReader: Device reconfigured: id=1, name='WaveShare WaveShare Touchscreen', size 16x16, orientation 0, mode 1, display id 0
09-19 17:17:56.645 311-372/system_process I/InputReader: Device added: id=1, name='WaveShare WaveShare Touchscreen', sources=0x00001002
09-19 17:17:56.679 935-935/? I/Binder:311_6: type=1400 audit(0.0:76): avc: denied { ptrace } for scontext=u:r:system_server:s0 tcontext=u:r:priv_app:s0:c512,c768 tclass=process permissive=1
09-19 17:17:57.909 240-240/? I/drm-event-liste: type=1400 audit(0.0:77): avc: denied { read } for path="socket:[8839]" dev="sockfs" ino=8839 scontext=u:r:hal_graphics_composer_default:s0 tcontext=u:r:hal_graphics_composer_default:s0 tclass=netlink_kobject_uevent_socket permissive=1
09-19 17:17:59.010 311-381/system_process W/AlarmManager: Unrecognized alarm listener com.android.server.wifi.WifiConfigStore$1@f0356d5
09-19 17:17:59.028 311-381/system_process D/WifiConfigStore: Writing to stores completed in 18 ms.
09-19 17:18:00.630 170-261/? E/hwc-gl-worker: Failed to make image from target buffer: EGL_BAD_PARAMETER
09-19 17:18:00.630 170-261/? E/hwc-gl-worker: Composite failed because of failed framebuffer
09-19 17:18:00.630 170-261/? E/hwc-drm-display-compositor: Failed to pre-composite layers
09-19 17:18:00.630 170-261/? E/hwc-drm-display-compositor: Failed to pre-composite for squash all composition -22
09-19 17:18:00.631 170-261/? E/hwc-platform-drm-generic: Failed to close gem handle 0 -1
09-19 17:18:08.861 311-1055/system_process D/WificondControl: Scan result ready event
09-19 17:18:30.976 311-325/system_process E/memtrack: Couldn't load memtrack module
09-19 17:18:30.976 311-325/system_process W/android.os.Debug: failed to get memory consumption info: -1
09-19 17:18:31.081 311-325/system_process E/memtrack: Couldn't load memtrack module
09-19 17:18:31.082 311-325/system_process W/android.os.Debug: failed to get memory consumption info: -1
09-19 17:18:31.407 130-130/? W//system/bin/hwservicemanager: getTransportFromManifest: Cannot find entry android.hardware.drm@1.0::IDrmFactory in either framework or device manifest, using default transport.
09-19 17:18:31.409 178-245/? E/DrmHal: Failed to find any drm factories
09-19 17:18:31.413 950-1303/com.google.android.gms.unstable W/DG.WV: Widevine DRM not supported on this device
                             android.media.UnsupportedSchemeException: Failed to instantiate drm object.
                                 at android.media.MediaDrm.native_setup(Native Method)
                                 at android.media.MediaDrm.<init>(MediaDrm.java:216)
                                 at joi.run(:com.google.android.gms:9)
                                 at ius.run(:com.google.android.gms:24)
                                 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
                                 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
                                 at izo.run(:com.google.android.gms:0)
                                 at java.lang.Thread.run(Thread.java:764)
09-19 17:18:31.707 311-1041/system_process D/WificondControl: Scan result ready event
09-19 17:18:32.104 950-1129/com.google.android.gms.unstable W/SystemServiceRegistry: No service published for: persistent_data_block
09-19 17:18:32.119 1129-1129/? I/Binder:950_3: type=1400 audit(0.0:78): avc: denied { read } for name="/" dev="tmpfs" ino=7244 scontext=u:r:priv_app:s0:c512,c768 tcontext=u:object_r:device:s0 tclass=dir permissive=1
09-19 17:18:32.129 1129-1129/? I/Binder:950_3: type=1400 audit(0.0:80): avc: denied { read } for name="interrupts" dev="proc" ino=4026532794 scontext=u:r:priv_app:s0:c512,c768 tcontext=u:object_r:proc_interrupts:s0 tclass=file permissive=1
09-19 17:18:32.144 950-1129/com.google.android.gms.unstable W/System: ClassLoader referenced unknown path: /data/user/0/com.google.android.gms/app_U1rfdkMe/Mr,09vcaQ,w
09-19 17:18:32.150 950-1129/com.google.android.gms.unstable W/System: ClassLoader referenced unknown path: /data/user/0/com.google.android.gms/app_U1rfdkMe/Mr,09vcaQ,w
09-19 17:18:34.049 783-1305/com.google.android.gms.persistent I/VacuumService: Vacuum at: now=1505841514048 tag=VacuumService
09-19 17:18:34.223 783-783/com.google.android.gms.persistent I/Auth: [ReflectiveChannelBinder] Successfully bound channel!
09-19 17:18:34.260 130-130/? W//system/bin/hwservicemanager: getTransportFromManifest: Cannot find entry android.hardware.drm@1.0::IDrmFactory in either framework or device manifest, using default transport.
09-19 17:18:34.262 178-178/? E/DrmHal: Failed to find any drm factories
09-19 17:18:34.264 950-1308/com.google.android.gms.unstable W/DG.WV: Widevine DRM not supported on this device
                             android.media.UnsupportedSchemeException: Failed to instantiate drm object.
                                 at android.media.MediaDrm.native_setup(Native Method)
                                 at android.media.MediaDrm.<init>(MediaDrm.java:216)
                                 at joi.run(:com.google.android.gms:9)
                                 at ius.run(:com.google.android.gms:24)
                                 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
                                 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
                                 at izo.run(:com.google.android.gms:0)
                                 at java.lang.Thread.run(Thread.java:764)
09-19 17:18:34.835 950-968/com.google.android.gms.unstable W/System: ClassLoader referenced unknown path: /data/user/0/com.google.android.gms/app_U1rfdkMe/Mr,09vcaQ,w
09-19 17:18:34.839 950-968/com.google.android.gms.unstable W/System: ClassLoader referenced unknown path: /data/user/0/com.google.android.gms/app_U1rfdkMe/Mr,09vcaQ,w
09-19 17:18:34.968 950-968/com.google.android.gms.unstable W/SystemServiceRegistry: No service published for: persistent_data_block
09-19 17:18:36.507 950-968/com.google.android.gms.unstable W/System: ClassLoader referenced unknown path: /data/user/0/com.google.android.gms/app_U1rfdkMe/Mr,09vcaQ,w
09-19 17:18:36.514 950-968/com.google.android.gms.unstable W/System: ClassLoader referenced unknown path: /data/user/0/com.google.android.gms/app_U1rfdkMe/Mr,09vcaQ,w
09-19 17:18:36.628 783-1042/com.google.android.gms.persistent W/Conscrypt: Could not set socket write timeout:
09-19 17:18:36.630 783-1042/com.google.android.gms.persistent W/Conscrypt:    java.lang.reflect.Method.invoke(Native Method)
09-19 17:18:36.630 783-1042/com.google.android.gms.persistent W/Conscrypt:    rkw.a(:com.google.android.gms:55)
09-19 17:18:36.752 783-1042/com.google.android.gms.persistent W/Conscrypt: Could not set socket write timeout:
09-19 17:18:36.753 783-1042/com.google.android.gms.persistent W/Conscrypt:    java.lang.reflect.Method.invoke(Native Method)
09-19 17:18:36.753 783-1042/com.google.android.gms.persistent W/Conscrypt:    rkw.a(:com.google.android.gms:55)
09-19 17:18:37.310 311-321/system_process I/zygote: Background concurrent copying GC freed 56654(2MB) AllocSpace objects, 4(80KB) LOS objects, 42% free, 4MB/8MB, paused 514us total 149.999ms
09-19 17:18:48.913 167-167/? D/WifiHAL: Start get packet fate command
09-19 17:18:48.913 167-167/? D/WifiHAL: createRequest Get Tx packet fate request
09-19 17:18:48.913 167-167/? E/WifiHAL: Failed to register get pkt fate response; result = -95
09-19 17:18:48.914 311-381/system_process E/WifiVendorHal: getTxPktFates(l.1941) failed {.code = ERROR_NOT_AVAILABLE, .description = }
09-19 17:18:48.915 167-167/? D/WifiHAL: Start get packet fate command
09-19 17:18:48.915 167-167/? D/WifiHAL: createRequest Get Rx packet fate request
09-19 17:18:48.915 167-167/? E/WifiHAL: Failed to register get pkt fate response; result = -95
09-19 17:18:48.916 311-381/system_process E/WifiVendorHal: getRxPktFates(l.1981) failed {.code = ERROR_NOT_AVAILABLE, .description = }
09-19 17:19:00.624 170-261/? E/hwc-gl-worker: Failed to make image from target buffer: EGL_BAD_PARAMETER
09-19 17:19:00.624 170-261/? E/hwc-gl-worker: Composite failed because of failed framebuffer
09-19 17:19:00.624 170-261/? E/hwc-drm-display-compositor: Failed to pre-composite layers
09-19 17:19:00.624 170-261/? E/hwc-drm-display-compositor: Failed to pre-composite for squash all composition -22
09-19 17:19:00.625 170-261/? E/hwc-platform-drm-generic: Failed to close gem handle 0 -1
09-19 17:19:10.975 311-325/system_process E/memtrack: Couldn't load memtrack module
09-19 17:19:10.975 311-325/system_process W/android.os.Debug: failed to get memory consumption info: -1
09-19 17:19:11.702 311-935/system_process D/WificondControl: Scan result ready event
09-19 17:19:16.084 311-325/system_process E/memtrack: Couldn't load memtrack module
09-19 17:19:16.084 311-325/system_process W/android.os.Debug: failed to get memory consumption info: -1
09-19 17:19:16.183 311-325/system_process E/memtrack: Couldn't load memtrack module
09-19 17:19:16.183 311-325/system_process W/android.os.Debug: failed to get memory consumption info: -1

Update - Downgrade to Android Things 0.4.1

I created a new image with Android Thing 0.4.1 and extended the config.txtwith my device specs, and voilá it's working...

But can maybe someone here help me out to get the display running und 0.5.1? Here is my "updated" config.txt

There are some differences between this config and the one I posted above. And of course this config isn't runnable for AT 0.5.1

kernel=u-boot-dtok.bin
framebuffer_depth=16
dtparam=i2c_arm=on
dtparam=spi=on
dtparam=audio=on

# pwm and I2S are mutually-exclusive since they share hardware clocks.  To
# enable I2S comment out the pwm line and uncomment the generic-i2s line.
dtoverlay=pwm-2chan-with-clk,pin=18,func=2,pin2=13,func2=4
# dtoverlay=generic-i2s

start_x=1

# Tell U-boot to always use the "serial0" interface for the console, which is
# set to whichever uart (uart0 or uart1) is set to the header pins. This doesn't
# interfere with the uart selected for Bluetooth.
dtoverlay=chosen-serial0

# Enable skip-init on the UART interfaces, so U-Boot doesn't attempt to
# re-initialize them.
dtoverlay=rpi-uart-skip-init

# Uncomment to disable serial port on headers, use GPIO14 and GPIO15
# as gpios and to allow the core_freq to change at runtime.
enable_uart=1
core_freq=400

max_usb_current=1
hdmi_group=2
hdmi_mode=1
hdmi_mode=87
hdmi_cvt 1024 600 60 6 0 0 0
hdmi_drive=1
raspberry-pi
raspberry-pi3
android-things
asked on Stack Overflow Sep 18, 2017 by dudeldidadum • edited Sep 26, 2017 by dudeldidadum

3 Answers

0

Ok, I think I have the same kit like you, RPi 3 with 7'' display Waveshare and with short and flat HDMI cable. I just tried to start this kit with AT 0.5.1 and it works fine (firstly it shows artefacts, lines and seems to be broken, but after few seconds I could see the Android Things start screen). I followed the description on the Android Things site for installation. If you read the release notes of 0.5.1, there is the following:

Automatically detect display settings on Raspberry Pi 3 without the need for edits to the root config.txt file.

But I copied my (automatically generated) config.txt for you:

kernel=u-boot-dtok.bin
framebuffer_depth=16

# Prevent the firmware from loading HAT overlays now that we handle pin muxing.
# ourselves. See:
# https://www.raspberrypi.org/documentation/configuration/device-tree.md#part3.4
dtoverlay=

dtparam=i2c_arm=on
dtparam=spi=on
dtparam=audio=on

# pwm and I2S are mutually-exclusive since they share hardware clocks.
dtoverlay=pwm-2chan-with-clk,pin=18,func=2,pin2=13,func2=4
dtoverlay=generic-i2s

start_x=1

# Tell U-boot to always use the "serial0" interface for the console, which is
# set to whichever uart (uart0 or uart1) is set to the header pins. This doesn't
# interfere with the uart selected for Bluetooth.
dtoverlay=chosen-serial0

# Enable skip-init on the UART interfaces, so U-Boot doesn't attempt to
# re-initialize them.
dtoverlay=rpi-uart-skip-init

# Add pin devices to the system for use by the runtime pin configuration driver.
dtoverlay=runtimepinconfig
dtoverlay=uart1
dtoverlay=bcm2710-rpi-3-b-spi0-pin-reorder

# Tell the I2S driver to use the cprman clock.
dtoverlay=bcm2710-rpi-3-b-i2s-use-cprman

# Uncomment to disable serial port on headers, use GPIO14 and GPIO15
# as gpios and to allow the core_freq to change at runtime.
enable_uart=1
core_freq=400

# Enable hardware graphics acceleration.
dtoverlay=vc4-kms-v3d,cma-256
mask_gpu_interrupt0=0x400
avoid_warnings=2

# Support official RPi display.
dtoverlay=i2c-rtc,ds3231
dtoverlay=rpi-ft5406
hdmi_force_hotplug=1
hdmi_drive=2

I hope it helps.

answered on Stack Overflow Sep 26, 2017 by Alexander Tumanin
0

Sometimes I managed to get the display running (with the fresh formatted image and the config.txt I posted above)... But from time to time the display stopped working... I then receive this log-message

1-01 00:00:18.553 311-334/? I/DisplayManagerService: Display device added: DisplayDeviceInfo{"Built-in Screen": uniqueId="local:0", 16 x 16, modeId 1, defaultModeId 1, supportedModes [{id=1, width=16, height=16, fps=1.0}], colorMode 0, supportedColorModes [0], HdrCapabilities android.view.Display$HdrCapabilities@1d6308, density 240, 96.0 x 96.0 dpi, appVsyncOff 1000000, presDeadline 1000000000, touch INTERNAL, rotation 0, type BUILT_IN, state UNKNOWN, FLAG_DEFAULT_DISPLAY, FLAG_ROTATES_WITH_CONTENT, FLAG_SECURE, FLAG_SUPPORTS_PROTECTED_BUFFERS}

And then no other displays (like my monitor, or my tv) aren't also not working anymore.

If the display is detected I receive this message instead:

01-01 00:00:18.591 310-332/? I/DisplayManagerService: Display device added: DisplayDeviceInfo{"Built-in Screen": uniqueId="local:0", 1024 x 600, modeId 1, defaultModeId 1, supportedModes [{id=1, width=1024, height=600, fps=43.0}], colorMode 0, supportedColorModes [0], HdrCapabilities android.view.Display$HdrCapabilities@1d6308, density 240, 173.397 x 152.4 dpi, appVsyncOff 1000000, presDeadline 23255814, touch INTERNAL, rotation 0, type BUILT_IN, state UNKNOWN, FLAG_DEFAULT_DISPLAY, FLAG_ROTATES_WITH_CONTENT, FLAG_SECURE, FLAG_SUPPORTS_PROTECTED_BUFFERS}

I think this is a bug in Android Things and hopefully this will be fixed with the next release!

If I have any updates, I will update this post.

answered on Stack Overflow Sep 26, 2017 by dudeldidadum
-1

The problem should have been fixed in DP6 (issue), which has been released. I haven't tested it though.

answered on Stack Overflow Dec 1, 2017 by kojira • edited Dec 1, 2017 by g00glen00b

User contributions licensed under CC BY-SA 3.0