Motorola Moto G4 (motorola-athene): Difference between revisions
Fengjiongmax (talk | contribs) Created page with "Category:Not booting {{Infobox device | manufacturer = Motorola | name = Motorola Moto G4 | codename = athene | image = File:motorola-athene.jpg | imagecaption = Moto G4..." |
mNo edit summary |
||
(37 intermediate revisions by 18 users not shown) | |||
Line 1: | Line 1: | ||
{{Infobox device | {{Infobox device | ||
| manufacturer = Motorola | | manufacturer = Motorola | ||
| name = | | name = Moto G4 | ||
| codename = athene | | codename = motorola-athene | ||
| image = File: | | image = File:Moto_G4_pmOS_MATE.png | ||
| imagecaption = Moto G4 | | imagecaption = Moto G4 | ||
| releaseyear = 2016 | | releaseyear = 2016 | ||
| originalsoftware = | | originalsoftware = Android | ||
| chipset = Qualcomm | | originalversion = 6.0.1 | ||
| cpu = | | pmoskernel = 3.10.108 | ||
| gpu = Adreno 405 | | chipset = Qualcomm Snapdragon 617 (MSM8952) | ||
| storage = 16 | | cpu = 4x 1.6 GHz + 4x 1.2 GHz Cortex-A53 | ||
| display = | | gpu = Adreno 405 | ||
| memory = 2 | | storage = 16/32 GB | ||
| display = 1080 x 1920 | |||
| memory = 2/3 GB | |||
| architecture = aarch64 | |||
| type = handset | |||
| status_usbnet = Y | |||
| status_flashing = P | |||
| status_touch = Y | |||
| status_screen = Y | |||
| status_wifi = Y | |||
| status_xwayland = Y | |||
| status_fde = | |||
| status_mainline = | |||
| status_battery = Y | |||
| status_3d = | |||
| status_accel = | |||
| status_audio = N | |||
| status_bluetooth = | |||
| status_camera = | |||
| status_gps = | |||
| status_mobiledata = | |||
| status_sms = | |||
| status_calls = | |||
| booting = yes | |||
| whet_dhry = 2621.7 | |||
}} | }} | ||
== Contributors == | == Contributors == | ||
* fengjiongmax | * fengjiongmax | ||
* thejsa | |||
== | == Users owning this device == | ||
{{Device owners}} | |||
== | == Models/Variants == | ||
According to Wikipedia, the G4 (SKU xt162x) and G4 Plus (xt164x) differ only trivially (memory, storage or peripherals/sensors [camera resolution, fingerprint reader]). | |||
== How to enter flash mode == | == How to enter flash mode == | ||
Line 34: | Line 53: | ||
== Installation == | == Installation == | ||
< | <syntaxhighlight lang="shell-session"> | ||
<code> | $ pmbootstrap flasher flash_rootfs | ||
$ pmbootstrap flasher boot | |||
</syntaxhighlight> | |||
== Problems == | |||
* Firmware issues | |||
* kernel partition can't be flashed because the boot partition is not big enough | |||
* Loading the adsp subsystem works momentarily before crashing the device | |||
* Loading the modem subsystem works momentaily before crashing the device | |||
== Firmware issues == | |||
Log from dmesg: | |||
<syntaxhighlight lang=dmesg> | |||
[ 68.992082] subsys-pil-tz 1de0000.qcom,venus: venus: Failed to locate venus.mdt | |||
[ 68.992096] msm_vidc: err: Failed to download firmware | |||
[ 68.992976] msm_vidc: err: Failed to load video firmware | |||
[ 68.993000] msm_vidc: err: msm_comm_init_core - firmware loading failed | |||
[ 68.993007] msm_vidc: err: Failed to move from state: 1 to 2 | |||
[ 68.993012] msm_vidc: err: Failed to move video instance to init state | |||
[ 68.993080] msm_vidc: err: Failed to create video instance, core: 0, type = 0 | |||
</syntaxhighlight> | |||
== Hardware details == | |||
<div class="toccolours mw-collapsible mw-collapsed"> | |||
<code>hwtest</code> output for SKU xt1625 | |||
<div class="mw-collapsible-content"> | |||
{| class="wikitable feature-colors" | |||
! style="text-align:left;"| Category | |||
! style="text-align:left;"| Model | |||
! style="text-align:left;"| Path | |||
! style="text-align:left;"| Status | |||
! style="text-align:left;"| Value | |||
|- | |||
|framebuffer | |||
|mdssfb_90000 | |||
|/sys/class/graphics/fb0 | |||
| class="feature-yes"| Working | |||
|U:1080x1920p-0 | |||
|- | |||
|framebuffer | |||
|mdssfb_a0000 | |||
|/sys/class/graphics/fb1 | |||
| class="feature-yes"| Working | |||
| | |||
|- | |||
|input | |||
|gpio-keys | |||
|/dev/input/event7 | |||
| class="feature-yes"| Working | |||
| | |||
|- | |||
|input | |||
|qpnp_pon | |||
|/dev/input/event6 | |||
| class="feature-yes"| Working | |||
| | |||
|- | |||
|input | |||
|qwerty | |||
|/dev/input/event5 | |||
| class="feature-yes"| Working | |||
| | |||
|- | |||
|input | |||
|Rear proximity sensor | |||
|/dev/input/event4 | |||
| class="feature-yes"| Working | |||
| | |||
|- | |||
|input | |||
|light | |||
|/dev/input/event3 | |||
| class="feature-yes"| Working | |||
| | |||
|- | |||
|input | |||
|synaptics_dsx_i2c | |||
|/dev/input/event2 | |||
| class="feature-yes"| Working | |||
| | |||
|- | |||
|input | |||
|input_mt_wrapper | |||
|/dev/input/event1 | |||
| class="feature-yes"| Working | |||
| | |||
|- | |||
|input | |||
|sensorprocessor | |||
|/dev/input/event0 | |||
| class="feature-yes"| Working | |||
| | |||
|} | |||
</div> | |||
</div> | |||
For comparison, results from <code>test_sensors</code> for SKU xt1625 on obsolete [https://forum.xda-developers.com/t/rom-non-android-sailfish-os-3-0-moto-g4-plus.3668304 sailfishOS] version 3.0.0.8 running kernel 3.10.84: | |||
<div class="toccolours mw-collapsible mw-collapsed"> | |||
test_sensors output for SKU xt1625 | |||
<div class="mw-collapsible-content"> | |||
<pre> | |||
Hardware module ID: sensors | |||
Hardware module Name: Motorola Sensors Module | |||
Hardware module Author: Motorola | |||
Hardware module API version: 0x1 | |||
Hardware HAL API version: 0x0 | |||
Poll device version: 0x1030001 | |||
API VERSION 0.1 (legacy): 0x1 | |||
API VERSION 0.1: 0x65537 | |||
API VERSION 1.0: 0x16777217 | |||
API VERSION 1.1: 0x16842753 | |||
API VERSION 1.2: 0x16908289 | |||
API VERSION 1.3: 0x16973825 | |||
API VERSION 1.4: 0x17039361 | |||
Got 19 sensors | |||
=== Sensor 0 == | |||
Name: 3-axis Accelerometer | |||
Vendor: Bosch | |||
Version: 0x1 | |||
Handle: 0x1 | |||
Type: 1 | |||
maxRange: 157 | |||
resolution: 0 | |||
power: 1 mA | |||
minDelay: 10000 | |||
=== Sensor 1 == | |||
Name: 3-axis Gyroscope | |||
Vendor: Bosch | |||
Version: 0x1 | |||
Handle: 0x2 | |||
Type: 4 | |||
maxRange: 2000 | |||
resolution: 0 | |||
power: 1 mA | |||
minDelay: 5000 | |||
=== Sensor 2 == | |||
Name: 3-axis Uncalibrated Gyroscope | |||
Vendor: Bosch | |||
Version: 0x1 | |||
Handle: 0x3 | |||
Type: 16 | |||
maxRange: 2000 | |||
resolution: 0 | |||
power: 1 mA | |||
minDelay: 5000 | |||
=== Sensor 3 == | |||
Name: Game Rotation Vector | |||
Vendor: Motorola | |||
Version: 0x1 | |||
Handle: 0x4 | |||
Type: 15 | |||
maxRange: 1 | |||
resolution: 0 | |||
power: 2 mA | |||
minDelay: 5000 | |||
=== Sensor 4 == | |||
Name: Gravity | |||
Vendor: Motorola | |||
Version: 0x1 | |||
Handle: 0x5 | |||
Type: 9 | |||
maxRange: 10 | |||
resolution: 0 | |||
power: 2 mA | |||
minDelay: 10000 | |||
=== Sensor 5 == | |||
Name: Linear Acceleration | |||
Vendor: Motorola | |||
Version: 0x1 | |||
Handle: 0x6 | |||
Type: 10 | |||
maxRange: 157 | |||
resolution: 0 | |||
power: 2 mA | |||
minDelay: 10000 | |||
=== Sensor 6 == | |||
Name: Step Detector sensor | |||
Vendor: Bosch | |||
Version: 0x1 | |||
Handle: 0x11 | |||
Type: 18 | |||
maxRange: 1 | |||
resolution: 0 | |||
power: 0 mA | |||
minDelay: 0 | |||
=== Sensor 7 == | |||
Name: Step Counter sensor | |||
Vendor: Bosch | |||
Version: 0x1 | |||
Handle: 0x12 | |||
Type: 19 | |||
maxRange: 340282346638528859811704183484516925440 | |||
resolution: 0 | |||
power: 0 mA | |||
minDelay: 1000000 | |||
=== Sensor 8 == | |||
Name: Ambient Light sensor | |||
Vendor: TAOS | |||
Version: 0x1 | |||
Handle: 0x7 | |||
Type: 5 | |||
maxRange: 65535 | |||
resolution: 1 | |||
power: 0 mA | |||
minDelay: 0 | |||
=== Sensor 9 == | |||
Name: Proximity sensor | |||
Vendor: TAOS | |||
Version: 0x1 | |||
Handle: 0x8 | |||
Type: 8 | |||
maxRange: 100 | |||
resolution: 100 | |||
power: 0 mA | |||
minDelay: 0 | |||
=== Sensor 10 == | |||
Name: Display Rotation sensor | |||
Vendor: Motorola | |||
Version: 0x1 | |||
Handle: 0x9 | |||
Type: 65536 | |||
maxRange: 4 | |||
resolution: 1 | |||
power: 1 mA | |||
minDelay: 0 | |||
=== Sensor 11 == | |||
Name: Flat Up | |||
Vendor: Motorola | |||
Version: 0x1 | |||
Handle: 0xa | |||
Type: 65537 | |||
maxRange: 1 | |||
resolution: 1 | |||
power: 1 mA | |||
minDelay: 0 | |||
=== Sensor 12 == | |||
Name: Flat Down | |||
Vendor: Motorola | |||
Version: 0x1 | |||
Handle: 0xb | |||
Type: 65538 | |||
maxRange: 1 | |||
resolution: 1 | |||
power: 1 mA | |||
minDelay: 0 | |||
=== Sensor 13 == | |||
Name: Stowed | |||
Vendor: Motorola | |||
Version: 0x1 | |||
Handle: 0xc | |||
Type: 65539 | |||
maxRange: 1 | |||
resolution: 1 | |||
power: 0 mA | |||
minDelay: 0 | |||
=== Sensor 14 == | |||
Name: Camera Activation sensor | |||
Vendor: Motorola | |||
Version: 0x1 | |||
Handle: 0xd | |||
Type: 65540 | |||
maxRange: 1 | |||
resolution: 1 | |||
power: 1 mA | |||
minDelay: 0 | |||
=== Sensor 15 == | |||
Name: ChopChop Gesture | |||
Vendor: Motorola | |||
Version: 0x1 | |||
Handle: 0xf | |||
Type: 65546 | |||
maxRange: 1 | |||
resolution: 1 | |||
power: 1 mA | |||
minDelay: 0 | |||
=== Sensor 16 == | |||
Name: Rear Proximity sensor | |||
Vendor: Motorola | |||
Version: 0x1 | |||
Handle: 0x10 | |||
Type: 8 | |||
maxRange: 100 | |||
resolution: 100 | |||
power: 0 mA | |||
minDelay: 0 | |||
=== Sensor 17 == | |||
Name: Glance Gesture | |||
Vendor: Motorola | |||
Version: 0x1 | |||
Handle: 0x13 | |||
Type: 24 | |||
maxRange: 1 | |||
resolution: 1 | |||
power: 1 mA | |||
minDelay: -1 | |||
=== Sensor 18 == | |||
Name: Moto Glance Gesture | |||
Vendor: Motorola | |||
Version: 0x1 | |||
Handle: 0x14 | |||
Type: 65548 | |||
maxRange: 1 | |||
resolution: 1 | |||
power: 1 mA | |||
minDelay: -1 | |||
</pre> | |||
</div> | |||
</div> | |||
=== CPU tuning === | |||
For unknown reasons, the default configuration boots only 5 cpus, <code>boot_cpus=0,4,5,6,7</code>. This boots only one of the 1.65 GHz cores, and the four 1.21 GHz cores. This can be shown via <code>cpufreq-info</code> (package cpufrequtils), or <code>htop</code>. | |||
The default governor is ''battery-draining'' "performance". | |||
To utilize all cores, extract and edit (or update) <code>bootimg.cfg</code> from <code>boot.img</code> to use <code>boot_cpus=0-7</code>. Boot the new image via <code>fastboot boot boot.img</code>. Alternatively, edit <code>deviceinfo</code> and repeat <code>pmbootstrap install</code>. This configuration will boot the 4x 1.65 GHz cores as cpus 0-3 and the 4x 1.21 GHz cores as cpus 4-7. | |||
The governor for each quad is assigned separately: | |||
<syntaxhighlight lang="shell-session"> | |||
# cpufreq-set -c 0 -r -g ondemand | |||
# cpufreq-set -c 4 -r -g ondemand | |||
</syntaxhighlight> | |||
This change does not persist across reboots. | |||
<div class="toccolours mw-collapsible mw-collapsed"> | |||
<code>ubench results</code> | |||
<div class="mw-collapsible-content"> | |||
{| class="wikitable feature-colors" | |||
! style="text-align:left;"| boot_cpus | |||
! style="text-align:left;"| governor | |||
! style="text-align:left;"| ubench | |||
! style="text-align:left;"| comment | |||
|- | |||
|0,4,5,6,7 | |||
|performance | |||
|1470.9 | |||
|nominal | |||
|- | |||
|0,4,5,6,7 | |||
|ondemand | |||
|1473.7 | |||
|change governor only | |||
|- | |||
|0-7 | |||
|performance | |||
|2619.3 | |||
|change boot_cpus only | |||
|- | |||
|0-7 | |||
|ondemand | |||
|2621.7 | |||
|change both | |||
| | |||
|} | |||
</div> | |||
</div> | |||
== Photos == | |||
|[[File:Fbgrab-athene-xfce4-htop-about.jpg|360x640px]] | |||
== See also == | == See also == | ||
* | * {{MR|1412}} initial PR | ||
* | * {{issue|1401}} initial port issue | ||
* {{Device package|motorola-athene}} | |||
* {{Kernel package|motorola-athene}} |
Latest revision as of 11:55, 1 February 2025
![]() Moto G4 | |
Manufacturer | Motorola |
---|---|
Name | Moto G4 |
Codename | motorola-athene |
Released | 2016 |
Type | handset |
Hardware | |
Chipset | Qualcomm Snapdragon 617 (MSM8952) |
CPU | 4x 1.6 GHz + 4x 1.2 GHz Cortex-A53 |
GPU | Adreno 405 |
Display | 1080 x 1920 |
Storage | 16/32 GB |
Memory | 2/3 GB |
Architecture | aarch64 |
Software | |
Original software | Android |
Original version | 6.0.1 |
postmarketOS | |
Category | testing |
Pre-built images | no |
postmarketOS kernel | 3.10.108 |
Unixbench Whet/Dhry score | 2621.7 |
Flashing |
Partial |
---|---|
USB Networking |
Works |
Internal storage |
No data |
SD card |
No data |
Battery |
Works |
Screen |
Works |
Touchscreen |
Works |
Multimedia | |
3D Acceleration |
No data |
Audio |
Broken |
Camera |
No data |
Camera Flash |
No data |
Connectivity | |
WiFi |
Works |
Bluetooth |
No data |
GPS |
No data |
NFC |
No data |
Modem | |
Calls |
No data |
SMS |
No data |
Mobile data |
No data |
Miscellaneous | |
FDE |
No data |
USB OTG |
No data |
HDMI/DP |
No data |
Sensors | |
Accelerometer |
No data |
Magnetometer |
No data |
Ambient Light |
No data |
Proximity |
No data |
Hall Effect |
No data |
Haptics |
No data |
Barometer |
No data |
Contributors
- fengjiongmax
- thejsa
Users owning this device
- Coatlessali
- Fengjiongmax (Notes: uart solder pads ruined by my poor soldering skill)
- GrantM11235
- Nobodywasishere (Notes: XT1625)
- Stormwoodpecker
- Yuui
Models/Variants
According to Wikipedia, the G4 (SKU xt162x) and G4 Plus (xt164x) differ only trivially (memory, storage or peripherals/sensors [camera resolution, fingerprint reader]).
How to enter flash mode
- Power + Volume Down buttons
Installation
$ pmbootstrap flasher flash_rootfs
$ pmbootstrap flasher boot
Problems
- Firmware issues
- kernel partition can't be flashed because the boot partition is not big enough
- Loading the adsp subsystem works momentarily before crashing the device
- Loading the modem subsystem works momentaily before crashing the device
Firmware issues
Log from dmesg:
[ 68.992082] subsys-pil-tz 1de0000.qcom,venus: venus: Failed to locate venus.mdt
[ 68.992096] msm_vidc: err: Failed to download firmware
[ 68.992976] msm_vidc: err: Failed to load video firmware
[ 68.993000] msm_vidc: err: msm_comm_init_core - firmware loading failed
[ 68.993007] msm_vidc: err: Failed to move from state: 1 to 2
[ 68.993012] msm_vidc: err: Failed to move video instance to init state
[ 68.993080] msm_vidc: err: Failed to create video instance, core: 0, type = 0
Hardware details
hwtest
output for SKU xt1625
For comparison, results from test_sensors
for SKU xt1625 on obsolete sailfishOS version 3.0.0.8 running kernel 3.10.84:
test_sensors output for SKU xt1625
CPU tuning
For unknown reasons, the default configuration boots only 5 cpus, boot_cpus=0,4,5,6,7
. This boots only one of the 1.65 GHz cores, and the four 1.21 GHz cores. This can be shown via cpufreq-info
(package cpufrequtils), or htop
.
The default governor is battery-draining "performance".
To utilize all cores, extract and edit (or update) bootimg.cfg
from boot.img
to use boot_cpus=0-7
. Boot the new image via fastboot boot boot.img
. Alternatively, edit deviceinfo
and repeat pmbootstrap install
. This configuration will boot the 4x 1.65 GHz cores as cpus 0-3 and the 4x 1.21 GHz cores as cpus 4-7.
The governor for each quad is assigned separately:
# cpufreq-set -c 0 -r -g ondemand
# cpufreq-set -c 4 -r -g ondemand
This change does not persist across reboots.
ubench results
Photos
See also
- !1412 initial PR
- #1401 initial port issue
- Device package
- Kernel package