Talk:Google Nexus 6P (huawei-angler)

Then, opening /dev/subsys_adsp will boot the sound card

How to open /dev/subsys_adsp to initialize the sound card?

I am trying to get audio working on Xiaomi Redmi 1S (xiaomi-armani).

--Alive4ever (talk) 22:07, 1 March 2018 (EST)

Failing to acquire an IP address on wlan0
Thank you zhuowei for documenting the Nexus 6P.

I'm struggling to connect to a known-good wifi AP. My setup is as follows: Debian host machine, connected via USB to Nexus 6P hardware.

I'll describe a couple issues:

Installation and SSH access
The Google_Nexus_6P worked well, although password-based authentication for SSH seemed to stop working after the first login. I subsequently opted to include a public key during `$ ./pmbootstrap.py init`

The battery is really awful on this phone. It's gone high-impedance. Anything requiring significant current draw (taking pictures, downloading stuff) will sag the bus and cause the phone to shut off. I'm hoping to find a way to build awareness of this shitty situation into the kernel, and perhaps throttle clock speed or current draw to stop the device from shooting itself in the foot. I'm sure plenty of other postmarket devices are, and will continue to experience the same battery degradation issues.

I used the telnet instructions on Inspecting_the_initramfs to inspect the initramfs. Good instructions. Thanks!

Error starting charging-sdl
I encountered "CHARGING MODE: error starting charging-sdl" and subsequently followed the instructions at Charging-sdl / # extract_initramfs_extra /boot/initramfs-huawei-angler-extra Extract /boot/initramfs-huawei-angler-extra 28942 blocks / # setup_directfb_tslib / # /boot/initramfs-huawei-angler-extra^C / # fontpath=$(awk '/^keyboard-font/{print $3}' /etc/osk.conf) / # charging-sdl -pcf "$fontpath" [INFO] charging-sdl version 0.1.0 commandline read: charging-sdl commandline read: -pcf commandline read: /usr/share/fonts/ttf-dejavu/DejaVuSans.ttf (*) Direct/Thread: Started 'SigHandler' (837) [CRITICAL - OTHER/0] ... 21:54, 9 March 2019 (EST)21:54, 9 March 2019 (EST)21:54, 9 March 2019 (EST)21:54, 9 March 2019 (EST)21:54, 9 March 2019 (EST)| DirectFB 1.7.7 |21:54, 9 March 2019 (EST)21:54, 9 March 2019 (EST)21:54, 9 March 2019 (EST)21:54, 9 March 2019 (EST)21:54, 9 March 2019 (EST)~ (c) 2012-2015 DirectFB integrated media GmbH (c) 2001-2015 The world wide DirectFB Open Source Community (c) 2000-2004 Convergence (integrated media) GmbH (*) DirectFB/Core: Single Application Core. (2017-10-03 12:17)                 (*) Direct/Memcpy: Using Generic 64bit memcpy (*) Direct/Thread: Started 'Fusion Dispatch' (838) [MESSAGING - OTHER/0] ...   (*) Direct/Thread: Started 'VT Switcher' (841) [CRITICAL - OTHER/0] ...    (*) Direct/Thread: Started 'VT Flusher' (842) [DEFAULT - OTHER/0] ... (*) DirectFB/FBDev: Found 'mdssfb_90000' (ID 0) with frame buffer at 0x00020000, 28800k (MMIO 0x00000000, 0k) (*) Direct/Modules: suppress module 'linux_input' (*) Direct/Thread: Started 'Keyboard Input' (843) [INPUT - OTHER/0] ... (*) DirectFB/Input: Keyboard 0.9 (directfb.org) (*) Direct/Thread: Started 'PS/2 Input' (844) [INPUT - OTHER/0] ...    (*) DirectFB/Input: IMPS/2 Mouse 1.0 (directfb.org) (*) DirectFB/Input: Hot-plug detection enabled with Input Hub Driver (*) DirectFB/Graphics: Generic Software Rasterizer 0.7 (directfb.org) (!) DirectFB/FBDev: No supported modes found in /etc/fb.modes and current mode not supported! (!) DirectFB/FBDev: Current mode's pixelformat: rgba 8/0, 8/8, 8/16, 8/24 (32bit) (!) DirectFB/Core/layers: Failed to initialize layer 0! --> A general initialization error occured (!) DirectFB/Core: Could not initialize 'layer_core' core! --> A general initialization error occured Segmentation fault

I ran `charging-sdl` again with no arguments, whereupon it failed in the same way.

What determines the update rate of the files in /sys/class/power_supply? They appear to change at a rather languid 5s interval. The kernel must be communicating with the pmi8994 much faster than that.

Trying to connect to WiFi
Here is section of dmesg that I believe is relevant to network interface initialization:

[ 1046.809777] EXT4-fs (dm-1): re-mounted. Opts: data=ordered [ 1046.995166] EXT4-fs (dm-0): mounting ext2 file system using the ext4 subsystem [ 1046.997448] EXT4-fs (dm-0): mounted filesystem without journal. Opts: (null) [ 1047.414023] mdss_fb_blank_sub: mdss_fb_open+0x27c/0x2e0 mode:0 [ 1049.180221]                  Dongle Host Driver, version 1.201.31 (r) Compiled in drivers/net/wireless/bcmdhd on Dec 2 2018 at 00:20:36 [ 1049.180234] wl_android_wifi_on in   [ 1049.180239] wifi_platform_set_power = 1 [ 1049.180244] dhd_wlan_power Enter: power on   [ 1049.382053] dhd_bus_devreset: == Power ON == [ 1049.382102] msm_pcie_enable: PCIe: Assert the reset of endpoint of RC1. [ 1049.386166] msm_pcie_enable: PCIe RC1 PHY is ready! [ 1049.396199] msm_pcie_enable: PCIe: Release the reset of endpoint of RC1. [ 1049.422873] msm_pcie_enable: PCIe RC1 link initialized [ 1049.423221] dhd_bus_devreset: dhdpcie_bus_clock_start OK   [ 1049.423707] dhdpcie_dongle_attach: PCI_BAR1_WIN = 0 [ 1049.424321] dhdpcie_dongle_attach: BAR1 window val=23 mask=0 [ 1049.424439] DHD: dongle ram size is set to 786432(orig 786432) at 0x180000 [ 1049.424757] dhdpcie_download_code_file: download firmware /lib/firmware/postmarketos/bcmdhd/bcm4358/fw_bcm4358.bin [ 1049.500789] dhdpcie_bus_write_vars: Download, Upload and compare of NVRAM succeeded. [ 1049.501013] Failed to open the file logstrs.bin in dhd_init_logstrs_array, /vendor/firmware/logstrs.bin [ 1049.592605] PCIe shared addr read took 80754 usec before dongle is ready [ 1049.592642] DMA RX offset from shared Area 0 [ 1049.592646] bus->txmode_push is set to 0 [ 1049.592670] ring_info_raw: 56 [ 1049.592673] 88 87 23 00 58 8a 23 00 00 8b 23 00 a8 8b 23 00 [ 1049.592695] b4 8b 23 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 1049.592714] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   [ 1049.592733] 00 00 00 00 2a 00 00 00 [ 1049.592745] max H2D queues 42 [ 1049.593063] dhd_bus_start: Initializing 42 flowrings [ 1049.593102] dhd_bus_cmn_writeshared: [ 1049.593109]  0000: 00 40 40 c5 00 00 00 00 [ 1049.593113] dhd_bus_cmn_writeshared: [ 1049.593119]  0000: 00 30 40 c5 00 00 00 00 [ 1049.593124] dhd_bus_cmn_writeshared: [ 1049.593130]  0000: 00 00 41 c5 00 00 00 00 [ 1049.593134] dhd_bus_cmn_writeshared: [ 1049.593140]  0000: 00 60 40 c5 00 00 00 00 [ 1049.593143] dhd_bus_cmn_writeshared: [ 1049.593150]  0000: 00 e0 40 c5 00 00 00 00 [ 1049.655961] dhd_prot_ioctl: status re   [ 1049.593153] dhd_bus_cmn_writeshared: [ 1049.593159]  0000: 00 f0 40 c5 00 00 00 00 [ 1049.593162] dhd_bus_cmn_writeshared: [ 1049.593166]  0000: 08 00 00 00    [ 1049.594370] wifi_platform_get_mac_addr [ 1049.598666] Firmware up: op_mode=0x0005, MAC=d4:61:2e:12:4f:c3 [ 1049.640323] dhd_prot_ioctl: status ret value is -5 [ 1049.642299] dhd_preinit_ioctls lpc fail WL_DOWN : 0, lpc = 1 [ 1049.643692] dhd_prot_ioctl: status ret value is -23 [ 1049.655245] Firmware version = wl0: Jun 2 2017 17:27:28 version 7.112.300.12 (r702724) FWID 01-f92b9ce0 t value is -26 [ 1049.691285] wl_host_event: Invalid ifidx 0 for wl0 [ 1049.691822] dhd_rtt_init : FTM is supported [ 1049.693518] dhd_bus_devreset: WLAN Power On Done [ 1049.694651] wl_host_event: Invalid ifidx 0 for wl0 [ 1049.694839] wl_host_event: Invalid ifidx 0 for wl0 [ 1049.715465] dhd_prot_flow_ring_create Send Flow create Req msglen flow ID 41 for peer 33:33:00:00:00:16 prio 0 ifindex 0 [ 1049.715838] dhd_prot_process_flow_ring_create_response Flow create Response status = 0 Flow 41 [ 1059.952591] ipa-wan ipa_wwan_ioctl:1415 [rmnet_ipa0] unsupported cmd[35585] [ 1059.953024] ether_ioctl: [rndis0] error: ioctl called for unsupported cmd[35585] [ 1060.128510] ipa-wan ipa_wwan_ioctl:1415 [rmnet_ipa0] unsupported cmd[35143] [ 1060.129080] ipa-wan ipa_wwan_ioctl:1415 [rmnet_ipa0] unsupported cmd[35143] [ 1067.391022] postmarketos-de[2956]: syscall 279 [ 1067.391034] Code: f9400fe5 8b26c0a5 f94000a5 d4000001 (97ffa390) [ 1067.391042] CPU: 1 PID: 2956 Comm: postmarketos-de Not tainted 3.10.73 #9-Alpine [ 1067.391048] task: ffffffc0ba038ac0 ti: ffffffc003acc000 task.ti: ffffffc003acc000 [ 1067.391053] PC is at 0x7a953eb220 [ 1067.391057] LR is at 0x7a94a697c0 [ 1067.391062] pc : [ ] lr : [ ] pstate: 80000000 [ 1067.391066] sp : 0000007fc7ee25c0 [ 1067.391070] x29: 0000007fc7ee25c0 x28: 0000007a94ad0b58 [ 1067.391076] x27: 0000007a94ad0b58 x26: 0000000000138d94 [ 1067.391081] x25: 0000007a94ad0000 x24: 0000000000000724 [ 1067.391087] x23: 00000000000002bd x22: 00000000000001c9 [ 1067.391092] x21: 0000000000000001 x20: 00000000ffffffff [ 1067.391097] x19: 0000005589ac8ac0 x18: 0000005589bfb3e0 [ 1067.391103] x17: 0000007a953eb18c x16: 0000007a94acd3f0 [ 1067.391108] x15: 0000000000000000 x14: 0000000000000000 [ 1067.391114] x13: 0000000000000000 x12: 0000005589847e60 [ 1067.391119] x11: 00000055898703d8 x10: 0000007fc7ee1b90 [ 1067.391124] x9 : 0000000000000000 x8 : 0000000000000117 [ 1067.391129] x7 : 0000007a9545b874 x6 : 00000000fffffff8 [ 1067.391135] x5 : 0000000000000001 x4 : 0000000000000020 [ 1067.391140] x3 : 0000000000000030 x2 : 0000007a947ea537 [ 1067.391145] x1 : 0000000000000001 x0 : 0000007a94a97ea7 [ 1104.302226] subsys-pil-tz fdce0000.qcom,venus: venus: Failed to locate venus.mdt

I configured wpa_supplicant.conf and /etc/network/interfaces as follows: (WiFi credentials omitted)

huawei-angler:~$ cat /etc/wpa_supplicant/wpa_supplicant.conf network={ ssid="XiRenSheng (talk) 21:54, 9 March 2019 (EST)" #psk="XiRenSheng (talk) 21:54, 9 March 2019 (EST)" psk=21:54, 9 March 2019 (EST)21:54, 9 March 2019 (EST)21:54, 9 March 2019 (EST)21:54, 9 March 2019 (EST)21:54, 9 March 2019 (EST)21:54, 9 March 2019 (EST)21:54, 9 March 2019 (EST)21:54, 9 March 2019 (EST)21:54, 9 March 2019 (EST)21:54, 9 March 2019 (EST)XiRenSheng (talk) 21:54, 9 March 2019 (EST) }

huawei-angler:~$ cat /etc/network/interfaces auto lo   iface lo inet loopback auto wlan0 iface wlan0 inet dhcp

After ssh'ing in, I observe that wpa_supplicant has stopped

huawei-angler:~$ sudo service wpa_supplicant status * status: stopped

I can restart the service, and it will stay alive

huawei-angler:~$ sudo service wpa_supplicant restart * Starting WPA Supplicant Daemon ... Successfully initialized wpa_supplicant ioctl[SIOCSIWMODE]: Not supported ioctl[SIOCGIWRANGE]: Not supported ioctl[SIOCGIWMODE]: Not supported ioctl[SIOCSIWAP]: Not supported ioctl[SIOCSIWESSID]: Not supported ioctl[SIOCSIWENCODEEXT]: Not supported ioctl[SIOCSIWENCODE]: Not supported ioctl[SIOCSIWENCODEEXT]: Not supported ioctl[SIOCSIWENCODE]: Not supported ioctl[SIOCSIWENCODEEXT]: Not supported ioctl[SIOCSIWENCODE]: Not supported ioctl[SIOCSIWENCODEEXT]: Not supported ioctl[SIOCSIWENCODE]: Not supported                                                 [ ok ] huawei-angler:~$ sudo service wpa_supplicant status * status: started

This shows up in dmesg

[ 6558.560661] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready

ip link looks like this:

huawei-angler:~$ ip link show wlan0 5: wlan0:  mtu 1500 qdisc pfifo_fast state DORMANT qlen 1000 link/ether d4:61:2e:12:4f:c3 brd ff:ff:ff:ff:ff:ff

`sudo iw dev wlan0 scan` shows many available wifi networks

There seem to be two dhcp daemons running

huawei-angler:~$ ps -e | grep -E "(dhc|wpa)" 522 root     0:00 udhcpd 2737 root     0:00 dhcpcd wlan0 5846 root     0:00 /sbin/wpa_supplicant -u -Dwext -B -c/etc/wpa_supplicant/wpa_supplicant.conf -iwlan0 5952 mattermo 0:00 grep -E (dhc|wpa)

I did edit /etc/conf.d/wpa_supplicant to try specifying only "wext" OR "nl80211" driver, but this seems to have made no difference. I will continue investigating, and will respond if I find a fix. If you're reading this, thank you!