更新到Android Things 0.5.1时的速度和屏幕分辨率问题

时间:2017-08-29 16:29:35

标签: raspberry-pi android-things

我有一个Raspberry pi 3与7" dsi触摸屏。我正在加载Android Things 0.5.1的空捆绑工厂图片,而且我有两个可能相关的问题。

首先,启动动画非常慢。每秒2帧左右的东西。

其次,一旦启动到开发预览连接屏幕,字体就会大于应有的字体。当我将我的应用程序加载到设备上时,很明显分辨率或像素密度有问题。

我在版本0.5.1和0.5.0上试过这个并在两者上得到相同的结果。

这是我的config.txt文件

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

当我降级到0.4.1时,这个问题消失了,我得到了一个快速的动画,屏幕分辨率恢复正常。

这是0.4.1

的config.txt
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

我尝试应用找到的in this question修复程序,但它没有任何区别。

感谢您的帮助。

1 个答案:

答案 0 :(得分:0)

我对7“Waveshare 1024x600显示器的屏幕密度存在同样的问题。显示器的密度由于某种原因未正确识别。但它可能是显示器的制造商问题。

您可以使用ADB命令查看显示报告的值:

adb shell dumpsys display | grep DisplayInfo

我的显示器报告240dpi,但正确的值是160dpi。

无论如何,我已设法通过ADB设置正确的密度:

adb shell wm density <correct_density_value>

好消息是你只需要为每张图片设置一次。