<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.pine64.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Memleek</id>
	<title>PINE64 - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.pine64.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Memleek"/>
	<link rel="alternate" type="text/html" href="https://wiki.pine64.org/wiki/Special:Contributions/Memleek"/>
	<updated>2026-04-18T07:23:36Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.37.1</generator>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PinePhone_Pro/IMX258_Camera_Debugging&amp;diff=13252</id>
		<title>PinePhone Pro/IMX258 Camera Debugging</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PinePhone_Pro/IMX258_Camera_Debugging&amp;diff=13252"/>
		<updated>2022-07-02T23:07:58Z</updated>

		<summary type="html">&lt;p&gt;Memleek: explain better how one figures out what function is responsible for frame completion notification&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Under construction}}&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
&lt;br /&gt;
The Pinephone Pro's rear camera is a Sony IMX258. The camera driver is present upstream, and at least [https://gitlab.manjaro.org/manjaro-arm/packages/core/linux-pinephonepro Manjaro's kernel] (downstream of Megi's) enables the driver. The camera does not seem to work; this page catalogs work on figuring out why.&lt;br /&gt;
&lt;br /&gt;
== Initial status ==&lt;br /&gt;
&lt;br /&gt;
What do we see in dmesg?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
imx258 1-001a: supply vana not found, using dummy regulator&lt;br /&gt;
imx258 1-001a: supply vdig not found, using dummy regulator&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This tells us the kernel loads the driver, which is something.&lt;br /&gt;
&lt;br /&gt;
Are these errors bad/fatal? Inspecting the [https://github.com/megous/linux/blob/orange-pi-5.17/drivers/media/i2c/imx258.c source] shows us that these supplies are defined in the &amp;lt;code&amp;gt;imx258_supply_names&amp;lt;/code&amp;gt; array, and &amp;lt;code&amp;gt;imx258_probe&amp;lt;/code&amp;gt; calls &amp;lt;code&amp;gt;devm_regulator_bulk_get&amp;lt;/code&amp;gt; to set them up.&lt;br /&gt;
&amp;lt;code&amp;gt;imx258_probe&amp;lt;/code&amp;gt; checks the return code from &amp;lt;code&amp;gt;devm_regulator_bulk_get&amp;lt;/code&amp;gt;, emitting a fatal &amp;quot;Failed to get supplies&amp;quot; message if the return code is negative (indicating failure). Since we don't see this message (or any others from the driver), it looks like it loads successfully!&lt;br /&gt;
&lt;br /&gt;
=== How can we test the camera? ===&lt;br /&gt;
&lt;br /&gt;
==== Megapixels ====&lt;br /&gt;
&lt;br /&gt;
[https://gitlab.com/postmarketOS/megapixels Megapixels] requires a per-device file to configure cameras. This one isn't complete (most of its numbers are complete nonsense), but it should let us see what happens when Megapixels tries to access the camera:&lt;br /&gt;
&amp;lt;code&amp;gt;pine64,pinephone-pro.ini&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[device]&lt;br /&gt;
make=PINE64&lt;br /&gt;
model=PinePhone Pro&lt;br /&gt;
&lt;br /&gt;
[rear]&lt;br /&gt;
driver=imx258&lt;br /&gt;
media-driver=rkisp1&lt;br /&gt;
capture-width=4208&lt;br /&gt;
capture-height=3118&lt;br /&gt;
capture-rate=60&lt;br /&gt;
capture-fmt=GRBG10P&lt;br /&gt;
preview-width=1280&lt;br /&gt;
preview-height=960&lt;br /&gt;
preview-rate=60&lt;br /&gt;
#preview-fmt=BGGR8&lt;br /&gt;
capture-fmt=GRBG10P&lt;br /&gt;
rotate=90&lt;br /&gt;
mirrored=true&lt;br /&gt;
focallength=2.6&lt;br /&gt;
cropfactor=12.7&lt;br /&gt;
fnumber=2.8&lt;br /&gt;
flash-display=true&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This segfaulted Megapixels for me. After patching some trivial segfaults, I get fatal GTK4 issues and other tangential problems. Let's try something else.&lt;br /&gt;
&lt;br /&gt;
==== Manually setting up a camera pipeline ====&lt;br /&gt;
&lt;br /&gt;
We can roughly follow [https://www.kernel.org/doc/html/latest/admin-guide/media/rkisp1.html this guide]. Doing so gives us the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;quot;media-ctl&amp;quot; &amp;quot;-d&amp;quot; &amp;quot;platform:rkisp1&amp;quot; &amp;quot;-r&amp;quot;&lt;br /&gt;
&amp;quot;media-ctl&amp;quot; &amp;quot;-d&amp;quot; &amp;quot;platform:rkisp1&amp;quot; &amp;quot;-l&amp;quot; &amp;quot;'imx258 1-001a':0 -&amp;gt; 'rkisp1_isp':0 [1]&amp;quot;&lt;br /&gt;
&amp;quot;media-ctl&amp;quot; &amp;quot;-d&amp;quot; &amp;quot;platform:rkisp1&amp;quot; &amp;quot;-l&amp;quot; &amp;quot;'rkisp1_isp':2 -&amp;gt; 'rkisp1_resizer_selfpath':0 [1]&amp;quot;&lt;br /&gt;
&amp;quot;media-ctl&amp;quot; &amp;quot;-d&amp;quot; &amp;quot;platform:rkisp1&amp;quot; &amp;quot;--set-v4l2&amp;quot; '&amp;quot;rkisp1_isp&amp;quot;:0 [fmt:SGRBG10_1X10/1048x780]'&lt;br /&gt;
&amp;quot;v4l2-ctl&amp;quot; &amp;quot;-z&amp;quot; &amp;quot;platform:rkisp1&amp;quot; &amp;quot;-d&amp;quot; &amp;quot;rkisp1_selfpath&amp;quot; &amp;quot;-v&amp;quot; &amp;quot;width=1048,height=780,&amp;quot;&lt;br /&gt;
&amp;quot;media-ctl&amp;quot; &amp;quot;-d&amp;quot; &amp;quot;platform:rkisp1&amp;quot; &amp;quot;--set-v4l2&amp;quot; '&amp;quot;rkisp1_resizer_selfpath&amp;quot;:0 [fmt:SGRBG10_1X10/1048x780 crop:(0,0)/1048x780]'&lt;br /&gt;
&lt;br /&gt;
&amp;quot;v4l2-ctl&amp;quot; &amp;quot;-z&amp;quot; &amp;quot;platform:rkisp1&amp;quot; &amp;quot;-d&amp;quot; &amp;quot;rkisp1_selfpath&amp;quot; &amp;quot;-v&amp;quot; &amp;quot;width=800,height=600,pixelformat=422P&amp;quot;&lt;br /&gt;
&amp;quot;v4l2-ctl&amp;quot; &amp;quot;-z&amp;quot; &amp;quot;platform:rkisp1&amp;quot; &amp;quot;-d&amp;quot; &amp;quot;rkisp1_selfpath&amp;quot; &amp;quot;--stream-mmap&amp;quot; &amp;quot;--stream-count&amp;quot; &amp;quot;1&amp;quot; &amp;quot;--verbose&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Careful readers will note that this is setting the camera up with a low resolution compared to what the sensor can do. For some reason I can't get the rkisp1 node to configure its sink pad with the maximum resolution of the sensor (4208x3118). Instead, it sets itself to 4032x3024. This mismatch is forbidden and causes v4l2 to give us EPIPE when we try to enable the stream. Using the lower resolution gets us further--the last command (which attempts to save a single frame of video) gives output like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
VIDIOC_QUERYCAP: ok&lt;br /&gt;
		VIDIOC_REQBUFS returned 0 (Success)&lt;br /&gt;
		VIDIOC_QUERYBUF returned 0 (Success)&lt;br /&gt;
		VIDIOC_QUERYBUF returned 0 (Success)&lt;br /&gt;
		VIDIOC_QUERYBUF returned 0 (Success)&lt;br /&gt;
		VIDIOC_QUERYBUF returned 0 (Success)&lt;br /&gt;
		VIDIOC_QBUF returned 0 (Success)&lt;br /&gt;
		VIDIOC_QBUF returned 0 (Success)&lt;br /&gt;
		VIDIOC_QBUF returned 0 (Success)&lt;br /&gt;
		VIDIOC_QBUF returned 0 (Success)&lt;br /&gt;
		VIDIOC_STREAMON returned 0 (Success)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
But then it just hangs there indefinitely.&lt;br /&gt;
&lt;br /&gt;
Running under strace, we see the program stuck in an ioctl:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ioctl(3, VIDIOC_DQBUF, {type=V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[https://www.kernel.org/doc/html/v4.13/media/uapi/v4l/vidioc-qbuf.html VIDIOC_DQBUF] corresponds to dequeuing a buffer once it has been filled with an image by the v4l2 device. Apparently, the device never gives us back a captured frame.&lt;br /&gt;
&lt;br /&gt;
=== Now what? ===&lt;br /&gt;
&lt;br /&gt;
==== Does i2c work at all? ====&lt;br /&gt;
&lt;br /&gt;
The camera driver uses i2c; we can see the camera [https://github.com/megous/linux/blob/c5af9f4f874a66b65c73c450b79f6a86b1b46332/arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts#L890-L914 in the .dts] to determine that it's on i2c bus 1, address 0x1a.&lt;br /&gt;
&lt;br /&gt;
The imx258 is controlled over i2c, and sends image data over MIPI. The first step is to see if the i2c control is working.&lt;br /&gt;
&lt;br /&gt;
Looking back at the driver, it seems we should see errors in dmesg if i2c communication fails. The driver checks the chip id in its probe function, which uses i2c, so we can conclude that i2c gets set up properly initially. Does it keep working?&lt;br /&gt;
&lt;br /&gt;
==== Does i2c keep working? (FTrace) ====&lt;br /&gt;
&lt;br /&gt;
We can see if other functions that use i2c produce errors--for example, when we run our &amp;lt;code&amp;gt;&amp;quot;v4l2-ctl&amp;quot; ... &amp;quot;--stream-mmap&amp;quot;&amp;lt;/code&amp;gt; command, we expect that &amp;lt;code&amp;gt;imx258_start_streaming&amp;lt;/code&amp;gt; will get called, and this function also writes a load of registers over i2c.&lt;br /&gt;
&lt;br /&gt;
Build and install a kernel with CONFIG_FTRACE (not hard, but outside the scope of this write-up) and enable function graph tracing:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo su&lt;br /&gt;
# cd /sys/kernel/debug/tracing&lt;br /&gt;
# echo function_graph &amp;gt; current_tracer&lt;br /&gt;
# cat available_filter_functions | grep -E 'rkisp|imx258|v4l2' | awk '{print $1}' &amp;gt; set_graph_function&lt;br /&gt;
# echo 'vm_map_pages,__iommu_map,iommu_map_sg_atomic,rk_iommu_map,__alloc_pages,dma_alloc_attrs,dma_mmap_attrs,__vm_map_pages,vb2_mmap,clk_e,able,schedule_timeout,clk_disable,regmap_write,schedule,__i2c_tra,sfer,i2c_tra,sfer_buffer_flags,dma_free_attrs' | tr , '\n' &amp;gt; set_graph_notrace&lt;br /&gt;
# tee trace_pipe &amp;gt; ~/function-trace.log&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, in another terminal session, run the &amp;lt;code&amp;gt;&amp;quot;v4l2-ctl&amp;quot; ... &amp;quot;--stream-mmap&amp;quot;&amp;lt;/code&amp;gt; command again. We end up with a bunch (but hopefully not *too* much) of output in our first terminal and the &amp;lt;code&amp;gt;~/function-trace.log&amp;lt;/code&amp;gt; file.&lt;br /&gt;
&lt;br /&gt;
A quick grep shows that &amp;lt;code&amp;gt;imx258_start_streaming&amp;lt;/code&amp;gt; is indeed called, so '''i2c is working properly'''.&lt;br /&gt;
&lt;br /&gt;
=== If i2c works, what doesn't? ===&lt;br /&gt;
&lt;br /&gt;
Our program that asks for a video frame is still hung! We ask the camera to start streaming frames, it presumably does, but the v4l2 stack never tells us a frame has finished. Doing some digging in the v4l2 stack (and the rkisp1 driver), we find out that rkisp1 is notified about frame status via interrupts. We figure this out by manually backtracking through the code to see when &amp;lt;code&amp;gt;vb2_buffer_done&amp;lt;/code&amp;gt;, the function in the vb2 API to call when a frame is finished, would be called. In the rkisp1 code, &amp;lt;code&amp;gt;vb2_buffer_done&amp;lt;/code&amp;gt; is only called from &amp;lt;code&amp;gt;rkisp1_handle_buffer&amp;lt;/code&amp;gt; which is only called from &amp;lt;code&amp;gt;rkisp1_capture_isr&amp;lt;/code&amp;gt;, which (for the PPP's rk3399 SoC) is only called from &amp;lt;code&amp;gt;rkisp1_isr&amp;lt;/code&amp;gt;, which is an interrupt handler. We know that it's an interrupt handler from the name (&amp;lt;code&amp;gt;_isr&amp;lt;/code&amp;gt;), but also because it gets passed (indirectly) to &amp;lt;code&amp;gt;devm_request_irq&amp;lt;/code&amp;gt; by way of being the &amp;lt;code&amp;gt;.isr&amp;lt;/code&amp;gt; field of &amp;lt;code&amp;gt;rk3399_isp_isrs&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Perhaps the hardware is never actually emitting the interrupt that signals a frame being finished. Indeed, grepping our FTrace log shows that &amp;lt;code&amp;gt;rkisp1_isr&amp;lt;/code&amp;gt; is never called. A quick look at &amp;lt;code&amp;gt;/proc/interrupts&amp;lt;/code&amp;gt; shows that '''the only interrupt associated with the isp has never triggered''' (0 count on every CPU):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# head -n1 /proc/interrupts; grep isp /proc/interrupts&lt;br /&gt;
           CPU0       CPU1       CPU2       CPU3       CPU4       CPU5       &lt;br /&gt;
 57:          0          0          0          0          0          0     GICv3  75 Level     ff914000.iommu, rkisp1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;rkisp1&amp;lt;/code&amp;gt; debugfs info ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;rkisp1&amp;lt;/code&amp;gt; driver keeps some [https://github.com/megous/linux/blob/c5af9f4f874a66b65c73c450b79f6a86b1b46332/drivers/media/platform/rockchip/rkisp1/rkisp1-common.h#L335-L363 error/debug counters] in debugfs, which can be viewed at &amp;lt;code&amp;gt;/sys/kernel/debug/ff910000.isp0&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Sadly, the only one of these that comes up nonzero is &amp;lt;code&amp;gt;sp_stop_timeout&amp;lt;/code&amp;gt; (&amp;quot;upon stream stop, the capture waits 1 second for the isr to stop the stream. This param is incremented in case of timeout&amp;quot;). I observe it to increment once per time I terminate the &amp;lt;code&amp;gt;&amp;quot;v4l2-ctl&amp;quot; ... &amp;quot;--stream-mmap&amp;quot;&amp;lt;/code&amp;gt; command. This tells us what we already know: interrupts are not firing, but it also tells us that we aren't hitting any other errors that rkisp1 knows about.&lt;br /&gt;
&lt;br /&gt;
== Next steps ==&lt;br /&gt;
&lt;br /&gt;
Where do we go from here? I don't know--something may be wrong with the way the .dts specifies interrupts, some kind of firmware/GIC (the rk3399's interrupt controller) configuration issue, or something else. It would be good to try to determine:&lt;br /&gt;
&lt;br /&gt;
* Whether the MIPI lines actually show traffic, if someone has a logic analyzer and a dissected PPP.&lt;br /&gt;
* Whether the DMA of frames to memory actually happens, regardless of (lack of) emission of the interrupt that tells us when said DMA finishes a frame.&lt;br /&gt;
* Whether the regulator messages we see during boot are actually significant. I don't know enough about the Linux regulator framework to say whether these being not-found means power is not correctly supplied, or if Linux just isn't being properly informed of the power supply requirements for precise tracking/power-saving when the camera is off.&lt;br /&gt;
&lt;br /&gt;
== Megi saves the day ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[I] &amp;lt;megi&amp;gt; you might be interested in this https://megous.com/dl/tmp/0ae6ba03a17a3d53.png&lt;br /&gt;
[I] &amp;lt;megi&amp;gt; https://megous.com/git/linux/tag/?h=orange-pi-5.18-20220521-1759&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Turns out, the .dts had the wrong ISP connected to the sensor! This is fixed in [https://github.com/megous/linux/commit/9afd884f8b36121fb6097e77b6d35fe46ab48ad9 this commit], which is included in kernel version 5.18 or newer.&lt;br /&gt;
&lt;br /&gt;
With a sufficiently new kernel, the following should produce an image (&amp;lt;code&amp;gt;frame.jpg&amp;lt;/code&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;quot;media-ctl&amp;quot; &amp;quot;-d&amp;quot; &amp;quot;platform:rkisp1&amp;quot; &amp;quot;-r&amp;quot;&lt;br /&gt;
&amp;quot;media-ctl&amp;quot; &amp;quot;-d&amp;quot; &amp;quot;platform:rkisp1&amp;quot; &amp;quot;--set-v4l2&amp;quot; '&amp;quot;imx258 1-001a&amp;quot;:0 [fmt:SGRBG10_1X10/1048x780]'&lt;br /&gt;
&amp;quot;media-ctl&amp;quot; &amp;quot;-d&amp;quot; &amp;quot;platform:rkisp1&amp;quot; &amp;quot;-l&amp;quot; &amp;quot;'imx258 1-001a':0 -&amp;gt; 'rkisp1_isp':0 [1]&amp;quot;&lt;br /&gt;
&amp;quot;media-ctl&amp;quot; &amp;quot;-d&amp;quot; &amp;quot;platform:rkisp1&amp;quot; &amp;quot;-l&amp;quot; &amp;quot;'rkisp1_isp':2 -&amp;gt; 'rkisp1_resizer_selfpath':0 [1]&amp;quot;&lt;br /&gt;
&amp;quot;media-ctl&amp;quot; &amp;quot;-d&amp;quot; &amp;quot;platform:rkisp1&amp;quot; &amp;quot;--set-v4l2&amp;quot; '&amp;quot;rkisp1_isp&amp;quot;:0 [fmt:SGRBG10_1X10/1048x780 crop:(0,0)/1048x780]'&lt;br /&gt;
&amp;quot;media-ctl&amp;quot; &amp;quot;-d&amp;quot; &amp;quot;platform:rkisp1&amp;quot; &amp;quot;--set-v4l2&amp;quot; '&amp;quot;rkisp1_isp&amp;quot;:2 [fmt:YUYV8_2X8/1048x780 crop:(0,0)/1048x780]'&lt;br /&gt;
&amp;quot;v4l2-ctl&amp;quot; &amp;quot;-z&amp;quot; &amp;quot;platform:rkisp1&amp;quot; &amp;quot;-d&amp;quot; &amp;quot;rkisp1_selfpath&amp;quot; &amp;quot;-v&amp;quot; &amp;quot;width=1048,height=780,&amp;quot;&lt;br /&gt;
&amp;quot;media-ctl&amp;quot; &amp;quot;-d&amp;quot; &amp;quot;platform:rkisp1&amp;quot; &amp;quot;--set-v4l2&amp;quot; '&amp;quot;rkisp1_resizer_selfpath&amp;quot;:0 [fmt:YUYV8_2X8/1048x780 crop:(0,0)/1048x780]'&lt;br /&gt;
&lt;br /&gt;
&amp;quot;v4l2-ctl&amp;quot; &amp;quot;-z&amp;quot; &amp;quot;platform:rkisp1&amp;quot; &amp;quot;-d&amp;quot; &amp;quot;rkisp1_selfpath&amp;quot; &amp;quot;-v&amp;quot; &amp;quot;width=1048,height=780,pixelformat=422P&amp;quot;&lt;br /&gt;
&amp;quot;v4l2-ctl&amp;quot; &amp;quot;-z&amp;quot; &amp;quot;platform:rkisp1&amp;quot; &amp;quot;-d&amp;quot; &amp;quot;rkisp1_selfpath&amp;quot; &amp;quot;--stream-mmap&amp;quot; &amp;quot;--stream-count&amp;quot; &amp;quot;1&amp;quot; &amp;quot;--stream-to=frame.raw&amp;quot;&lt;br /&gt;
&lt;br /&gt;
ffmpeg -y -s:v 1048x780 -pix_fmt yuv422p -i frame.raw frame.jpg&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Similarly, you can take a photo from the front camera with the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;quot;media-ctl&amp;quot; &amp;quot;-d&amp;quot; &amp;quot;platform:rkisp1&amp;quot; &amp;quot;-r&amp;quot;&lt;br /&gt;
&amp;quot;media-ctl&amp;quot; &amp;quot;-d&amp;quot; &amp;quot;platform:rkisp1&amp;quot; &amp;quot;--set-v4l2&amp;quot; &amp;quot;'m00_f_ov8858 1-0036':0 [fmt:SBGGR10_1X10/1632x1224]&amp;quot;&lt;br /&gt;
&amp;quot;media-ctl&amp;quot; &amp;quot;-d&amp;quot; &amp;quot;platform:rkisp1&amp;quot; &amp;quot;-l&amp;quot; &amp;quot;'m00_f_ov8858 1-0036':0 -&amp;gt; 'rkisp1_isp':0 [1]&amp;quot;&lt;br /&gt;
&amp;quot;media-ctl&amp;quot; &amp;quot;-d&amp;quot; &amp;quot;platform:rkisp1&amp;quot; &amp;quot;-l&amp;quot; &amp;quot;'rkisp1_isp':2 -&amp;gt; 'rkisp1_resizer_selfpath':0 [1]&amp;quot;&lt;br /&gt;
&amp;quot;media-ctl&amp;quot; &amp;quot;-d&amp;quot; &amp;quot;platform:rkisp1&amp;quot; &amp;quot;--set-v4l2&amp;quot; &amp;quot;'rkisp1_isp':0 [fmt:SBGGR10_1X10/1632x1224 crop:(0,0)/1632x1224]&amp;quot;&lt;br /&gt;
&amp;quot;media-ctl&amp;quot; &amp;quot;-d&amp;quot; &amp;quot;platform:rkisp1&amp;quot; &amp;quot;--set-v4l2&amp;quot; &amp;quot;'rkisp1_isp':2 [fmt:YUYV8_2X8/1632x1224 crop:(0,0)/1632x1224]&amp;quot;&lt;br /&gt;
&amp;quot;v4l2-ctl&amp;quot; &amp;quot;-z&amp;quot; &amp;quot;platform:rkisp1&amp;quot; &amp;quot;-d&amp;quot; &amp;quot;rkisp1_selfpath&amp;quot; &amp;quot;-v&amp;quot; &amp;quot;width=1632,height=1224,&amp;quot;&lt;br /&gt;
&amp;quot;media-ctl&amp;quot; &amp;quot;-d&amp;quot; &amp;quot;platform:rkisp1&amp;quot; &amp;quot;--set-v4l2&amp;quot; &amp;quot;'rkisp1_resizer_selfpath':0 [fmt:YUYV8_2X8/1632x1224 crop:(0,0)/1632x1224]&amp;quot;&lt;br /&gt;
&amp;quot;media-ctl&amp;quot; &amp;quot;-d&amp;quot; &amp;quot;platform:rkisp1&amp;quot; &amp;quot;--set-v4l2&amp;quot; &amp;quot;'rkisp1_resizer_selfpath':1 [fmt:YUYV8_2X8/1632x1224]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;v4l2-ctl&amp;quot; &amp;quot;-z&amp;quot; &amp;quot;platform:rkisp1&amp;quot; &amp;quot;-d&amp;quot; &amp;quot;rkisp1_selfpath&amp;quot; &amp;quot;-v&amp;quot; &amp;quot;width=1632,height=1224,pixelformat=422P&amp;quot;&lt;br /&gt;
&amp;quot;v4l2-ctl&amp;quot; &amp;quot;-z&amp;quot; &amp;quot;platform:rkisp1&amp;quot; &amp;quot;-d&amp;quot; &amp;quot;rkisp1_selfpath&amp;quot; &amp;quot;--stream-mmap&amp;quot; &amp;quot;--stream-count&amp;quot; &amp;quot;1&amp;quot; &amp;quot;--stream-to=frame.raw&amp;quot;&lt;br /&gt;
&lt;br /&gt;
ffmpeg -y -s:v 1632x1224 -pix_fmt yuv422p -i frame.raw frame.jpg&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In some cases, the isp exposes 2 devices nodes, and the nodes have separate topologies with a different sensor attached to each. In this situation, you may need to reference the isp using the correct device node for the commands to work.&lt;br /&gt;
&lt;br /&gt;
=== What's left? ===&lt;br /&gt;
&lt;br /&gt;
* libcamera and megapixels still don't work. Megapixels appears to need support for debayering YUYV, and both appear to be configuring the rkisp1 pipeline wrong.&lt;br /&gt;
* The images captured are pretty green and seem to have two pixels of garbage at their bottom edge. rkisp1 supports auto white-balance (AWB) using the params/stats pads, and libcamera has some smarts that may hook these up properly. In the meantime, raw images can be postprocessed to improve white balance and exposure.&lt;br /&gt;
&lt;br /&gt;
== Useful links == &lt;br /&gt;
&lt;br /&gt;
* [https://files.pine64.org/doc/PinePhonePro/PinephonePro-Schematic-V1.0-20211127.pdf Pinephone Pro Schematic]&lt;br /&gt;
* [https://blog.krybot.com/a?ID=01650-cea27a80-a1ab-4da1-9cb5-3945be91e3e1 Background on the GIC]&lt;br /&gt;
* [https://elinux.org/images/9/94/ISP-presentation.pdf Background on the rkisp1 ISP]&lt;/div&gt;</summary>
		<author><name>Memleek</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PinePhone_Pro_Software_State&amp;diff=13110</id>
		<title>PinePhone Pro Software State</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PinePhone_Pro_Software_State&amp;diff=13110"/>
		<updated>2022-05-21T20:37:32Z</updated>

		<summary type="html">&lt;p&gt;Memleek: update rear camera status&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Presently the PinePhone Pro Explorer Edition is aimed at '''Linux developers with an extensive knowledge of embedded systems and/or experience with mobile Linux'''. It will take time for all the PinePhone Pro’s functionality to reach software parity with the original PinePhone and for mobile operating systems, in more general, to reach a higher degree of maturity.&lt;br /&gt;
&lt;br /&gt;
Bear in mind that the software for these smartphones is still in a very early stage, with most of the software being in alpha or beta state. That's especially also the case for scalability of applications, their availability and practicability, any hardware function implementations and the firmware. The software is provided as is. There is no warranty for the software, not even for merchantability or fitness for a particular purpose.&lt;br /&gt;
&lt;br /&gt;
The following table lists the feature functionality status of the unaltered pre-installed factory image of the current shipping batch and as comparison an up-to-date reference image (no responsibility is accepted for the accuracy of this information, the list is provided and updated by the community). If you have any questions regarding the current state of the software or of specific features working, please don't hesitate to ask in the [[Main Page#Community and Support|community chat]] '''before buying the device''':&lt;br /&gt;
&lt;br /&gt;
* Discord: ''#pinephone'' under https://discord.gg/pine64&lt;br /&gt;
* IRC: ''#pinephone'' on ''irc.pine64.org''. Note: please consider Matrix, Discord or Telegram due to the volatile nature of IRC&lt;br /&gt;
* Matrix: https://app.element.io/#/room/#pinephone:matrix.org&lt;br /&gt;
* Telegram: https://t.me/pinephone&lt;br /&gt;
&lt;br /&gt;
{{Hint|The software is '''written by the community''', any contributions towards the community projects are greatly appreciated! Please see &amp;quot;[[How to Contribute]]&amp;quot; to learn about how to contribute to the software projects and &amp;quot;[[Where to Report Bugs]]&amp;quot; to learn about where to report bugs.}}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable plainrowheaders&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Functionality&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; style=&amp;quot;min-width: 260px;&amp;quot;  | Component&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; style=&amp;quot;width: 120px;&amp;quot; | Status (factory)¹&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; style=&amp;quot;width: 120px;&amp;quot; | Status (updated)²&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Notes&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; rowspan=&amp;quot;3&amp;quot; | Bootloader&lt;br /&gt;
| &amp;lt;code&amp;gt;U-Boot&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | Critical bugs&lt;br /&gt;
| Some critical software bugs currently not fixed yet: A drained battery causes U-Boot to bootloop (cause is known and currently being worked on);&amp;lt;sup&amp;gt;[[PinePhone_Pro#The battery is fully drained|Workaround]]&amp;lt;/sup&amp;gt; Occasionally the eMMC fails to initialize&amp;lt;sup&amp;gt;[https://gitlab.com/postmarketOS/pmaports/-/issues/1424 Report]&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;SPI&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | Unfinished&lt;br /&gt;
| SPI memory is currently empty in the Explorer Edition batch, a corrupted installation on the eMMC has a higher boot priority than a fresh microSD card installation, leading to a involved recovery procedure&amp;lt;sup&amp;gt;[https://tow-boot.org/ Planned]&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Boot GUI&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | Not implemented&lt;br /&gt;
| Currently there is no graphical boot selection implemented&amp;lt;sup&amp;gt;[https://tow-boot.org/ Possibly planned]&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; rowspan=&amp;quot;3&amp;quot; | Operating System&lt;br /&gt;
| &amp;lt;code&amp;gt;Stability&amp;lt;/code&amp;gt;&lt;br /&gt;
| style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | Critical bugs&lt;br /&gt;
| style=&amp;quot;background:LightYellow; text-align:center;&amp;quot; | WIP&lt;br /&gt;
| The pre-flashed and outdated operating system on the eMMC often gets corrupted after updating&amp;lt;sup&amp;gt;[https://forum.pine64.org/showthread.php?tid=15950 Example]&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Suspend&amp;lt;/code&amp;gt;&lt;br /&gt;
| style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | Not working&lt;br /&gt;
| style=&amp;quot;background:LightYellow; text-align:center;&amp;quot; | Experimental&lt;br /&gt;
| '''Without suspend the phone will drain very fast!''' Suspend only available in specific more recent images&amp;lt;sup&amp;gt;[https://www.pine64.org/2022/03/15/march-update-introducing-the-quartzpro64/ News]&amp;lt;/sup&amp;gt; Audio is often higher pitched after waking up from suspend due to a bug&amp;lt;sup&amp;gt;[https://github.com/dreemurrs-embedded/Pine64-Arch/issues/381 Report]&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Updates&amp;lt;/code&amp;gt;&lt;br /&gt;
| style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | Critical bugs&lt;br /&gt;
| style=&amp;quot;background:LightYellow; text-align:center;&amp;quot; | WIP&lt;br /&gt;
| The pre-flashed and outdated operating system on the eMMC often gets corrupted after updating&amp;lt;sup&amp;gt;[https://forum.pine64.org/showthread.php?tid=15950 Example]&amp;lt;/sup&amp;gt;; Pacman database lock preventing updates&amp;lt;sup&amp;gt;[https://wiki.archlinux.org/title/pacman#%22Failed_to_init_transaction_(unable_to_lock_database)%22_error Solution]&amp;lt;/sup&amp;gt;; Keyring bug&amp;lt;sup&amp;gt;[Solution is to run &amp;quot;pinephonepro-post-install&amp;quot; script as root]&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; rowspan=&amp;quot;5&amp;quot; | Modem&lt;br /&gt;
| &amp;lt;code&amp;gt;General&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | Critical bugs&lt;br /&gt;
| The modem crashes frequently&amp;lt;sup&amp;gt;[https://gitlab.manjaro.org/manjaro-arm/issues/pinephone/phosh/-/issues/147 Report]&amp;lt;/sup&amp;gt;&amp;lt;sup&amp;gt;[https://gitlab.com/mobian1/devices/eg25-manager/-/issues/15 Report]&amp;lt;/sup&amp;gt;&amp;lt;sup&amp;gt;[https://github.com/Biktorgj/pinephone_modem_sdk Alternative firmware]&amp;lt;/sup&amp;gt;; Slow wakeup&amp;lt;sup&amp;gt;[https://gitlab.com/mobian1/devices/eg25-manager/-/issues/34 Report]&amp;lt;/sup&amp;gt;; Some carriers blocking specific TANs in their network&amp;lt;sup&amp;gt;[[PinePhone Carrier Support]]&amp;lt;/sup&amp;gt;; '''Note:''' Proprietary firmware&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Phone&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightYellow; text-align:center;&amp;quot; | WIP&lt;br /&gt;
| The modem crashes frequently, which can lead to missed calls&amp;lt;sup&amp;gt;[https://gitlab.manjaro.org/manjaro-arm/issues/pinephone/phosh/-/issues/147 Report]&amp;lt;/sup&amp;gt;&amp;lt;sup&amp;gt;[https://gitlab.com/mobian1/devices/eg25-manager/-/issues/15 Report]&amp;lt;/sup&amp;gt;&amp;lt;sup&amp;gt;[https://github.com/Biktorgj/pinephone_modem_sdk Alternative firmware]&amp;lt;/sup&amp;gt;; bad call audio quality&amp;lt;sup&amp;gt;[https://gitlab.manjaro.org/manjaro-arm/issues/pinephone/phosh/-/issues/249 Report]&amp;lt;/sup&amp;gt;;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;SMS&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightGreen; text-align:center;&amp;quot; | Working&lt;br /&gt;
| SMS functionality is expected to work. In certain cases the functionality might be blocked by a clogged modem&amp;lt;sup&amp;gt;[https://gitlab.manjaro.org/manjaro-arm/issues/pinephone/phosh/-/issues/203 Report]&amp;lt;/sup&amp;gt;; Some bugs&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;MMS&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightYellow; text-align:center;&amp;quot; | WIP&lt;br /&gt;
| MMS functionality is integrated into the application &amp;quot;Spacebar&amp;quot;, some bugs remaining and expected&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Push notifications&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | Not implemented&lt;br /&gt;
| Receiving push notifications while the phone is suspended is not implemented&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; rowspan=&amp;quot;12&amp;quot; | Components&lt;br /&gt;
| &amp;lt;code&amp;gt;LCD&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightGreen; text-align:center;&amp;quot; | Working&lt;br /&gt;
| Under certain circumstances it is difficult to wake up the screen&amp;lt;sup&amp;gt;[Citation]&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Touch&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightGreen; text-align:center;&amp;quot; | Working&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Rear camera&amp;lt;/code&amp;gt;&lt;br /&gt;
| style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | Not working&lt;br /&gt;
| style=&amp;quot;background:LightYellow; text-align:center;&amp;quot; | WIP&lt;br /&gt;
| Camera works with DTS fix; userspace still needs to do some catching up (see [[PinePhone Pro/IMX258 Camera Debugging|debugging article]])&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Front camera&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | Not working&lt;br /&gt;
| Driver not implemented yet (a staging driver exists for this sensor using the Intel Atom ISP framework (drivers/staging/media/atomisp/i2c/ov8858.c), but it needs to be ported and cleaned up); camera not operational&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Camera flash&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightGreen; text-align:center;&amp;quot; | Working&lt;br /&gt;
| (tested on Manjaro; at &amp;lt;code&amp;gt;/sys/class/leds/white:flash&amp;lt;/code&amp;gt;)&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;WiFi&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightGreen; text-align:center;&amp;quot; | Working&lt;br /&gt;
| WiFi is expected to work. Some remaining tasks, such as &amp;quot;monitor mode&amp;quot;. '''Note:''' Proprietary firmware&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Bluetooth&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightYellow; text-align:center;&amp;quot; | WIP&lt;br /&gt;
| Bluetooth not necessarily working for calls yet due to missing audio routing&amp;lt;sup&amp;gt;[Citation]&amp;lt;/sup&amp;gt;; Bluetooth in general dodgy under Pulseaudio.&amp;lt;sup&amp;gt;[https://wiki.archlinux.org/title/bluetooth_headset#Headset_via_Pipewire Info]&amp;lt;/sup&amp;gt; '''Note:''' Proprietary firmware&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;GNSS/GPS&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightYellow; text-align:center;&amp;quot; | WIP&lt;br /&gt;
| aGPS to be implemented&amp;lt;sup&amp;gt;[Citation]&amp;lt;/sup&amp;gt;; long loading times to get a GPS fix&amp;lt;sup&amp;gt;[Citation]&amp;lt;/sup&amp;gt;; No preinstalled application&amp;lt;sup&amp;gt;[Citation]&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Sensors&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightYellow; text-align:center;&amp;quot; | WIP&lt;br /&gt;
| &amp;quot;3 Axis Magnetometer&amp;quot; (&amp;lt;code&amp;gt;lis3mdl&amp;lt;/code&amp;gt;): Not present in hardware (it's an alternative chip to &amp;lt;code&amp;gt;af8133j&amp;lt;/code&amp;gt; due to component shortages)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;quot;Geo Magnetic Sensor&amp;quot; (&amp;lt;code&amp;gt;af8133j&amp;lt;/code&amp;gt;): Working (tested on Manjaro, at &amp;lt;code&amp;gt;/sys/bus/i2c/devices/4-001c/iio:device1&amp;lt;/code&amp;gt;)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;quot;Accelerometer / Gyroscope&amp;quot; (&amp;lt;code&amp;gt;mpu6500&amp;lt;/code&amp;gt;): Working (tested on Manjaro, at &amp;lt;code&amp;gt;/sys/bus/i2c/devices/4-0068/iio:device2&amp;lt;/code&amp;gt;)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;quot;Ambient light / Proximity&amp;quot; (&amp;lt;code&amp;gt;stk3311&amp;lt;/code&amp;gt;): Not working (tested on Manjaro 5.17.6-2 kernel; IRQ issues)&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt;stk3311 dmesg excerpt&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
[    9.406478] genirq: Failed to request resources for stk3310_event (irq 99) on irqchip rockchip_gpio_irq&lt;br /&gt;
[    9.407380] stk3310 3-0048: request irq 99 failed&lt;br /&gt;
[    9.408360] stk3310: probe of 3-0048 failed with error -5&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Vibration motor&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightGreen; text-align:center;&amp;quot; | Working&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Notification LED&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightGreen; text-align:center;&amp;quot; | Working&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Buttons&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightGreen; text-align:center;&amp;quot; | Working&lt;br /&gt;
| Power buttons and volume buttons are working.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; rowspan=&amp;quot;5&amp;quot; | Accessory compatibility, spare parts&lt;br /&gt;
| &amp;lt;code&amp;gt;Keyboard Add-on&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | WIP and critical hardware issue&lt;br /&gt;
| The keyboard add-on compatibility is work-in-progress. '''Hardware issue: USB-C port of the phone must not be used while the current keyboard revision is connected'''&amp;lt;sup&amp;gt;[[PinePhone_(Pro)_Keyboard#Safety|Warning]]&amp;lt;/sup&amp;gt;; Top row symbols not implemented as designed&amp;lt;sup&amp;gt;[Citation]&amp;lt;/sup&amp;gt;; Keyboard hot-plugging not supported&amp;lt;sup&amp;gt;[Citation]&amp;lt;/sup&amp;gt;; Battery state not exposed in the pre-flashed operating system state&amp;lt;sup&amp;gt;[Citation]&amp;lt;/sup&amp;gt;; general driver bugs&amp;lt;sup&amp;gt;[Citation]&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;LoRa Add-on&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | Not implemented&lt;br /&gt;
| No software support implemented&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Qi Wireless Charging Add-on&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightYellow; text-align:center;&amp;quot; | WIP&lt;br /&gt;
| Wireless charging with the add-on case is expected to work to some degree. Certain software functionality and a driver is currently missing&amp;lt;sup&amp;gt;[Citation]&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Fingerprint Reader Add-on&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | Not implemented&lt;br /&gt;
| No software support implemented&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Spare parts&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | Not available yet&lt;br /&gt;
| Spare parts currently not available yet in the store.&amp;lt;sup&amp;gt;[https://pine64.com/product-category/smartphone-spare-parts/ Store]&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; rowspan=&amp;quot;1&amp;quot; | Software notes&lt;br /&gt;
| &amp;lt;code&amp;gt;Waydroid&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightYellow; text-align:center;&amp;quot; | Software rendering only&lt;br /&gt;
| Waydroid is an Android container used to run Android applications. Currently can only be started using software rendering due to a bug&amp;lt;sup&amp;gt;[https://github.com/waydroid/waydroid/issues/291 Report]&amp;lt;/sup&amp;gt;&amp;lt;sup&amp;gt;[https://gitlab.freedesktop.org/mesa/mesa/-/issues/5928 Report]&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
¹ Status of the features at the time of the last factory installation without updates&lt;br /&gt;
&lt;br /&gt;
² Status of the features with an up-to-date reference image&lt;/div&gt;</summary>
		<author><name>Memleek</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PinePhone_Pro/IMX258_Camera_Debugging&amp;diff=13109</id>
		<title>PinePhone Pro/IMX258 Camera Debugging</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PinePhone_Pro/IMX258_Camera_Debugging&amp;diff=13109"/>
		<updated>2022-05-21T20:34:37Z</updated>

		<summary type="html">&lt;p&gt;Memleek: mention some caveats&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Background ==&lt;br /&gt;
&lt;br /&gt;
The Pinephone Pro's rear camera is a Sony IMX258. The camera driver is present upstream, and at least [https://gitlab.manjaro.org/manjaro-arm/packages/core/linux-pinephonepro Manjaro's kernel] (downstream of Megi's) enables the driver. The camera does not seem to work; this page catalogs work on figuring out why.&lt;br /&gt;
&lt;br /&gt;
== Initial status ==&lt;br /&gt;
&lt;br /&gt;
What do we see in dmesg?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
imx258 1-001a: supply vana not found, using dummy regulator&lt;br /&gt;
imx258 1-001a: supply vdig not found, using dummy regulator&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This tells us the kernel loads the driver, which is something.&lt;br /&gt;
&lt;br /&gt;
Are these errors bad/fatal? Inspecting the [https://github.com/megous/linux/blob/orange-pi-5.17/drivers/media/i2c/imx258.c source] shows us that these supplies are defined in the &amp;lt;code&amp;gt;imx258_supply_names&amp;lt;/code&amp;gt; array, and &amp;lt;code&amp;gt;imx258_probe&amp;lt;/code&amp;gt; calls &amp;lt;code&amp;gt;devm_regulator_bulk_get&amp;lt;/code&amp;gt; to set them up.&lt;br /&gt;
&amp;lt;code&amp;gt;imx258_probe&amp;lt;/code&amp;gt; checks the return code from &amp;lt;code&amp;gt;devm_regulator_bulk_get&amp;lt;/code&amp;gt;, emitting a fatal &amp;quot;Failed to get supplies&amp;quot; message if the return code is negative (indicating failure). Since we don't see this message (or any others from the driver), it looks like it loads successfully!&lt;br /&gt;
&lt;br /&gt;
=== How can we test the camera? ===&lt;br /&gt;
&lt;br /&gt;
==== Megapixels ====&lt;br /&gt;
&lt;br /&gt;
[https://gitlab.com/postmarketOS/megapixels Megapixels] requires a per-device file to configure cameras. This one isn't complete (most of its numbers are complete nonsense), but it should let us see what happens when Megapixels tries to access the camera:&lt;br /&gt;
&amp;lt;code&amp;gt;pine64,pinephone-pro.ini&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[device]&lt;br /&gt;
make=PINE64&lt;br /&gt;
model=PinePhone Pro&lt;br /&gt;
&lt;br /&gt;
[rear]&lt;br /&gt;
driver=imx258&lt;br /&gt;
media-driver=rkisp1&lt;br /&gt;
capture-width=4208&lt;br /&gt;
capture-height=3118&lt;br /&gt;
capture-rate=60&lt;br /&gt;
capture-fmt=GRBG10P&lt;br /&gt;
preview-width=1280&lt;br /&gt;
preview-height=960&lt;br /&gt;
preview-rate=60&lt;br /&gt;
#preview-fmt=BGGR8&lt;br /&gt;
capture-fmt=GRBG10P&lt;br /&gt;
rotate=90&lt;br /&gt;
mirrored=true&lt;br /&gt;
focallength=2.6&lt;br /&gt;
cropfactor=12.7&lt;br /&gt;
fnumber=2.8&lt;br /&gt;
flash-display=true&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This segfaulted Megapixels for me. After patching some trivial segfaults, I get fatal GTK4 issues and other tangential problems. Let's try something else.&lt;br /&gt;
&lt;br /&gt;
==== Manually setting up a camera pipeline ====&lt;br /&gt;
&lt;br /&gt;
We can roughly follow [https://www.kernel.org/doc/html/latest/admin-guide/media/rkisp1.html this guide]. Doing so gives us the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;quot;media-ctl&amp;quot; &amp;quot;-d&amp;quot; &amp;quot;platform:rkisp1&amp;quot; &amp;quot;-r&amp;quot;&lt;br /&gt;
&amp;quot;media-ctl&amp;quot; &amp;quot;-d&amp;quot; &amp;quot;platform:rkisp1&amp;quot; &amp;quot;-l&amp;quot; &amp;quot;'imx258 1-001a':0 -&amp;gt; 'rkisp1_isp':0 [1]&amp;quot;&lt;br /&gt;
&amp;quot;media-ctl&amp;quot; &amp;quot;-d&amp;quot; &amp;quot;platform:rkisp1&amp;quot; &amp;quot;-l&amp;quot; &amp;quot;'rkisp1_isp':2 -&amp;gt; 'rkisp1_resizer_selfpath':0 [1]&amp;quot;&lt;br /&gt;
&amp;quot;media-ctl&amp;quot; &amp;quot;-d&amp;quot; &amp;quot;platform:rkisp1&amp;quot; &amp;quot;--set-v4l2&amp;quot; '&amp;quot;rkisp1_isp&amp;quot;:0 [fmt:SGRBG10_1X10/1048x780]'&lt;br /&gt;
&amp;quot;v4l2-ctl&amp;quot; &amp;quot;-z&amp;quot; &amp;quot;platform:rkisp1&amp;quot; &amp;quot;-d&amp;quot; &amp;quot;rkisp1_selfpath&amp;quot; &amp;quot;-v&amp;quot; &amp;quot;width=1048,height=780,&amp;quot;&lt;br /&gt;
&amp;quot;media-ctl&amp;quot; &amp;quot;-d&amp;quot; &amp;quot;platform:rkisp1&amp;quot; &amp;quot;--set-v4l2&amp;quot; '&amp;quot;rkisp1_resizer_selfpath&amp;quot;:0 [fmt:SGRBG10_1X10/1048x780 crop:(0,0)/1048x780]'&lt;br /&gt;
&lt;br /&gt;
&amp;quot;v4l2-ctl&amp;quot; &amp;quot;-z&amp;quot; &amp;quot;platform:rkisp1&amp;quot; &amp;quot;-d&amp;quot; &amp;quot;rkisp1_selfpath&amp;quot; &amp;quot;-v&amp;quot; &amp;quot;width=800,height=600,pixelformat=422P&amp;quot;&lt;br /&gt;
&amp;quot;v4l2-ctl&amp;quot; &amp;quot;-z&amp;quot; &amp;quot;platform:rkisp1&amp;quot; &amp;quot;-d&amp;quot; &amp;quot;rkisp1_selfpath&amp;quot; &amp;quot;--stream-mmap&amp;quot; &amp;quot;--stream-count&amp;quot; &amp;quot;1&amp;quot; &amp;quot;--verbose&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Careful readers will note that this is setting the camera up with a low resolution compared to what the sensor can do. For some reason I can't get the rkisp1 node to configure its sink pad with the maximum resolution of the sensor (4208x3118). Instead, it sets itself to 4032x3024. This mismatch is forbidden and causes v4l2 to give us EPIPE when we try to enable the stream. Using the lower resolution gets us further--the last command (which attempts to save a single frame of video) gives output like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
VIDIOC_QUERYCAP: ok&lt;br /&gt;
		VIDIOC_REQBUFS returned 0 (Success)&lt;br /&gt;
		VIDIOC_QUERYBUF returned 0 (Success)&lt;br /&gt;
		VIDIOC_QUERYBUF returned 0 (Success)&lt;br /&gt;
		VIDIOC_QUERYBUF returned 0 (Success)&lt;br /&gt;
		VIDIOC_QUERYBUF returned 0 (Success)&lt;br /&gt;
		VIDIOC_QBUF returned 0 (Success)&lt;br /&gt;
		VIDIOC_QBUF returned 0 (Success)&lt;br /&gt;
		VIDIOC_QBUF returned 0 (Success)&lt;br /&gt;
		VIDIOC_QBUF returned 0 (Success)&lt;br /&gt;
		VIDIOC_STREAMON returned 0 (Success)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
But then it just hangs there indefinitely.&lt;br /&gt;
&lt;br /&gt;
Running under strace, we see the program stuck in an ioctl:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ioctl(3, VIDIOC_DQBUF, {type=V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[https://www.kernel.org/doc/html/v4.13/media/uapi/v4l/vidioc-qbuf.html VIDIOC_DQBUF] corresponds to dequeuing a buffer once it has been filled with an image by the v4l2 device. Apparently, the device never gives us back a captured frame.&lt;br /&gt;
&lt;br /&gt;
=== Now what? ===&lt;br /&gt;
&lt;br /&gt;
==== Does i2c work at all? ====&lt;br /&gt;
&lt;br /&gt;
The camera driver uses i2c; we can see the camera [https://github.com/megous/linux/blob/c5af9f4f874a66b65c73c450b79f6a86b1b46332/arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts#L890-L914 in the .dts] to determine that it's on i2c bus 1, address 0x1a.&lt;br /&gt;
&lt;br /&gt;
The imx258 is controlled over i2c, and sends image data over MIPI. The first step is to see if the i2c control is working.&lt;br /&gt;
&lt;br /&gt;
Looking back at the driver, it seems we should see errors in dmesg if i2c communication fails. The driver checks the chip id in its probe function, which uses i2c, so we can conclude that i2c gets set up properly initially. Does it keep working?&lt;br /&gt;
&lt;br /&gt;
==== Does i2c keep working? (FTrace) ====&lt;br /&gt;
&lt;br /&gt;
We can see if other functions that use i2c produce errors--for example, when we run our &amp;lt;code&amp;gt;&amp;quot;v4l2-ctl&amp;quot; ... &amp;quot;--stream-mmap&amp;quot;&amp;lt;/code&amp;gt; command, we expect that &amp;lt;code&amp;gt;imx258_start_streaming&amp;lt;/code&amp;gt; will get called, and this function also writes a load of registers over i2c.&lt;br /&gt;
&lt;br /&gt;
Build and install a kernel with CONFIG_FTRACE (not hard, but outside the scope of this write-up) and enable function graph tracing:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo su&lt;br /&gt;
# cd /sys/kernel/debug/tracing&lt;br /&gt;
# echo function_graph &amp;gt; current_tracer&lt;br /&gt;
# cat available_filter_functions | grep -E 'rkisp|imx258|v4l2' | awk '{print $1}' &amp;gt; set_graph_function&lt;br /&gt;
# echo 'vm_map_pages,__iommu_map,iommu_map_sg_atomic,rk_iommu_map,__alloc_pages,dma_alloc_attrs,dma_mmap_attrs,__vm_map_pages,vb2_mmap,clk_e,able,schedule_timeout,clk_disable,regmap_write,schedule,__i2c_tra,sfer,i2c_tra,sfer_buffer_flags,dma_free_attrs' | tr , '\n' &amp;gt; set_graph_notrace&lt;br /&gt;
# tee trace_pipe &amp;gt; ~/function-trace.log&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, in another terminal session, run the &amp;lt;code&amp;gt;&amp;quot;v4l2-ctl&amp;quot; ... &amp;quot;--stream-mmap&amp;quot;&amp;lt;/code&amp;gt; command again. We end up with a bunch (but hopefully not *too* much) of output in our first terminal and the &amp;lt;code&amp;gt;~/function-trace.log&amp;lt;/code&amp;gt; file.&lt;br /&gt;
&lt;br /&gt;
A quick grep shows that &amp;lt;code&amp;gt;imx258_start_streaming&amp;lt;/code&amp;gt; is indeed called, so '''i2c is working properly'''.&lt;br /&gt;
&lt;br /&gt;
=== If i2c works, what doesn't? ===&lt;br /&gt;
&lt;br /&gt;
Our program that asks for a video frame is still hung! We ask the camera to start streaming frames, it presumably does, but the v4l2 stack never tells us a frame has finished. Doing some digging in the v4l2 stack (and the rkisp1 driver), we find out that rkisp1 is notified about frame status via interrupts.&lt;br /&gt;
&lt;br /&gt;
Perhaps the hardware is never actually emitting the interrupt that signals a frame being finished. Indeed, grepping our FTrace log shows that &amp;lt;code&amp;gt;rkisp1_isr&amp;lt;/code&amp;gt; is never called. A quick look at &amp;lt;code&amp;gt;/proc/interrupts&amp;lt;/code&amp;gt; shows that '''the only interrupt associated with the isp has never triggered''' (0 count on every CPU):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# head -n1 /proc/interrupts; grep isp /proc/interrupts&lt;br /&gt;
           CPU0       CPU1       CPU2       CPU3       CPU4       CPU5       &lt;br /&gt;
 57:          0          0          0          0          0          0     GICv3  75 Level     ff914000.iommu, rkisp1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;rkisp1&amp;lt;/code&amp;gt; debugfs info ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;rkisp1&amp;lt;/code&amp;gt; driver keeps some [https://github.com/megous/linux/blob/c5af9f4f874a66b65c73c450b79f6a86b1b46332/drivers/media/platform/rockchip/rkisp1/rkisp1-common.h#L335-L363 error/debug counters] in debugfs, which can be viewed at &amp;lt;code&amp;gt;/sys/kernel/debug/ff910000.isp0&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Sadly, the only one of these that comes up nonzero is &amp;lt;code&amp;gt;sp_stop_timeout&amp;lt;/code&amp;gt; (&amp;quot;upon stream stop, the capture waits 1 second for the isr to stop the stream. This param is incremented in case of timeout&amp;quot;). I observe it to increment once per time I terminate the &amp;lt;code&amp;gt;&amp;quot;v4l2-ctl&amp;quot; ... &amp;quot;--stream-mmap&amp;quot;&amp;lt;/code&amp;gt; command. This tells us what we already know: interrupts are not firing, but it also tells us that we aren't hitting any other errors that rkisp1 knows about.&lt;br /&gt;
&lt;br /&gt;
== Next steps ==&lt;br /&gt;
&lt;br /&gt;
Where do we go from here? I don't know--something may be wrong with the way the .dts specifies interrupts, some kind of firmware/GIC (the rk3399's interrupt controller) configuration issue, or something else. It would be good to try to determine:&lt;br /&gt;
&lt;br /&gt;
* Whether the MIPI lines actually show traffic, if someone has a logic analyzer and a dissected PPP.&lt;br /&gt;
* Whether the DMA of frames to memory actually happens, regardless of (lack of) emission of the interrupt that tells us when said DMA finishes a frame.&lt;br /&gt;
* Whether the regulator messages we see during boot are actually significant. I don't know enough about the Linux regulator framework to say whether these being not-found means power is not correctly supplied, or if Linux just isn't being properly informed of the power supply requirements for precise tracking/power-saving when the camera is off.&lt;br /&gt;
&lt;br /&gt;
== Megi saves the day ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[I] &amp;lt;megi&amp;gt; you might be interested in this https://megous.com/dl/tmp/0ae6ba03a17a3d53.png&lt;br /&gt;
[I] &amp;lt;megi&amp;gt; https://megous.com/git/linux/tag/?h=orange-pi-5.18-20220521-1759&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Turns out, the .dts had the wrong ISP connected to the sensor!&lt;br /&gt;
&lt;br /&gt;
Apply [https://github.com/megous/linux/commit/9afd884f8b36121fb6097e77b6d35fe46ab48ad9 this commit] ([https://github.com/megous/linux/commit/9afd884f8b36121fb6097e77b6d35fe46ab48ad9.patch patch]) to your kernel tree, rebuild, and reinstall. Now, the following should produce an image (&amp;lt;code&amp;gt;frame.jpg&amp;lt;/code&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;quot;media-ctl&amp;quot; &amp;quot;-d&amp;quot; &amp;quot;platform:rkisp1&amp;quot; &amp;quot;-r&amp;quot;&lt;br /&gt;
&amp;quot;media-ctl&amp;quot; &amp;quot;-d&amp;quot; &amp;quot;platform:rkisp1&amp;quot; &amp;quot;--set-v4l2&amp;quot; '&amp;quot;imx258 1-001a&amp;quot;:0 [fmt:SGRBG10_1X10/1048x780]'&lt;br /&gt;
&amp;quot;media-ctl&amp;quot; &amp;quot;-d&amp;quot; &amp;quot;platform:rkisp1&amp;quot; &amp;quot;-l&amp;quot; &amp;quot;'imx258 1-001a':0 -&amp;gt; 'rkisp1_isp':0 [1]&amp;quot;&lt;br /&gt;
&amp;quot;media-ctl&amp;quot; &amp;quot;-d&amp;quot; &amp;quot;platform:rkisp1&amp;quot; &amp;quot;-l&amp;quot; &amp;quot;'rkisp1_isp':2 -&amp;gt; 'rkisp1_resizer_selfpath':0 [1]&amp;quot;&lt;br /&gt;
&amp;quot;media-ctl&amp;quot; &amp;quot;-d&amp;quot; &amp;quot;platform:rkisp1&amp;quot; &amp;quot;--set-v4l2&amp;quot; '&amp;quot;rkisp1_isp&amp;quot;:0 [fmt:SGRBG10_1X10/1048x780 crop:(0,0)/1048x780]'&lt;br /&gt;
&amp;quot;media-ctl&amp;quot; &amp;quot;-d&amp;quot; &amp;quot;platform:rkisp1&amp;quot; &amp;quot;--set-v4l2&amp;quot; '&amp;quot;rkisp1_isp&amp;quot;:2 [fmt:YUYV8_2X8/1048x780 crop:(0,0)/1048x780]'&lt;br /&gt;
&amp;quot;v4l2-ctl&amp;quot; &amp;quot;-z&amp;quot; &amp;quot;platform:rkisp1&amp;quot; &amp;quot;-d&amp;quot; &amp;quot;rkisp1_selfpath&amp;quot; &amp;quot;-v&amp;quot; &amp;quot;width=1048,height=780,&amp;quot;&lt;br /&gt;
&amp;quot;media-ctl&amp;quot; &amp;quot;-d&amp;quot; &amp;quot;platform:rkisp1&amp;quot; &amp;quot;--set-v4l2&amp;quot; '&amp;quot;rkisp1_resizer_selfpath&amp;quot;:0 [fmt:YUYV8_2X8/1048x780 crop:(0,0)/1048x780]'&lt;br /&gt;
&lt;br /&gt;
&amp;quot;v4l2-ctl&amp;quot; &amp;quot;-z&amp;quot; &amp;quot;platform:rkisp1&amp;quot; &amp;quot;-d&amp;quot; &amp;quot;rkisp1_selfpath&amp;quot; &amp;quot;-v&amp;quot; &amp;quot;width=1048,height=780,pixelformat=422P&amp;quot;&lt;br /&gt;
&amp;quot;v4l2-ctl&amp;quot; &amp;quot;-z&amp;quot; &amp;quot;platform:rkisp1&amp;quot; &amp;quot;-d&amp;quot; &amp;quot;rkisp1_selfpath&amp;quot; &amp;quot;--stream-mmap&amp;quot; &amp;quot;--stream-count&amp;quot; &amp;quot;1&amp;quot; &amp;quot;--stream-to=frame.raw&amp;quot;&lt;br /&gt;
&lt;br /&gt;
ffmpeg -y -s:v 1048x780 -pix_fmt yuv422p -i frame.raw frame.jpg&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== What's left? ===&lt;br /&gt;
&lt;br /&gt;
* libcamera and megapixels still don't work. Megapixels appears to need support for debayering YUYV, and both appear to be configuring the rkisp1 pipeline wrong.&lt;br /&gt;
* The images captured are pretty green and seem to have two pixels of garbage at their bottom edge. rkisp1 supports auto white-balance (AWB) using the params/stats pads, and libcamera has some smarts that may hook these up properly. In the meantime, raw images can be postprocessed to improve white balance and exposure.&lt;br /&gt;
&lt;br /&gt;
== Useful links == &lt;br /&gt;
&lt;br /&gt;
* [https://files.pine64.org/doc/PinePhonePro/PinephonePro-Schematic-V1.0-20211127.pdf Pinephone Pro Schematic]&lt;br /&gt;
* [https://blog.krybot.com/a?ID=01650-cea27a80-a1ab-4da1-9cb5-3945be91e3e1 Background on the GIC]&lt;br /&gt;
* [https://elinux.org/images/9/94/ISP-presentation.pdf Background on the rkisp1 ISP]&lt;/div&gt;</summary>
		<author><name>Memleek</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PinePhone_Pro/IMX258_Camera_Debugging&amp;diff=13108</id>
		<title>PinePhone Pro/IMX258 Camera Debugging</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PinePhone_Pro/IMX258_Camera_Debugging&amp;diff=13108"/>
		<updated>2022-05-21T20:30:13Z</updated>

		<summary type="html">&lt;p&gt;Memleek: fix command typo&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Background ==&lt;br /&gt;
&lt;br /&gt;
The Pinephone Pro's rear camera is a Sony IMX258. The camera driver is present upstream, and at least [https://gitlab.manjaro.org/manjaro-arm/packages/core/linux-pinephonepro Manjaro's kernel] (downstream of Megi's) enables the driver. The camera does not seem to work; this page catalogs work on figuring out why.&lt;br /&gt;
&lt;br /&gt;
== Initial status ==&lt;br /&gt;
&lt;br /&gt;
What do we see in dmesg?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
imx258 1-001a: supply vana not found, using dummy regulator&lt;br /&gt;
imx258 1-001a: supply vdig not found, using dummy regulator&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This tells us the kernel loads the driver, which is something.&lt;br /&gt;
&lt;br /&gt;
Are these errors bad/fatal? Inspecting the [https://github.com/megous/linux/blob/orange-pi-5.17/drivers/media/i2c/imx258.c source] shows us that these supplies are defined in the &amp;lt;code&amp;gt;imx258_supply_names&amp;lt;/code&amp;gt; array, and &amp;lt;code&amp;gt;imx258_probe&amp;lt;/code&amp;gt; calls &amp;lt;code&amp;gt;devm_regulator_bulk_get&amp;lt;/code&amp;gt; to set them up.&lt;br /&gt;
&amp;lt;code&amp;gt;imx258_probe&amp;lt;/code&amp;gt; checks the return code from &amp;lt;code&amp;gt;devm_regulator_bulk_get&amp;lt;/code&amp;gt;, emitting a fatal &amp;quot;Failed to get supplies&amp;quot; message if the return code is negative (indicating failure). Since we don't see this message (or any others from the driver), it looks like it loads successfully!&lt;br /&gt;
&lt;br /&gt;
=== How can we test the camera? ===&lt;br /&gt;
&lt;br /&gt;
==== Megapixels ====&lt;br /&gt;
&lt;br /&gt;
[https://gitlab.com/postmarketOS/megapixels Megapixels] requires a per-device file to configure cameras. This one isn't complete (most of its numbers are complete nonsense), but it should let us see what happens when Megapixels tries to access the camera:&lt;br /&gt;
&amp;lt;code&amp;gt;pine64,pinephone-pro.ini&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[device]&lt;br /&gt;
make=PINE64&lt;br /&gt;
model=PinePhone Pro&lt;br /&gt;
&lt;br /&gt;
[rear]&lt;br /&gt;
driver=imx258&lt;br /&gt;
media-driver=rkisp1&lt;br /&gt;
capture-width=4208&lt;br /&gt;
capture-height=3118&lt;br /&gt;
capture-rate=60&lt;br /&gt;
capture-fmt=GRBG10P&lt;br /&gt;
preview-width=1280&lt;br /&gt;
preview-height=960&lt;br /&gt;
preview-rate=60&lt;br /&gt;
#preview-fmt=BGGR8&lt;br /&gt;
capture-fmt=GRBG10P&lt;br /&gt;
rotate=90&lt;br /&gt;
mirrored=true&lt;br /&gt;
focallength=2.6&lt;br /&gt;
cropfactor=12.7&lt;br /&gt;
fnumber=2.8&lt;br /&gt;
flash-display=true&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This segfaulted Megapixels for me. After patching some trivial segfaults, I get fatal GTK4 issues and other tangential problems. Let's try something else.&lt;br /&gt;
&lt;br /&gt;
==== Manually setting up a camera pipeline ====&lt;br /&gt;
&lt;br /&gt;
We can roughly follow [https://www.kernel.org/doc/html/latest/admin-guide/media/rkisp1.html this guide]. Doing so gives us the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;quot;media-ctl&amp;quot; &amp;quot;-d&amp;quot; &amp;quot;platform:rkisp1&amp;quot; &amp;quot;-r&amp;quot;&lt;br /&gt;
&amp;quot;media-ctl&amp;quot; &amp;quot;-d&amp;quot; &amp;quot;platform:rkisp1&amp;quot; &amp;quot;-l&amp;quot; &amp;quot;'imx258 1-001a':0 -&amp;gt; 'rkisp1_isp':0 [1]&amp;quot;&lt;br /&gt;
&amp;quot;media-ctl&amp;quot; &amp;quot;-d&amp;quot; &amp;quot;platform:rkisp1&amp;quot; &amp;quot;-l&amp;quot; &amp;quot;'rkisp1_isp':2 -&amp;gt; 'rkisp1_resizer_selfpath':0 [1]&amp;quot;&lt;br /&gt;
&amp;quot;media-ctl&amp;quot; &amp;quot;-d&amp;quot; &amp;quot;platform:rkisp1&amp;quot; &amp;quot;--set-v4l2&amp;quot; '&amp;quot;rkisp1_isp&amp;quot;:0 [fmt:SGRBG10_1X10/1048x780]'&lt;br /&gt;
&amp;quot;v4l2-ctl&amp;quot; &amp;quot;-z&amp;quot; &amp;quot;platform:rkisp1&amp;quot; &amp;quot;-d&amp;quot; &amp;quot;rkisp1_selfpath&amp;quot; &amp;quot;-v&amp;quot; &amp;quot;width=1048,height=780,&amp;quot;&lt;br /&gt;
&amp;quot;media-ctl&amp;quot; &amp;quot;-d&amp;quot; &amp;quot;platform:rkisp1&amp;quot; &amp;quot;--set-v4l2&amp;quot; '&amp;quot;rkisp1_resizer_selfpath&amp;quot;:0 [fmt:SGRBG10_1X10/1048x780 crop:(0,0)/1048x780]'&lt;br /&gt;
&lt;br /&gt;
&amp;quot;v4l2-ctl&amp;quot; &amp;quot;-z&amp;quot; &amp;quot;platform:rkisp1&amp;quot; &amp;quot;-d&amp;quot; &amp;quot;rkisp1_selfpath&amp;quot; &amp;quot;-v&amp;quot; &amp;quot;width=800,height=600,pixelformat=422P&amp;quot;&lt;br /&gt;
&amp;quot;v4l2-ctl&amp;quot; &amp;quot;-z&amp;quot; &amp;quot;platform:rkisp1&amp;quot; &amp;quot;-d&amp;quot; &amp;quot;rkisp1_selfpath&amp;quot; &amp;quot;--stream-mmap&amp;quot; &amp;quot;--stream-count&amp;quot; &amp;quot;1&amp;quot; &amp;quot;--verbose&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Careful readers will note that this is setting the camera up with a low resolution compared to what the sensor can do. For some reason I can't get the rkisp1 node to configure its sink pad with the maximum resolution of the sensor (4208x3118). Instead, it sets itself to 4032x3024. This mismatch is forbidden and causes v4l2 to give us EPIPE when we try to enable the stream. Using the lower resolution gets us further--the last command (which attempts to save a single frame of video) gives output like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
VIDIOC_QUERYCAP: ok&lt;br /&gt;
		VIDIOC_REQBUFS returned 0 (Success)&lt;br /&gt;
		VIDIOC_QUERYBUF returned 0 (Success)&lt;br /&gt;
		VIDIOC_QUERYBUF returned 0 (Success)&lt;br /&gt;
		VIDIOC_QUERYBUF returned 0 (Success)&lt;br /&gt;
		VIDIOC_QUERYBUF returned 0 (Success)&lt;br /&gt;
		VIDIOC_QBUF returned 0 (Success)&lt;br /&gt;
		VIDIOC_QBUF returned 0 (Success)&lt;br /&gt;
		VIDIOC_QBUF returned 0 (Success)&lt;br /&gt;
		VIDIOC_QBUF returned 0 (Success)&lt;br /&gt;
		VIDIOC_STREAMON returned 0 (Success)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
But then it just hangs there indefinitely.&lt;br /&gt;
&lt;br /&gt;
Running under strace, we see the program stuck in an ioctl:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ioctl(3, VIDIOC_DQBUF, {type=V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[https://www.kernel.org/doc/html/v4.13/media/uapi/v4l/vidioc-qbuf.html VIDIOC_DQBUF] corresponds to dequeuing a buffer once it has been filled with an image by the v4l2 device. Apparently, the device never gives us back a captured frame.&lt;br /&gt;
&lt;br /&gt;
=== Now what? ===&lt;br /&gt;
&lt;br /&gt;
==== Does i2c work at all? ====&lt;br /&gt;
&lt;br /&gt;
The camera driver uses i2c; we can see the camera [https://github.com/megous/linux/blob/c5af9f4f874a66b65c73c450b79f6a86b1b46332/arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts#L890-L914 in the .dts] to determine that it's on i2c bus 1, address 0x1a.&lt;br /&gt;
&lt;br /&gt;
The imx258 is controlled over i2c, and sends image data over MIPI. The first step is to see if the i2c control is working.&lt;br /&gt;
&lt;br /&gt;
Looking back at the driver, it seems we should see errors in dmesg if i2c communication fails. The driver checks the chip id in its probe function, which uses i2c, so we can conclude that i2c gets set up properly initially. Does it keep working?&lt;br /&gt;
&lt;br /&gt;
==== Does i2c keep working? (FTrace) ====&lt;br /&gt;
&lt;br /&gt;
We can see if other functions that use i2c produce errors--for example, when we run our &amp;lt;code&amp;gt;&amp;quot;v4l2-ctl&amp;quot; ... &amp;quot;--stream-mmap&amp;quot;&amp;lt;/code&amp;gt; command, we expect that &amp;lt;code&amp;gt;imx258_start_streaming&amp;lt;/code&amp;gt; will get called, and this function also writes a load of registers over i2c.&lt;br /&gt;
&lt;br /&gt;
Build and install a kernel with CONFIG_FTRACE (not hard, but outside the scope of this write-up) and enable function graph tracing:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo su&lt;br /&gt;
# cd /sys/kernel/debug/tracing&lt;br /&gt;
# echo function_graph &amp;gt; current_tracer&lt;br /&gt;
# cat available_filter_functions | grep -E 'rkisp|imx258|v4l2' | awk '{print $1}' &amp;gt; set_graph_function&lt;br /&gt;
# echo 'vm_map_pages,__iommu_map,iommu_map_sg_atomic,rk_iommu_map,__alloc_pages,dma_alloc_attrs,dma_mmap_attrs,__vm_map_pages,vb2_mmap,clk_e,able,schedule_timeout,clk_disable,regmap_write,schedule,__i2c_tra,sfer,i2c_tra,sfer_buffer_flags,dma_free_attrs' | tr , '\n' &amp;gt; set_graph_notrace&lt;br /&gt;
# tee trace_pipe &amp;gt; ~/function-trace.log&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, in another terminal session, run the &amp;lt;code&amp;gt;&amp;quot;v4l2-ctl&amp;quot; ... &amp;quot;--stream-mmap&amp;quot;&amp;lt;/code&amp;gt; command again. We end up with a bunch (but hopefully not *too* much) of output in our first terminal and the &amp;lt;code&amp;gt;~/function-trace.log&amp;lt;/code&amp;gt; file.&lt;br /&gt;
&lt;br /&gt;
A quick grep shows that &amp;lt;code&amp;gt;imx258_start_streaming&amp;lt;/code&amp;gt; is indeed called, so '''i2c is working properly'''.&lt;br /&gt;
&lt;br /&gt;
=== If i2c works, what doesn't? ===&lt;br /&gt;
&lt;br /&gt;
Our program that asks for a video frame is still hung! We ask the camera to start streaming frames, it presumably does, but the v4l2 stack never tells us a frame has finished. Doing some digging in the v4l2 stack (and the rkisp1 driver), we find out that rkisp1 is notified about frame status via interrupts.&lt;br /&gt;
&lt;br /&gt;
Perhaps the hardware is never actually emitting the interrupt that signals a frame being finished. Indeed, grepping our FTrace log shows that &amp;lt;code&amp;gt;rkisp1_isr&amp;lt;/code&amp;gt; is never called. A quick look at &amp;lt;code&amp;gt;/proc/interrupts&amp;lt;/code&amp;gt; shows that '''the only interrupt associated with the isp has never triggered''' (0 count on every CPU):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# head -n1 /proc/interrupts; grep isp /proc/interrupts&lt;br /&gt;
           CPU0       CPU1       CPU2       CPU3       CPU4       CPU5       &lt;br /&gt;
 57:          0          0          0          0          0          0     GICv3  75 Level     ff914000.iommu, rkisp1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;rkisp1&amp;lt;/code&amp;gt; debugfs info ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;rkisp1&amp;lt;/code&amp;gt; driver keeps some [https://github.com/megous/linux/blob/c5af9f4f874a66b65c73c450b79f6a86b1b46332/drivers/media/platform/rockchip/rkisp1/rkisp1-common.h#L335-L363 error/debug counters] in debugfs, which can be viewed at &amp;lt;code&amp;gt;/sys/kernel/debug/ff910000.isp0&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Sadly, the only one of these that comes up nonzero is &amp;lt;code&amp;gt;sp_stop_timeout&amp;lt;/code&amp;gt; (&amp;quot;upon stream stop, the capture waits 1 second for the isr to stop the stream. This param is incremented in case of timeout&amp;quot;). I observe it to increment once per time I terminate the &amp;lt;code&amp;gt;&amp;quot;v4l2-ctl&amp;quot; ... &amp;quot;--stream-mmap&amp;quot;&amp;lt;/code&amp;gt; command. This tells us what we already know: interrupts are not firing, but it also tells us that we aren't hitting any other errors that rkisp1 knows about.&lt;br /&gt;
&lt;br /&gt;
== Next steps ==&lt;br /&gt;
&lt;br /&gt;
Where do we go from here? I don't know--something may be wrong with the way the .dts specifies interrupts, some kind of firmware/GIC (the rk3399's interrupt controller) configuration issue, or something else. It would be good to try to determine:&lt;br /&gt;
&lt;br /&gt;
* Whether the MIPI lines actually show traffic, if someone has a logic analyzer and a dissected PPP.&lt;br /&gt;
* Whether the DMA of frames to memory actually happens, regardless of (lack of) emission of the interrupt that tells us when said DMA finishes a frame.&lt;br /&gt;
* Whether the regulator messages we see during boot are actually significant. I don't know enough about the Linux regulator framework to say whether these being not-found means power is not correctly supplied, or if Linux just isn't being properly informed of the power supply requirements for precise tracking/power-saving when the camera is off.&lt;br /&gt;
&lt;br /&gt;
== Megi saves the day ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[I] &amp;lt;megi&amp;gt; you might be interested in this https://megous.com/dl/tmp/0ae6ba03a17a3d53.png&lt;br /&gt;
[I] &amp;lt;megi&amp;gt; https://megous.com/git/linux/tag/?h=orange-pi-5.18-20220521-1759&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Turns out, the .dts had the wrong ISP connected to the sensor!&lt;br /&gt;
&lt;br /&gt;
Apply [https://github.com/megous/linux/commit/9afd884f8b36121fb6097e77b6d35fe46ab48ad9 this commit] ([https://github.com/megous/linux/commit/9afd884f8b36121fb6097e77b6d35fe46ab48ad9.patch patch]) to your kernel tree, rebuild, and reinstall. Now, the following should produce an image (&amp;lt;code&amp;gt;frame.jpg&amp;lt;/code&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;quot;media-ctl&amp;quot; &amp;quot;-d&amp;quot; &amp;quot;platform:rkisp1&amp;quot; &amp;quot;-r&amp;quot;&lt;br /&gt;
&amp;quot;media-ctl&amp;quot; &amp;quot;-d&amp;quot; &amp;quot;platform:rkisp1&amp;quot; &amp;quot;--set-v4l2&amp;quot; '&amp;quot;imx258 1-001a&amp;quot;:0 [fmt:SGRBG10_1X10/1048x780]'&lt;br /&gt;
&amp;quot;media-ctl&amp;quot; &amp;quot;-d&amp;quot; &amp;quot;platform:rkisp1&amp;quot; &amp;quot;-l&amp;quot; &amp;quot;'imx258 1-001a':0 -&amp;gt; 'rkisp1_isp':0 [1]&amp;quot;&lt;br /&gt;
&amp;quot;media-ctl&amp;quot; &amp;quot;-d&amp;quot; &amp;quot;platform:rkisp1&amp;quot; &amp;quot;-l&amp;quot; &amp;quot;'rkisp1_isp':2 -&amp;gt; 'rkisp1_resizer_selfpath':0 [1]&amp;quot;&lt;br /&gt;
&amp;quot;media-ctl&amp;quot; &amp;quot;-d&amp;quot; &amp;quot;platform:rkisp1&amp;quot; &amp;quot;--set-v4l2&amp;quot; '&amp;quot;rkisp1_isp&amp;quot;:0 [fmt:SGRBG10_1X10/1048x780 crop:(0,0)/1048x780]'&lt;br /&gt;
&amp;quot;media-ctl&amp;quot; &amp;quot;-d&amp;quot; &amp;quot;platform:rkisp1&amp;quot; &amp;quot;--set-v4l2&amp;quot; '&amp;quot;rkisp1_isp&amp;quot;:2 [fmt:YUYV8_2X8/1048x780 crop:(0,0)/1048x780]'&lt;br /&gt;
&amp;quot;v4l2-ctl&amp;quot; &amp;quot;-z&amp;quot; &amp;quot;platform:rkisp1&amp;quot; &amp;quot;-d&amp;quot; &amp;quot;rkisp1_selfpath&amp;quot; &amp;quot;-v&amp;quot; &amp;quot;width=1048,height=780,&amp;quot;&lt;br /&gt;
&amp;quot;media-ctl&amp;quot; &amp;quot;-d&amp;quot; &amp;quot;platform:rkisp1&amp;quot; &amp;quot;--set-v4l2&amp;quot; '&amp;quot;rkisp1_resizer_selfpath&amp;quot;:0 [fmt:YUYV8_2X8/1048x780 crop:(0,0)/1048x780]'&lt;br /&gt;
&lt;br /&gt;
&amp;quot;v4l2-ctl&amp;quot; &amp;quot;-z&amp;quot; &amp;quot;platform:rkisp1&amp;quot; &amp;quot;-d&amp;quot; &amp;quot;rkisp1_selfpath&amp;quot; &amp;quot;-v&amp;quot; &amp;quot;width=1048,height=780,pixelformat=422P&amp;quot;&lt;br /&gt;
&amp;quot;v4l2-ctl&amp;quot; &amp;quot;-z&amp;quot; &amp;quot;platform:rkisp1&amp;quot; &amp;quot;-d&amp;quot; &amp;quot;rkisp1_selfpath&amp;quot; &amp;quot;--stream-mmap&amp;quot; &amp;quot;--stream-count&amp;quot; &amp;quot;1&amp;quot; &amp;quot;--stream-to=frame.raw&amp;quot;&lt;br /&gt;
&lt;br /&gt;
ffmpeg -y -s:v 1048x780 -pix_fmt yuv422p -i frame.raw frame.jpg&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== What's left? ===&lt;br /&gt;
&lt;br /&gt;
libcamera and megapixels still don't work. Megapixels appears to need support for debayering YUYV, and both appear to be configuring the rkisp1 pipeline wrong.&lt;br /&gt;
&lt;br /&gt;
== Useful links == &lt;br /&gt;
&lt;br /&gt;
* [https://files.pine64.org/doc/PinePhonePro/PinephonePro-Schematic-V1.0-20211127.pdf Pinephone Pro Schematic]&lt;br /&gt;
* [https://blog.krybot.com/a?ID=01650-cea27a80-a1ab-4da1-9cb5-3945be91e3e1 Background on the GIC]&lt;br /&gt;
* [https://elinux.org/images/9/94/ISP-presentation.pdf Background on the rkisp1 ISP]&lt;/div&gt;</summary>
		<author><name>Memleek</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PinePhone_Pro/IMX258_Camera_Debugging&amp;diff=13107</id>
		<title>PinePhone Pro/IMX258 Camera Debugging</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PinePhone_Pro/IMX258_Camera_Debugging&amp;diff=13107"/>
		<updated>2022-05-21T20:27:16Z</updated>

		<summary type="html">&lt;p&gt;Memleek: Add fix from Megi!&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Background ==&lt;br /&gt;
&lt;br /&gt;
The Pinephone Pro's rear camera is a Sony IMX258. The camera driver is present upstream, and at least [https://gitlab.manjaro.org/manjaro-arm/packages/core/linux-pinephonepro Manjaro's kernel] (downstream of Megi's) enables the driver. The camera does not seem to work; this page catalogs work on figuring out why.&lt;br /&gt;
&lt;br /&gt;
== Initial status ==&lt;br /&gt;
&lt;br /&gt;
What do we see in dmesg?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
imx258 1-001a: supply vana not found, using dummy regulator&lt;br /&gt;
imx258 1-001a: supply vdig not found, using dummy regulator&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This tells us the kernel loads the driver, which is something.&lt;br /&gt;
&lt;br /&gt;
Are these errors bad/fatal? Inspecting the [https://github.com/megous/linux/blob/orange-pi-5.17/drivers/media/i2c/imx258.c source] shows us that these supplies are defined in the &amp;lt;code&amp;gt;imx258_supply_names&amp;lt;/code&amp;gt; array, and &amp;lt;code&amp;gt;imx258_probe&amp;lt;/code&amp;gt; calls &amp;lt;code&amp;gt;devm_regulator_bulk_get&amp;lt;/code&amp;gt; to set them up.&lt;br /&gt;
&amp;lt;code&amp;gt;imx258_probe&amp;lt;/code&amp;gt; checks the return code from &amp;lt;code&amp;gt;devm_regulator_bulk_get&amp;lt;/code&amp;gt;, emitting a fatal &amp;quot;Failed to get supplies&amp;quot; message if the return code is negative (indicating failure). Since we don't see this message (or any others from the driver), it looks like it loads successfully!&lt;br /&gt;
&lt;br /&gt;
=== How can we test the camera? ===&lt;br /&gt;
&lt;br /&gt;
==== Megapixels ====&lt;br /&gt;
&lt;br /&gt;
[https://gitlab.com/postmarketOS/megapixels Megapixels] requires a per-device file to configure cameras. This one isn't complete (most of its numbers are complete nonsense), but it should let us see what happens when Megapixels tries to access the camera:&lt;br /&gt;
&amp;lt;code&amp;gt;pine64,pinephone-pro.ini&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[device]&lt;br /&gt;
make=PINE64&lt;br /&gt;
model=PinePhone Pro&lt;br /&gt;
&lt;br /&gt;
[rear]&lt;br /&gt;
driver=imx258&lt;br /&gt;
media-driver=rkisp1&lt;br /&gt;
capture-width=4208&lt;br /&gt;
capture-height=3118&lt;br /&gt;
capture-rate=60&lt;br /&gt;
capture-fmt=GRBG10P&lt;br /&gt;
preview-width=1280&lt;br /&gt;
preview-height=960&lt;br /&gt;
preview-rate=60&lt;br /&gt;
#preview-fmt=BGGR8&lt;br /&gt;
capture-fmt=GRBG10P&lt;br /&gt;
rotate=90&lt;br /&gt;
mirrored=true&lt;br /&gt;
focallength=2.6&lt;br /&gt;
cropfactor=12.7&lt;br /&gt;
fnumber=2.8&lt;br /&gt;
flash-display=true&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This segfaulted Megapixels for me. After patching some trivial segfaults, I get fatal GTK4 issues and other tangential problems. Let's try something else.&lt;br /&gt;
&lt;br /&gt;
==== Manually setting up a camera pipeline ====&lt;br /&gt;
&lt;br /&gt;
We can roughly follow [https://www.kernel.org/doc/html/latest/admin-guide/media/rkisp1.html this guide]. Doing so gives us the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;quot;media-ctl&amp;quot; &amp;quot;-d&amp;quot; &amp;quot;platform:rkisp1&amp;quot; &amp;quot;-r&amp;quot;&lt;br /&gt;
&amp;quot;media-ctl&amp;quot; &amp;quot;-d&amp;quot; &amp;quot;platform:rkisp1&amp;quot; &amp;quot;-l&amp;quot; &amp;quot;'imx258 1-001a':0 -&amp;gt; 'rkisp1_isp':0 [1]&amp;quot;&lt;br /&gt;
&amp;quot;media-ctl&amp;quot; &amp;quot;-d&amp;quot; &amp;quot;platform:rkisp1&amp;quot; &amp;quot;-l&amp;quot; &amp;quot;'rkisp1_isp':2 -&amp;gt; 'rkisp1_resizer_selfpath':0 [1]&amp;quot;&lt;br /&gt;
&amp;quot;media-ctl&amp;quot; &amp;quot;-d&amp;quot; &amp;quot;platform:rkisp1&amp;quot; &amp;quot;--set-v4l2&amp;quot; '&amp;quot;rkisp1_isp&amp;quot;:0 [fmt:SGRBG10_1X10/1048x780]'&lt;br /&gt;
&amp;quot;v4l2-ctl&amp;quot; &amp;quot;-z&amp;quot; &amp;quot;platform:rkisp1&amp;quot; &amp;quot;-d&amp;quot; &amp;quot;rkisp1_selfpath&amp;quot; &amp;quot;-v&amp;quot; &amp;quot;width=1048,height=780,&amp;quot;&lt;br /&gt;
&amp;quot;media-ctl&amp;quot; &amp;quot;-d&amp;quot; &amp;quot;platform:rkisp1&amp;quot; &amp;quot;--set-v4l2&amp;quot; '&amp;quot;rkisp1_resizer_selfpath&amp;quot;:0 [fmt:SGRBG10_1X10/1048x780 crop:(0,0)/1048x780]'&lt;br /&gt;
&lt;br /&gt;
&amp;quot;v4l2-ctl&amp;quot; &amp;quot;-z&amp;quot; &amp;quot;platform:rkisp1&amp;quot; &amp;quot;-d&amp;quot; &amp;quot;rkisp1_selfpath&amp;quot; &amp;quot;-v&amp;quot; &amp;quot;width=800,height=600,pixelformat=422P&amp;quot;&lt;br /&gt;
&amp;quot;v4l2-ctl&amp;quot; &amp;quot;-z&amp;quot; &amp;quot;platform:rkisp1&amp;quot; &amp;quot;-d&amp;quot; &amp;quot;rkisp1_selfpath&amp;quot; &amp;quot;--stream-mmap&amp;quot; &amp;quot;--stream-count&amp;quot; &amp;quot;1&amp;quot; &amp;quot;--verbose&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Careful readers will note that this is setting the camera up with a low resolution compared to what the sensor can do. For some reason I can't get the rkisp1 node to configure its sink pad with the maximum resolution of the sensor (4208x3118). Instead, it sets itself to 4032x3024. This mismatch is forbidden and causes v4l2 to give us EPIPE when we try to enable the stream. Using the lower resolution gets us further--the last command (which attempts to save a single frame of video) gives output like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
VIDIOC_QUERYCAP: ok&lt;br /&gt;
		VIDIOC_REQBUFS returned 0 (Success)&lt;br /&gt;
		VIDIOC_QUERYBUF returned 0 (Success)&lt;br /&gt;
		VIDIOC_QUERYBUF returned 0 (Success)&lt;br /&gt;
		VIDIOC_QUERYBUF returned 0 (Success)&lt;br /&gt;
		VIDIOC_QUERYBUF returned 0 (Success)&lt;br /&gt;
		VIDIOC_QBUF returned 0 (Success)&lt;br /&gt;
		VIDIOC_QBUF returned 0 (Success)&lt;br /&gt;
		VIDIOC_QBUF returned 0 (Success)&lt;br /&gt;
		VIDIOC_QBUF returned 0 (Success)&lt;br /&gt;
		VIDIOC_STREAMON returned 0 (Success)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
But then it just hangs there indefinitely.&lt;br /&gt;
&lt;br /&gt;
Running under strace, we see the program stuck in an ioctl:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ioctl(3, VIDIOC_DQBUF, {type=V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[https://www.kernel.org/doc/html/v4.13/media/uapi/v4l/vidioc-qbuf.html VIDIOC_DQBUF] corresponds to dequeuing a buffer once it has been filled with an image by the v4l2 device. Apparently, the device never gives us back a captured frame.&lt;br /&gt;
&lt;br /&gt;
=== Now what? ===&lt;br /&gt;
&lt;br /&gt;
==== Does i2c work at all? ====&lt;br /&gt;
&lt;br /&gt;
The camera driver uses i2c; we can see the camera [https://github.com/megous/linux/blob/c5af9f4f874a66b65c73c450b79f6a86b1b46332/arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts#L890-L914 in the .dts] to determine that it's on i2c bus 1, address 0x1a.&lt;br /&gt;
&lt;br /&gt;
The imx258 is controlled over i2c, and sends image data over MIPI. The first step is to see if the i2c control is working.&lt;br /&gt;
&lt;br /&gt;
Looking back at the driver, it seems we should see errors in dmesg if i2c communication fails. The driver checks the chip id in its probe function, which uses i2c, so we can conclude that i2c gets set up properly initially. Does it keep working?&lt;br /&gt;
&lt;br /&gt;
==== Does i2c keep working? (FTrace) ====&lt;br /&gt;
&lt;br /&gt;
We can see if other functions that use i2c produce errors--for example, when we run our &amp;lt;code&amp;gt;&amp;quot;v4l2-ctl&amp;quot; ... &amp;quot;--stream-mmap&amp;quot;&amp;lt;/code&amp;gt; command, we expect that &amp;lt;code&amp;gt;imx258_start_streaming&amp;lt;/code&amp;gt; will get called, and this function also writes a load of registers over i2c.&lt;br /&gt;
&lt;br /&gt;
Build and install a kernel with CONFIG_FTRACE (not hard, but outside the scope of this write-up) and enable function graph tracing:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo su&lt;br /&gt;
# cd /sys/kernel/debug/tracing&lt;br /&gt;
# echo function_graph &amp;gt; current_tracer&lt;br /&gt;
# cat available_filter_functions | grep -E 'rkisp|imx258|v4l2' | awk '{print $1}' &amp;gt; set_graph_function&lt;br /&gt;
# echo 'vm_map_pages,__iommu_map,iommu_map_sg_atomic,rk_iommu_map,__alloc_pages,dma_alloc_attrs,dma_mmap_attrs,__vm_map_pages,vb2_mmap,clk_e,able,schedule_timeout,clk_disable,regmap_write,schedule,__i2c_tra,sfer,i2c_tra,sfer_buffer_flags,dma_free_attrs' | tr , '\n' &amp;gt; set_graph_notrace&lt;br /&gt;
# tee trace_pipe &amp;gt; ~/function-trace.log&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, in another terminal session, run the &amp;lt;code&amp;gt;&amp;quot;v4l2-ctl&amp;quot; ... &amp;quot;--stream-mmap&amp;quot;&amp;lt;/code&amp;gt; command again. We end up with a bunch (but hopefully not *too* much) of output in our first terminal and the &amp;lt;code&amp;gt;~/function-trace.log&amp;lt;/code&amp;gt; file.&lt;br /&gt;
&lt;br /&gt;
A quick grep shows that &amp;lt;code&amp;gt;imx258_start_streaming&amp;lt;/code&amp;gt; is indeed called, so '''i2c is working properly'''.&lt;br /&gt;
&lt;br /&gt;
=== If i2c works, what doesn't? ===&lt;br /&gt;
&lt;br /&gt;
Our program that asks for a video frame is still hung! We ask the camera to start streaming frames, it presumably does, but the v4l2 stack never tells us a frame has finished. Doing some digging in the v4l2 stack (and the rkisp1 driver), we find out that rkisp1 is notified about frame status via interrupts.&lt;br /&gt;
&lt;br /&gt;
Perhaps the hardware is never actually emitting the interrupt that signals a frame being finished. Indeed, grepping our FTrace log shows that &amp;lt;code&amp;gt;rkisp1_isr&amp;lt;/code&amp;gt; is never called. A quick look at &amp;lt;code&amp;gt;/proc/interrupts&amp;lt;/code&amp;gt; shows that '''the only interrupt associated with the isp has never triggered''' (0 count on every CPU):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# head -n1 /proc/interrupts; grep isp /proc/interrupts&lt;br /&gt;
           CPU0       CPU1       CPU2       CPU3       CPU4       CPU5       &lt;br /&gt;
 57:          0          0          0          0          0          0     GICv3  75 Level     ff914000.iommu, rkisp1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;rkisp1&amp;lt;/code&amp;gt; debugfs info ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;rkisp1&amp;lt;/code&amp;gt; driver keeps some [https://github.com/megous/linux/blob/c5af9f4f874a66b65c73c450b79f6a86b1b46332/drivers/media/platform/rockchip/rkisp1/rkisp1-common.h#L335-L363 error/debug counters] in debugfs, which can be viewed at &amp;lt;code&amp;gt;/sys/kernel/debug/ff910000.isp0&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Sadly, the only one of these that comes up nonzero is &amp;lt;code&amp;gt;sp_stop_timeout&amp;lt;/code&amp;gt; (&amp;quot;upon stream stop, the capture waits 1 second for the isr to stop the stream. This param is incremented in case of timeout&amp;quot;). I observe it to increment once per time I terminate the &amp;lt;code&amp;gt;&amp;quot;v4l2-ctl&amp;quot; ... &amp;quot;--stream-mmap&amp;quot;&amp;lt;/code&amp;gt; command. This tells us what we already know: interrupts are not firing, but it also tells us that we aren't hitting any other errors that rkisp1 knows about.&lt;br /&gt;
&lt;br /&gt;
== Next steps ==&lt;br /&gt;
&lt;br /&gt;
Where do we go from here? I don't know--something may be wrong with the way the .dts specifies interrupts, some kind of firmware/GIC (the rk3399's interrupt controller) configuration issue, or something else. It would be good to try to determine:&lt;br /&gt;
&lt;br /&gt;
* Whether the MIPI lines actually show traffic, if someone has a logic analyzer and a dissected PPP.&lt;br /&gt;
* Whether the DMA of frames to memory actually happens, regardless of (lack of) emission of the interrupt that tells us when said DMA finishes a frame.&lt;br /&gt;
* Whether the regulator messages we see during boot are actually significant. I don't know enough about the Linux regulator framework to say whether these being not-found means power is not correctly supplied, or if Linux just isn't being properly informed of the power supply requirements for precise tracking/power-saving when the camera is off.&lt;br /&gt;
&lt;br /&gt;
== Megi saves the day ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[I] &amp;lt;megi&amp;gt; you might be interested in this https://megous.com/dl/tmp/0ae6ba03a17a3d53.png&lt;br /&gt;
[I] &amp;lt;megi&amp;gt; https://megous.com/git/linux/tag/?h=orange-pi-5.18-20220521-1759&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Turns out, the .dts had the wrong ISP connected to the sensor!&lt;br /&gt;
&lt;br /&gt;
Apply [https://github.com/megous/linux/commit/9afd884f8b36121fb6097e77b6d35fe46ab48ad9 this commit] ([https://github.com/megous/linux/commit/9afd884f8b36121fb6097e77b6d35fe46ab48ad9.patch patch]) to your kernel tree, rebuild, and reinstall. Now, the following should produce an image (&amp;lt;code&amp;gt;frame.jpg&amp;lt;/code&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;quot;media-ctl&amp;quot; &amp;quot;-d&amp;quot; &amp;quot;platform:rkisp1&amp;quot; &amp;quot;-r&amp;quot;&lt;br /&gt;
&amp;quot;media-ctl&amp;quot; &amp;quot;-d&amp;quot; &amp;quot;platform:rkisp1&amp;quot; &amp;quot;--set-v4l2&amp;quot; '&amp;quot;imx258 1-001a&amp;quot;:0 [fmt:SGRBG10_1X10/1048x780]'&lt;br /&gt;
&amp;quot;media-ctl&amp;quot; &amp;quot;-d&amp;quot; &amp;quot;platform:rkisp1&amp;quot; &amp;quot;-l&amp;quot; &amp;quot;'imx258 1-001a':0 -&amp;gt; 'rkisp1_isp':0 [1]&amp;quot;&lt;br /&gt;
&amp;quot;media-ctl&amp;quot; &amp;quot;-d&amp;quot; &amp;quot;platform:rkisp1&amp;quot; &amp;quot;-l&amp;quot; &amp;quot;'rkisp1_isp':2 -&amp;gt; 'rkisp1_resizer_selfpath':0 [1]&amp;quot;&lt;br /&gt;
&amp;quot;media-ctl&amp;quot; &amp;quot;-d&amp;quot; &amp;quot;platform:rkisp1&amp;quot; &amp;quot;--set-v4l2&amp;quot; '&amp;quot;rkisp1_isp&amp;quot;:0 [fmt:SGRBG10_1X10/1048x780 crop:(0,0)/1048x780]'&lt;br /&gt;
&amp;quot;media-ctl&amp;quot; &amp;quot;-d&amp;quot; &amp;quot;platform:rkisp1&amp;quot; &amp;quot;--set-v4l2&amp;quot; '&amp;quot;rkisp1_isp&amp;quot;:2 [fmt:YUYV8_2X8/1048x780 crop:(0,0)/1048x780]'&lt;br /&gt;
&amp;quot;v4l2-ctl&amp;quot; &amp;quot;-z&amp;quot; &amp;quot;platform:rkisp1&amp;quot; &amp;quot;-d&amp;quot; &amp;quot;rkisp1_selfpath&amp;quot; &amp;quot;-v&amp;quot; &amp;quot;width=1048,height=780,&amp;quot;&lt;br /&gt;
&amp;quot;media-ctl&amp;quot; &amp;quot;-d&amp;quot; &amp;quot;platform:rkisp1&amp;quot; &amp;quot;--set-v4l2&amp;quot; '&amp;quot;rkisp1_resizer_selfpath&amp;quot;:0 [fmt:YUYV8_2X8/1048x780 crop:(0,0)/1048x780]'&lt;br /&gt;
&lt;br /&gt;
&amp;quot;v4l2-ctl&amp;quot; &amp;quot;-z&amp;quot; &amp;quot;platform:rkisp1&amp;quot; &amp;quot;-d&amp;quot; &amp;quot;rkisp1_selfpath&amp;quot; &amp;quot;-v&amp;quot; &amp;quot;width=1048,height=780,pixelformat=422P&amp;quot;&lt;br /&gt;
&amp;quot;v4l2-ctl&amp;quot; &amp;quot;-z&amp;quot; &amp;quot;platform:rkisp1&amp;quot; &amp;quot;-d&amp;quot; &amp;quot;rkisp1_selfpath&amp;quot; &amp;quot;--stream-mmap&amp;quot; &amp;quot;--stream-count&amp;quot; &amp;quot;1&amp;quot; &amp;quot;--stream-file=frame.raw&amp;quot;&lt;br /&gt;
&lt;br /&gt;
ffmpeg -y -s:v 1048x780 -pix_fmt yuv422p -i frame.raw frame.jpg&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== What's left? ===&lt;br /&gt;
&lt;br /&gt;
libcamera and megapixels still don't work. Megapixels appears to need support for debayering YUYV, and both appear to be configuring the rkisp1 pipeline wrong.&lt;br /&gt;
&lt;br /&gt;
== Useful links == &lt;br /&gt;
&lt;br /&gt;
* [https://files.pine64.org/doc/PinePhonePro/PinephonePro-Schematic-V1.0-20211127.pdf Pinephone Pro Schematic]&lt;br /&gt;
* [https://blog.krybot.com/a?ID=01650-cea27a80-a1ab-4da1-9cb5-3945be91e3e1 Background on the GIC]&lt;br /&gt;
* [https://elinux.org/images/9/94/ISP-presentation.pdf Background on the rkisp1 ISP]&lt;/div&gt;</summary>
		<author><name>Memleek</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PinePhone_Pro_Software_State&amp;diff=13105</id>
		<title>PinePhone Pro Software State</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PinePhone_Pro_Software_State&amp;diff=13105"/>
		<updated>2022-05-19T19:25:43Z</updated>

		<summary type="html">&lt;p&gt;Memleek: link imx258 debugging article&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Presently the PinePhone Pro Explorer Edition is aimed at '''Linux developers with an extensive knowledge of embedded systems and/or experience with mobile Linux'''. It will take time for all the PinePhone Pro’s functionality to reach software parity with the original PinePhone and for mobile operating systems, in more general, to reach a higher degree of maturity.&lt;br /&gt;
&lt;br /&gt;
Bear in mind that the software for these smartphones is still in a very early stage, with most of the software being in alpha or beta state. That's especially also the case for scalability of applications, their availability and practicability, any hardware function implementations and the firmware. The software is provided as is. There is no warranty for the software, not even for merchantability or fitness for a particular purpose.&lt;br /&gt;
&lt;br /&gt;
The following table lists the feature functionality status of the unaltered pre-installed factory image of the current shipping batch and as comparison an up-to-date reference image (no responsibility is accepted for the accuracy of this information, the list is provided and updated by the community). If you have any questions regarding the current state of the software or of specific features working, please don't hesitate to ask in the [[Main Page#Community and Support|community chat]] '''before buying the device''':&lt;br /&gt;
&lt;br /&gt;
* Discord: ''#pinephone'' under https://discord.gg/pine64&lt;br /&gt;
* IRC: ''#pinephone'' on ''irc.pine64.org''. Note: please consider Matrix, Discord or Telegram due to the volatile nature of IRC&lt;br /&gt;
* Matrix: https://app.element.io/#/room/#pinephone:matrix.org&lt;br /&gt;
* Telegram: https://t.me/pinephone&lt;br /&gt;
&lt;br /&gt;
{{Hint|The software is '''written by the community''', any contributions towards the community projects are greatly appreciated! Please see &amp;quot;[[How to Contribute]]&amp;quot; to learn about how to contribute to the software projects and &amp;quot;[[Where to Report Bugs]]&amp;quot; to learn about where to report bugs.}}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable plainrowheaders&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Functionality&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; style=&amp;quot;min-width: 260px;&amp;quot;  | Component&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; style=&amp;quot;width: 120px;&amp;quot; | Status (factory)¹&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; style=&amp;quot;width: 120px;&amp;quot; | Status (updated)²&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Notes&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; rowspan=&amp;quot;3&amp;quot; | Bootloader&lt;br /&gt;
| &amp;lt;code&amp;gt;U-Boot&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | Critical bugs&lt;br /&gt;
| Some critical software bugs currently not fixed yet: A drained battery causes U-Boot to bootloop (cause is known and currently being worked on);&amp;lt;sup&amp;gt;[[PinePhone_Pro#The battery is fully drained|Workaround]]&amp;lt;/sup&amp;gt; Occasionally the eMMC fails to initialize&amp;lt;sup&amp;gt;[https://gitlab.com/postmarketOS/pmaports/-/issues/1424 Report]&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;SPI&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | Unfinished&lt;br /&gt;
| SPI memory is currently empty in the Explorer Edition batch, a corrupted installation on the eMMC has a higher boot priority than a fresh microSD card installation, leading to a involved recovery procedure&amp;lt;sup&amp;gt;[https://tow-boot.org/ Planned]&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Boot GUI&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | Not implemented&lt;br /&gt;
| Currently there is no graphical boot selection implemented&amp;lt;sup&amp;gt;[https://tow-boot.org/ Possibly planned]&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; rowspan=&amp;quot;3&amp;quot; | Operating System&lt;br /&gt;
| &amp;lt;code&amp;gt;Stability&amp;lt;/code&amp;gt;&lt;br /&gt;
| style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | Critical bugs&lt;br /&gt;
| style=&amp;quot;background:LightYellow; text-align:center;&amp;quot; | WIP&lt;br /&gt;
| The pre-flashed and outdated operating system on the eMMC often gets corrupted after updating&amp;lt;sup&amp;gt;[https://forum.pine64.org/showthread.php?tid=15950 Example]&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Suspend&amp;lt;/code&amp;gt;&lt;br /&gt;
| style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | Not working&lt;br /&gt;
| style=&amp;quot;background:LightYellow; text-align:center;&amp;quot; | Experimental&lt;br /&gt;
| '''Without suspend the phone will drain very fast!''' Suspend only available in specific more recent images&amp;lt;sup&amp;gt;[https://www.pine64.org/2022/03/15/march-update-introducing-the-quartzpro64/ News]&amp;lt;/sup&amp;gt; Audio is often higher pitched after waking up from suspend due to a bug&amp;lt;sup&amp;gt;[https://github.com/dreemurrs-embedded/Pine64-Arch/issues/381 Report]&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Updates&amp;lt;/code&amp;gt;&lt;br /&gt;
| style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | Critical bugs&lt;br /&gt;
| style=&amp;quot;background:LightYellow; text-align:center;&amp;quot; | WIP&lt;br /&gt;
| The pre-flashed and outdated operating system on the eMMC often gets corrupted after updating&amp;lt;sup&amp;gt;[https://forum.pine64.org/showthread.php?tid=15950 Example]&amp;lt;/sup&amp;gt;; Pacman database lock preventing updates&amp;lt;sup&amp;gt;[https://wiki.archlinux.org/title/pacman#%22Failed_to_init_transaction_(unable_to_lock_database)%22_error Solution]&amp;lt;/sup&amp;gt;; Keyring bug&amp;lt;sup&amp;gt;[Solution is to run &amp;quot;pinephonepro-post-install&amp;quot; script as root]&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; rowspan=&amp;quot;5&amp;quot; | Modem&lt;br /&gt;
| &amp;lt;code&amp;gt;General&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | Critical bugs&lt;br /&gt;
| The modem crashes frequently&amp;lt;sup&amp;gt;[https://gitlab.manjaro.org/manjaro-arm/issues/pinephone/phosh/-/issues/147 Report]&amp;lt;/sup&amp;gt;&amp;lt;sup&amp;gt;[https://gitlab.com/mobian1/devices/eg25-manager/-/issues/15 Report]&amp;lt;/sup&amp;gt;&amp;lt;sup&amp;gt;[https://github.com/Biktorgj/pinephone_modem_sdk Alternative firmware]&amp;lt;/sup&amp;gt;; Slow wakeup&amp;lt;sup&amp;gt;[https://gitlab.com/mobian1/devices/eg25-manager/-/issues/34 Report]&amp;lt;/sup&amp;gt;; Some carriers blocking specific TANs in their network&amp;lt;sup&amp;gt;[[PinePhone Carrier Support]]&amp;lt;/sup&amp;gt;; '''Note:''' Proprietary firmware&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Phone&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightYellow; text-align:center;&amp;quot; | WIP&lt;br /&gt;
| The modem crashes frequently, which can lead to missed calls&amp;lt;sup&amp;gt;[https://gitlab.manjaro.org/manjaro-arm/issues/pinephone/phosh/-/issues/147 Report]&amp;lt;/sup&amp;gt;&amp;lt;sup&amp;gt;[https://gitlab.com/mobian1/devices/eg25-manager/-/issues/15 Report]&amp;lt;/sup&amp;gt;&amp;lt;sup&amp;gt;[https://github.com/Biktorgj/pinephone_modem_sdk Alternative firmware]&amp;lt;/sup&amp;gt;; bad call audio quality&amp;lt;sup&amp;gt;[https://gitlab.manjaro.org/manjaro-arm/issues/pinephone/phosh/-/issues/249 Report]&amp;lt;/sup&amp;gt;;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;SMS&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightGreen; text-align:center;&amp;quot; | Working&lt;br /&gt;
| SMS functionality is expected to work. In certain cases the functionality might be blocked by a clogged modem&amp;lt;sup&amp;gt;[https://gitlab.manjaro.org/manjaro-arm/issues/pinephone/phosh/-/issues/203 Report]&amp;lt;/sup&amp;gt;; Some bugs&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;MMS&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightYellow; text-align:center;&amp;quot; | WIP&lt;br /&gt;
| MMS functionality is integrated into the application &amp;quot;Spacebar&amp;quot;, some bugs remaining and expected&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Push notifications&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | Not implemented&lt;br /&gt;
| Receiving push notifications while the phone is suspended is not implemented&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; rowspan=&amp;quot;12&amp;quot; | Components&lt;br /&gt;
| &amp;lt;code&amp;gt;LCD&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightGreen; text-align:center;&amp;quot; | Working&lt;br /&gt;
| Under certain circumstances it is difficult to wake up the screen&amp;lt;sup&amp;gt;[Citation]&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Touch&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightGreen; text-align:center;&amp;quot; | Working&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Rear camera&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | Not working&lt;br /&gt;
| Driver exists (drivers/media/i2c/imx258.c) but camera does not seem to capture frames (see [[PinePhone Pro/IMX258 Camera Debugging|debugging article]])&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Front camera&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | Not working&lt;br /&gt;
| Driver not implemented yet (a staging driver exists for this sensor using the Intel Atom ISP framework (drivers/staging/media/atomisp/i2c/ov8858.c), but it needs to be ported and cleaned up); camera not operational&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Camera flash&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightGreen; text-align:center;&amp;quot; | Working&lt;br /&gt;
| (tested on Manjaro; at &amp;lt;code&amp;gt;/sys/class/leds/white:flash&amp;lt;/code&amp;gt;)&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;WiFi&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightGreen; text-align:center;&amp;quot; | Working&lt;br /&gt;
| WiFi is expected to work. Some remaining tasks, such as &amp;quot;monitor mode&amp;quot;. '''Note:''' Proprietary firmware&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Bluetooth&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightYellow; text-align:center;&amp;quot; | WIP&lt;br /&gt;
| Bluetooth not necessarily working for calls yet due to missing audio routing&amp;lt;sup&amp;gt;[Citation]&amp;lt;/sup&amp;gt;; Bluetooth in general dodgy under Pulseaudio.&amp;lt;sup&amp;gt;[https://wiki.archlinux.org/title/bluetooth_headset#Headset_via_Pipewire Info]&amp;lt;/sup&amp;gt; '''Note:''' Proprietary firmware&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;GNSS/GPS&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightYellow; text-align:center;&amp;quot; | WIP&lt;br /&gt;
| aGPS to be implemented&amp;lt;sup&amp;gt;[Citation]&amp;lt;/sup&amp;gt;; long loading times to get a GPS fix&amp;lt;sup&amp;gt;[Citation]&amp;lt;/sup&amp;gt;; No preinstalled application&amp;lt;sup&amp;gt;[Citation]&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Sensors&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightYellow; text-align:center;&amp;quot; | WIP&lt;br /&gt;
| &amp;quot;3 Axis Magnetometer&amp;quot; (&amp;lt;code&amp;gt;lis3mdl&amp;lt;/code&amp;gt;): Not present in hardware (it's an alternative chip to &amp;lt;code&amp;gt;af8133j&amp;lt;/code&amp;gt; due to component shortages)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;quot;Geo Magnetic Sensor&amp;quot; (&amp;lt;code&amp;gt;af8133j&amp;lt;/code&amp;gt;): Working (tested on Manjaro, at &amp;lt;code&amp;gt;/sys/bus/i2c/devices/4-001c/iio:device1&amp;lt;/code&amp;gt;)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;quot;Accelerometer / Gyroscope&amp;quot; (&amp;lt;code&amp;gt;mpu6500&amp;lt;/code&amp;gt;): Working (tested on Manjaro, at &amp;lt;code&amp;gt;/sys/bus/i2c/devices/4-0068/iio:device2&amp;lt;/code&amp;gt;)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;quot;Ambient light / Proximity&amp;quot; (&amp;lt;code&amp;gt;stk3311&amp;lt;/code&amp;gt;): Not working (tested on Manjaro 5.17.6-2 kernel; IRQ issues)&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt;stk3311 dmesg excerpt&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
[    9.406478] genirq: Failed to request resources for stk3310_event (irq 99) on irqchip rockchip_gpio_irq&lt;br /&gt;
[    9.407380] stk3310 3-0048: request irq 99 failed&lt;br /&gt;
[    9.408360] stk3310: probe of 3-0048 failed with error -5&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Vibration motor&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightGreen; text-align:center;&amp;quot; | Working&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Notification LED&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightGreen; text-align:center;&amp;quot; | Working&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Buttons&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightGreen; text-align:center;&amp;quot; | Working&lt;br /&gt;
| Power buttons and volume buttons are working.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; rowspan=&amp;quot;5&amp;quot; | Accessory compatibility, spare parts&lt;br /&gt;
| &amp;lt;code&amp;gt;Keyboard Add-on&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | WIP and critical hardware issue&lt;br /&gt;
| The keyboard add-on compatibility is work-in-progress. '''Hardware issue: USB-C port of the phone must not be used while the current keyboard revision is connected'''&amp;lt;sup&amp;gt;[[PinePhone_(Pro)_Keyboard#Safety|Warning]]&amp;lt;/sup&amp;gt;; Top row symbols not implemented as designed&amp;lt;sup&amp;gt;[Citation]&amp;lt;/sup&amp;gt;; Keyboard hot-plugging not supported&amp;lt;sup&amp;gt;[Citation]&amp;lt;/sup&amp;gt;; Battery state not exposed in the pre-flashed operating system state&amp;lt;sup&amp;gt;[Citation]&amp;lt;/sup&amp;gt;; general driver bugs&amp;lt;sup&amp;gt;[Citation]&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;LoRa Add-on&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | Not implemented&lt;br /&gt;
| No software support implemented&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Qi Wireless Charging Add-on&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightYellow; text-align:center;&amp;quot; | WIP&lt;br /&gt;
| Wireless charging with the add-on case is expected to work to some degree. Certain software functionality and a driver is currently missing&amp;lt;sup&amp;gt;[Citation]&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Fingerprint Reader Add-on&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | Not implemented&lt;br /&gt;
| No software support implemented&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Spare parts&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | Not available yet&lt;br /&gt;
| Spare parts currently not available yet in the store.&amp;lt;sup&amp;gt;[https://pine64.com/product-category/smartphone-spare-parts/ Store]&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; rowspan=&amp;quot;1&amp;quot; | Software notes&lt;br /&gt;
| &amp;lt;code&amp;gt;Waydroid&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightYellow; text-align:center;&amp;quot; | Software rendering only&lt;br /&gt;
| Waydroid is an Android container used to run Android applications. Currently can only be started using software rendering due to a bug&amp;lt;sup&amp;gt;[https://github.com/waydroid/waydroid/issues/291 Report]&amp;lt;/sup&amp;gt;&amp;lt;sup&amp;gt;[https://gitlab.freedesktop.org/mesa/mesa/-/issues/5928 Report]&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
¹ Status of the features at the time of the last factory installation without updates&lt;br /&gt;
&lt;br /&gt;
² Status of the features with an up-to-date reference image&lt;/div&gt;</summary>
		<author><name>Memleek</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PinePhone_Pro/IMX258_Camera_Debugging&amp;diff=13104</id>
		<title>PinePhone Pro/IMX258 Camera Debugging</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PinePhone_Pro/IMX258_Camera_Debugging&amp;diff=13104"/>
		<updated>2022-05-19T16:25:45Z</updated>

		<summary type="html">&lt;p&gt;Memleek: More debugging, add some links&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Background ==&lt;br /&gt;
&lt;br /&gt;
The Pinephone Pro's rear camera is a Sony IMX258. The camera driver is present upstream, and at least [https://gitlab.manjaro.org/manjaro-arm/packages/core/linux-pinephonepro Manjaro's kernel] (downstream of Megi's) enables the driver. The camera does not seem to work; this page catalogs work on figuring out why.&lt;br /&gt;
&lt;br /&gt;
== Initial status ==&lt;br /&gt;
&lt;br /&gt;
What do we see in dmesg?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
imx258 1-001a: supply vana not found, using dummy regulator&lt;br /&gt;
imx258 1-001a: supply vdig not found, using dummy regulator&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This tells us the kernel loads the driver, which is something.&lt;br /&gt;
&lt;br /&gt;
Are these errors bad/fatal? Inspecting the [https://github.com/megous/linux/blob/orange-pi-5.17/drivers/media/i2c/imx258.c source] shows us that these supplies are defined in the &amp;lt;code&amp;gt;imx258_supply_names&amp;lt;/code&amp;gt; array, and &amp;lt;code&amp;gt;imx258_probe&amp;lt;/code&amp;gt; calls &amp;lt;code&amp;gt;devm_regulator_bulk_get&amp;lt;/code&amp;gt; to set them up.&lt;br /&gt;
&amp;lt;code&amp;gt;imx258_probe&amp;lt;/code&amp;gt; checks the return code from &amp;lt;code&amp;gt;devm_regulator_bulk_get&amp;lt;/code&amp;gt;, emitting a fatal &amp;quot;Failed to get supplies&amp;quot; message if the return code is negative (indicating failure). Since we don't see this message (or any others from the driver), it looks like it loads successfully!&lt;br /&gt;
&lt;br /&gt;
=== How can we test the camera? ===&lt;br /&gt;
&lt;br /&gt;
==== Megapixels ====&lt;br /&gt;
&lt;br /&gt;
[https://gitlab.com/postmarketOS/megapixels Megapixels] requires a per-device file to configure cameras. This one isn't complete (most of its numbers are complete nonsense), but it should let us see what happens when Megapixels tries to access the camera:&lt;br /&gt;
&amp;lt;code&amp;gt;pine64,pinephone-pro.ini&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[device]&lt;br /&gt;
make=PINE64&lt;br /&gt;
model=PinePhone Pro&lt;br /&gt;
&lt;br /&gt;
[rear]&lt;br /&gt;
driver=imx258&lt;br /&gt;
media-driver=rkisp1&lt;br /&gt;
capture-width=4208&lt;br /&gt;
capture-height=3118&lt;br /&gt;
capture-rate=60&lt;br /&gt;
capture-fmt=GRBG10P&lt;br /&gt;
preview-width=1280&lt;br /&gt;
preview-height=960&lt;br /&gt;
preview-rate=60&lt;br /&gt;
#preview-fmt=BGGR8&lt;br /&gt;
capture-fmt=GRBG10P&lt;br /&gt;
rotate=90&lt;br /&gt;
mirrored=true&lt;br /&gt;
focallength=2.6&lt;br /&gt;
cropfactor=12.7&lt;br /&gt;
fnumber=2.8&lt;br /&gt;
flash-display=true&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This segfaulted Megapixels for me. After patching some trivial segfaults, I get fatal GTK4 issues and other tangential problems. Let's try something else.&lt;br /&gt;
&lt;br /&gt;
==== Manually setting up a camera pipeline ====&lt;br /&gt;
&lt;br /&gt;
We can roughly follow [https://www.kernel.org/doc/html/latest/admin-guide/media/rkisp1.html this guide]. Doing so gives us the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;quot;media-ctl&amp;quot; &amp;quot;-d&amp;quot; &amp;quot;platform:rkisp1&amp;quot; &amp;quot;-r&amp;quot;&lt;br /&gt;
&amp;quot;media-ctl&amp;quot; &amp;quot;-d&amp;quot; &amp;quot;platform:rkisp1&amp;quot; &amp;quot;-l&amp;quot; &amp;quot;'imx258 1-001a':0 -&amp;gt; 'rkisp1_isp':0 [1]&amp;quot;&lt;br /&gt;
&amp;quot;media-ctl&amp;quot; &amp;quot;-d&amp;quot; &amp;quot;platform:rkisp1&amp;quot; &amp;quot;-l&amp;quot; &amp;quot;'rkisp1_isp':2 -&amp;gt; 'rkisp1_resizer_selfpath':0 [1]&amp;quot;&lt;br /&gt;
&amp;quot;media-ctl&amp;quot; &amp;quot;-d&amp;quot; &amp;quot;platform:rkisp1&amp;quot; &amp;quot;--set-v4l2&amp;quot; '&amp;quot;rkisp1_isp&amp;quot;:0 [fmt:SGRBG10_1X10/1048x780]'&lt;br /&gt;
&amp;quot;v4l2-ctl&amp;quot; &amp;quot;-z&amp;quot; &amp;quot;platform:rkisp1&amp;quot; &amp;quot;-d&amp;quot; &amp;quot;rkisp1_selfpath&amp;quot; &amp;quot;-v&amp;quot; &amp;quot;width=1048,height=780,&amp;quot;&lt;br /&gt;
&amp;quot;media-ctl&amp;quot; &amp;quot;-d&amp;quot; &amp;quot;platform:rkisp1&amp;quot; &amp;quot;--set-v4l2&amp;quot; '&amp;quot;rkisp1_resizer_selfpath&amp;quot;:0 [fmt:SGRBG10_1X10/1048x780 crop:(0,0)/1048x780]'&lt;br /&gt;
&lt;br /&gt;
&amp;quot;v4l2-ctl&amp;quot; &amp;quot;-z&amp;quot; &amp;quot;platform:rkisp1&amp;quot; &amp;quot;-d&amp;quot; &amp;quot;rkisp1_selfpath&amp;quot; &amp;quot;-v&amp;quot; &amp;quot;width=800,height=600,pixelformat=422P&amp;quot;&lt;br /&gt;
&amp;quot;v4l2-ctl&amp;quot; &amp;quot;-z&amp;quot; &amp;quot;platform:rkisp1&amp;quot; &amp;quot;-d&amp;quot; &amp;quot;rkisp1_selfpath&amp;quot; &amp;quot;--stream-mmap&amp;quot; &amp;quot;--stream-count&amp;quot; &amp;quot;1&amp;quot; &amp;quot;--verbose&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Careful readers will note that this is setting the camera up with a low resolution compared to what the sensor can do. For some reason I can't get the rkisp1 node to configure its sink pad with the maximum resolution of the sensor (4208x3118). Instead, it sets itself to 4032x3024. This mismatch is forbidden and causes v4l2 to give us EPIPE when we try to enable the stream. Using the lower resolution gets us further--the last command (which attempts to save a single frame of video) gives output like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
VIDIOC_QUERYCAP: ok&lt;br /&gt;
		VIDIOC_REQBUFS returned 0 (Success)&lt;br /&gt;
		VIDIOC_QUERYBUF returned 0 (Success)&lt;br /&gt;
		VIDIOC_QUERYBUF returned 0 (Success)&lt;br /&gt;
		VIDIOC_QUERYBUF returned 0 (Success)&lt;br /&gt;
		VIDIOC_QUERYBUF returned 0 (Success)&lt;br /&gt;
		VIDIOC_QBUF returned 0 (Success)&lt;br /&gt;
		VIDIOC_QBUF returned 0 (Success)&lt;br /&gt;
		VIDIOC_QBUF returned 0 (Success)&lt;br /&gt;
		VIDIOC_QBUF returned 0 (Success)&lt;br /&gt;
		VIDIOC_STREAMON returned 0 (Success)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
But then it just hangs there indefinitely.&lt;br /&gt;
&lt;br /&gt;
Running under strace, we see the program stuck in an ioctl:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ioctl(3, VIDIOC_DQBUF, {type=V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[https://www.kernel.org/doc/html/v4.13/media/uapi/v4l/vidioc-qbuf.html VIDIOC_DQBUF] corresponds to dequeuing a buffer once it has been filled with an image by the v4l2 device. Apparently, the device never gives us back a captured frame.&lt;br /&gt;
&lt;br /&gt;
=== Now what? ===&lt;br /&gt;
&lt;br /&gt;
==== Does i2c work at all? ====&lt;br /&gt;
&lt;br /&gt;
The camera driver uses i2c; we can see the camera [https://github.com/megous/linux/blob/c5af9f4f874a66b65c73c450b79f6a86b1b46332/arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts#L890-L914 in the .dts] to determine that it's on i2c bus 1, address 0x1a.&lt;br /&gt;
&lt;br /&gt;
The imx258 is controlled over i2c, and sends image data over MIPI. The first step is to see if the i2c control is working.&lt;br /&gt;
&lt;br /&gt;
Looking back at the driver, it seems we should see errors in dmesg if i2c communication fails. The driver checks the chip id in its probe function, which uses i2c, so we can conclude that i2c gets set up properly initially. Does it keep working?&lt;br /&gt;
&lt;br /&gt;
==== Does i2c keep working? (FTrace) ====&lt;br /&gt;
&lt;br /&gt;
We can see if other functions that use i2c produce errors--for example, when we run our &amp;lt;code&amp;gt;&amp;quot;v4l2-ctl&amp;quot; ... &amp;quot;--stream-mmap&amp;quot;&amp;lt;/code&amp;gt; command, we expect that &amp;lt;code&amp;gt;imx258_start_streaming&amp;lt;/code&amp;gt; will get called, and this function also writes a load of registers over i2c.&lt;br /&gt;
&lt;br /&gt;
Build and install a kernel with CONFIG_FTRACE (not hard, but outside the scope of this write-up) and enable function graph tracing:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo su&lt;br /&gt;
# cd /sys/kernel/debug/tracing&lt;br /&gt;
# echo function_graph &amp;gt; current_tracer&lt;br /&gt;
# cat available_filter_functions | grep -E 'rkisp|imx258|v4l2' | awk '{print $1}' &amp;gt; set_graph_function&lt;br /&gt;
# echo 'vm_map_pages,__iommu_map,iommu_map_sg_atomic,rk_iommu_map,__alloc_pages,dma_alloc_attrs,dma_mmap_attrs,__vm_map_pages,vb2_mmap,clk_e,able,schedule_timeout,clk_disable,regmap_write,schedule,__i2c_tra,sfer,i2c_tra,sfer_buffer_flags,dma_free_attrs' | tr , '\n' &amp;gt; set_graph_notrace&lt;br /&gt;
# tee trace_pipe &amp;gt; ~/function-trace.log&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, in another terminal session, run the &amp;lt;code&amp;gt;&amp;quot;v4l2-ctl&amp;quot; ... &amp;quot;--stream-mmap&amp;quot;&amp;lt;/code&amp;gt; command again. We end up with a bunch (but hopefully not *too* much) of output in our first terminal and the &amp;lt;code&amp;gt;~/function-trace.log&amp;lt;/code&amp;gt; file.&lt;br /&gt;
&lt;br /&gt;
A quick grep shows that &amp;lt;code&amp;gt;imx258_start_streaming&amp;lt;/code&amp;gt; is indeed called, so '''i2c is working properly'''.&lt;br /&gt;
&lt;br /&gt;
=== If i2c works, what doesn't? ===&lt;br /&gt;
&lt;br /&gt;
Our program that asks for a video frame is still hung! We ask the camera to start streaming frames, it presumably does, but the v4l2 stack never tells us a frame has finished. Doing some digging in the v4l2 stack (and the rkisp1 driver), we find out that rkisp1 is notified about frame status via interrupts.&lt;br /&gt;
&lt;br /&gt;
Perhaps the hardware is never actually emitting the interrupt that signals a frame being finished. Indeed, grepping our FTrace log shows that &amp;lt;code&amp;gt;rkisp1_isr&amp;lt;/code&amp;gt; is never called. A quick look at &amp;lt;code&amp;gt;/proc/interrupts&amp;lt;/code&amp;gt; shows that '''the only interrupt associated with the isp has never triggered''' (0 count on every CPU):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# head -n1 /proc/interrupts; grep isp /proc/interrupts&lt;br /&gt;
           CPU0       CPU1       CPU2       CPU3       CPU4       CPU5       &lt;br /&gt;
 57:          0          0          0          0          0          0     GICv3  75 Level     ff914000.iommu, rkisp1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;rkisp1&amp;lt;/code&amp;gt; debugfs info ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;rkisp1&amp;lt;/code&amp;gt; driver keeps some [https://github.com/megous/linux/blob/c5af9f4f874a66b65c73c450b79f6a86b1b46332/drivers/media/platform/rockchip/rkisp1/rkisp1-common.h#L335-L363 error/debug counters] in debugfs, which can be viewed at &amp;lt;code&amp;gt;/sys/kernel/debug/ff910000.isp0&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Sadly, the only one of these that comes up nonzero is &amp;lt;code&amp;gt;sp_stop_timeout&amp;lt;/code&amp;gt; (&amp;quot;upon stream stop, the capture waits 1 second for the isr to stop the stream. This param is incremented in case of timeout&amp;quot;). I observe it to increment once per time I terminate the &amp;lt;code&amp;gt;&amp;quot;v4l2-ctl&amp;quot; ... &amp;quot;--stream-mmap&amp;quot;&amp;lt;/code&amp;gt; command. This tells us what we already know: interrupts are not firing, but it also tells us that we aren't hitting any other errors that rkisp1 knows about.&lt;br /&gt;
&lt;br /&gt;
== Next steps ==&lt;br /&gt;
&lt;br /&gt;
Where do we go from here? I don't know--something may be wrong with the way the .dts specifies interrupts, some kind of firmware/GIC (the rk3399's interrupt controller) configuration issue, or something else. It would be good to try to determine:&lt;br /&gt;
&lt;br /&gt;
* Whether the MIPI lines actually show traffic, if someone has a logic analyzer and a dissected PPP.&lt;br /&gt;
* Whether the DMA of frames to memory actually happens, regardless of (lack of) emission of the interrupt that tells us when said DMA finishes a frame.&lt;br /&gt;
* Whether the regulator messages we see during boot are actually significant. I don't know enough about the Linux regulator framework to say whether these being not-found means power is not correctly supplied, or if Linux just isn't being properly informed of the power supply requirements for precise tracking/power-saving when the camera is off.&lt;br /&gt;
&lt;br /&gt;
== Useful links == &lt;br /&gt;
&lt;br /&gt;
* [https://files.pine64.org/doc/PinePhonePro/PinephonePro-Schematic-V1.0-20211127.pdf Pinephone Pro Schematic]&lt;br /&gt;
* [https://blog.krybot.com/a?ID=01650-cea27a80-a1ab-4da1-9cb5-3945be91e3e1 Background on the GIC]&lt;br /&gt;
* [https://elinux.org/images/9/94/ISP-presentation.pdf Background on the rkisp1 ISP]&lt;/div&gt;</summary>
		<author><name>Memleek</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PinePhone_Pro_Software_State&amp;diff=13103</id>
		<title>PinePhone Pro Software State</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PinePhone_Pro_Software_State&amp;diff=13103"/>
		<updated>2022-05-19T15:26:22Z</updated>

		<summary type="html">&lt;p&gt;Memleek: Note that lis3mdl is not present on devices (thanks @dsimic on the pinephone matrix channel for info)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Presently the PinePhone Pro Explorer Edition is aimed at '''Linux developers with an extensive knowledge of embedded systems and/or experience with mobile Linux'''. It will take time for all the PinePhone Pro’s functionality to reach software parity with the original PinePhone and for mobile operating systems, in more general, to reach a higher degree of maturity.&lt;br /&gt;
&lt;br /&gt;
Bear in mind that the software for these smartphones is still in a very early stage, with most of the software being in alpha or beta state. That's especially also the case for scalability of applications, their availability and practicability, any hardware function implementations and the firmware. The software is provided as is. There is no warranty for the software, not even for merchantability or fitness for a particular purpose.&lt;br /&gt;
&lt;br /&gt;
The following table lists the feature functionality status of the unaltered pre-installed factory image of the current shipping batch and as comparison an up-to-date reference image (no responsibility is accepted for the accuracy of this information, the list is provided and updated by the community). If you have any questions regarding the current state of the software or of specific features working, please don't hesitate to ask in the [[Main Page#Community and Support|community chat]] '''before buying the device''':&lt;br /&gt;
&lt;br /&gt;
* Discord: ''#pinephone'' under https://discord.gg/pine64&lt;br /&gt;
* IRC: ''#pinephone'' on ''irc.pine64.org''. Note: please consider Matrix, Discord or Telegram due to the volatile nature of IRC&lt;br /&gt;
* Matrix: https://app.element.io/#/room/#pinephone:matrix.org&lt;br /&gt;
* Telegram: https://t.me/pinephone&lt;br /&gt;
&lt;br /&gt;
{{Hint|The software is '''written by the community''', any contributions towards the community projects are greatly appreciated! Please see &amp;quot;[[How to Contribute]]&amp;quot; to learn about how to contribute to the software projects and &amp;quot;[[Where to Report Bugs]]&amp;quot; to learn about where to report bugs.}}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable plainrowheaders&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Functionality&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; style=&amp;quot;min-width: 260px;&amp;quot;  | Component&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; style=&amp;quot;width: 120px;&amp;quot; | Status (factory)¹&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; style=&amp;quot;width: 120px;&amp;quot; | Status (updated)²&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Notes&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; rowspan=&amp;quot;3&amp;quot; | Bootloader&lt;br /&gt;
| &amp;lt;code&amp;gt;U-Boot&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | Critical bugs&lt;br /&gt;
| Some critical software bugs currently not fixed yet: A drained battery causes U-Boot to bootloop (cause is known and currently being worked on);&amp;lt;sup&amp;gt;[[PinePhone_Pro#The battery is fully drained|Workaround]]&amp;lt;/sup&amp;gt; Occasionally the eMMC fails to initialize&amp;lt;sup&amp;gt;[https://gitlab.com/postmarketOS/pmaports/-/issues/1424 Report]&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;SPI&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | Unfinished&lt;br /&gt;
| SPI memory is currently empty in the Explorer Edition batch, a corrupted installation on the eMMC has a higher boot priority than a fresh microSD card installation, leading to a involved recovery procedure&amp;lt;sup&amp;gt;[https://tow-boot.org/ Planned]&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Boot GUI&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | Not implemented&lt;br /&gt;
| Currently there is no graphical boot selection implemented&amp;lt;sup&amp;gt;[https://tow-boot.org/ Possibly planned]&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; rowspan=&amp;quot;3&amp;quot; | Operating System&lt;br /&gt;
| &amp;lt;code&amp;gt;Stability&amp;lt;/code&amp;gt;&lt;br /&gt;
| style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | Critical bugs&lt;br /&gt;
| style=&amp;quot;background:LightYellow; text-align:center;&amp;quot; | WIP&lt;br /&gt;
| The pre-flashed and outdated operating system on the eMMC often gets corrupted after updating&amp;lt;sup&amp;gt;[https://forum.pine64.org/showthread.php?tid=15950 Example]&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Suspend&amp;lt;/code&amp;gt;&lt;br /&gt;
| style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | Not working&lt;br /&gt;
| style=&amp;quot;background:LightYellow; text-align:center;&amp;quot; | Experimental&lt;br /&gt;
| '''Without suspend the phone will drain very fast!''' Suspend only available in specific more recent images&amp;lt;sup&amp;gt;[https://www.pine64.org/2022/03/15/march-update-introducing-the-quartzpro64/ News]&amp;lt;/sup&amp;gt; Audio is often higher pitched after waking up from suspend due to a bug&amp;lt;sup&amp;gt;[https://github.com/dreemurrs-embedded/Pine64-Arch/issues/381 Report]&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Updates&amp;lt;/code&amp;gt;&lt;br /&gt;
| style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | Critical bugs&lt;br /&gt;
| style=&amp;quot;background:LightYellow; text-align:center;&amp;quot; | WIP&lt;br /&gt;
| The pre-flashed and outdated operating system on the eMMC often gets corrupted after updating&amp;lt;sup&amp;gt;[https://forum.pine64.org/showthread.php?tid=15950 Example]&amp;lt;/sup&amp;gt;; Pacman database lock preventing updates&amp;lt;sup&amp;gt;[https://wiki.archlinux.org/title/pacman#%22Failed_to_init_transaction_(unable_to_lock_database)%22_error Solution]&amp;lt;/sup&amp;gt;; Keyring bug&amp;lt;sup&amp;gt;[Solution is to run &amp;quot;pinephonepro-post-install&amp;quot; script as root]&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; rowspan=&amp;quot;5&amp;quot; | Modem&lt;br /&gt;
| &amp;lt;code&amp;gt;General&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | Critical bugs&lt;br /&gt;
| The modem crashes frequently&amp;lt;sup&amp;gt;[https://gitlab.manjaro.org/manjaro-arm/issues/pinephone/phosh/-/issues/147 Report]&amp;lt;/sup&amp;gt;&amp;lt;sup&amp;gt;[https://gitlab.com/mobian1/devices/eg25-manager/-/issues/15 Report]&amp;lt;/sup&amp;gt;&amp;lt;sup&amp;gt;[https://github.com/Biktorgj/pinephone_modem_sdk Alternative firmware]&amp;lt;/sup&amp;gt;; Slow wakeup&amp;lt;sup&amp;gt;[https://gitlab.com/mobian1/devices/eg25-manager/-/issues/34 Report]&amp;lt;/sup&amp;gt;; Some carriers blocking specific TANs in their network&amp;lt;sup&amp;gt;[[PinePhone Carrier Support]]&amp;lt;/sup&amp;gt;; '''Note:''' Proprietary firmware&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Phone&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightYellow; text-align:center;&amp;quot; | WIP&lt;br /&gt;
| The modem crashes frequently, which can lead to missed calls&amp;lt;sup&amp;gt;[https://gitlab.manjaro.org/manjaro-arm/issues/pinephone/phosh/-/issues/147 Report]&amp;lt;/sup&amp;gt;&amp;lt;sup&amp;gt;[https://gitlab.com/mobian1/devices/eg25-manager/-/issues/15 Report]&amp;lt;/sup&amp;gt;&amp;lt;sup&amp;gt;[https://github.com/Biktorgj/pinephone_modem_sdk Alternative firmware]&amp;lt;/sup&amp;gt;; bad call audio quality&amp;lt;sup&amp;gt;[https://gitlab.manjaro.org/manjaro-arm/issues/pinephone/phosh/-/issues/249 Report]&amp;lt;/sup&amp;gt;;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;SMS&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightGreen; text-align:center;&amp;quot; | Working&lt;br /&gt;
| SMS functionality is expected to work. In certain cases the functionality might be blocked by a clogged modem&amp;lt;sup&amp;gt;[https://gitlab.manjaro.org/manjaro-arm/issues/pinephone/phosh/-/issues/203 Report]&amp;lt;/sup&amp;gt;; Some bugs&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;MMS&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightYellow; text-align:center;&amp;quot; | WIP&lt;br /&gt;
| MMS functionality is integrated into the application &amp;quot;Spacebar&amp;quot;, some bugs remaining and expected&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Push notifications&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | Not implemented&lt;br /&gt;
| Receiving push notifications while the phone is suspended is not implemented&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; rowspan=&amp;quot;12&amp;quot; | Components&lt;br /&gt;
| &amp;lt;code&amp;gt;LCD&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightGreen; text-align:center;&amp;quot; | Working&lt;br /&gt;
| Under certain circumstances it is difficult to wake up the screen&amp;lt;sup&amp;gt;[Citation]&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Touch&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightGreen; text-align:center;&amp;quot; | Working&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Rear camera&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | Not working&lt;br /&gt;
| Driver exists (drivers/media/i2c/imx258.c) but camera does not seem to capture frames&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Front camera&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | Not working&lt;br /&gt;
| Driver not implemented yet (a staging driver exists for this sensor using the Intel Atom ISP framework (drivers/staging/media/atomisp/i2c/ov8858.c), but it needs to be ported and cleaned up); camera not operational&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Camera flash&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightGreen; text-align:center;&amp;quot; | Working&lt;br /&gt;
| (tested on Manjaro; at &amp;lt;code&amp;gt;/sys/class/leds/white:flash&amp;lt;/code&amp;gt;)&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;WiFi&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightGreen; text-align:center;&amp;quot; | Working&lt;br /&gt;
| WiFi is expected to work. Some remaining tasks, such as &amp;quot;monitor mode&amp;quot;. '''Note:''' Proprietary firmware&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Bluetooth&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightYellow; text-align:center;&amp;quot; | WIP&lt;br /&gt;
| Bluetooth not necessarily working for calls yet due to missing audio routing&amp;lt;sup&amp;gt;[Citation]&amp;lt;/sup&amp;gt;; Bluetooth in general dodgy under Pulseaudio.&amp;lt;sup&amp;gt;[https://wiki.archlinux.org/title/bluetooth_headset#Headset_via_Pipewire Info]&amp;lt;/sup&amp;gt; '''Note:''' Proprietary firmware&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;GNSS/GPS&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightYellow; text-align:center;&amp;quot; | WIP&lt;br /&gt;
| aGPS to be implemented&amp;lt;sup&amp;gt;[Citation]&amp;lt;/sup&amp;gt;; long loading times to get a GPS fix&amp;lt;sup&amp;gt;[Citation]&amp;lt;/sup&amp;gt;; No preinstalled application&amp;lt;sup&amp;gt;[Citation]&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Sensors&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightYellow; text-align:center;&amp;quot; | WIP&lt;br /&gt;
| &amp;quot;3 Axis Magnetometer&amp;quot; (&amp;lt;code&amp;gt;lis3mdl&amp;lt;/code&amp;gt;): Not present in hardware (it's an alternative chip to &amp;lt;code&amp;gt;af8133j&amp;lt;/code&amp;gt; due to component shortages)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;quot;Geo Magnetic Sensor&amp;quot; (&amp;lt;code&amp;gt;af8133j&amp;lt;/code&amp;gt;): Working (tested on Manjaro, at &amp;lt;code&amp;gt;/sys/bus/i2c/devices/4-001c/iio:device1&amp;lt;/code&amp;gt;)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;quot;Accelerometer / Gyroscope&amp;quot; (&amp;lt;code&amp;gt;mpu6500&amp;lt;/code&amp;gt;): Working (tested on Manjaro, at &amp;lt;code&amp;gt;/sys/bus/i2c/devices/4-0068/iio:device2&amp;lt;/code&amp;gt;)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;quot;Ambient light / Proximity&amp;quot; (&amp;lt;code&amp;gt;stk3311&amp;lt;/code&amp;gt;): Not working (tested on Manjaro 5.17.6-2 kernel; IRQ issues)&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt;stk3311 dmesg excerpt&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
[    9.406478] genirq: Failed to request resources for stk3310_event (irq 99) on irqchip rockchip_gpio_irq&lt;br /&gt;
[    9.407380] stk3310 3-0048: request irq 99 failed&lt;br /&gt;
[    9.408360] stk3310: probe of 3-0048 failed with error -5&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Vibration motor&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightGreen; text-align:center;&amp;quot; | Working&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Notification LED&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightGreen; text-align:center;&amp;quot; | Working&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Buttons&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightGreen; text-align:center;&amp;quot; | Working&lt;br /&gt;
| Power buttons and volume buttons are working.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; rowspan=&amp;quot;5&amp;quot; | Accessory compatibility, spare parts&lt;br /&gt;
| &amp;lt;code&amp;gt;Keyboard Add-on&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | WIP and critical hardware issue&lt;br /&gt;
| The keyboard add-on compatibility is work-in-progress. '''Hardware issue: USB-C port of the phone must not be used while the current keyboard revision is connected'''&amp;lt;sup&amp;gt;[[PinePhone_(Pro)_Keyboard#Safety|Warning]]&amp;lt;/sup&amp;gt;; Top row symbols not implemented as designed&amp;lt;sup&amp;gt;[Citation]&amp;lt;/sup&amp;gt;; Keyboard hot-plugging not supported&amp;lt;sup&amp;gt;[Citation]&amp;lt;/sup&amp;gt;; Battery state not exposed in the pre-flashed operating system state&amp;lt;sup&amp;gt;[Citation]&amp;lt;/sup&amp;gt;; general driver bugs&amp;lt;sup&amp;gt;[Citation]&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;LoRa Add-on&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | Not implemented&lt;br /&gt;
| No software support implemented&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Qi Wireless Charging Add-on&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightYellow; text-align:center;&amp;quot; | WIP&lt;br /&gt;
| Wireless charging with the add-on case is expected to work to some degree. Certain software functionality and a driver is currently missing&amp;lt;sup&amp;gt;[Citation]&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Fingerprint Reader Add-on&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | Not implemented&lt;br /&gt;
| No software support implemented&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Spare parts&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | Not available yet&lt;br /&gt;
| Spare parts currently not available yet in the store.&amp;lt;sup&amp;gt;[https://pine64.com/product-category/smartphone-spare-parts/ Store]&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; rowspan=&amp;quot;1&amp;quot; | Software notes&lt;br /&gt;
| &amp;lt;code&amp;gt;Waydroid&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightYellow; text-align:center;&amp;quot; | Software rendering only&lt;br /&gt;
| Waydroid is an Android container used to run Android applications. Currently can only be started using software rendering due to a bug&amp;lt;sup&amp;gt;[https://github.com/waydroid/waydroid/issues/291 Report]&amp;lt;/sup&amp;gt;&amp;lt;sup&amp;gt;[https://gitlab.freedesktop.org/mesa/mesa/-/issues/5928 Report]&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
¹ Status of the features at the time of the last factory installation without updates&lt;br /&gt;
&lt;br /&gt;
² Status of the features with an up-to-date reference image&lt;/div&gt;</summary>
		<author><name>Memleek</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PinePhone_Pro&amp;diff=13102</id>
		<title>PinePhone Pro</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PinePhone_Pro&amp;diff=13102"/>
		<updated>2022-05-19T15:23:43Z</updated>

		<summary type="html">&lt;p&gt;Memleek: Add link to software state article&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:Pinephone_double.png|400px|thumb|right|Rendering of the PinePhone Pro]]&lt;br /&gt;
&lt;br /&gt;
The '''PinePhone Pro''' is PINE64's flagship smartphone announced on October 15, 2021. It features 4GB of RAM, an 128GB eMMC and is using an Rockchip RK3399S SoC, which is a specialized version of the RK3399 made specifically for the PinePhone Pro.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The PinePhone Pro is PINE64’s second smartphone and a successor to the original PinePhone. It does not, however, replace the original PinePhone. It should also not be considered a second generation PinePhone; it is a higher-end device, with much better specs, aimed at those who wish to daily-drive a open system stack. Achieving this goal will, however, take time as the software and overall smartphone software ecosystem needs to mature.&lt;br /&gt;
&lt;br /&gt;
More information about the PinePhone Pro can be found on the device [https://www.pine64.org/pinephonepro/ main page].&lt;br /&gt;
&lt;br /&gt;
=== State of the software ===&lt;br /&gt;
&amp;lt;sup&amp;gt;([[PinePhone Pro Software State|view separately]])&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{:PinePhone Pro Software State}}&lt;br /&gt;
&lt;br /&gt;
=== Editions and revisions ===&lt;br /&gt;
Similarly to the original PinePhone, various PinePhone Pro editions are planned, the first of which is the Developer Edition (aimed at developers, as the name entails) followed by the Explorer Edition, which is aimed at early adopters.&lt;br /&gt;
&lt;br /&gt;
* [[PinePhone Pro Developer Edition]]&lt;br /&gt;
* [[PinePhone Pro Explorer Edition]]&lt;br /&gt;
&lt;br /&gt;
=== Help and support ===&lt;br /&gt;
&lt;br /&gt;
Still have any questions regarding software, shipping, or ordering after reading this Wiki? Please don't hesitate to contact the community in the bridged community channels for detailed answers or simply to chat with friendly people in the community! See [[Main Page#Community and Support]].&lt;br /&gt;
&lt;br /&gt;
Please keep in mind that PINE64 is not like a regular company (see the [https://www.pine64.org/philosophy/ PINE64 philosophy]) and that support resources are limited - the best way to get support quickly is to ask in the community chat! Please only contact the PINE64 support directly if questions couldn't be solved via the community chat or this wiki.&lt;br /&gt;
&lt;br /&gt;
== First time setup ==&lt;br /&gt;
[[File:Pinephone_warning.png|320px|thumb|right|A protection foil isolates the battery for the shipping.]]&lt;br /&gt;
&lt;br /&gt;
When shipped the battery is isolated from the device using a protective plastic tab, which is required to be removed before using the phone. The battery '''will not''' charge or boot until it is removed and the battery is connected again. &lt;br /&gt;
&lt;br /&gt;
{{Info|To remove the sticker after unboxing the phone: Carefully remove the back panel using the notch in the corner of the back cover without overbending it. Then remove the battery. Peel off the clear plastic sticker below it, which isolates the charging contacts and reinsert the battery.}}&lt;br /&gt;
&lt;br /&gt;
The PinePhone's SIM slot only accepts a micro-SIM, please do not insert a nano-SIM without an adapter and make sure that the nano-SIM does not get released from its adapter. The SIM card has to be placed in the lower slot, while the microSD has to be placed in the upper slot.&lt;br /&gt;
&lt;br /&gt;
{{Info|Do not insert an empty micro-SIM adapter into the phone and do not release the nano-SIM inside the adapter, as it will get stuck on the contact pins. If the nano-SIM got released inside the adapter inside the phone, carefully reinsert the nano-SIM card without moving the adapter. In that case do not pull on the empty adapter as it will get stuck on the contact pins and damage them!}}&lt;br /&gt;
&lt;br /&gt;
[[File:Pinephone slots.png|600px|thumb|none|The microSD belongs in the upper slot, the micro-SIM in the lower slot.]]&lt;br /&gt;
&lt;br /&gt;
An adapter from a nano to a micro-SIM might be included under tape in the camera notch of the phone's packaging. Some nano-SIMs will not fit firmly into that adapter that comes with the PinePhone and if the included adapter is used without a well-fitting nano-SIM, the contact pins might get damaged. In that case it is highly recommended to acquire a better fitting adapter.&lt;br /&gt;
&lt;br /&gt;
== Software ==&lt;br /&gt;
&lt;br /&gt;
The software section explains how to install the available software releases for the PinePhone Pro to the internal eMMC or a microSD card, how to boot them and how to solve common booting issues.&lt;br /&gt;
&lt;br /&gt;
=== Software releases ===&lt;br /&gt;
&lt;br /&gt;
The [[PinePhone Pro Software Releases]] page has a complete list of currently supported phone-optimized operating system images that work with the PinePhone Pro.&lt;br /&gt;
&lt;br /&gt;
{{Info|Images of the regular PinePhone are not compatible with the PinePhone Pro.}}&lt;br /&gt;
&lt;br /&gt;
=== Boot order ===&lt;br /&gt;
&lt;br /&gt;
The RK3399S processor in the PinePhone Pro searches for the bootloader (such as ''U-Boot'') in the following order:&lt;br /&gt;
&lt;br /&gt;
# SPI flash&lt;br /&gt;
# eMMC (the internal memory)&lt;br /&gt;
# MicroSD card&lt;br /&gt;
&lt;br /&gt;
The bootloader uses its own boot order for loading the kernel and other core operating system components at boot, which for example may result in the boot loader residing on the eMMC loading and booting the kernel from a microSD card.&lt;br /&gt;
&lt;br /&gt;
The SPI flash and the eMMC chip can be bypassed during boot by temporarily disabling them at the hardware level using the following method, which can be used in cases such as having corrupted installation on the SPI flash or the eMMC:&lt;br /&gt;
&lt;br /&gt;
* On the '''Explorer Edition''' hold the ''RE'' button underneath the cover for a few seconds, while powering on the device.&lt;br /&gt;
&lt;br /&gt;
* On the '''Developer Edition''', which was an earlier revision intended for developers only, the SPI and the eMMC can be bypassed by shorting the bypass test points while booting. The process is explained in the article [[PinePhone Pro Developer Edition#Nuking the factory AOSP installation|PinePhone Pro Developer Edition]]. Please join the community chat for any questions regarding the process.&lt;br /&gt;
&lt;br /&gt;
The bypass disables the SPI and the eMMC while being applied and the PinePhone Pro will try to boot from the next available boot medium, which is the microSD card. Note: When holding the ''RE'' button (or when shorting the contact points in case of the ''Developer Edition'') for a longer time at boot the operating system will not initialize the SPI and eMMC and it will not be possible to write to these storage mediums until the next reboot.&lt;br /&gt;
&lt;br /&gt;
{{Info|The bootloader (such as ''U-Boot'') resides in the free space in front of the first partition. Wiping the bootloader from the eMMC to make the PinePhone Pro boot from microSD card can be done using &amp;lt;code&amp;gt;sudo dd if&amp;amp;#61;/dev/zero of&amp;amp;#61;/dev/mmcblk2 seek&amp;amp;#61;64 count&amp;amp;#61;400 conv&amp;amp;#61;fsync&amp;lt;/code&amp;gt;. Formatting the drive or deleting the partition table is not sufficient to wipe the bootloader.}}&lt;br /&gt;
&lt;br /&gt;
See [[RK3399 boot sequence]] for details regarding the boot sequence.&lt;br /&gt;
&lt;br /&gt;
=== Installation instructions ===&lt;br /&gt;
&lt;br /&gt;
The software releases can be installed (the process is being referred to as ''flashing'') to the eMMC or to an microSD card.&lt;br /&gt;
&lt;br /&gt;
==== Flashing to microSD card ====&lt;br /&gt;
To install an image to the microSD card:&lt;br /&gt;
&lt;br /&gt;
# Download a compatible image from [[PinePhone Pro Software Releases]]&lt;br /&gt;
# Extract the compressed image&lt;br /&gt;
# Write the image to your microSD card using your favorite method, examples:&lt;br /&gt;
#* Using ''dd'': On the device you're flashing the microSD card from, find the correct device under &amp;lt;code&amp;gt;lsblk&amp;lt;/code&amp;gt; and then flash the image to the microSD card using &amp;lt;code&amp;gt;sudo dd if='''IMAGE.img''' of=/dev/'''[DEVICE]''' bs=1M status=progress conv=fsync&amp;lt;/code&amp;gt;. Make sure the target is the whole microSD card and not its first partition (''sdc1'' or ''mmcblk0p1'' are wrong!).&lt;br /&gt;
#* Using ''bmaptool'': Make sure to select the correct device using &amp;lt;code&amp;gt;lsblk&amp;lt;/code&amp;gt;. Then run bmaptool with the correct device: Download the ''IMAGE.xz'' and the ''IMAGE.bmap'' files, then run &amp;lt;code&amp;gt;bmaptool copy --bmap '''IMAGE.bmap''' '''IMAGE.xz''' /dev/'''[DEVICE]'''&amp;lt;/code&amp;gt;. This takes around 2.5 minutes to flash a 4 GB file.&lt;br /&gt;
#* Using ''a graphical tool'': A graphical tool such as Gnome Disks under Linux or Etcher under Windows may also be used.&lt;br /&gt;
# Insert the microSD card into the top slot of the PinePhone Pro. Make sure the microSD card is inserted all the way and that the notch of the right side of the microSD card is not visible anymore, see [[:File:Pinephone_slots.png|here]].&lt;br /&gt;
# Power on the PinePhone Pro. If there is an '''existing bootloader on the eMMC''' already you need to bypass or wipe the bootloader on the eMMC as explained in the section [[PinePhone Pro#Boot order|Boot order]].&lt;br /&gt;
&lt;br /&gt;
==== Flashing to the eMMC ====&lt;br /&gt;
Flashing to the eMMC can be done by booting an operating system from the microSD (see the section [[PinePhone Pro#Flashing to microSD card|Flashing to microSD card]]) and by writing to the eMMC directly from there:&lt;br /&gt;
&lt;br /&gt;
# Boot an operating system [[PinePhone Pro#Flashing to microSD card|from the microSD card]]. If there is already a bootloader on the eMMC installed see the section [[PinePhone Pro#Boot order|Boot order]] to bypass it&lt;br /&gt;
# Download or copy the desired image to the microSD card as file&lt;br /&gt;
# Check if the eMMC appears under &amp;lt;code&amp;gt;lsblk&amp;lt;/code&amp;gt;. If it doesn't appear in the output of the command, the eMMC wasn't initialized due to applying the above explained bypass method for a too long time during the boot&lt;br /&gt;
# Extract the image&lt;br /&gt;
# Flash the extracted image using &amp;lt;code&amp;gt;sudo dd if='''IMAGE.img''' of=/dev/mmcblk2 bs=1M status=progress conv=fsync&amp;lt;/code&amp;gt;&lt;br /&gt;
# Reboot the PinePhone Pro&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting ===&lt;br /&gt;
&lt;br /&gt;
If the PinePhone Pro is not booting (either booting incompletely into a boot splash or tty or if the PinePhone Pro is showing no signs of life) this will typically have the following two reasons:&lt;br /&gt;
&lt;br /&gt;
==== The battery is fully drained ====&lt;br /&gt;
The bootloader ''U-Boot'' is currently booting into a boot loop if the battery is fully drained. In that case it is not possible to charge the phone. The battery can be charged by interrupting the boot loop by booting the PinePhone Pro into ''Maskrom mode'' or by charging the battery externally. To boot the PinePhone Pro into ''Maskrom mode'':&lt;br /&gt;
&lt;br /&gt;
* Remove any microSD card from the phone and keep it removed for the below procedure&lt;br /&gt;
* Remove the battery, any USB cable and any serial cable&lt;br /&gt;
* Reinsert the battery&lt;br /&gt;
* Hold the ''RE'' button underneath the back cover of your ''Explorer Edition'' (or short the bypass contact points on the ''Developer Edition'') &lt;br /&gt;
* Connect the phone to an USB port of a computer, while still holding the button for some time&lt;br /&gt;
* Check if the phone in Maskrom mode appears in the output of the terminal command &amp;lt;code&amp;gt;lsusb&amp;lt;/code&amp;gt; on the computer, the expected ''VID:PID'' of the device is ''2207:330c'' (under ''Windows'' this can be checked using the ''Device Manager'' and checking the VID and PID of an appearing ''Unknown device'')&lt;br /&gt;
* Let the phone charge for at least two hours&lt;br /&gt;
&lt;br /&gt;
{{Info|If the device doesn't appear under ''lsusb'' please try again with a different known good USB-C cable and make sure that there is no microSD card in the phone inserted.}}&lt;br /&gt;
&lt;br /&gt;
The device should now be able to boot from the boot medium again. If that is not the case the installation got corrupted, as explained below.&lt;br /&gt;
&lt;br /&gt;
==== The installation is corrupted ====&lt;br /&gt;
The PinePhone Pro won't be able to boot if the installation on the SPI flash, the eMMC or the microSD card got corrupted. To boot a working operating system:&lt;br /&gt;
&lt;br /&gt;
* Prepare a microSD card as explained in the section [[PinePhone Pro#Flashing to microSD card|Flashing to microSD card]]&lt;br /&gt;
* Remove any USB-C cable or device or add-on case from the PinePhone Pro&lt;br /&gt;
* Make sure the device is powered off by shortly removing the battery for a second&lt;br /&gt;
* Insert the microSD card into the top slot of the PinePhone Pro. Make sure the microSD card is inserted all the way and that the notch of the right side of the microSD card is not visible anymore.&lt;br /&gt;
* Power on the device while bypassing the SPI and eMMC as explained under [[PinePhone Pro#Boot order|Boot order]]&lt;br /&gt;
&lt;br /&gt;
The device should now boot from the microSD card. If the phone does not boot from the microSD card the microSD card was flashed with an incompatible image or the battery got drained as explained above.&lt;br /&gt;
&lt;br /&gt;
=== Bootloaders ===&lt;br /&gt;
The following section contains notes regarding compatible bootloaders with the PinePhone Pro.&lt;br /&gt;
&lt;br /&gt;
==== U-Boot ====&lt;br /&gt;
The pre-installed operating system on the PinePhone Pro Explorer Edition is using ''U-Boot'' as default bootloader.&lt;br /&gt;
&lt;br /&gt;
==== Tow-Boot ====&lt;br /&gt;
There are plans to possibly ship the PinePhone Pro with ''Tow-Boot'' pre-installed to the SPI flash in a future batch, which is an opinionated distribution of ''U-Boot'' and brings numerous advantages over stock ''U-Boot'', such as the possibility to choose from booting the eMMC or microSD card using the volume buttons during boot, as well as a ''USB Mass Storage mode'', where the device can be written to by connecting the device to a computer via USB.&lt;br /&gt;
&lt;br /&gt;
The user can flash Tow-Boot to the PinePhone Pro using the [https://tow-boot.org/devices/pine64-pinephonePro.html instructions on the Tow-Boot website].&lt;br /&gt;
&lt;br /&gt;
==== levinboot ====&lt;br /&gt;
The levinboot bootloader is another upcoming option for the PinePhone Pro. The project repository can be found [https://gitlab.com/DeltaGem/levinboot/-/tree/master/ here].&lt;br /&gt;
&lt;br /&gt;
== Privacy switch configuration ==&lt;br /&gt;
&lt;br /&gt;
[[File:PinePhone Kill Interruptors de Maquinari del PinePhone 4529.jpg|320px|thumb|right|Picture of the privacy switches]]&lt;br /&gt;
&lt;br /&gt;
The PinePhone features six switches that can be used to configure its hardware. They are numbered 1-6, with switch 1 located nearest to the modem. Their &amp;quot;on&amp;quot; position is toward the top of the phone.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Number&lt;br /&gt;
! Name&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Modem&lt;br /&gt;
| &amp;quot;On&amp;quot; enables 2G/3G/4G communication and GNSS hardware, &amp;quot;off&amp;quot; disables it.&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| WiFi / Bluetooth&lt;br /&gt;
| &amp;quot;On&amp;quot; enables WiFi and Bluetooth communication hardware, &amp;quot;off&amp;quot; disables it.&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| Microphone&lt;br /&gt;
| &amp;quot;On&amp;quot; enables audio input from on-board microphones (not 3.5 mm jack), &amp;quot;off&amp;quot; disables it.&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| Rear camera&lt;br /&gt;
| &amp;quot;On&amp;quot; enables the rear camera, &amp;quot;off&amp;quot; disables it.&lt;br /&gt;
|-&lt;br /&gt;
| 5&lt;br /&gt;
| Front camera&lt;br /&gt;
| &amp;quot;On&amp;quot; enables the front camera, &amp;quot;off&amp;quot; disables it.&lt;br /&gt;
|-&lt;br /&gt;
| 6&lt;br /&gt;
| Headphone&lt;br /&gt;
| &amp;quot;On&amp;quot; enables audio input and output via the 3.5 mm audio jack, &amp;quot;off&amp;quot; switches the jack to hardware UART¹ mode.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
¹ Note: The baud rate may be 1500000 instead of 115200.&lt;br /&gt;
&lt;br /&gt;
== Specifications ==&lt;br /&gt;
&lt;br /&gt;
* '''Dimensions:''' 160.8 x 76.6 x 11.1mm&lt;br /&gt;
* '''Weight:''' Approx. 220g&lt;br /&gt;
* '''SIM Card:''' Micro-SIM&lt;br /&gt;
* '''Display:'''&lt;br /&gt;
** '''Size:''' 6 inches (151mm) diagonal&lt;br /&gt;
** '''Type:''' 1440 x 720 in-cell IPS with Gorilla Glass 4™&lt;br /&gt;
** '''Resolution:''' 1440x720, 18:9 ratio&lt;br /&gt;
* '''System on Chip:''' Rockchip RK3399S 64bit SoC – 2x A72 and 4x A53 CPU cores @ 1.5GHz&lt;br /&gt;
* '''RAM:''' 4GB LPDDR4 @ 800MHz&lt;br /&gt;
* '''Internal Storage:''' 128GB eMMC, extendable up to 2TB via microSD, supports SDHC and SDXC&lt;br /&gt;
* '''Back [[#Camera|Camera]]:''' 13MP Sony IMX258 with Gorilla Glass 4™ protective layer, LED Flash&lt;br /&gt;
* '''Front Camera:''' 8MP, OmniVision OV8858 front-facing camera&lt;br /&gt;
* '''Sound:''' Loudspeaker, 3.5mm jack &amp;amp; mic (jack doubles as hardware UART if hardware switch 6 is deactivated)&lt;br /&gt;
* '''Communication:'''&lt;br /&gt;
** '''[[#Modem|Modem]]:''' [https://www.quectel.com/product/lte-eg25-g/ Quectel EG25-G]&lt;br /&gt;
** '''LTE-FDD''': B1, B2, B3, B4, B5, B7, B8, B12, B13, B18, B19, B20, B25, B26, B28&lt;br /&gt;
** '''LTE-TDD''': B38, B39, B40, B41&lt;br /&gt;
** '''WCDMA''': B1, B2, B4, B5, B6, B8, B19&lt;br /&gt;
** '''GSM''': B2, B3, B5, B8 (850, 900, 1800, 1900 MHz)&lt;br /&gt;
** '''WLAN &amp;amp; Bluetooth:''' Wi-Fi 802.11AC, hotspot capable + Bluetooth V5.0&lt;br /&gt;
** '''GNSS:''' GPS/GLONASS/BeiDou/Galileo/QZSS, with A-GPS&lt;br /&gt;
* '''Sensors:''' Accelerometer, gyroscope, proximity, ambient light, compass&lt;br /&gt;
* '''Privacy switches:''' Modem, WiFi &amp;amp; Bluetooth, Microphone, Cameras&lt;br /&gt;
* '''[[#Battery|Battery]]:''' Lithium-ion, rated capacity 2800mAh (10.64Wh), typical capacity 3000mAh (11.40Wh) (nominally replaceable with any Samsung J7 form-factor battery)&lt;br /&gt;
* '''I/O:''' USB Type-C, USB Host, DisplayPort Alternate Mode output, 15W 5V 3A Quick Charge, follows USB PD specification&lt;br /&gt;
&lt;br /&gt;
== Components ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Component&lt;br /&gt;
! Model&lt;br /&gt;
|-&lt;br /&gt;
| Touchscreen&lt;br /&gt;
| Goodix GT917S&lt;br /&gt;
|-&lt;br /&gt;
| LCD&lt;br /&gt;
| Himax HX8394 compatible&lt;br /&gt;
|-&lt;br /&gt;
| Rear camera&lt;br /&gt;
| IMX258&lt;br /&gt;
|-&lt;br /&gt;
| Front camera&lt;br /&gt;
| OV8858&lt;br /&gt;
|-&lt;br /&gt;
| Camera flash&lt;br /&gt;
| AW3641EDNR&lt;br /&gt;
|-&lt;br /&gt;
| WiFi + Bluetooth&lt;br /&gt;
| [https://www.azurewave.com/img/wireless-modules/AW_CM256SM_DS_Rev15_CYW.pdf AzureWave AW-CM256SM]&lt;br /&gt;
|-&lt;br /&gt;
| Modem&lt;br /&gt;
| [http://static.abstore.pl/design/accounts/soyter/img/dokumentacje/quectel_eg25-g.pdf Quectel EG25-G]&lt;br /&gt;
|-&lt;br /&gt;
| GNSS/GPS&lt;br /&gt;
| [http://static.abstore.pl/design/accounts/soyter/img/dokumentacje/quectel_eg25-g.pdf Quectel EG25-G]&lt;br /&gt;
|-&lt;br /&gt;
| 3 Axis Magnetometer&lt;br /&gt;
| [https://www.st.com/en/mems-and-sensors/lis3mdl.html ST LIS3MDL]&lt;br /&gt;
|-&lt;br /&gt;
| Geo Magnetic Sensor&lt;br /&gt;
| [http://www.voltafield.com/products01.html Voltafield AF8133J]&lt;br /&gt;
|-&lt;br /&gt;
| Ambient light / Proximity&lt;br /&gt;
| STK3311-A&lt;br /&gt;
|-&lt;br /&gt;
| Accelerometer / Gyroscope&lt;br /&gt;
| [https://invensense.tdk.com/products/motion-tracking/6-axis/mpu-6500/ TDK MPU-6500]&lt;br /&gt;
|-&lt;br /&gt;
| Vibration motor&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Notification LED&lt;br /&gt;
| LED0603RGB&lt;br /&gt;
|-&lt;br /&gt;
| Audio Codec&lt;br /&gt;
| ALC5616 and ALC5640&lt;br /&gt;
|-&lt;br /&gt;
| Volume buttons&lt;br /&gt;
| Buttons connected to the KEYADC&lt;br /&gt;
|-&lt;br /&gt;
| Power button&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Battery fuel gauge&lt;br /&gt;
| [https://rockchip.fr/RK818%20datasheet%20V1.0.pdf RK818]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Datasheets, schematics and certifications ==&lt;br /&gt;
&lt;br /&gt;
* PinePhone Pro mainboard schematic:&lt;br /&gt;
** [https://files.pine64.org/doc/PinePhonePro/PinephonePro-Schematic-V1.0-20211127.pdf PinePhone Pro mainboard Explorer Edition Released Schematic ver 1.0 20211127]&lt;br /&gt;
** [https://files.pine64.org/doc/PinePhonePro/PinephonePro_PCB_Component_Placement-V02_20211127-top.pdf PinePhone Pro mainboard Explorer Edition component top placement ver 1.0 20211127]&lt;br /&gt;
** [https://files.pine64.org/doc/PinePhonePro/PinephonePro_PCB_Component_Placement-V02_20211127-bottom.pdf PinePhone Pro mainboard Explorer Edition component bottom placement ver 1.0 20211127]&lt;br /&gt;
&lt;br /&gt;
* PinePhone Pro USB-C small board schematic:&lt;br /&gt;
** TBD&lt;br /&gt;
&lt;br /&gt;
* Certifications:&lt;br /&gt;
** [https://files.pine64.org/doc/cert/PinePhone%20Pro%20FCC%20Certificate-S21101902805001.pdf PinePhone Pro FCC Certificate]&lt;br /&gt;
** [https://files.pine64.org/doc/cert/PinePhonePro%20SAR%20Evaluation%20Report-S21101902806001.pdf PinePhone Pro SAR Evaluation Report]&lt;br /&gt;
** [https://files.pine64.org/doc/cert/PinePhone%20Pro%20CE%20RED%20Certificate-S21101902802-R1.pdf PinePhone Pro CE RED Certificate]&lt;br /&gt;
** [https://files.pine64.org/doc/cert/PinePhonePro%20RoHS%20Test%20Report.pdf PinePhone Pro ROHS Test Report]&lt;br /&gt;
&lt;br /&gt;
== Factory Test Build for Hardware Checking ==&lt;br /&gt;
&lt;br /&gt;
* Please note that this Android build solely for PinePhone Pro hardware checking purpose and solely used by support team. This is NOT a general release build.&lt;br /&gt;
* DD image (for 8GB microSD Card or larger)&lt;br /&gt;
** [http://files.pine64.org/os/PinePhonePro/pinephone_pro_dd_android9_QC_Test_SDboot_20220215-8GB.img.gz Direct download from pine64.org]&lt;br /&gt;
*** MD5 (GZip file): 214e063c8205c1a98d44b2015a21bb5d&lt;br /&gt;
*** File Size: 722MB&lt;br /&gt;
&lt;br /&gt;
* Download the build, extract the image and dd it to a 8 GB or larger microSD card, takes out the PinePhone Pro Explorer Edition then insert it into microSD slot (upper slot).&lt;br /&gt;
* Insert battery, press RE button (bypass SPI and eMMC boot)  while plug in USB-C power. After 3 seconds release RE button. &lt;br /&gt;
* When power up, below battery icon screen show up and press power key for two second, the Rockchip logo screen shows up.&lt;br /&gt;
&lt;br /&gt;
[[File:PPP_Abdroid_Test_Utility-1.jpg|300px]][[File:PPP_Abdroid_Test_Utility-2.jpg|300px]]&lt;br /&gt;
&lt;br /&gt;
* Wait for home screen, double tap on the test app icon (mark red circuit) and this will bring up the factory test screen. Please note that SD test is disable due to this is a SD boot build.&lt;br /&gt;
* After running particular test function, please snapshot test result and pass back to support team&lt;br /&gt;
** Note: Please slot in functional Sim card when perform SIM test&lt;br /&gt;
** Note: When perform GPS test, the first result may fail and please ignore this false message.&lt;br /&gt;
** Note: For light sensing test, please have touch light shine to PinePhone Pro when perform test.&lt;br /&gt;
&lt;br /&gt;
[[File:PPP_Abdroid_Test_Utility-4.jpg|300px]][[File:PPP_Abdroid_Test_Utility-5.jpg|538px]]&lt;br /&gt;
&lt;br /&gt;
== Using Factory Test Build for Battery charging ==&lt;br /&gt;
&lt;br /&gt;
* Please note that this Android build solely for PinePhone Pro hardware checking purpose and solely used by support team. This is NOT a general release build.&lt;br /&gt;
* DD image (for 8GB microSD Card or larger)&lt;br /&gt;
** [http://files.pine64.org/os/PinePhonePro/pinephone_pro_dd_android9_QC_Test_SDboot_20220215-8GB.img.gz Direct download from pine64.org]&lt;br /&gt;
*** MD5 (GZip file): 214e063c8205c1a98d44b2015a21bb5d&lt;br /&gt;
*** File Size: 722MB&lt;br /&gt;
&lt;br /&gt;
* Download the build, extract the image and dd it to a 8 GB or larger microSD card, takes out the PinePhone Pro Explorer Edition then insert it into microSD slot (upper slot).&lt;br /&gt;
* Insert battery, press RE button (bypass SPI and eMMC boot)  while plug in USB-C power. After 3 seconds release RE button. &lt;br /&gt;
* When power up, below battery icon screen show up and battery will start charging. &lt;br /&gt;
* The battery icon display for few seconds and then LCD panel turn off while charging. To check charging status, just quick press power button (about 0.5 second) and battery icon will display progress.&lt;br /&gt;
&lt;br /&gt;
[[File:PPP_Abdroid_Test_Utility-1.jpg|300px]]&lt;br /&gt;
&lt;br /&gt;
== Press ==&lt;br /&gt;
&lt;br /&gt;
For an overview about media of the PinePhone Pro you can use for the news, blogs, or similar see [[PinePhone Press]].&lt;br /&gt;
&lt;br /&gt;
== External links ==&lt;br /&gt;
* [https://www.pine64.org/pinephonepro/ Product Page]&lt;br /&gt;
* [https://www.youtube.com/watch?v=wP2-6Z74W44 Announcement video]&lt;br /&gt;
* [https://www.pine64.org/2021/10/15/october-update-introducing-the-pinephone-pro/ Blog post] with the announcement&lt;br /&gt;
&lt;br /&gt;
[[Category:PinePhone Pro]][[Category:Rockchip RK3399]]&lt;/div&gt;</summary>
		<author><name>Memleek</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PinePhone_Pro/IMX258_Camera_Debugging&amp;diff=13101</id>
		<title>PinePhone Pro/IMX258 Camera Debugging</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PinePhone_Pro/IMX258_Camera_Debugging&amp;diff=13101"/>
		<updated>2022-05-19T04:00:48Z</updated>

		<summary type="html">&lt;p&gt;Memleek: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Background ==&lt;br /&gt;
&lt;br /&gt;
The Pinephone Pro's rear camera is a Sony IMX258. The camera driver is present upstream, and at least [https://gitlab.manjaro.org/manjaro-arm/packages/core/linux-pinephonepro Manjaro's kernel] (downstream of Megi's) enables the driver. The camera does not seem to work; this page catalogs work on figuring out why.&lt;br /&gt;
&lt;br /&gt;
== Initial status ==&lt;br /&gt;
&lt;br /&gt;
What do we see in dmesg?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
imx258 1-001a: supply vana not found, using dummy regulator&lt;br /&gt;
imx258 1-001a: supply vdig not found, using dummy regulator&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This tells us the kernel loads the driver, which is something.&lt;br /&gt;
&lt;br /&gt;
Are these errors bad/fatal? Inspecting the [https://github.com/megous/linux/blob/orange-pi-5.17/drivers/media/i2c/imx258.c source] shows us that these supplies are defined in the &amp;lt;code&amp;gt;imx258_supply_names&amp;lt;/code&amp;gt; array, and &amp;lt;code&amp;gt;imx258_probe&amp;lt;/code&amp;gt; calls &amp;lt;code&amp;gt;devm_regulator_bulk_get&amp;lt;/code&amp;gt; to set them up.&lt;br /&gt;
&amp;lt;code&amp;gt;imx258_probe&amp;lt;/code&amp;gt; checks the return code from &amp;lt;code&amp;gt;devm_regulator_bulk_get&amp;lt;/code&amp;gt;, emitting a fatal &amp;quot;Failed to get supplies&amp;quot; message if the return code is negative (indicating failure). Since we don't see this message (or any others from the driver), it looks like it loads successfully!&lt;br /&gt;
&lt;br /&gt;
=== How can we test the camera? ===&lt;br /&gt;
&lt;br /&gt;
==== Megapixels ====&lt;br /&gt;
&lt;br /&gt;
[https://gitlab.com/postmarketOS/megapixels Megapixels] requires a per-device file to configure cameras. This one isn't complete (most of its numbers are complete nonsense), but it should let us see what happens when Megapixels tries to access the camera:&lt;br /&gt;
&amp;lt;code&amp;gt;pine64,pinephone-pro.ini&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[device]&lt;br /&gt;
make=PINE64&lt;br /&gt;
model=PinePhone Pro&lt;br /&gt;
&lt;br /&gt;
[rear]&lt;br /&gt;
driver=imx258&lt;br /&gt;
media-driver=rkisp1&lt;br /&gt;
capture-width=4208&lt;br /&gt;
capture-height=3118&lt;br /&gt;
capture-rate=60&lt;br /&gt;
capture-fmt=GRBG10P&lt;br /&gt;
preview-width=1280&lt;br /&gt;
preview-height=960&lt;br /&gt;
preview-rate=60&lt;br /&gt;
#preview-fmt=BGGR8&lt;br /&gt;
capture-fmt=GRBG10P&lt;br /&gt;
rotate=90&lt;br /&gt;
mirrored=true&lt;br /&gt;
focallength=2.6&lt;br /&gt;
cropfactor=12.7&lt;br /&gt;
fnumber=2.8&lt;br /&gt;
flash-display=true&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This segfaulted Megapixels for me. After patching some trivial segfaults, I get fatal GTK4 issues and other tangential problems. Let's try something else.&lt;br /&gt;
&lt;br /&gt;
==== Manually setting up a camera pipeline ====&lt;br /&gt;
&lt;br /&gt;
We can roughly follow [https://www.kernel.org/doc/html/latest/admin-guide/media/rkisp1.html this guide]. Doing so gives us the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;quot;media-ctl&amp;quot; &amp;quot;-d&amp;quot; &amp;quot;platform:rkisp1&amp;quot; &amp;quot;-r&amp;quot;&lt;br /&gt;
&amp;quot;media-ctl&amp;quot; &amp;quot;-d&amp;quot; &amp;quot;platform:rkisp1&amp;quot; &amp;quot;-l&amp;quot; &amp;quot;'imx258 1-001a':0 -&amp;gt; 'rkisp1_isp':0 [1]&amp;quot;&lt;br /&gt;
&amp;quot;media-ctl&amp;quot; &amp;quot;-d&amp;quot; &amp;quot;platform:rkisp1&amp;quot; &amp;quot;-l&amp;quot; &amp;quot;'rkisp1_isp':2 -&amp;gt; 'rkisp1_resizer_selfpath':0 [1]&amp;quot;&lt;br /&gt;
&amp;quot;media-ctl&amp;quot; &amp;quot;-d&amp;quot; &amp;quot;platform:rkisp1&amp;quot; &amp;quot;--set-v4l2&amp;quot; '&amp;quot;rkisp1_isp&amp;quot;:0 [fmt:SGRBG10_1X10/1048x780]'&lt;br /&gt;
&amp;quot;v4l2-ctl&amp;quot; &amp;quot;-z&amp;quot; &amp;quot;platform:rkisp1&amp;quot; &amp;quot;-d&amp;quot; &amp;quot;rkisp1_selfpath&amp;quot; &amp;quot;-v&amp;quot; &amp;quot;width=1048,height=780,&amp;quot;&lt;br /&gt;
&amp;quot;media-ctl&amp;quot; &amp;quot;-d&amp;quot; &amp;quot;platform:rkisp1&amp;quot; &amp;quot;--set-v4l2&amp;quot; '&amp;quot;rkisp1_resizer_selfpath&amp;quot;:0 [fmt:SGRBG10_1X10/1048x780 crop:(0,0)/1048x780]'&lt;br /&gt;
&lt;br /&gt;
&amp;quot;v4l2-ctl&amp;quot; &amp;quot;-z&amp;quot; &amp;quot;platform:rkisp1&amp;quot; &amp;quot;-d&amp;quot; &amp;quot;rkisp1_selfpath&amp;quot; &amp;quot;-v&amp;quot; &amp;quot;width=800,height=600,pixelformat=422P&amp;quot;&lt;br /&gt;
&amp;quot;v4l2-ctl&amp;quot; &amp;quot;-z&amp;quot; &amp;quot;platform:rkisp1&amp;quot; &amp;quot;-d&amp;quot; &amp;quot;rkisp1_selfpath&amp;quot; &amp;quot;--stream-mmap&amp;quot; &amp;quot;--stream-count&amp;quot; &amp;quot;1&amp;quot; &amp;quot;--verbose&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Careful readers will note that this is setting the camera up with a low resolution compared to what the sensor can do. For some reason I can't get the rkisp1 node to configure its sink pad with the maximum resolution of the sensor (4208x3118). Instead, it sets itself to 4032x3024. This mismatch is forbidden and causes v4l2 to give us EPIPE when we try to enable the stream. Using the lower resolution gets us further--the last command (which attempts to save a single frame of video) gives output like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
VIDIOC_QUERYCAP: ok&lt;br /&gt;
		VIDIOC_REQBUFS returned 0 (Success)&lt;br /&gt;
		VIDIOC_QUERYBUF returned 0 (Success)&lt;br /&gt;
		VIDIOC_QUERYBUF returned 0 (Success)&lt;br /&gt;
		VIDIOC_QUERYBUF returned 0 (Success)&lt;br /&gt;
		VIDIOC_QUERYBUF returned 0 (Success)&lt;br /&gt;
		VIDIOC_QBUF returned 0 (Success)&lt;br /&gt;
		VIDIOC_QBUF returned 0 (Success)&lt;br /&gt;
		VIDIOC_QBUF returned 0 (Success)&lt;br /&gt;
		VIDIOC_QBUF returned 0 (Success)&lt;br /&gt;
		VIDIOC_STREAMON returned 0 (Success)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
But then it just hangs there indefinitely.&lt;br /&gt;
&lt;br /&gt;
Running under strace, we see the program stuck in an ioctl:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ioctl(3, VIDIOC_DQBUF, {type=V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[https://www.kernel.org/doc/html/v4.13/media/uapi/v4l/vidioc-qbuf.html VIDIOC_DQBUF] corresponds to dequeuing a buffer once it has been filled with an image by the v4l2 device. Apparently, the device never gives us back a captured frame.&lt;br /&gt;
&lt;br /&gt;
=== Now what? ===&lt;br /&gt;
&lt;br /&gt;
==== Does i2c work at all? ====&lt;br /&gt;
&lt;br /&gt;
The camera driver uses i2c; we can see the camera [https://github.com/megous/linux/blob/c5af9f4f874a66b65c73c450b79f6a86b1b46332/arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts#L890-L914 in the .dts] to determine that it's on i2c bus 1, address 0x1a.&lt;br /&gt;
&lt;br /&gt;
The imx258 is controlled over i2c, and sends image data over MIPI. The first step is to see if the i2c control is working.&lt;br /&gt;
&lt;br /&gt;
Looking back at the driver, it seems we should see errors in dmesg if i2c communication fails. The driver checks the chip id in its probe function, which uses i2c, so we can conclude that i2c gets set up properly initially. Does it keep working?&lt;br /&gt;
&lt;br /&gt;
==== Does i2c keep working? (FTrace) ====&lt;br /&gt;
&lt;br /&gt;
We can see if other functions that use i2c produce errors--for example, when we run our &amp;lt;code&amp;gt;&amp;quot;v4l2-ctl&amp;quot; ... &amp;quot;--stream-mmap&amp;quot;&amp;lt;/code&amp;gt; command, we expect that &amp;lt;code&amp;gt;imx258_start_streaming&amp;lt;/code&amp;gt; will get called, and this function also writes a load of registers over i2c.&lt;br /&gt;
&lt;br /&gt;
Build and install a kernel with CONFIG_FTRACE (not hard, but outside the scope of this write-up) and enable function graph tracing:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo su&lt;br /&gt;
# cd /sys/kernel/debug/tracing&lt;br /&gt;
# echo function_graph &amp;gt; current_tracer&lt;br /&gt;
# cat available_filter_functions | grep -E 'rkisp|imx258|v4l2' | awk '{print $1}' &amp;gt; set_graph_function&lt;br /&gt;
# echo 'vm_map_pages,__iommu_map,iommu_map_sg_atomic,rk_iommu_map,__alloc_pages,dma_alloc_attrs,dma_mmap_attrs,__vm_map_pages,vb2_mmap,clk_e,able,schedule_timeout,clk_disable,regmap_write,schedule,__i2c_tra,sfer,i2c_tra,sfer_buffer_flags,dma_free_attrs' | tr , '\n' &amp;gt; set_graph_notrace&lt;br /&gt;
# tee trace_pipe &amp;gt; ~/function-trace.log&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, in another terminal session, run the &amp;lt;code&amp;gt;&amp;quot;v4l2-ctl&amp;quot; ... &amp;quot;--stream-mmap&amp;quot;&amp;lt;/code&amp;gt; command again. We end up with a bunch (but hopefully not *too* much) of output in our first terminal and the &amp;lt;code&amp;gt;~/function-trace.log&amp;lt;/code&amp;gt; file.&lt;br /&gt;
&lt;br /&gt;
A quick grep shows that &amp;lt;code&amp;gt;imx258_start_streaming&amp;lt;/code&amp;gt; is indeed called, so '''i2c is working properly'''.&lt;br /&gt;
&lt;br /&gt;
=== If i2c works, what doesn't? ===&lt;br /&gt;
&lt;br /&gt;
Our program that asks for a video frame is still hung! We ask the camera to start streaming frames, it presumably does, but the v4l2 stack never tells us a frame has finished. Doing some digging in the v4l2 stack (and the rkisp1 driver), we find out that rkisp1 is notified about frame status via interrupts.&lt;br /&gt;
&lt;br /&gt;
Perhaps the hardware is never actually emitting the interrupt that signals a frame being finished. Indeed, grepping our FTrace log shows that &amp;lt;code&amp;gt;rkisp1_isr&amp;lt;/code&amp;gt; is never called. A quick look at &amp;lt;code&amp;gt;/proc/interrupts&amp;lt;/code&amp;gt; shows that '''the only interrupt associated with the isp has never triggered''' (0 count on every CPU):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# head -n1 /proc/interrupts; grep isp /proc/interrupts&lt;br /&gt;
           CPU0       CPU1       CPU2       CPU3       CPU4       CPU5       &lt;br /&gt;
 57:          0          0          0          0          0          0     GICv3  75 Level     ff914000.iommu, rkisp1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Next steps ==&lt;br /&gt;
&lt;br /&gt;
Where do we go from here? I don't know--something may be wrong with the way the .dts specifies interrupts, some kind of firmware/GIC (the rk3399's interrupt controller) configuration issue, or something else. It would be good to try to determine:&lt;br /&gt;
&lt;br /&gt;
* Whether the MIPI lines actually show traffic, if someone has a logic analyzer and a dissected PPP.&lt;br /&gt;
* Whether the DMA of frames to memory actually happens, regardless of (lack of) emission of the interrupt that tells us when said DMA finishes a frame.&lt;br /&gt;
* Whether the regulator messages we see during boot are actually significant. I don't know enough about the Linux regulator framework to say whether these being not-found means power is not correctly supplied, or if Linux just isn't being properly informed of the power supply requirements for precise tracking/power-saving when the camera is off.&lt;/div&gt;</summary>
		<author><name>Memleek</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PinePhone_Pro/IMX258_Camera_Debugging&amp;diff=13100</id>
		<title>PinePhone Pro/IMX258 Camera Debugging</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PinePhone_Pro/IMX258_Camera_Debugging&amp;diff=13100"/>
		<updated>2022-05-19T03:47:54Z</updated>

		<summary type="html">&lt;p&gt;Memleek: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Background ==&lt;br /&gt;
&lt;br /&gt;
The Pinephone Pro's rear camera is a Sony IMX258. The camera driver is present upstream, and at least [https://gitlab.manjaro.org/manjaro-arm/packages/core/linux-pinephonepro Manjaro's kernel] (downstream of Megi's) enables the driver. The camera does not seem to work; this page catalogs work on figuring out why.&lt;br /&gt;
&lt;br /&gt;
== Initial status ==&lt;br /&gt;
&lt;br /&gt;
What do we see in dmesg?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
imx258 1-001a: supply vana not found, using dummy regulator&lt;br /&gt;
imx258 1-001a: supply vdig not found, using dummy regulator&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This tells us the kernel loads the driver, which is something.&lt;br /&gt;
&lt;br /&gt;
Are these errors bad/fatal? Inspecting the [https://github.com/megous/linux/blob/orange-pi-5.17/drivers/media/i2c/imx258.c source] shows us that these supplies are defined in the &amp;lt;code&amp;gt;imx258_supply_names&amp;lt;/code&amp;gt; array, and &amp;lt;code&amp;gt;imx258_probe&amp;lt;/code&amp;gt; calls &amp;lt;code&amp;gt;devm_regulator_bulk_get&amp;lt;/code&amp;gt; to set up these supplies.&lt;br /&gt;
&amp;lt;code&amp;gt;imx258_probe&amp;lt;/code&amp;gt; checks the return code from &amp;lt;code&amp;gt;devm_regulator_bulk_get&amp;lt;/code&amp;gt;, and produces a fatal &amp;quot;Failed to get supplies&amp;quot; message if the return code is negative (indicating failure). Since we don't see this message (or any others from the driver), it looks like it loads successfully!&lt;br /&gt;
&lt;br /&gt;
=== How can we test the camera? ===&lt;br /&gt;
&lt;br /&gt;
==== Megapixels ====&lt;br /&gt;
&lt;br /&gt;
[https://gitlab.com/postmarketOS/megapixels Megapixels] requires a per-device file to configure cameras. This one isn't complete (most of its numbers are complete nonsense), but it should let us see what happens when Megapixels tries to access the camera:&lt;br /&gt;
&amp;lt;code&amp;gt;pine64,pinephone-pro.ini&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[device]&lt;br /&gt;
make=PINE64&lt;br /&gt;
model=PinePhone Pro&lt;br /&gt;
&lt;br /&gt;
[rear]&lt;br /&gt;
driver=imx258&lt;br /&gt;
media-driver=rkisp1&lt;br /&gt;
capture-width=4208&lt;br /&gt;
capture-height=3118&lt;br /&gt;
capture-rate=60&lt;br /&gt;
capture-fmt=GRBG10P&lt;br /&gt;
preview-width=1280&lt;br /&gt;
preview-height=960&lt;br /&gt;
preview-rate=60&lt;br /&gt;
#preview-fmt=BGGR8&lt;br /&gt;
capture-fmt=GRBG10P&lt;br /&gt;
rotate=90&lt;br /&gt;
mirrored=true&lt;br /&gt;
focallength=2.6&lt;br /&gt;
cropfactor=12.7&lt;br /&gt;
fnumber=2.8&lt;br /&gt;
flash-display=true&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This segfaulted Megapixels for me. After patching some trivial segfaults, I get fatal GTK4 issues and other tangential problems. Let's try something else.&lt;br /&gt;
&lt;br /&gt;
==== Manually setting up a camera pipeline ====&lt;br /&gt;
&lt;br /&gt;
We can roughly follow [https://www.kernel.org/doc/html/latest/admin-guide/media/rkisp1.html this guide]. Doing so gives us the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;quot;media-ctl&amp;quot; &amp;quot;-d&amp;quot; &amp;quot;platform:rkisp1&amp;quot; &amp;quot;-r&amp;quot;&lt;br /&gt;
&amp;quot;media-ctl&amp;quot; &amp;quot;-d&amp;quot; &amp;quot;platform:rkisp1&amp;quot; &amp;quot;-l&amp;quot; &amp;quot;'imx258 1-001a':0 -&amp;gt; 'rkisp1_isp':0 [1]&amp;quot;&lt;br /&gt;
&amp;quot;media-ctl&amp;quot; &amp;quot;-d&amp;quot; &amp;quot;platform:rkisp1&amp;quot; &amp;quot;-l&amp;quot; &amp;quot;'rkisp1_isp':2 -&amp;gt; 'rkisp1_resizer_selfpath':0 [1]&amp;quot;&lt;br /&gt;
&amp;quot;media-ctl&amp;quot; &amp;quot;-d&amp;quot; &amp;quot;platform:rkisp1&amp;quot; &amp;quot;--set-v4l2&amp;quot; '&amp;quot;rkisp1_isp&amp;quot;:0 [fmt:SGRBG10_1X10/1048x780]'&lt;br /&gt;
&amp;quot;v4l2-ctl&amp;quot; &amp;quot;-z&amp;quot; &amp;quot;platform:rkisp1&amp;quot; &amp;quot;-d&amp;quot; &amp;quot;rkisp1_selfpath&amp;quot; &amp;quot;-v&amp;quot; &amp;quot;width=1048,height=780,&amp;quot;&lt;br /&gt;
&amp;quot;media-ctl&amp;quot; &amp;quot;-d&amp;quot; &amp;quot;platform:rkisp1&amp;quot; &amp;quot;--set-v4l2&amp;quot; '&amp;quot;rkisp1_resizer_selfpath&amp;quot;:0 [fmt:SGRBG10_1X10/1048x780 crop:(0,0)/1048x780]'&lt;br /&gt;
&lt;br /&gt;
&amp;quot;v4l2-ctl&amp;quot; &amp;quot;-z&amp;quot; &amp;quot;platform:rkisp1&amp;quot; &amp;quot;-d&amp;quot; &amp;quot;rkisp1_selfpath&amp;quot; &amp;quot;-v&amp;quot; &amp;quot;width=800,height=600,pixelformat=422P&amp;quot;&lt;br /&gt;
&amp;quot;v4l2-ctl&amp;quot; &amp;quot;-z&amp;quot; &amp;quot;platform:rkisp1&amp;quot; &amp;quot;-d&amp;quot; &amp;quot;rkisp1_selfpath&amp;quot; &amp;quot;--stream-mmap&amp;quot; &amp;quot;--stream-count&amp;quot; &amp;quot;1&amp;quot; &amp;quot;--verbose&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Careful readers will note that this is setting the camera up with a low resolution compared to what the sensor can do. For some reason I can't get the rkisp1 node to configure its sink pad with the maximum resolution of the sensor (4208x3118). Instead, it sets itself to 4032x3024. This mismatch is forbidden and causes v4l2 to give us EPIPE when we try to enable the stream. Using the lower resolution gets us further--the last command (which attempts to save a single frame of video) gives output like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
VIDIOC_QUERYCAP: ok&lt;br /&gt;
		VIDIOC_REQBUFS returned 0 (Success)&lt;br /&gt;
		VIDIOC_QUERYBUF returned 0 (Success)&lt;br /&gt;
		VIDIOC_QUERYBUF returned 0 (Success)&lt;br /&gt;
		VIDIOC_QUERYBUF returned 0 (Success)&lt;br /&gt;
		VIDIOC_QUERYBUF returned 0 (Success)&lt;br /&gt;
		VIDIOC_QBUF returned 0 (Success)&lt;br /&gt;
		VIDIOC_QBUF returned 0 (Success)&lt;br /&gt;
		VIDIOC_QBUF returned 0 (Success)&lt;br /&gt;
		VIDIOC_QBUF returned 0 (Success)&lt;br /&gt;
		VIDIOC_STREAMON returned 0 (Success)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
But then it just hangs there indefinitely.&lt;br /&gt;
&lt;br /&gt;
Running under strace, we see the program stuck in an ioctl:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ioctl(3, VIDIOC_DQBUF, {type=V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[https://www.kernel.org/doc/html/v4.13/media/uapi/v4l/vidioc-qbuf.html VIDIOC_DQBUF] corresponds to dequeuing a buffer once it has been filled with an image by the v4l2 device. Apparently, the device never gives us back a captured frame.&lt;br /&gt;
&lt;br /&gt;
=== Now what? ===&lt;br /&gt;
&lt;br /&gt;
==== Does i2c work at all? ====&lt;br /&gt;
&lt;br /&gt;
The camera driver uses i2c; we can see the camera [https://github.com/megous/linux/blob/c5af9f4f874a66b65c73c450b79f6a86b1b46332/arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts#L890-L914 in the .dts] to determine that it's on i2c bus 1, address 0x1a.&lt;br /&gt;
&lt;br /&gt;
The imx258 is controlled over i2c, and sends image data over MIPI DSI. The first step is to see if the i2c control is working.&lt;br /&gt;
&lt;br /&gt;
Looking back at the driver, it seems we should see errors in dmesg if i2c communication fails. The driver checks the chip id in its probe function, which uses i2c, so we can conclude that i2c gets set up properly initially. Does it keep working?&lt;br /&gt;
&lt;br /&gt;
==== Does i2c keep working? (FTrace) ====&lt;br /&gt;
&lt;br /&gt;
We can see if other functions that use i2c produce errors--for example, when we run our &amp;lt;code&amp;gt;&amp;quot;v4l2-ctl&amp;quot; ... &amp;quot;--stream-mmap&amp;quot;&amp;lt;/code&amp;gt; command, we expect that &amp;lt;code&amp;gt;imx258_start_streaming&amp;lt;/code&amp;gt; will get called, and this function also writes a load of registers over i2c.&lt;br /&gt;
&lt;br /&gt;
Build and install a kernel with CONFIG_FTRACE (not hard, but outside the scope of this write-up) and enable function graph tracing:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo su&lt;br /&gt;
# cd /sys/kernel/debug/tracing&lt;br /&gt;
# echo function_graph &amp;gt; current_tracer&lt;br /&gt;
# cat available_filter_functions | grep -E 'rkisp|imx258|v4l2' | awk '{print $1}' &amp;gt; set_graph_function&lt;br /&gt;
# echo 'vm_map_pages,__iommu_map,iommu_map_sg_atomic,rk_iommu_map,__alloc_pages,dma_alloc_attrs,dma_mmap_attrs,__vm_map_pages,vb2_mmap,clk_e,able,schedule_timeout,clk_disable,regmap_write,schedule,__i2c_tra,sfer,i2c_tra,sfer_buffer_flags,dma_free_attrs' | tr , '\n' &amp;gt; set_graph_notrace&lt;br /&gt;
# tee trace_pipe &amp;gt; ~/function-trace.log&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, in another terminal session, run the &amp;lt;code&amp;gt;&amp;quot;v4l2-ctl&amp;quot; ... &amp;quot;--stream-mmap&amp;quot;&amp;lt;/code&amp;gt; command again. We end up with a bunch (but hopefully not *too* much) of output in our first terminal and the &amp;lt;code&amp;gt;~/function-trace.log&amp;lt;/code&amp;gt; file.&lt;br /&gt;
&lt;br /&gt;
A quick grep shows that &amp;lt;code&amp;gt;imx258_start_streaming&amp;lt;/code&amp;gt; is indeed called, so '''i2c is working properly'''.&lt;br /&gt;
&lt;br /&gt;
=== If i2c works, what doesn't? ===&lt;br /&gt;
&lt;br /&gt;
Our program that asks for a video frame is still hung! We ask the camera to start streaming frames, it presumably does, but the v4l2 stack never tells us a frame has finished. Doing some digging in the v4l2 stack (and the rkisp1 driver), we find out that rkisp1 is notified about frame status via interrupts.&lt;br /&gt;
&lt;br /&gt;
Perhaps the hardware is never actually emitting the interrupt that signals a frame being finished. Indeed, grepping our FTrace log shows that &amp;lt;code&amp;gt;rkisp1_isr&amp;lt;/code&amp;gt; is never called. A quick look at &amp;lt;code&amp;gt;/proc/interrupts&amp;lt;/code&amp;gt; shows that '''the only interrupt associated with the isp has never triggered''' (0 count on every CPU):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# head -n1 /proc/interrupts; grep isp /proc/interrupts&lt;br /&gt;
           CPU0       CPU1       CPU2       CPU3       CPU4       CPU5       &lt;br /&gt;
 57:          0          0          0          0          0          0     GICv3  75 Level     ff914000.iommu, rkisp1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Next steps ==&lt;br /&gt;
&lt;br /&gt;
Where do we go from here? I don't know--something may be wrong with the way the .dts specifies interrupts, some kind of firmware/GIC (the rk3399's interrupt controller) configuration issue, or something else. It would be good to try to determine:&lt;br /&gt;
&lt;br /&gt;
* Whether the MIPI lines actually show traffic, if someone has a logic analyzer and a dissected PPP.&lt;br /&gt;
* Whether the DMA of frames to memory actually happens, regardless of (lack of) emission of the interrupt that tells us when said DMA finishes a frame.&lt;br /&gt;
* Whether the regulator messages we see during boot are actually significant. I don't know enough about the Linux regulator framework to say whether these being not-found means power is not correctly supplied, or if Linux just isn't being properly informed of the power supply requirements for precise tracking/power-saving when the camera is off.&lt;/div&gt;</summary>
		<author><name>Memleek</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PinePhone_Pro/IMX258_Camera_Debugging&amp;diff=13099</id>
		<title>PinePhone Pro/IMX258 Camera Debugging</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PinePhone_Pro/IMX258_Camera_Debugging&amp;diff=13099"/>
		<updated>2022-05-19T03:47:15Z</updated>

		<summary type="html">&lt;p&gt;Memleek: Log what I've tried so far&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Background ==&lt;br /&gt;
&lt;br /&gt;
The Pinephone Pro's rear camera is a Sony IMX258. The camera driver is present upstream, and at least [https://gitlab.manjaro.org/manjaro-arm/packages/core/linux-pinephonepro Manjaro's kernel] (downstream of Megi's) enables the driver. The camera does not seem to work; this page catalogs work on figuring out why.&lt;br /&gt;
&lt;br /&gt;
== Initial status ==&lt;br /&gt;
&lt;br /&gt;
What do we see in dmesg?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
imx258 1-001a: supply vana not found, using dummy regulator&lt;br /&gt;
imx258 1-001a: supply vdig not found, using dummy regulator&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This tells us the kernel loads the driver, which is something.&lt;br /&gt;
&lt;br /&gt;
Are these errors bad/fatal? Inspecting the [https://github.com/megous/linux/blob/orange-pi-5.17/drivers/media/i2c/imx258.c source] shows us that these supplies are defined in the &amp;lt;code&amp;gt;imx258_supply_names&amp;lt;/code&amp;gt; array, and &amp;lt;code&amp;gt;imx258_probe&amp;lt;/code&amp;gt; calls &amp;lt;code&amp;gt;devm_regulator_bulk_get&amp;lt;/code&amp;gt; to set up these supplies.&lt;br /&gt;
&amp;lt;code&amp;gt;imx258_probe&amp;lt;/code&amp;gt; checks the return code from &amp;lt;code&amp;gt;devm_regulator_bulk_get&amp;lt;/code&amp;gt;, and produces a fatal &amp;quot;Failed to get supplies&amp;quot; message if the return code is negative (indicating failure). Since we don't see this message (or any others from the driver), it looks like it loads successfully!&lt;br /&gt;
&lt;br /&gt;
=== How can we test the camera? ===&lt;br /&gt;
&lt;br /&gt;
==== Megapixels ====&lt;br /&gt;
&lt;br /&gt;
[https://gitlab.com/postmarketOS/megapixels Megapixels] requires a per-device file to configure cameras. This one isn't complete (most of its numbers are complete nonsense), but it should let us see what happens when Megapixels tries to access the camera:&lt;br /&gt;
&amp;lt;code&amp;gt;pine64,pinephone-pro.ini&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[device]&lt;br /&gt;
make=PINE64&lt;br /&gt;
model=PinePhone Pro&lt;br /&gt;
&lt;br /&gt;
[rear]&lt;br /&gt;
driver=imx258&lt;br /&gt;
media-driver=rkisp1&lt;br /&gt;
capture-width=4208&lt;br /&gt;
capture-height=3118&lt;br /&gt;
capture-rate=60&lt;br /&gt;
capture-fmt=GRBG10P&lt;br /&gt;
preview-width=1280&lt;br /&gt;
preview-height=960&lt;br /&gt;
preview-rate=60&lt;br /&gt;
#preview-fmt=BGGR8&lt;br /&gt;
capture-fmt=GRBG10P&lt;br /&gt;
rotate=90&lt;br /&gt;
mirrored=true&lt;br /&gt;
focallength=2.6&lt;br /&gt;
cropfactor=12.7&lt;br /&gt;
fnumber=2.8&lt;br /&gt;
flash-display=true&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This segfaulted Megapixels for me. After patching some trivial segfaults, I get fatal GTK4 issues and other tangential problems. Let's try something else.&lt;br /&gt;
&lt;br /&gt;
==== Manually setting up a camera pipeline ====&lt;br /&gt;
&lt;br /&gt;
We can roughly follow [https://www.kernel.org/doc/html/latest/admin-guide/media/rkisp1.html this guide]. Doing so gives us the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;quot;media-ctl&amp;quot; &amp;quot;-d&amp;quot; &amp;quot;platform:rkisp1&amp;quot; &amp;quot;-r&amp;quot;&lt;br /&gt;
&amp;quot;media-ctl&amp;quot; &amp;quot;-d&amp;quot; &amp;quot;platform:rkisp1&amp;quot; &amp;quot;-l&amp;quot; &amp;quot;'imx258 1-001a':0 -&amp;gt; 'rkisp1_isp':0 [1]&amp;quot;&lt;br /&gt;
&amp;quot;media-ctl&amp;quot; &amp;quot;-d&amp;quot; &amp;quot;platform:rkisp1&amp;quot; &amp;quot;-l&amp;quot; &amp;quot;'rkisp1_isp':2 -&amp;gt; 'rkisp1_resizer_selfpath':0 [1]&amp;quot;&lt;br /&gt;
&amp;quot;media-ctl&amp;quot; &amp;quot;-d&amp;quot; &amp;quot;platform:rkisp1&amp;quot; &amp;quot;--set-v4l2&amp;quot; '&amp;quot;rkisp1_isp&amp;quot;:0 [fmt:SGRBG10_1X10/1048x780]'&lt;br /&gt;
&amp;quot;v4l2-ctl&amp;quot; &amp;quot;-z&amp;quot; &amp;quot;platform:rkisp1&amp;quot; &amp;quot;-d&amp;quot; &amp;quot;rkisp1_selfpath&amp;quot; &amp;quot;-v&amp;quot; &amp;quot;width=1048,height=780,&amp;quot;&lt;br /&gt;
&amp;quot;media-ctl&amp;quot; &amp;quot;-d&amp;quot; &amp;quot;platform:rkisp1&amp;quot; &amp;quot;--set-v4l2&amp;quot; '&amp;quot;rkisp1_resizer_selfpath&amp;quot;:0 [fmt:SGRBG10_1X10/1048x780 crop:(0,0)/1048x780]'&lt;br /&gt;
&lt;br /&gt;
&amp;quot;v4l2-ctl&amp;quot; &amp;quot;-z&amp;quot; &amp;quot;platform:rkisp1&amp;quot; &amp;quot;-d&amp;quot; &amp;quot;rkisp1_selfpath&amp;quot; &amp;quot;-v&amp;quot; &amp;quot;width=800,height=600,pixelformat=422P&amp;quot;&lt;br /&gt;
&amp;quot;v4l2-ctl&amp;quot; &amp;quot;-z&amp;quot; &amp;quot;platform:rkisp1&amp;quot; &amp;quot;-d&amp;quot; &amp;quot;rkisp1_selfpath&amp;quot; &amp;quot;--stream-mmap&amp;quot; &amp;quot;--stream-count&amp;quot; &amp;quot;1&amp;quot; &amp;quot;--verbose&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Careful readers will note that this is setting the camera up with a low resolution compared to what the sensor can do. For some reason I can't get the rkisp1 node to configure its sink pad with the maximum resolution of the sensor (4208x3118). Instead, it sets itself to 4032x3024. This mismatch is forbidden and causes v4l2 to give us EPIPE when we try to enable the stream. Using the lower resolution gets us further--the last command (which attempts to save a single frame of video) gives output like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
VIDIOC_QUERYCAP: ok&lt;br /&gt;
		VIDIOC_REQBUFS returned 0 (Success)&lt;br /&gt;
		VIDIOC_QUERYBUF returned 0 (Success)&lt;br /&gt;
		VIDIOC_QUERYBUF returned 0 (Success)&lt;br /&gt;
		VIDIOC_QUERYBUF returned 0 (Success)&lt;br /&gt;
		VIDIOC_QUERYBUF returned 0 (Success)&lt;br /&gt;
		VIDIOC_QBUF returned 0 (Success)&lt;br /&gt;
		VIDIOC_QBUF returned 0 (Success)&lt;br /&gt;
		VIDIOC_QBUF returned 0 (Success)&lt;br /&gt;
		VIDIOC_QBUF returned 0 (Success)&lt;br /&gt;
		VIDIOC_STREAMON returned 0 (Success)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
But then it just hangs there indefinitely.&lt;br /&gt;
&lt;br /&gt;
Running under strace, we see the program stuck in an ioctl:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ioctl(3, VIDIOC_DQBUF, {type=V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[https://www.kernel.org/doc/html/v4.13/media/uapi/v4l/vidioc-qbuf.html VIDIOC_DQBUF] corresponds to dequeuing a buffer once it has been filled with an image by the v4l2 device. Apparently, the device never gives us back a captured frame.&lt;br /&gt;
&lt;br /&gt;
=== Now what? ===&lt;br /&gt;
&lt;br /&gt;
==== Does i2c work at all? ====&lt;br /&gt;
&lt;br /&gt;
The camera driver uses i2c; we can see the camera [https://github.com/megous/linux/blob/c5af9f4f874a66b65c73c450b79f6a86b1b46332/arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts#L890-L914 in the .dts] to determine that it's on i2c bus 1, address 0x1a.&lt;br /&gt;
&lt;br /&gt;
The imx258 is controlled over i2c, and sends image data over MIPI DSI. The first step is to see if the i2c control is working.&lt;br /&gt;
&lt;br /&gt;
Looking back at the driver, it seems we should see errors in dmesg if i2c communication fails. The driver checks the chip id in its probe function, which uses i2c, so we can conclude that i2c gets set up properly initially. Does it keep working?&lt;br /&gt;
&lt;br /&gt;
==== Does i2c keep working? (FTrace) ====&lt;br /&gt;
&lt;br /&gt;
We can see if other functions that use i2c produce errors--for example, when we run our &amp;lt;code&amp;gt;&amp;quot;v4l2-ctl&amp;quot; ... &amp;quot;--stream-mmap&amp;quot;&amp;lt;/code&amp;gt; command, we expect that &amp;lt;code&amp;gt;imx258_start_streaming&amp;lt;/code&amp;gt; will get called, and this function also writes a load of registers over i2c.&lt;br /&gt;
&lt;br /&gt;
Build and install a kernel with CONFIG_FTRACE (not hard, but outside the scope of this write-up) and enable function graph tracing:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo su&lt;br /&gt;
# cd /sys/kernel/debug/tracing&lt;br /&gt;
# echo function_graph &amp;gt; current_tracer&lt;br /&gt;
# cat available_filter_functions | grep -E 'rkisp|imx258|v4l2' | awk '{print $1}' &amp;gt; set_graph_function&lt;br /&gt;
# echo 'vm_map_pages,__iommu_map,iommu_map_sg_atomic,rk_iommu_map,__alloc_pages,dma_alloc_attrs,dma_mmap_attrs,__vm_map_pages,vb2_mmap,clk_e,able,schedule_timeout,clk_disable,regmap_write,schedule,__i2c_tra,sfer,i2c_tra,sfer_buffer_flags,dma_free_attrs' | tr , '\n' &amp;gt; set_graph_notrace&lt;br /&gt;
# tee trace_pipe &amp;gt; ~/function-trace.log&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, in another terminal session, run the &amp;lt;code&amp;gt;&amp;quot;v4l2-ctl&amp;quot; ... &amp;quot;--stream-mmap&amp;quot;&amp;lt;/code&amp;gt; command again. We end up with a bunch (but hopefully not *too* much) of output in our first terminal and the &amp;lt;code&amp;gt;~/function-trace.log&amp;lt;/code&amp;gt; file.&lt;br /&gt;
&lt;br /&gt;
A quick grep shows that &amp;lt;p&amp;gt;imx258_start_streaming&amp;lt;/p&amp;gt; is indeed called, so '''i2c is working properly'''.&lt;br /&gt;
&lt;br /&gt;
=== If i2c works, what doesn't? ===&lt;br /&gt;
&lt;br /&gt;
Our program that asks for a video frame is still hung! We ask the camera to start streaming frames, it presumably does, but the v4l2 stack never tells us a frame has finished. Doing some digging in the v4l2 stack (and the rkisp1 driver), we find out that rkisp1 is notified about frame status via interrupts.&lt;br /&gt;
&lt;br /&gt;
Perhaps the hardware is never actually emitting the interrupt that signals a frame being finished. Indeed, grepping our FTrace log shows that &amp;lt;code&amp;gt;rkisp1_isr&amp;lt;/code&amp;gt; is never called. A quick look at &amp;lt;code&amp;gt;/proc/interrupts&amp;lt;/code&amp;gt; shows that '''the only interrupt associated with the isp has never triggered''' (0 count on every CPU):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# head -n1 /proc/interrupts; grep isp /proc/interrupts&lt;br /&gt;
           CPU0       CPU1       CPU2       CPU3       CPU4       CPU5       &lt;br /&gt;
 57:          0          0          0          0          0          0     GICv3  75 Level     ff914000.iommu, rkisp1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Next steps ==&lt;br /&gt;
&lt;br /&gt;
Where do we go from here? I don't know--something may be wrong with the way the .dts specifies interrupts, some kind of firmware/GIC (the rk3399's interrupt controller) configuration issue, or something else. It would be good to try to determine:&lt;br /&gt;
&lt;br /&gt;
* Whether the MIPI lines actually show traffic, if someone has a logic analyzer and a dissected PPP.&lt;br /&gt;
* Whether the DMA of frames to memory actually happens, regardless of (lack of) emission of the interrupt that tells us when said DMA finishes a frame.&lt;br /&gt;
* Whether the regulator messages we see during boot are actually significant. I don't know enough about the Linux regulator framework to say whether these being not-found means power is not correctly supplied, or if Linux just isn't being properly informed of the power supply requirements for precise tracking/power-saving when the camera is off.&lt;/div&gt;</summary>
		<author><name>Memleek</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PinePhone_Pro_Software_State&amp;diff=13098</id>
		<title>PinePhone Pro Software State</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PinePhone_Pro_Software_State&amp;diff=13098"/>
		<updated>2022-05-18T19:43:05Z</updated>

		<summary type="html">&lt;p&gt;Memleek: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Presently the PinePhone Pro Explorer Edition is aimed at '''Linux developers with an extensive knowledge of embedded systems and/or experience with mobile Linux'''. It will take time for all the PinePhone Pro’s functionality to reach software parity with the original PinePhone and for mobile operating systems, in more general, to reach a higher degree of maturity.&lt;br /&gt;
&lt;br /&gt;
Bear in mind that the software for these smartphones is still in a very early stage, with most of the software being in alpha or beta state. That's especially also the case for scalability of applications, their availability and practicability, any hardware function implementations and the firmware. The software is provided as is. There is no warranty for the software, not even for merchantability or fitness for a particular purpose.&lt;br /&gt;
&lt;br /&gt;
The following table lists the feature functionality status of the unaltered pre-installed factory image of the current shipping batch and as comparison an up-to-date reference image (no responsibility is accepted for the accuracy of this information, the list is provided and updated by the community). If you have any questions regarding the current state of the software or of specific features working, please don't hesitate to ask in the [[Main Page#Community and Support|community chat]] '''before buying the device''':&lt;br /&gt;
&lt;br /&gt;
* Discord: ''#pinephone'' under https://discord.gg/pine64&lt;br /&gt;
* IRC: ''#pinephone'' on ''irc.pine64.org''. Note: please consider Matrix, Discord or Telegram due to the volatile nature of IRC&lt;br /&gt;
* Matrix: https://app.element.io/#/room/#pinephone:matrix.org&lt;br /&gt;
* Telegram: https://t.me/pinephone&lt;br /&gt;
&lt;br /&gt;
{{Hint|The software is '''written by the community''', any contributions towards the community projects are greatly appreciated! Please see &amp;quot;[[How to Contribute]]&amp;quot; to learn about how to contribute to the software projects and &amp;quot;[[Where to Report Bugs]]&amp;quot; to learn about where to report bugs.}}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable plainrowheaders&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Functionality&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; style=&amp;quot;min-width: 260px;&amp;quot;  | Component&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; style=&amp;quot;width: 120px;&amp;quot; | Status (factory)¹&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; style=&amp;quot;width: 120px;&amp;quot; | Status (updated)²&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Notes&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; rowspan=&amp;quot;3&amp;quot; | Bootloader&lt;br /&gt;
| &amp;lt;code&amp;gt;U-Boot&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | Critical bugs&lt;br /&gt;
| Some critical software bugs currently not fixed yet: A drained battery causes U-Boot to bootloop (cause is known and currently being worked on);&amp;lt;sup&amp;gt;[[PinePhone_Pro#The battery is fully drained|Workaround]]&amp;lt;/sup&amp;gt; Occasionally the eMMC fails to initialize&amp;lt;sup&amp;gt;[https://gitlab.com/postmarketOS/pmaports/-/issues/1424 Report]&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;SPI&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | Unfinished&lt;br /&gt;
| SPI memory is currently empty in the Explorer Edition batch, a corrupted installation on the eMMC has a higher boot priority than a fresh microSD card installation, leading to a involved recovery procedure&amp;lt;sup&amp;gt;[https://tow-boot.org/ Planned]&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Boot GUI&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | Not implemented&lt;br /&gt;
| Currently there is no graphical boot selection implemented&amp;lt;sup&amp;gt;[https://tow-boot.org/ Possibly planned]&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; rowspan=&amp;quot;3&amp;quot; | Operating System&lt;br /&gt;
| &amp;lt;code&amp;gt;Stability&amp;lt;/code&amp;gt;&lt;br /&gt;
| style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | Critical bugs&lt;br /&gt;
| style=&amp;quot;background:LightYellow; text-align:center;&amp;quot; | WIP&lt;br /&gt;
| The pre-flashed and outdated operating system on the eMMC often gets corrupted after updating&amp;lt;sup&amp;gt;[https://forum.pine64.org/showthread.php?tid=15950 Example]&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Suspend&amp;lt;/code&amp;gt;&lt;br /&gt;
| style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | Not working&lt;br /&gt;
| style=&amp;quot;background:LightYellow; text-align:center;&amp;quot; | Experimental&lt;br /&gt;
| '''Without suspend the phone will drain very fast!''' Suspend only available in specific more recent images&amp;lt;sup&amp;gt;[https://www.pine64.org/2022/03/15/march-update-introducing-the-quartzpro64/ News]&amp;lt;/sup&amp;gt; Audio is often higher pitched after waking up from suspend due to a bug&amp;lt;sup&amp;gt;[https://github.com/dreemurrs-embedded/Pine64-Arch/issues/381 Report]&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Updates&amp;lt;/code&amp;gt;&lt;br /&gt;
| style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | Critical bugs&lt;br /&gt;
| style=&amp;quot;background:LightYellow; text-align:center;&amp;quot; | WIP&lt;br /&gt;
| The pre-flashed and outdated operating system on the eMMC often gets corrupted after updating&amp;lt;sup&amp;gt;[https://forum.pine64.org/showthread.php?tid=15950 Example]&amp;lt;/sup&amp;gt;; Pacman database lock preventing updates&amp;lt;sup&amp;gt;[https://wiki.archlinux.org/title/pacman#%22Failed_to_init_transaction_(unable_to_lock_database)%22_error Solution]&amp;lt;/sup&amp;gt;; Keyring bug&amp;lt;sup&amp;gt;[Solution is to run &amp;quot;pinephonepro-post-install&amp;quot; script as root]&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; rowspan=&amp;quot;5&amp;quot; | Modem&lt;br /&gt;
| &amp;lt;code&amp;gt;General&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | Critical bugs&lt;br /&gt;
| The modem crashes frequently&amp;lt;sup&amp;gt;[https://gitlab.manjaro.org/manjaro-arm/issues/pinephone/phosh/-/issues/147 Report]&amp;lt;/sup&amp;gt;&amp;lt;sup&amp;gt;[https://gitlab.com/mobian1/devices/eg25-manager/-/issues/15 Report]&amp;lt;/sup&amp;gt;&amp;lt;sup&amp;gt;[https://github.com/Biktorgj/pinephone_modem_sdk Alternative firmware]&amp;lt;/sup&amp;gt;; Slow wakeup&amp;lt;sup&amp;gt;[https://gitlab.com/mobian1/devices/eg25-manager/-/issues/34 Report]&amp;lt;/sup&amp;gt;; Some carriers blocking specific TANs in their network&amp;lt;sup&amp;gt;[[PinePhone Carrier Support]]&amp;lt;/sup&amp;gt;; '''Note:''' Proprietary firmware&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Phone&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightYellow; text-align:center;&amp;quot; | WIP&lt;br /&gt;
| The modem crashes frequently, which can lead to missed calls&amp;lt;sup&amp;gt;[https://gitlab.manjaro.org/manjaro-arm/issues/pinephone/phosh/-/issues/147 Report]&amp;lt;/sup&amp;gt;&amp;lt;sup&amp;gt;[https://gitlab.com/mobian1/devices/eg25-manager/-/issues/15 Report]&amp;lt;/sup&amp;gt;&amp;lt;sup&amp;gt;[https://github.com/Biktorgj/pinephone_modem_sdk Alternative firmware]&amp;lt;/sup&amp;gt;; bad call audio quality&amp;lt;sup&amp;gt;[https://gitlab.manjaro.org/manjaro-arm/issues/pinephone/phosh/-/issues/249 Report]&amp;lt;/sup&amp;gt;;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;SMS&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightGreen; text-align:center;&amp;quot; | Working&lt;br /&gt;
| SMS functionality is expected to work. In certain cases the functionality might be blocked by a clogged modem&amp;lt;sup&amp;gt;[https://gitlab.manjaro.org/manjaro-arm/issues/pinephone/phosh/-/issues/203 Report]&amp;lt;/sup&amp;gt;; Some bugs&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;MMS&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightYellow; text-align:center;&amp;quot; | WIP&lt;br /&gt;
| MMS functionality is integrated into the application &amp;quot;Spacebar&amp;quot;, some bugs remaining and expected&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Push notifications&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | Not implemented&lt;br /&gt;
| Receiving push notifications while the phone is suspended is not implemented&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; rowspan=&amp;quot;12&amp;quot; | Components&lt;br /&gt;
| &amp;lt;code&amp;gt;LCD&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightGreen; text-align:center;&amp;quot; | Working&lt;br /&gt;
| Under certain circumstances it is difficult to wake up the screen&amp;lt;sup&amp;gt;[Citation]&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Touch&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightGreen; text-align:center;&amp;quot; | Working&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Rear camera&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | Not working&lt;br /&gt;
| Driver exists (drivers/media/i2c/imx258.c) but camera does not seem to capture frames&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Front camera&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | Not working&lt;br /&gt;
| Driver not implemented yet (a staging driver exists for this sensor using the Intel Atom ISP framework (drivers/staging/media/atomisp/i2c/ov8858.c), but it needs to be ported and cleaned up); camera not operational&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Camera flash&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightGreen; text-align:center;&amp;quot; | Working&lt;br /&gt;
| (tested on Manjaro; at &amp;lt;code&amp;gt;/sys/class/leds/white:flash&amp;lt;/code&amp;gt;)&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;WiFi&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightGreen; text-align:center;&amp;quot; | Working&lt;br /&gt;
| WiFi is expected to work. Some remaining tasks, such as &amp;quot;monitor mode&amp;quot;. '''Note:''' Proprietary firmware&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Bluetooth&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightYellow; text-align:center;&amp;quot; | WIP&lt;br /&gt;
| Bluetooth not necessarily working for calls yet due to missing audio routing&amp;lt;sup&amp;gt;[Citation]&amp;lt;/sup&amp;gt;; Bluetooth in general dodgy under Pulseaudio.&amp;lt;sup&amp;gt;[https://wiki.archlinux.org/title/bluetooth_headset#Headset_via_Pipewire Info]&amp;lt;/sup&amp;gt; '''Note:''' Proprietary firmware&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;GNSS/GPS&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightYellow; text-align:center;&amp;quot; | WIP&lt;br /&gt;
| aGPS to be implemented&amp;lt;sup&amp;gt;[Citation]&amp;lt;/sup&amp;gt;; long loading times to get a GPS fix&amp;lt;sup&amp;gt;[Citation]&amp;lt;/sup&amp;gt;; No preinstalled application&amp;lt;sup&amp;gt;[Citation]&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Sensors&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightYellow; text-align:center;&amp;quot; | WIP&lt;br /&gt;
| &amp;quot;3 Axis Magnetometer&amp;quot; (&amp;lt;code&amp;gt;lis3mdl&amp;lt;/code&amp;gt;): Not working (tested on Manjaro 5.17.6-2 kernel; not present in devicetree bindings; does not show up on i2c bus 4 as expected with &amp;lt;code&amp;gt;# i2cdetect 4&amp;lt;/code&amp;gt;... may have a conflict for i2c-4 addr 0x1c with &amp;lt;code&amp;gt;af8133j&amp;lt;/code&amp;gt;)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;quot;Geo Magnetic Sensor&amp;quot; (&amp;lt;code&amp;gt;af8133j&amp;lt;/code&amp;gt;): Working (tested on Manjaro, at &amp;lt;code&amp;gt;/sys/bus/i2c/devices/4-001c/iio:device1&amp;lt;/code&amp;gt;)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;quot;Accelerometer / Gyroscope&amp;quot; (&amp;lt;code&amp;gt;mpu6500&amp;lt;/code&amp;gt;): Working (tested on Manjaro, at &amp;lt;code&amp;gt;/sys/bus/i2c/devices/4-0068/iio:device2&amp;lt;/code&amp;gt;)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;quot;Ambient light / Proximity&amp;quot; (&amp;lt;code&amp;gt;stk3311&amp;lt;/code&amp;gt;): Not working (tested on Manjaro 5.17.6-2 kernel; IRQ issues)&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt;stk3311 dmesg excerpt&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
[    9.406478] genirq: Failed to request resources for stk3310_event (irq 99) on irqchip rockchip_gpio_irq&lt;br /&gt;
[    9.407380] stk3310 3-0048: request irq 99 failed&lt;br /&gt;
[    9.408360] stk3310: probe of 3-0048 failed with error -5&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Vibration motor&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightGreen; text-align:center;&amp;quot; | Working&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Notification LED&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightGreen; text-align:center;&amp;quot; | Working&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Buttons&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightGreen; text-align:center;&amp;quot; | Working&lt;br /&gt;
| Power buttons and volume buttons are working.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; rowspan=&amp;quot;5&amp;quot; | Accessory compatibility, spare parts&lt;br /&gt;
| &amp;lt;code&amp;gt;Keyboard Add-on&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | WIP and critical hardware issue&lt;br /&gt;
| The keyboard add-on compatibility is work-in-progress. '''Hardware issue: USB-C port of the phone must not be used while the current keyboard revision is connected'''&amp;lt;sup&amp;gt;[[PinePhone_(Pro)_Keyboard#Safety|Warning]]&amp;lt;/sup&amp;gt;; Top row symbols not implemented as designed&amp;lt;sup&amp;gt;[Citation]&amp;lt;/sup&amp;gt;; Keyboard hot-plugging not supported&amp;lt;sup&amp;gt;[Citation]&amp;lt;/sup&amp;gt;; Battery state not exposed in the pre-flashed operating system state&amp;lt;sup&amp;gt;[Citation]&amp;lt;/sup&amp;gt;; general driver bugs&amp;lt;sup&amp;gt;[Citation]&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;LoRa Add-on&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | Not implemented&lt;br /&gt;
| No software support implemented&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Qi Wireless Charging Add-on&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightYellow; text-align:center;&amp;quot; | WIP&lt;br /&gt;
| Wireless charging with the add-on case is expected to work to some degree. Certain software functionality and a driver is currently missing&amp;lt;sup&amp;gt;[Citation]&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Fingerprint Reader Add-on&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | Not implemented&lt;br /&gt;
| No software support implemented&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Spare parts&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | Not available yet&lt;br /&gt;
| Spare parts currently not available yet in the store.&amp;lt;sup&amp;gt;[https://pine64.com/product-category/smartphone-spare-parts/ Store]&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; rowspan=&amp;quot;1&amp;quot; | Software notes&lt;br /&gt;
| &amp;lt;code&amp;gt;Waydroid&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightYellow; text-align:center;&amp;quot; | Software rendering only&lt;br /&gt;
| Waydroid is an Android container used to run Android applications. Currently can only be started using software rendering due to a bug&amp;lt;sup&amp;gt;[https://github.com/waydroid/waydroid/issues/291 Report]&amp;lt;/sup&amp;gt;&amp;lt;sup&amp;gt;[https://gitlab.freedesktop.org/mesa/mesa/-/issues/5928 Report]&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
¹ Status of the features at the time of the last factory installation without updates&lt;br /&gt;
&lt;br /&gt;
² Status of the features with an up-to-date reference image&lt;/div&gt;</summary>
		<author><name>Memleek</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PinePhone_Pro_Software_State&amp;diff=13097</id>
		<title>PinePhone Pro Software State</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PinePhone_Pro_Software_State&amp;diff=13097"/>
		<updated>2022-05-18T19:42:29Z</updated>

		<summary type="html">&lt;p&gt;Memleek: Update flash status to Working and sensors summary to WIP&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Presently the PinePhone Pro Explorer Edition is aimed at '''Linux developers with an extensive knowledge of embedded systems and/or experience with mobile Linux'''. It will take time for all the PinePhone Pro’s functionality to reach software parity with the original PinePhone and for mobile operating systems, in more general, to reach a higher degree of maturity.&lt;br /&gt;
&lt;br /&gt;
Bear in mind that the software for these smartphones is still in a very early stage, with most of the software being in alpha or beta state. That's especially also the case for scalability of applications, their availability and practicability, any hardware function implementations and the firmware. The software is provided as is. There is no warranty for the software, not even for merchantability or fitness for a particular purpose.&lt;br /&gt;
&lt;br /&gt;
The following table lists the feature functionality status of the unaltered pre-installed factory image of the current shipping batch and as comparison an up-to-date reference image (no responsibility is accepted for the accuracy of this information, the list is provided and updated by the community). If you have any questions regarding the current state of the software or of specific features working, please don't hesitate to ask in the [[Main Page#Community and Support|community chat]] '''before buying the device''':&lt;br /&gt;
&lt;br /&gt;
* Discord: ''#pinephone'' under https://discord.gg/pine64&lt;br /&gt;
* IRC: ''#pinephone'' on ''irc.pine64.org''. Note: please consider Matrix, Discord or Telegram due to the volatile nature of IRC&lt;br /&gt;
* Matrix: https://app.element.io/#/room/#pinephone:matrix.org&lt;br /&gt;
* Telegram: https://t.me/pinephone&lt;br /&gt;
&lt;br /&gt;
{{Hint|The software is '''written by the community''', any contributions towards the community projects are greatly appreciated! Please see &amp;quot;[[How to Contribute]]&amp;quot; to learn about how to contribute to the software projects and &amp;quot;[[Where to Report Bugs]]&amp;quot; to learn about where to report bugs.}}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable plainrowheaders&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Functionality&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; style=&amp;quot;min-width: 260px;&amp;quot;  | Component&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; style=&amp;quot;width: 120px;&amp;quot; | Status (factory)¹&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; style=&amp;quot;width: 120px;&amp;quot; | Status (updated)²&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Notes&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; rowspan=&amp;quot;3&amp;quot; | Bootloader&lt;br /&gt;
| &amp;lt;code&amp;gt;U-Boot&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | Critical bugs&lt;br /&gt;
| Some critical software bugs currently not fixed yet: A drained battery causes U-Boot to bootloop (cause is known and currently being worked on);&amp;lt;sup&amp;gt;[[PinePhone_Pro#The battery is fully drained|Workaround]]&amp;lt;/sup&amp;gt; Occasionally the eMMC fails to initialize&amp;lt;sup&amp;gt;[https://gitlab.com/postmarketOS/pmaports/-/issues/1424 Report]&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;SPI&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | Unfinished&lt;br /&gt;
| SPI memory is currently empty in the Explorer Edition batch, a corrupted installation on the eMMC has a higher boot priority than a fresh microSD card installation, leading to a involved recovery procedure&amp;lt;sup&amp;gt;[https://tow-boot.org/ Planned]&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Boot GUI&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | Not implemented&lt;br /&gt;
| Currently there is no graphical boot selection implemented&amp;lt;sup&amp;gt;[https://tow-boot.org/ Possibly planned]&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; rowspan=&amp;quot;3&amp;quot; | Operating System&lt;br /&gt;
| &amp;lt;code&amp;gt;Stability&amp;lt;/code&amp;gt;&lt;br /&gt;
| style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | Critical bugs&lt;br /&gt;
| style=&amp;quot;background:LightYellow; text-align:center;&amp;quot; | WIP&lt;br /&gt;
| The pre-flashed and outdated operating system on the eMMC often gets corrupted after updating&amp;lt;sup&amp;gt;[https://forum.pine64.org/showthread.php?tid=15950 Example]&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Suspend&amp;lt;/code&amp;gt;&lt;br /&gt;
| style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | Not working&lt;br /&gt;
| style=&amp;quot;background:LightYellow; text-align:center;&amp;quot; | Experimental&lt;br /&gt;
| '''Without suspend the phone will drain very fast!''' Suspend only available in specific more recent images&amp;lt;sup&amp;gt;[https://www.pine64.org/2022/03/15/march-update-introducing-the-quartzpro64/ News]&amp;lt;/sup&amp;gt; Audio is often higher pitched after waking up from suspend due to a bug&amp;lt;sup&amp;gt;[https://github.com/dreemurrs-embedded/Pine64-Arch/issues/381 Report]&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Updates&amp;lt;/code&amp;gt;&lt;br /&gt;
| style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | Critical bugs&lt;br /&gt;
| style=&amp;quot;background:LightYellow; text-align:center;&amp;quot; | WIP&lt;br /&gt;
| The pre-flashed and outdated operating system on the eMMC often gets corrupted after updating&amp;lt;sup&amp;gt;[https://forum.pine64.org/showthread.php?tid=15950 Example]&amp;lt;/sup&amp;gt;; Pacman database lock preventing updates&amp;lt;sup&amp;gt;[https://wiki.archlinux.org/title/pacman#%22Failed_to_init_transaction_(unable_to_lock_database)%22_error Solution]&amp;lt;/sup&amp;gt;; Keyring bug&amp;lt;sup&amp;gt;[Solution is to run &amp;quot;pinephonepro-post-install&amp;quot; script as root]&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; rowspan=&amp;quot;5&amp;quot; | Modem&lt;br /&gt;
| &amp;lt;code&amp;gt;General&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | Critical bugs&lt;br /&gt;
| The modem crashes frequently&amp;lt;sup&amp;gt;[https://gitlab.manjaro.org/manjaro-arm/issues/pinephone/phosh/-/issues/147 Report]&amp;lt;/sup&amp;gt;&amp;lt;sup&amp;gt;[https://gitlab.com/mobian1/devices/eg25-manager/-/issues/15 Report]&amp;lt;/sup&amp;gt;&amp;lt;sup&amp;gt;[https://github.com/Biktorgj/pinephone_modem_sdk Alternative firmware]&amp;lt;/sup&amp;gt;; Slow wakeup&amp;lt;sup&amp;gt;[https://gitlab.com/mobian1/devices/eg25-manager/-/issues/34 Report]&amp;lt;/sup&amp;gt;; Some carriers blocking specific TANs in their network&amp;lt;sup&amp;gt;[[PinePhone Carrier Support]]&amp;lt;/sup&amp;gt;; '''Note:''' Proprietary firmware&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Phone&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightYellow; text-align:center;&amp;quot; | WIP&lt;br /&gt;
| The modem crashes frequently, which can lead to missed calls&amp;lt;sup&amp;gt;[https://gitlab.manjaro.org/manjaro-arm/issues/pinephone/phosh/-/issues/147 Report]&amp;lt;/sup&amp;gt;&amp;lt;sup&amp;gt;[https://gitlab.com/mobian1/devices/eg25-manager/-/issues/15 Report]&amp;lt;/sup&amp;gt;&amp;lt;sup&amp;gt;[https://github.com/Biktorgj/pinephone_modem_sdk Alternative firmware]&amp;lt;/sup&amp;gt;; bad call audio quality&amp;lt;sup&amp;gt;[https://gitlab.manjaro.org/manjaro-arm/issues/pinephone/phosh/-/issues/249 Report]&amp;lt;/sup&amp;gt;;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;SMS&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightGreen; text-align:center;&amp;quot; | Working&lt;br /&gt;
| SMS functionality is expected to work. In certain cases the functionality might be blocked by a clogged modem&amp;lt;sup&amp;gt;[https://gitlab.manjaro.org/manjaro-arm/issues/pinephone/phosh/-/issues/203 Report]&amp;lt;/sup&amp;gt;; Some bugs&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;MMS&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightYellow; text-align:center;&amp;quot; | WIP&lt;br /&gt;
| MMS functionality is integrated into the application &amp;quot;Spacebar&amp;quot;, some bugs remaining and expected&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Push notifications&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | Not implemented&lt;br /&gt;
| Receiving push notifications while the phone is suspended is not implemented&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; rowspan=&amp;quot;12&amp;quot; | Components&lt;br /&gt;
| &amp;lt;code&amp;gt;LCD&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightGreen; text-align:center;&amp;quot; | Working&lt;br /&gt;
| Under certain circumstances it is difficult to wake up the screen&amp;lt;sup&amp;gt;[Citation]&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Touch&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightGreen; text-align:center;&amp;quot; | Working&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Rear camera&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | Not working&lt;br /&gt;
| Driver exists (drivers/media/i2c/imx258.c) but camera does not seem to capture frames&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Front camera&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | Not working&lt;br /&gt;
| Driver not implemented yet (a staging driver exists for this sensor using the Intel Atom ISP framework (drivers/staging/media/atomisp/i2c/ov8858.c), but it needs to be ported and cleaned up); camera not operational&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Camera flash&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightGreen; text-align:center;&amp;quot; | Working (tested on Manjaro; at &amp;lt;code&amp;gt;/sys/class/leds/white:flash&amp;lt;/code&amp;gt;)&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;WiFi&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightGreen; text-align:center;&amp;quot; | Working&lt;br /&gt;
| WiFi is expected to work. Some remaining tasks, such as &amp;quot;monitor mode&amp;quot;. '''Note:''' Proprietary firmware&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Bluetooth&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightYellow; text-align:center;&amp;quot; | WIP&lt;br /&gt;
| Bluetooth not necessarily working for calls yet due to missing audio routing&amp;lt;sup&amp;gt;[Citation]&amp;lt;/sup&amp;gt;; Bluetooth in general dodgy under Pulseaudio.&amp;lt;sup&amp;gt;[https://wiki.archlinux.org/title/bluetooth_headset#Headset_via_Pipewire Info]&amp;lt;/sup&amp;gt; '''Note:''' Proprietary firmware&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;GNSS/GPS&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightYellow; text-align:center;&amp;quot; | WIP&lt;br /&gt;
| aGPS to be implemented&amp;lt;sup&amp;gt;[Citation]&amp;lt;/sup&amp;gt;; long loading times to get a GPS fix&amp;lt;sup&amp;gt;[Citation]&amp;lt;/sup&amp;gt;; No preinstalled application&amp;lt;sup&amp;gt;[Citation]&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Sensors&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightYellow; text-align:center;&amp;quot; | WIP&lt;br /&gt;
| &amp;quot;3 Axis Magnetometer&amp;quot; (&amp;lt;code&amp;gt;lis3mdl&amp;lt;/code&amp;gt;): Not working (tested on Manjaro 5.17.6-2 kernel; not present in devicetree bindings; does not show up on i2c bus 4 as expected with &amp;lt;code&amp;gt;# i2cdetect 4&amp;lt;/code&amp;gt;... may have a conflict for i2c-4 addr 0x1c with &amp;lt;code&amp;gt;af8133j&amp;lt;/code&amp;gt;)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;quot;Geo Magnetic Sensor&amp;quot; (&amp;lt;code&amp;gt;af8133j&amp;lt;/code&amp;gt;): Working (tested on Manjaro, at &amp;lt;code&amp;gt;/sys/bus/i2c/devices/4-001c/iio:device1&amp;lt;/code&amp;gt;)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;quot;Accelerometer / Gyroscope&amp;quot; (&amp;lt;code&amp;gt;mpu6500&amp;lt;/code&amp;gt;): Working (tested on Manjaro, at &amp;lt;code&amp;gt;/sys/bus/i2c/devices/4-0068/iio:device2&amp;lt;/code&amp;gt;)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;quot;Ambient light / Proximity&amp;quot; (&amp;lt;code&amp;gt;stk3311&amp;lt;/code&amp;gt;): Not working (tested on Manjaro 5.17.6-2 kernel; IRQ issues)&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt;stk3311 dmesg excerpt&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
[    9.406478] genirq: Failed to request resources for stk3310_event (irq 99) on irqchip rockchip_gpio_irq&lt;br /&gt;
[    9.407380] stk3310 3-0048: request irq 99 failed&lt;br /&gt;
[    9.408360] stk3310: probe of 3-0048 failed with error -5&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Vibration motor&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightGreen; text-align:center;&amp;quot; | Working&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Notification LED&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightGreen; text-align:center;&amp;quot; | Working&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Buttons&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightGreen; text-align:center;&amp;quot; | Working&lt;br /&gt;
| Power buttons and volume buttons are working.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; rowspan=&amp;quot;5&amp;quot; | Accessory compatibility, spare parts&lt;br /&gt;
| &amp;lt;code&amp;gt;Keyboard Add-on&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | WIP and critical hardware issue&lt;br /&gt;
| The keyboard add-on compatibility is work-in-progress. '''Hardware issue: USB-C port of the phone must not be used while the current keyboard revision is connected'''&amp;lt;sup&amp;gt;[[PinePhone_(Pro)_Keyboard#Safety|Warning]]&amp;lt;/sup&amp;gt;; Top row symbols not implemented as designed&amp;lt;sup&amp;gt;[Citation]&amp;lt;/sup&amp;gt;; Keyboard hot-plugging not supported&amp;lt;sup&amp;gt;[Citation]&amp;lt;/sup&amp;gt;; Battery state not exposed in the pre-flashed operating system state&amp;lt;sup&amp;gt;[Citation]&amp;lt;/sup&amp;gt;; general driver bugs&amp;lt;sup&amp;gt;[Citation]&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;LoRa Add-on&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | Not implemented&lt;br /&gt;
| No software support implemented&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Qi Wireless Charging Add-on&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightYellow; text-align:center;&amp;quot; | WIP&lt;br /&gt;
| Wireless charging with the add-on case is expected to work to some degree. Certain software functionality and a driver is currently missing&amp;lt;sup&amp;gt;[Citation]&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Fingerprint Reader Add-on&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | Not implemented&lt;br /&gt;
| No software support implemented&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Spare parts&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | Not available yet&lt;br /&gt;
| Spare parts currently not available yet in the store.&amp;lt;sup&amp;gt;[https://pine64.com/product-category/smartphone-spare-parts/ Store]&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; rowspan=&amp;quot;1&amp;quot; | Software notes&lt;br /&gt;
| &amp;lt;code&amp;gt;Waydroid&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightYellow; text-align:center;&amp;quot; | Software rendering only&lt;br /&gt;
| Waydroid is an Android container used to run Android applications. Currently can only be started using software rendering due to a bug&amp;lt;sup&amp;gt;[https://github.com/waydroid/waydroid/issues/291 Report]&amp;lt;/sup&amp;gt;&amp;lt;sup&amp;gt;[https://gitlab.freedesktop.org/mesa/mesa/-/issues/5928 Report]&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
¹ Status of the features at the time of the last factory installation without updates&lt;br /&gt;
&lt;br /&gt;
² Status of the features with an up-to-date reference image&lt;/div&gt;</summary>
		<author><name>Memleek</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PinePhone_Pro_Software_State&amp;diff=13096</id>
		<title>PinePhone Pro Software State</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PinePhone_Pro_Software_State&amp;diff=13096"/>
		<updated>2022-05-18T19:40:09Z</updated>

		<summary type="html">&lt;p&gt;Memleek: Update sensors status based on own research&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Presently the PinePhone Pro Explorer Edition is aimed at '''Linux developers with an extensive knowledge of embedded systems and/or experience with mobile Linux'''. It will take time for all the PinePhone Pro’s functionality to reach software parity with the original PinePhone and for mobile operating systems, in more general, to reach a higher degree of maturity.&lt;br /&gt;
&lt;br /&gt;
Bear in mind that the software for these smartphones is still in a very early stage, with most of the software being in alpha or beta state. That's especially also the case for scalability of applications, their availability and practicability, any hardware function implementations and the firmware. The software is provided as is. There is no warranty for the software, not even for merchantability or fitness for a particular purpose.&lt;br /&gt;
&lt;br /&gt;
The following table lists the feature functionality status of the unaltered pre-installed factory image of the current shipping batch and as comparison an up-to-date reference image (no responsibility is accepted for the accuracy of this information, the list is provided and updated by the community). If you have any questions regarding the current state of the software or of specific features working, please don't hesitate to ask in the [[Main Page#Community and Support|community chat]] '''before buying the device''':&lt;br /&gt;
&lt;br /&gt;
* Discord: ''#pinephone'' under https://discord.gg/pine64&lt;br /&gt;
* IRC: ''#pinephone'' on ''irc.pine64.org''. Note: please consider Matrix, Discord or Telegram due to the volatile nature of IRC&lt;br /&gt;
* Matrix: https://app.element.io/#/room/#pinephone:matrix.org&lt;br /&gt;
* Telegram: https://t.me/pinephone&lt;br /&gt;
&lt;br /&gt;
{{Hint|The software is '''written by the community''', any contributions towards the community projects are greatly appreciated! Please see &amp;quot;[[How to Contribute]]&amp;quot; to learn about how to contribute to the software projects and &amp;quot;[[Where to Report Bugs]]&amp;quot; to learn about where to report bugs.}}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable plainrowheaders&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Functionality&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; style=&amp;quot;min-width: 260px;&amp;quot;  | Component&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; style=&amp;quot;width: 120px;&amp;quot; | Status (factory)¹&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; style=&amp;quot;width: 120px;&amp;quot; | Status (updated)²&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Notes&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; rowspan=&amp;quot;3&amp;quot; | Bootloader&lt;br /&gt;
| &amp;lt;code&amp;gt;U-Boot&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | Critical bugs&lt;br /&gt;
| Some critical software bugs currently not fixed yet: A drained battery causes U-Boot to bootloop (cause is known and currently being worked on);&amp;lt;sup&amp;gt;[[PinePhone_Pro#The battery is fully drained|Workaround]]&amp;lt;/sup&amp;gt; Occasionally the eMMC fails to initialize&amp;lt;sup&amp;gt;[https://gitlab.com/postmarketOS/pmaports/-/issues/1424 Report]&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;SPI&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | Unfinished&lt;br /&gt;
| SPI memory is currently empty in the Explorer Edition batch, a corrupted installation on the eMMC has a higher boot priority than a fresh microSD card installation, leading to a involved recovery procedure&amp;lt;sup&amp;gt;[https://tow-boot.org/ Planned]&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Boot GUI&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | Not implemented&lt;br /&gt;
| Currently there is no graphical boot selection implemented&amp;lt;sup&amp;gt;[https://tow-boot.org/ Possibly planned]&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; rowspan=&amp;quot;3&amp;quot; | Operating System&lt;br /&gt;
| &amp;lt;code&amp;gt;Stability&amp;lt;/code&amp;gt;&lt;br /&gt;
| style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | Critical bugs&lt;br /&gt;
| style=&amp;quot;background:LightYellow; text-align:center;&amp;quot; | WIP&lt;br /&gt;
| The pre-flashed and outdated operating system on the eMMC often gets corrupted after updating&amp;lt;sup&amp;gt;[https://forum.pine64.org/showthread.php?tid=15950 Example]&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Suspend&amp;lt;/code&amp;gt;&lt;br /&gt;
| style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | Not working&lt;br /&gt;
| style=&amp;quot;background:LightYellow; text-align:center;&amp;quot; | Experimental&lt;br /&gt;
| '''Without suspend the phone will drain very fast!''' Suspend only available in specific more recent images&amp;lt;sup&amp;gt;[https://www.pine64.org/2022/03/15/march-update-introducing-the-quartzpro64/ News]&amp;lt;/sup&amp;gt; Audio is often higher pitched after waking up from suspend due to a bug&amp;lt;sup&amp;gt;[https://github.com/dreemurrs-embedded/Pine64-Arch/issues/381 Report]&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Updates&amp;lt;/code&amp;gt;&lt;br /&gt;
| style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | Critical bugs&lt;br /&gt;
| style=&amp;quot;background:LightYellow; text-align:center;&amp;quot; | WIP&lt;br /&gt;
| The pre-flashed and outdated operating system on the eMMC often gets corrupted after updating&amp;lt;sup&amp;gt;[https://forum.pine64.org/showthread.php?tid=15950 Example]&amp;lt;/sup&amp;gt;; Pacman database lock preventing updates&amp;lt;sup&amp;gt;[https://wiki.archlinux.org/title/pacman#%22Failed_to_init_transaction_(unable_to_lock_database)%22_error Solution]&amp;lt;/sup&amp;gt;; Keyring bug&amp;lt;sup&amp;gt;[Solution is to run &amp;quot;pinephonepro-post-install&amp;quot; script as root]&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; rowspan=&amp;quot;5&amp;quot; | Modem&lt;br /&gt;
| &amp;lt;code&amp;gt;General&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | Critical bugs&lt;br /&gt;
| The modem crashes frequently&amp;lt;sup&amp;gt;[https://gitlab.manjaro.org/manjaro-arm/issues/pinephone/phosh/-/issues/147 Report]&amp;lt;/sup&amp;gt;&amp;lt;sup&amp;gt;[https://gitlab.com/mobian1/devices/eg25-manager/-/issues/15 Report]&amp;lt;/sup&amp;gt;&amp;lt;sup&amp;gt;[https://github.com/Biktorgj/pinephone_modem_sdk Alternative firmware]&amp;lt;/sup&amp;gt;; Slow wakeup&amp;lt;sup&amp;gt;[https://gitlab.com/mobian1/devices/eg25-manager/-/issues/34 Report]&amp;lt;/sup&amp;gt;; Some carriers blocking specific TANs in their network&amp;lt;sup&amp;gt;[[PinePhone Carrier Support]]&amp;lt;/sup&amp;gt;; '''Note:''' Proprietary firmware&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Phone&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightYellow; text-align:center;&amp;quot; | WIP&lt;br /&gt;
| The modem crashes frequently, which can lead to missed calls&amp;lt;sup&amp;gt;[https://gitlab.manjaro.org/manjaro-arm/issues/pinephone/phosh/-/issues/147 Report]&amp;lt;/sup&amp;gt;&amp;lt;sup&amp;gt;[https://gitlab.com/mobian1/devices/eg25-manager/-/issues/15 Report]&amp;lt;/sup&amp;gt;&amp;lt;sup&amp;gt;[https://github.com/Biktorgj/pinephone_modem_sdk Alternative firmware]&amp;lt;/sup&amp;gt;; bad call audio quality&amp;lt;sup&amp;gt;[https://gitlab.manjaro.org/manjaro-arm/issues/pinephone/phosh/-/issues/249 Report]&amp;lt;/sup&amp;gt;;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;SMS&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightGreen; text-align:center;&amp;quot; | Working&lt;br /&gt;
| SMS functionality is expected to work. In certain cases the functionality might be blocked by a clogged modem&amp;lt;sup&amp;gt;[https://gitlab.manjaro.org/manjaro-arm/issues/pinephone/phosh/-/issues/203 Report]&amp;lt;/sup&amp;gt;; Some bugs&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;MMS&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightYellow; text-align:center;&amp;quot; | WIP&lt;br /&gt;
| MMS functionality is integrated into the application &amp;quot;Spacebar&amp;quot;, some bugs remaining and expected&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Push notifications&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | Not implemented&lt;br /&gt;
| Receiving push notifications while the phone is suspended is not implemented&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; rowspan=&amp;quot;12&amp;quot; | Components&lt;br /&gt;
| &amp;lt;code&amp;gt;LCD&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightGreen; text-align:center;&amp;quot; | Working&lt;br /&gt;
| Under certain circumstances it is difficult to wake up the screen&amp;lt;sup&amp;gt;[Citation]&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Touch&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightGreen; text-align:center;&amp;quot; | Working&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Rear camera&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | Not working&lt;br /&gt;
| Driver exists (drivers/media/i2c/imx258.c) but camera does not seem to capture frames&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Front camera&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | Not working&lt;br /&gt;
| Driver not implemented yet (a staging driver exists for this sensor using the Intel Atom ISP framework (drivers/staging/media/atomisp/i2c/ov8858.c), but it needs to be ported and cleaned up); camera not operational&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Camera flash&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:lightgray; text-align:center;&amp;quot; | Untested&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;WiFi&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightGreen; text-align:center;&amp;quot; | Working&lt;br /&gt;
| WiFi is expected to work. Some remaining tasks, such as &amp;quot;monitor mode&amp;quot;. '''Note:''' Proprietary firmware&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Bluetooth&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightYellow; text-align:center;&amp;quot; | WIP&lt;br /&gt;
| Bluetooth not necessarily working for calls yet due to missing audio routing&amp;lt;sup&amp;gt;[Citation]&amp;lt;/sup&amp;gt;; Bluetooth in general dodgy under Pulseaudio.&amp;lt;sup&amp;gt;[https://wiki.archlinux.org/title/bluetooth_headset#Headset_via_Pipewire Info]&amp;lt;/sup&amp;gt; '''Note:''' Proprietary firmware&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;GNSS/GPS&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightYellow; text-align:center;&amp;quot; | WIP&lt;br /&gt;
| aGPS to be implemented&amp;lt;sup&amp;gt;[Citation]&amp;lt;/sup&amp;gt;; long loading times to get a GPS fix&amp;lt;sup&amp;gt;[Citation]&amp;lt;/sup&amp;gt;; No preinstalled application&amp;lt;sup&amp;gt;[Citation]&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Sensors&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:lightgray; text-align:center;&amp;quot; | Untested&lt;br /&gt;
| &amp;quot;3 Axis Magnetometer&amp;quot; (&amp;lt;code&amp;gt;lis3mdl&amp;lt;/code&amp;gt;): Not working (tested on Manjaro 5.17.6-2 kernel; not present in devicetree bindings; does not show up on i2c bus 4 as expected with &amp;lt;code&amp;gt;# i2cdetect 4&amp;lt;/code&amp;gt;... may have a conflict for i2c-4 addr 0x1c with &amp;lt;code&amp;gt;af8133j&amp;lt;/code&amp;gt;)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;quot;Geo Magnetic Sensor&amp;quot; (&amp;lt;code&amp;gt;af8133j&amp;lt;/code&amp;gt;): Working (tested on Manjaro, at &amp;lt;code&amp;gt;/sys/bus/i2c/devices/4-001c/iio:device1&amp;lt;/code&amp;gt;)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;quot;Accelerometer / Gyroscope&amp;quot; (&amp;lt;code&amp;gt;mpu6500&amp;lt;/code&amp;gt;): Working (tested on Manjaro, at &amp;lt;code&amp;gt;/sys/bus/i2c/devices/4-0068/iio:device2&amp;lt;/code&amp;gt;)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;quot;Ambient light / Proximity&amp;quot; (&amp;lt;code&amp;gt;stk3311&amp;lt;/code&amp;gt;): Not working (tested on Manjaro 5.17.6-2 kernel; IRQ issues)&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-weight:bold;line-height:1.6;&amp;quot;&amp;gt;stk3311 dmesg excerpt&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
[    9.406478] genirq: Failed to request resources for stk3310_event (irq 99) on irqchip rockchip_gpio_irq&lt;br /&gt;
[    9.407380] stk3310 3-0048: request irq 99 failed&lt;br /&gt;
[    9.408360] stk3310: probe of 3-0048 failed with error -5&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Vibration motor&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightGreen; text-align:center;&amp;quot; | Working&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Notification LED&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightGreen; text-align:center;&amp;quot; | Working&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Buttons&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightGreen; text-align:center;&amp;quot; | Working&lt;br /&gt;
| Power buttons and volume buttons are working.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; rowspan=&amp;quot;5&amp;quot; | Accessory compatibility, spare parts&lt;br /&gt;
| &amp;lt;code&amp;gt;Keyboard Add-on&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | WIP and critical hardware issue&lt;br /&gt;
| The keyboard add-on compatibility is work-in-progress. '''Hardware issue: USB-C port of the phone must not be used while the current keyboard revision is connected'''&amp;lt;sup&amp;gt;[[PinePhone_(Pro)_Keyboard#Safety|Warning]]&amp;lt;/sup&amp;gt;; Top row symbols not implemented as designed&amp;lt;sup&amp;gt;[Citation]&amp;lt;/sup&amp;gt;; Keyboard hot-plugging not supported&amp;lt;sup&amp;gt;[Citation]&amp;lt;/sup&amp;gt;; Battery state not exposed in the pre-flashed operating system state&amp;lt;sup&amp;gt;[Citation]&amp;lt;/sup&amp;gt;; general driver bugs&amp;lt;sup&amp;gt;[Citation]&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;LoRa Add-on&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | Not implemented&lt;br /&gt;
| No software support implemented&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Qi Wireless Charging Add-on&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightYellow; text-align:center;&amp;quot; | WIP&lt;br /&gt;
| Wireless charging with the add-on case is expected to work to some degree. Certain software functionality and a driver is currently missing&amp;lt;sup&amp;gt;[Citation]&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Fingerprint Reader Add-on&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | Not implemented&lt;br /&gt;
| No software support implemented&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Spare parts&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | Not available yet&lt;br /&gt;
| Spare parts currently not available yet in the store.&amp;lt;sup&amp;gt;[https://pine64.com/product-category/smartphone-spare-parts/ Store]&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; rowspan=&amp;quot;1&amp;quot; | Software notes&lt;br /&gt;
| &amp;lt;code&amp;gt;Waydroid&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightYellow; text-align:center;&amp;quot; | Software rendering only&lt;br /&gt;
| Waydroid is an Android container used to run Android applications. Currently can only be started using software rendering due to a bug&amp;lt;sup&amp;gt;[https://github.com/waydroid/waydroid/issues/291 Report]&amp;lt;/sup&amp;gt;&amp;lt;sup&amp;gt;[https://gitlab.freedesktop.org/mesa/mesa/-/issues/5928 Report]&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
¹ Status of the features at the time of the last factory installation without updates&lt;br /&gt;
&lt;br /&gt;
² Status of the features with an up-to-date reference image&lt;/div&gt;</summary>
		<author><name>Memleek</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PinePhone_Pro_Software_State&amp;diff=13064</id>
		<title>PinePhone Pro Software State</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PinePhone_Pro_Software_State&amp;diff=13064"/>
		<updated>2022-05-14T16:10:10Z</updated>

		<summary type="html">&lt;p&gt;Memleek: Clarify front camera status&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Presently the PinePhone Pro Explorer Edition is aimed at '''Linux developers with an extensive knowledge of embedded systems and/or experience with mobile Linux'''. It will take time for all the PinePhone Pro’s functionality to reach software parity with the original PinePhone and for mobile operating systems, in more general, to reach a higher degree of maturity.&lt;br /&gt;
&lt;br /&gt;
Bear in mind that the software for these smartphones is still in a very early stage, with most of the software being in alpha or beta state. That's especially also the case for scalability of applications, their availability and practicability, any hardware function implementations and the firmware. The software is provided as is. There is no warranty for the software, not even for merchantability or fitness for a particular purpose.&lt;br /&gt;
&lt;br /&gt;
The following table lists the feature functionality status of the unaltered pre-installed factory image of the current shipping batch and as comparison an up-to-date reference image (no responsibility is accepted for the accuracy of this information, the list is provided and updated by the community). If you have any questions regarding the current state of the software or of specific features working, please don't hesitate to ask in the [[Main Page#Community and Support|community chat]] '''before buying the device''':&lt;br /&gt;
&lt;br /&gt;
* Discord: ''#pinephone'' under https://discord.gg/pine64&lt;br /&gt;
* IRC: ''#pinephone'' on ''irc.pine64.org''. Note: please consider Matrix, Discord or Telegram due to the volatile nature of IRC&lt;br /&gt;
* Matrix: https://app.element.io/#/room/#pinephone:matrix.org&lt;br /&gt;
* Telegram: https://t.me/pinephone&lt;br /&gt;
&lt;br /&gt;
{{Hint|The software is '''written by the community''', any contributions towards the community projects are greatly appreciated! Please see &amp;quot;[[How to Contribute]]&amp;quot; to learn about how to contribute to the software projects and &amp;quot;[[Where to Report Bugs]]&amp;quot; to learn about where to report bugs.}}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable plainrowheaders&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Functionality&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; style=&amp;quot;min-width: 260px;&amp;quot;  | Component&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; style=&amp;quot;width: 120px;&amp;quot; | Status (factory)¹&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; style=&amp;quot;width: 120px;&amp;quot; | Status (updated)²&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Notes&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; rowspan=&amp;quot;3&amp;quot; | Bootloader&lt;br /&gt;
| &amp;lt;code&amp;gt;U-Boot&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | Critical bugs&lt;br /&gt;
| Some critical software bugs currently not fixed yet: A drained battery causes U-Boot to bootloop (cause is known and currently being worked on);&amp;lt;sup&amp;gt;[[PinePhone_Pro#The battery is fully drained|Workaround]]&amp;lt;/sup&amp;gt; Occasionally the eMMC fails to initialize&amp;lt;sup&amp;gt;[https://gitlab.com/postmarketOS/pmaports/-/issues/1424 Report]&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;SPI&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | Unfinished&lt;br /&gt;
| SPI memory is currently empty in the Explorer Edition batch, a corrupted installation on the eMMC has a higher boot priority than a fresh microSD card installation, leading to a involved recovery procedure&amp;lt;sup&amp;gt;[https://tow-boot.org/ Planned]&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Boot GUI&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | Not implemented&lt;br /&gt;
| Currently there is no graphical boot selection implemented&amp;lt;sup&amp;gt;[https://tow-boot.org/ Possibly planned]&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; rowspan=&amp;quot;3&amp;quot; | Operating System&lt;br /&gt;
| &amp;lt;code&amp;gt;Stability&amp;lt;/code&amp;gt;&lt;br /&gt;
| style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | Critical bugs&lt;br /&gt;
| style=&amp;quot;background:LightYellow; text-align:center;&amp;quot; | WIP&lt;br /&gt;
| The pre-flashed and outdated operating system on the eMMC often gets corrupted after updating&amp;lt;sup&amp;gt;[https://forum.pine64.org/showthread.php?tid=15950 Example]&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Suspend&amp;lt;/code&amp;gt;&lt;br /&gt;
| style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | Not working&lt;br /&gt;
| style=&amp;quot;background:LightYellow; text-align:center;&amp;quot; | Experimental&lt;br /&gt;
| '''Without suspend the phone will drain very fast!''' Suspend only available in specific more recent images&amp;lt;sup&amp;gt;[https://www.pine64.org/2022/03/15/march-update-introducing-the-quartzpro64/ News]&amp;lt;/sup&amp;gt; Audio is often higher pitched after waking up from suspend due to a bug&amp;lt;sup&amp;gt;[Citation]&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Updates&amp;lt;/code&amp;gt;&lt;br /&gt;
| style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | Critical bugs&lt;br /&gt;
| style=&amp;quot;background:LightYellow; text-align:center;&amp;quot; | WIP&lt;br /&gt;
| The pre-flashed and outdated operating system on the eMMC often gets corrupted after updating&amp;lt;sup&amp;gt;[https://forum.pine64.org/showthread.php?tid=15950 Example]&amp;lt;/sup&amp;gt;; Pacman database lock preventing updates&amp;lt;sup&amp;gt;[https://wiki.archlinux.org/title/pacman#%22Failed_to_init_transaction_(unable_to_lock_database)%22_error Solution]&amp;lt;/sup&amp;gt;; Keyring bug&amp;lt;sup&amp;gt;[Solution is to run &amp;quot;pinephonepro-post-install&amp;quot; script as root]&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; rowspan=&amp;quot;5&amp;quot; | Modem&lt;br /&gt;
| &amp;lt;code&amp;gt;General&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | Critical bugs&lt;br /&gt;
| The modem crashes frequently&amp;lt;sup&amp;gt;[https://gitlab.manjaro.org/manjaro-arm/issues/pinephone/phosh/-/issues/147 Report]&amp;lt;/sup&amp;gt;&amp;lt;sup&amp;gt;[https://gitlab.com/mobian1/devices/eg25-manager/-/issues/15 Report]&amp;lt;/sup&amp;gt;&amp;lt;sup&amp;gt;[https://github.com/Biktorgj/pinephone_modem_sdk Alternative firmware]&amp;lt;/sup&amp;gt;; Slow wakeup&amp;lt;sup&amp;gt;[https://gitlab.com/mobian1/devices/eg25-manager/-/issues/34 Report]&amp;lt;/sup&amp;gt;; Some carriers blocking specific TANs in their network&amp;lt;sup&amp;gt;[[PinePhone Carrier Support]]&amp;lt;/sup&amp;gt;; '''Note:''' Proprietary firmware&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Phone&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightYellow; text-align:center;&amp;quot; | WIP&lt;br /&gt;
| The modem crashes frequently, which can lead to missed calls&amp;lt;sup&amp;gt;[https://gitlab.manjaro.org/manjaro-arm/issues/pinephone/phosh/-/issues/147 Report]&amp;lt;/sup&amp;gt;&amp;lt;sup&amp;gt;[https://gitlab.com/mobian1/devices/eg25-manager/-/issues/15 Report]&amp;lt;/sup&amp;gt;&amp;lt;sup&amp;gt;[https://github.com/Biktorgj/pinephone_modem_sdk Alternative firmware]&amp;lt;/sup&amp;gt;; bad call audio quality&amp;lt;sup&amp;gt;[https://gitlab.manjaro.org/manjaro-arm/issues/pinephone/phosh/-/issues/249 Report]&amp;lt;/sup&amp;gt;;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;SMS&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightGreen; text-align:center;&amp;quot; | Working&lt;br /&gt;
| SMS functionality is expected to work. In certain cases the functionality might be blocked by a clogged modem&amp;lt;sup&amp;gt;[https://gitlab.manjaro.org/manjaro-arm/issues/pinephone/phosh/-/issues/203 Report]&amp;lt;/sup&amp;gt;; Some bugs&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;MMS&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightYellow; text-align:center;&amp;quot; | WIP&lt;br /&gt;
| MMS functionality is integrated into the application &amp;quot;Spacebar&amp;quot;, some bugs remaining and expected&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Push notifications&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | Not implemented&lt;br /&gt;
| Receiving push notifications while the phone is suspended is not implemented&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; rowspan=&amp;quot;12&amp;quot; | Components&lt;br /&gt;
| &amp;lt;code&amp;gt;LCD&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightGreen; text-align:center;&amp;quot; | Working&lt;br /&gt;
| Under certain circumstances it is difficult to wake up the screen&amp;lt;sup&amp;gt;[Citation]&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Touch&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightGreen; text-align:center;&amp;quot; | Working&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Rear camera&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | Not working&lt;br /&gt;
| Driver exists (drivers/media/i2c/imx258.c) but camera does not seem to capture frames&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Front camera&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | Not working&lt;br /&gt;
| Driver not implemented yet (a staging driver exists for this sensor using the Intel Atom ISP framework (drivers/staging/media/atomisp/i2c/ov8858.c), but it needs to be ported and cleaned up); camera not operational&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Camera flash&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:lightgray; text-align:center;&amp;quot; | Untested&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;WiFi&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightGreen; text-align:center;&amp;quot; | Working&lt;br /&gt;
| WiFi is expected to work. Some remaining tasks, such as &amp;quot;monitor mode&amp;quot;. '''Note:''' Proprietary firmware&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Bluetooth&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightYellow; text-align:center;&amp;quot; | WIP&lt;br /&gt;
| Bluetooth not necessarily working for calls yet due to missing audio routing&amp;lt;sup&amp;gt;[Citation]&amp;lt;/sup&amp;gt;; Bluetooth in general dodgy under Pulseaudio.&amp;lt;sup&amp;gt;[https://wiki.archlinux.org/title/bluetooth_headset#Headset_via_Pipewire Info]&amp;lt;/sup&amp;gt; '''Note:''' Proprietary firmware&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;GNSS/GPS&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightYellow; text-align:center;&amp;quot; | WIP&lt;br /&gt;
| aGPS to be implemented&amp;lt;sup&amp;gt;[Citation]&amp;lt;/sup&amp;gt;; long loading times to get a GPS fix&amp;lt;sup&amp;gt;[Citation]&amp;lt;/sup&amp;gt;; No preinstalled application&amp;lt;sup&amp;gt;[Citation]&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Sensors&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:lightgray; text-align:center;&amp;quot; | Untested&lt;br /&gt;
| Status of &amp;quot;3 Axis Magnetometer&amp;quot; &amp;lt;sup&amp;gt;[Citation]&amp;lt;/sup&amp;gt;, &amp;quot;Geo Magnetic Sensor&amp;quot; &amp;lt;sup&amp;gt;[Citation]&amp;lt;/sup&amp;gt;, &amp;quot;Ambient light / Proximity&amp;quot; &amp;lt;sup&amp;gt;[Citation]&amp;lt;/sup&amp;gt;, &amp;quot;Accelerometer / Gyroscope&amp;quot; &amp;lt;sup&amp;gt;[Citation]&amp;lt;/sup&amp;gt; is Untested.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Vibration motor&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightGreen; text-align:center;&amp;quot; | Working&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Notification LED&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:lightgray; text-align:center;&amp;quot; | Untested&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Buttons&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightGreen; text-align:center;&amp;quot; | Working&lt;br /&gt;
| Power buttons and volume buttons are working.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; rowspan=&amp;quot;5&amp;quot; | Accessory compatibility, spare parts&lt;br /&gt;
| &amp;lt;code&amp;gt;Keyboard Add-on&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | WIP and critical hardware issue&lt;br /&gt;
| The keyboard add-on compatibility is work-in-progress. '''Hardware issue: USB-C port of the phone must not be used while the current keyboard revision is connected'''&amp;lt;sup&amp;gt;[[PinePhone_(Pro)_Keyboard#Safety|Warning]]&amp;lt;/sup&amp;gt;; Top row symbols not implemented as designed&amp;lt;sup&amp;gt;[Citation]&amp;lt;/sup&amp;gt;; Keyboard hot-plugging not supported&amp;lt;sup&amp;gt;[Citation]&amp;lt;/sup&amp;gt;; Battery state not exposed in the pre-flashed operating system state&amp;lt;sup&amp;gt;[Citation]&amp;lt;/sup&amp;gt;; general driver bugs&amp;lt;sup&amp;gt;[Citation]&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;LoRa Add-on&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | Not implemented&lt;br /&gt;
| No software support implemented&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Qi Wireless Charging Add-on&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightYellow; text-align:center;&amp;quot; | WIP&lt;br /&gt;
| Wireless charging with the add-on case is expected to work to some degree. Certain software functionality and a driver is currently missing&amp;lt;sup&amp;gt;[Citation]&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Fingerprint Reader Add-on&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | Not implemented&lt;br /&gt;
| No software support implemented&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Spare parts&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | Not available yet&lt;br /&gt;
| Spare parts currently not available yet in the store.&amp;lt;sup&amp;gt;[https://pine64.com/product-category/smartphone-spare-parts/ Store]&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; rowspan=&amp;quot;1&amp;quot; | Software notes&lt;br /&gt;
| &amp;lt;code&amp;gt;Waydroid&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightYellow; text-align:center;&amp;quot; | Software rendering only&lt;br /&gt;
| Waydroid is an Android container used to run Android applications. Currently can only be started using software rendering due to a bug&amp;lt;sup&amp;gt;[https://github.com/waydroid/waydroid/issues/291 Report]&amp;lt;/sup&amp;gt;&amp;lt;sup&amp;gt;[https://gitlab.freedesktop.org/mesa/mesa/-/issues/5928 Report]&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
¹ Status of the features at the time of the last factory installation without updates&lt;br /&gt;
&lt;br /&gt;
² Status of the features with an up-to-date reference image&lt;/div&gt;</summary>
		<author><name>Memleek</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PinePhone_Pro_Software_State&amp;diff=13063</id>
		<title>PinePhone Pro Software State</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PinePhone_Pro_Software_State&amp;diff=13063"/>
		<updated>2022-05-14T15:47:08Z</updated>

		<summary type="html">&lt;p&gt;Memleek: Update camera status to clarify that an IMX258 driver is in mainline but the rear camera still doesn't workr&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Presently the PinePhone Pro Explorer Edition is aimed at '''Linux developers with an extensive knowledge of embedded systems and/or experience with mobile Linux'''. It will take time for all the PinePhone Pro’s functionality to reach software parity with the original PinePhone and for mobile operating systems, in more general, to reach a higher degree of maturity.&lt;br /&gt;
&lt;br /&gt;
Bear in mind that the software for these smartphones is still in a very early stage, with most of the software being in alpha or beta state. That's especially also the case for scalability of applications, their availability and practicability, any hardware function implementations and the firmware. The software is provided as is. There is no warranty for the software, not even for merchantability or fitness for a particular purpose.&lt;br /&gt;
&lt;br /&gt;
The following table lists the feature functionality status of the unaltered pre-installed factory image of the current shipping batch and as comparison an up-to-date reference image (no responsibility is accepted for the accuracy of this information, the list is provided and updated by the community). If you have any questions regarding the current state of the software or of specific features working, please don't hesitate to ask in the [[Main Page#Community and Support|community chat]] '''before buying the device''':&lt;br /&gt;
&lt;br /&gt;
* Discord: ''#pinephone'' under https://discord.gg/pine64&lt;br /&gt;
* IRC: ''#pinephone'' on ''irc.pine64.org''. Note: please consider Matrix, Discord or Telegram due to the volatile nature of IRC&lt;br /&gt;
* Matrix: https://app.element.io/#/room/#pinephone:matrix.org&lt;br /&gt;
* Telegram: https://t.me/pinephone&lt;br /&gt;
&lt;br /&gt;
{{Hint|The software is '''written by the community''', any contributions towards the community projects are greatly appreciated! Please see &amp;quot;[[How to Contribute]]&amp;quot; to learn about how to contribute to the software projects and &amp;quot;[[Where to Report Bugs]]&amp;quot; to learn about where to report bugs.}}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable plainrowheaders&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Functionality&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; style=&amp;quot;min-width: 260px;&amp;quot;  | Component&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; style=&amp;quot;width: 120px;&amp;quot; | Status (factory)¹&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; style=&amp;quot;width: 120px;&amp;quot; | Status (updated)²&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Notes&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; rowspan=&amp;quot;3&amp;quot; | Bootloader&lt;br /&gt;
| &amp;lt;code&amp;gt;U-Boot&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | Critical bugs&lt;br /&gt;
| Some critical software bugs currently not fixed yet: A drained battery causes U-Boot to bootloop (cause is known and currently being worked on);&amp;lt;sup&amp;gt;[[PinePhone_Pro#The battery is fully drained|Workaround]]&amp;lt;/sup&amp;gt; Occasionally the eMMC fails to initialize&amp;lt;sup&amp;gt;[https://gitlab.com/postmarketOS/pmaports/-/issues/1424 Report]&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;SPI&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | Unfinished&lt;br /&gt;
| SPI memory is currently empty in the Explorer Edition batch, a corrupted installation on the eMMC has a higher boot priority than a fresh microSD card installation, leading to a involved recovery procedure&amp;lt;sup&amp;gt;[https://tow-boot.org/ Planned]&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Boot GUI&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | Not implemented&lt;br /&gt;
| Currently there is no graphical boot selection implemented&amp;lt;sup&amp;gt;[https://tow-boot.org/ Possibly planned]&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; rowspan=&amp;quot;3&amp;quot; | Operating System&lt;br /&gt;
| &amp;lt;code&amp;gt;Stability&amp;lt;/code&amp;gt;&lt;br /&gt;
| style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | Critical bugs&lt;br /&gt;
| style=&amp;quot;background:LightYellow; text-align:center;&amp;quot; | WIP&lt;br /&gt;
| The pre-flashed and outdated operating system on the eMMC often gets corrupted after updating&amp;lt;sup&amp;gt;[https://forum.pine64.org/showthread.php?tid=15950 Example]&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Suspend&amp;lt;/code&amp;gt;&lt;br /&gt;
| style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | Not working&lt;br /&gt;
| style=&amp;quot;background:LightYellow; text-align:center;&amp;quot; | Experimental&lt;br /&gt;
| '''Without suspend the phone will drain very fast!''' Suspend only available in specific more recent images&amp;lt;sup&amp;gt;[https://www.pine64.org/2022/03/15/march-update-introducing-the-quartzpro64/ News]&amp;lt;/sup&amp;gt; Audio is often higher pitched after waking up from suspend due to a bug&amp;lt;sup&amp;gt;[Citation]&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Updates&amp;lt;/code&amp;gt;&lt;br /&gt;
| style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | Critical bugs&lt;br /&gt;
| style=&amp;quot;background:LightYellow; text-align:center;&amp;quot; | WIP&lt;br /&gt;
| The pre-flashed and outdated operating system on the eMMC often gets corrupted after updating&amp;lt;sup&amp;gt;[https://forum.pine64.org/showthread.php?tid=15950 Example]&amp;lt;/sup&amp;gt;; Pacman database lock preventing updates&amp;lt;sup&amp;gt;[https://wiki.archlinux.org/title/pacman#%22Failed_to_init_transaction_(unable_to_lock_database)%22_error Solution]&amp;lt;/sup&amp;gt;; Keyring bug&amp;lt;sup&amp;gt;[Solution is to run &amp;quot;pinephonepro-post-install&amp;quot; script as root]&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; rowspan=&amp;quot;5&amp;quot; | Modem&lt;br /&gt;
| &amp;lt;code&amp;gt;General&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | Critical bugs&lt;br /&gt;
| The modem crashes frequently&amp;lt;sup&amp;gt;[https://gitlab.manjaro.org/manjaro-arm/issues/pinephone/phosh/-/issues/147 Report]&amp;lt;/sup&amp;gt;&amp;lt;sup&amp;gt;[https://gitlab.com/mobian1/devices/eg25-manager/-/issues/15 Report]&amp;lt;/sup&amp;gt;&amp;lt;sup&amp;gt;[https://github.com/Biktorgj/pinephone_modem_sdk Alternative firmware]&amp;lt;/sup&amp;gt;; Slow wakeup&amp;lt;sup&amp;gt;[https://gitlab.com/mobian1/devices/eg25-manager/-/issues/34 Report]&amp;lt;/sup&amp;gt;; Some carriers blocking specific TANs in their network&amp;lt;sup&amp;gt;[[PinePhone Carrier Support]]&amp;lt;/sup&amp;gt;; '''Note:''' Proprietary firmware&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Phone&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightYellow; text-align:center;&amp;quot; | WIP&lt;br /&gt;
| The modem crashes frequently, which can lead to missed calls&amp;lt;sup&amp;gt;[https://gitlab.manjaro.org/manjaro-arm/issues/pinephone/phosh/-/issues/147 Report]&amp;lt;/sup&amp;gt;&amp;lt;sup&amp;gt;[https://gitlab.com/mobian1/devices/eg25-manager/-/issues/15 Report]&amp;lt;/sup&amp;gt;&amp;lt;sup&amp;gt;[https://github.com/Biktorgj/pinephone_modem_sdk Alternative firmware]&amp;lt;/sup&amp;gt;; bad call audio quality&amp;lt;sup&amp;gt;[https://gitlab.manjaro.org/manjaro-arm/issues/pinephone/phosh/-/issues/249 Report]&amp;lt;/sup&amp;gt;;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;SMS&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightGreen; text-align:center;&amp;quot; | Working&lt;br /&gt;
| SMS functionality is expected to work. In certain cases the functionality might be blocked by a clogged modem&amp;lt;sup&amp;gt;[https://gitlab.manjaro.org/manjaro-arm/issues/pinephone/phosh/-/issues/203 Report]&amp;lt;/sup&amp;gt;; Some bugs&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;MMS&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightYellow; text-align:center;&amp;quot; | WIP&lt;br /&gt;
| MMS functionality is integrated into the application &amp;quot;Spacebar&amp;quot;, some bugs remaining and expected&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Push notifications&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | Not implemented&lt;br /&gt;
| Receiving push notifications while the phone is suspended is not implemented&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; rowspan=&amp;quot;12&amp;quot; | Components&lt;br /&gt;
| &amp;lt;code&amp;gt;LCD&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightGreen; text-align:center;&amp;quot; | Working&lt;br /&gt;
| Under certain circumstances it is difficult to wake up the screen&amp;lt;sup&amp;gt;[Citation]&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Touch&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightGreen; text-align:center;&amp;quot; | Working&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Rear camera&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | Not working&lt;br /&gt;
| Driver exists (drivers/media/i2c/imx258.c) but camera does not seem to capture frames&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Front camera&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | Not working&lt;br /&gt;
| Driver (OV8858) not implemented yet, camera not operational&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Camera flash&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:lightgray; text-align:center;&amp;quot; | Untested&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;WiFi&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightGreen; text-align:center;&amp;quot; | Working&lt;br /&gt;
| WiFi is expected to work. Some remaining tasks, such as &amp;quot;monitor mode&amp;quot;. '''Note:''' Proprietary firmware&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Bluetooth&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightYellow; text-align:center;&amp;quot; | WIP&lt;br /&gt;
| Bluetooth not necessarily working for calls yet due to missing audio routing&amp;lt;sup&amp;gt;[Citation]&amp;lt;/sup&amp;gt;; Bluetooth in general dodgy under Pulseaudio.&amp;lt;sup&amp;gt;[https://wiki.archlinux.org/title/bluetooth_headset#Headset_via_Pipewire Info]&amp;lt;/sup&amp;gt; '''Note:''' Proprietary firmware&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;GNSS/GPS&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightYellow; text-align:center;&amp;quot; | WIP&lt;br /&gt;
| aGPS to be implemented&amp;lt;sup&amp;gt;[Citation]&amp;lt;/sup&amp;gt;; long loading times to get a GPS fix&amp;lt;sup&amp;gt;[Citation]&amp;lt;/sup&amp;gt;; No preinstalled application&amp;lt;sup&amp;gt;[Citation]&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Sensors&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:lightgray; text-align:center;&amp;quot; | Untested&lt;br /&gt;
| Status of &amp;quot;3 Axis Magnetometer&amp;quot; &amp;lt;sup&amp;gt;[Citation]&amp;lt;/sup&amp;gt;, &amp;quot;Geo Magnetic Sensor&amp;quot; &amp;lt;sup&amp;gt;[Citation]&amp;lt;/sup&amp;gt;, &amp;quot;Ambient light / Proximity&amp;quot; &amp;lt;sup&amp;gt;[Citation]&amp;lt;/sup&amp;gt;, &amp;quot;Accelerometer / Gyroscope&amp;quot; &amp;lt;sup&amp;gt;[Citation]&amp;lt;/sup&amp;gt; is Untested.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Vibration motor&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightGreen; text-align:center;&amp;quot; | Working&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Notification LED&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:lightgray; text-align:center;&amp;quot; | Untested&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Buttons&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightGreen; text-align:center;&amp;quot; | Working&lt;br /&gt;
| Power buttons and volume buttons are working.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; rowspan=&amp;quot;5&amp;quot; | Accessory compatibility, spare parts&lt;br /&gt;
| &amp;lt;code&amp;gt;Keyboard Add-on&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | WIP and critical hardware issue&lt;br /&gt;
| The keyboard add-on compatibility is work-in-progress. '''Hardware issue: USB-C port of the phone must not be used while the current keyboard revision is connected'''&amp;lt;sup&amp;gt;[[PinePhone_(Pro)_Keyboard#Safety|Warning]]&amp;lt;/sup&amp;gt;; Top row symbols not implemented as designed&amp;lt;sup&amp;gt;[Citation]&amp;lt;/sup&amp;gt;; Keyboard hot-plugging not supported&amp;lt;sup&amp;gt;[Citation]&amp;lt;/sup&amp;gt;; Battery state not exposed in the pre-flashed operating system state&amp;lt;sup&amp;gt;[Citation]&amp;lt;/sup&amp;gt;; general driver bugs&amp;lt;sup&amp;gt;[Citation]&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;LoRa Add-on&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | Not implemented&lt;br /&gt;
| No software support implemented&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Qi Wireless Charging Add-on&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightYellow; text-align:center;&amp;quot; | WIP&lt;br /&gt;
| Wireless charging with the add-on case is expected to work to some degree. Certain software functionality and a driver is currently missing&amp;lt;sup&amp;gt;[Citation]&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Fingerprint Reader Add-on&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | Not implemented&lt;br /&gt;
| No software support implemented&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Spare parts&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:lightcoral; text-align:center;&amp;quot; | Not available yet&lt;br /&gt;
| Spare parts currently not available yet in the store.&amp;lt;sup&amp;gt;[https://pine64.com/product-category/smartphone-spare-parts/ Store]&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; rowspan=&amp;quot;1&amp;quot; | Software notes&lt;br /&gt;
| &amp;lt;code&amp;gt;Waydroid&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background:LightYellow; text-align:center;&amp;quot; | Software rendering only&lt;br /&gt;
| Waydroid is an Android container used to run Android applications. Currently can only be started using software rendering due to a bug&amp;lt;sup&amp;gt;[https://github.com/waydroid/waydroid/issues/291 Report]&amp;lt;/sup&amp;gt;&amp;lt;sup&amp;gt;[https://gitlab.freedesktop.org/mesa/mesa/-/issues/5928 Report]&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
¹ Status of the features at the time of the last factory installation without updates&lt;br /&gt;
&lt;br /&gt;
² Status of the features with an up-to-date reference image&lt;/div&gt;</summary>
		<author><name>Memleek</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PinePhone_FAQ&amp;diff=9178</id>
		<title>PinePhone FAQ</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PinePhone_FAQ&amp;diff=9178"/>
		<updated>2021-02-10T17:25:45Z</updated>

		<summary type="html">&lt;p&gt;Memleek: /* I want a replacement battery, which one should I buy? */ Clarify battery compatibility.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A list of frequently asked question.&lt;br /&gt;
&lt;br /&gt;
== Hardware ==&lt;br /&gt;
&lt;br /&gt;
=== Revisions ===&lt;br /&gt;
==== What are Community Editions? ====&lt;br /&gt;
Community Editions of the PinePhone are special versions which comes preinstalled with the operating system of the partner project and features the logo of this project on the back panel. The Community Edition is intended to help partner projects developing these systems: &amp;quot;Community editions are meant to bring exposure to partner-projects operating systems and communities, as well as help finance ongoing development.&amp;quot;, [https://www.pine64.org/2020/04/02/pinephone-ubports-community-edition-pre-orders-now-open/ source].&lt;br /&gt;
&lt;br /&gt;
==== Is the Community Edition the latest revision? ====&lt;br /&gt;
Yes, they are! The Community Edition PinePhones are the latest versions of the PinePhone, featuring the mainboard numbers 1.2 through 1.2b and branded back covers. The only difference between each Community Edition is the inclusion of crucial bug fixes, with the last issue being fixed with the 1.2b motherboard shipping with the Manjaro CE PinePhones. Aside from the back cover, the only other difference is that starting with the postmarketOS edition PinePhone, a convergence package option was released that adds another gigabyte of ram to the phone and a 32GB eMMC instead of a 16GB eMMC. Convergence packages also included a dock for plugging in USB peripherals and connecting to a HDMI monitor, however you can purchase a generic USB-C dock to use with a 2GB PinePhone. The predecessor to the Convergence Edition PinePhones was the Braveheart Edition intended for developers to bring up the platform, which had the version number 1.1. For more details about the topic see [[PinePhone#Hardware Revisions]].&lt;br /&gt;
&lt;br /&gt;
There is currently no plans for further hardware changes beyond the mainboard 1.2b which shipped with the Manjaro CE.&lt;br /&gt;
&lt;br /&gt;
==== Will there be other Community Editions? ====&lt;br /&gt;
Five Community Editions have been announced: [https://www.pine64.org/2020/04/02/pinephone-ubports-community-edition-pre-orders-now-open/ UBports], [https://www.pine64.org/2020/06/15/june-update-postmarketos-ce-pinephone-shipping-pine64-cluster/ postmarketOS], [https://www.pine64.org/2020/08/31/pinephone-manjaro-community-edition/ Manjaro], [https://www.pine64.org/2020/12/01/kde-community-edition-is-now-available/ KDE], and [https://www.pine64.org/2021/01/17/mobian-community-edition/ Mobian]. At this time no further Community Editions are expected. Pine64 is intending to transition to the release of retail units with partners.&lt;br /&gt;
&lt;br /&gt;
==== In simple terms, what are the differences between Braveheart and the new Community Edition? ====&lt;br /&gt;
The Braveheart PinePhone was the first public revision of the PinePhone which was intended solely for developers and Linux enthusiasts. The Ubports Community Edition was the next revision of the PinePhone with an updated mainboard based on feedback from the Braveheart Edition, see [[PinePhone#Hardware Revisions]]. All current revisions of the PinePhone continue to be intended for developers and enthusiasts, however Pine64 will be starting to offer partnered retail units of the PinePhone in 2021 which will have a better warranty and technical support (keep in mind even then it is not intended for a broader audience at this time, as the software still needs work and the hardware does not hold up well to modern consumer standards).&lt;br /&gt;
&lt;br /&gt;
==== Will there be a newer revision after the Community Editions? ====&lt;br /&gt;
It is highly unlikely (unless major issues are found in the latest revision). Starting with the Ubports Community Edition the PinePhone has gotten CE and FCC certifications, repeating the certification process due to changes in the hardware design is very expensive, so the Community Edition(s) are viewed as the final revision besides critical fixes.&lt;br /&gt;
&lt;br /&gt;
The Community Edition PinePhones (and parts for them) will be produced and sold for at least 5 years. There are ideas for a newer PinePhone with updated hardware, however this is multiple years away and there is no solid plan for it yet (3-5 years).&lt;br /&gt;
&lt;br /&gt;
==== Will there be hardware differences between the Community Editions? ====&lt;br /&gt;
&lt;br /&gt;
Besides the varied back covers, starting with the launch of the PostmarketOS CE there has been the release of a convergence package option for the PinePhone which includes more ram and storage, and a included dock for convenience. There has also been multiple hardware changes starting with the Ubports CE (mainboard 1.2) and ending with the Manjaro CE (mainboard 1.2b). There is currently no plans for future hardware changes for a few years.&lt;br /&gt;
&lt;br /&gt;
==== How powerful is the PinePhone's hardware? ====&lt;br /&gt;
&lt;br /&gt;
The PinePhone is about on par with a Raspberry Pi 3 in terms of CPU power, however going by GFLOPS it has half the GPU power. The Pi 3's Videocore IV does 24 GFLOPS, and the Mali 400 MP2 on the PinePhone only 10.8.&lt;br /&gt;
&lt;br /&gt;
Despite this, using software rendering the PinePhone is capable of smoothly rendering at 1080p resolution or higher. However, with a fully GPU-accelerated mobile environment you should expect a more sluggish experience outputting to such resolutions. Unfortunately the Mali 400 MP2 (a 2008 arm mobile GPU) simply isn't intended to push 1080p resolution. With that said, the VPU of the PinePhone has been shown to handle smooth H.264 1440p30 video playback using Cedrus and gstreamer as documented [https://xnux.eu/log/#001 here]. Further, the PinePhone should be more than capable of a smooth phone experience when used in conjunction with well optimized software that makes use of its hardware features. It is also more than capable of running many light games (including 3D ones such as Supertuxkart), and retro gaming. Expect further speed improvements over time as the drivers are improved, and in the meanwhile you can look into slightly [[overclocking]] the device (at your own risk).&lt;br /&gt;
&lt;br /&gt;
=== Sound ===&lt;br /&gt;
=== Modem ===&lt;br /&gt;
&lt;br /&gt;
==== The modem isn't working ====&lt;br /&gt;
&lt;br /&gt;
In order to use the modem and WiFi/Bluetooth, you need to ensure the battery is inside the device and has a sufficient charge. Even when supplying the phone with enough power, the modem and WiFi chip will not work without a connected battery. Further, double check that you have no put the SD card into the sim card slot, or vice versa.&lt;br /&gt;
&lt;br /&gt;
==== Does the PinePhone only wakeup from sleep for calls and texts? ====&lt;br /&gt;
&lt;br /&gt;
Yes. Unless the PinePhone is configured to wakeup every few minutes from deep sleep in crust (At the cost of battery life. However, in the future there may be other solutions), then there is not any way to get any notifications for applications. The modem on the PinePhone will wake the device for incoming calls and texts however, and the real time clock is also capable of waking the device for alarms.&lt;br /&gt;
&lt;br /&gt;
=== Battery ===&lt;br /&gt;
&lt;br /&gt;
==== The battery is stuck inside the phone ====&lt;br /&gt;
&lt;br /&gt;
The battery can be stuck in the phone if the screws of the frame are overtightened.&lt;br /&gt;
&lt;br /&gt;
If your battery is stuck inside the PinePhone, grab a screw driver and completely unscrew all the screws of the midframe. Then pull out the battery (you may have to fully take off the midframe in some cases to get it out). And then rescrew the midframe, but only tighten the screws to the point where they are just barely tight to hold. This should allow you to remove the battery easily.&lt;br /&gt;
&lt;br /&gt;
==== The battery is discharging while the phone is powered off (Braveheart Edition) ====&lt;br /&gt;
&lt;br /&gt;
The issue is not present on the Community Edition. Due to a hardware bug, after poweroff, the phone still consumes 20–30mA which drains the battery in 3-4 days. A manual procedure to fix the hardware bug is described [https://xnux.eu/devices/pp-pmic-fix.jpg here].&lt;br /&gt;
&lt;br /&gt;
=== Kill Switches ===&lt;br /&gt;
==== What are the kill switches doing? ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Number&lt;br /&gt;
! Name&lt;br /&gt;
! Explanation&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Modem&lt;br /&gt;
| Pulls Q1501 gate up (FET killing modem power)&lt;br /&gt;
| &amp;quot;On&amp;quot; enables 2G/3G/4G communication and GNSS hardware, &amp;quot;off&amp;quot; disables it.&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| WiFi / Bluetooth&lt;br /&gt;
| Pulls up CHIP_EN&lt;br /&gt;
| &amp;quot;On&amp;quot; enables WiFi and Bluetooth communication hardware, &amp;quot;off&amp;quot; disables it.&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| Microphone&lt;br /&gt;
| Breaks microphone bias voltage from the SoC&lt;br /&gt;
| &amp;quot;On&amp;quot; enables audio input from on-board microphones (not 3.5mm jack), &amp;quot;off&amp;quot; disables it.&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| Rear camera&lt;br /&gt;
| Pulls up PWDN on OV5640 &lt;br /&gt;
| &amp;quot;On&amp;quot; enables the rear camera, &amp;quot;off&amp;quot; disables it.&lt;br /&gt;
|-&lt;br /&gt;
| 5&lt;br /&gt;
| Front camera&lt;br /&gt;
| Pulls up PWDN on GC2145&lt;br /&gt;
| &amp;quot;On&amp;quot; enables the front camera, &amp;quot;off&amp;quot; disables it.&lt;br /&gt;
|-&lt;br /&gt;
| 6&lt;br /&gt;
| Headphone&lt;br /&gt;
| Pulls up IN2 on analog switch BCT4717ETB&lt;br /&gt;
| &amp;quot;On&amp;quot; enables audio input and output via the 3.5mm audio jack, &amp;quot;off&amp;quot; switches the jack to hardware UART mode.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Memory ===&lt;br /&gt;
&lt;br /&gt;
==== What's the speed difference between the eMMC and SD cards? ====&lt;br /&gt;
Maximum transfer speed of the eMMC is around 85 MB/s, while SD cards are limited to approximately 23 MB/s (even with faster cards).&lt;br /&gt;
&lt;br /&gt;
=== GPS ===&lt;br /&gt;
&lt;br /&gt;
==== GPS doesn't work ====&lt;br /&gt;
&lt;br /&gt;
Like almost all smartphones, the PinePhone GPS antenna is small and can only get a first fix unassisted if the GPS signal is very strong. To make first fix faster and more reliable, phones download assistance data either from the phone network or from the internet. The GPS in the PinePhone modem supports the internet based assistance method, as detailed in the modem documentation, but this isn't yet supported out of the box by any of the distros. There is a [https://gist.github.com/alastair-dm/263209b54d01209be28828e555fa6628 proof of concept script] to show that it can work.&lt;br /&gt;
&lt;br /&gt;
Until AGPS support makes its way into the distros you'll have to make some manual changes - see for example [https://wiki.mobian-project.org/doku.php?id=location Mobian wiki]&lt;br /&gt;
&lt;br /&gt;
===== Broken hardware? =====&lt;br /&gt;
&lt;br /&gt;
One or two people have reported no signal from any satellites, whether using the AGPS proof of concept script or not. This suggests a problem with the antenna, as even without AGPS it is normal for the system to detect the presence of a signal from satellites, even when it's too weak to get a first fix.&lt;br /&gt;
&lt;br /&gt;
== Software ==&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
&lt;br /&gt;
==== How can I install an operating system on the SD card / eMMC? ====&lt;br /&gt;
&lt;br /&gt;
See [[PinePhone Installation Instructions]].&lt;br /&gt;
&lt;br /&gt;
=== Updating ===&lt;br /&gt;
&lt;br /&gt;
Read the [[PinePhone Updating Instructions]].&lt;br /&gt;
&lt;br /&gt;
=== Booting ===&lt;br /&gt;
&lt;br /&gt;
==== What's the boot order for SD cards and eMMC? ====&lt;br /&gt;
&lt;br /&gt;
The PinePhone will automatically boot from microSD if a bootable card is inserted. If no (bootable) microSD is found, it will boot from eMMC.&lt;br /&gt;
&lt;br /&gt;
==== How can I select different OSes at boot? ====&lt;br /&gt;
&lt;br /&gt;
There is a project by Danct12 which allows the user to select different OSes at boot, the software is currently work-in-progress: https://github.com/dreemurrs-embedded/Pineloader.&lt;br /&gt;
&lt;br /&gt;
==== I turned on my Manjaro CE PinePhone. The red LED and screen backlight are briefly lit, then both are not and it will not boot. ====&lt;br /&gt;
&lt;br /&gt;
This can be the result of at least one situation:&lt;br /&gt;
&lt;br /&gt;
# The eMMC installation became corrupt or otherwise unbootable&lt;br /&gt;
# An SD card is present but not bootable (consider [[PinePhone#Detailed usage instructions]])&lt;br /&gt;
&lt;br /&gt;
If there is an installation of Manjaro on both the eMMC &amp;amp; an SD card, the SD card will always boot first on the device. Try taking the SD card out and booting the installation that is on the eMMC. If the problem persists, it is likely there is an issue with both installations and you will need to reinstall your distribution. You may also want to check with your distribution's maintainers if boot issues are a common problem in a recent update.&lt;br /&gt;
&lt;br /&gt;
====  I did not install an update in Ubuntu Touch and I'm stuck on the Pine64 logo after rebooting. ====&lt;br /&gt;
&lt;br /&gt;
# Use a USB A-C cable to plug your phone into your PC&lt;br /&gt;
# Hold the PinePhone's power button for 4 seconds or more to power it off.&lt;br /&gt;
# Wait 5 seconds&lt;br /&gt;
# Hold the Volume Up and Power buttons on the PinePhone to boot into recovery. You should see the LED light red, then yellow, then green. The &amp;quot;Installing update&amp;quot; screen will appear, but a progress bar to indicate update progress will not. Ignore the &amp;quot;Installing update&amp;quot; part.&lt;br /&gt;
# Your PC may automatically mount the PinePhone's partitions. If it does, Safely Remove or Eject all of them.&lt;br /&gt;
# Open a terminal on your PC. Type &amp;lt;code&amp;gt;telnet 172.16.42.1&amp;lt;/code&amp;gt;&lt;br /&gt;
# You should receive the text 'Welcome to Rescue SD Shell!'&lt;br /&gt;
# In the new Rescue SD shell, type &amp;lt;code&amp;gt;umount /dev/mmcblk2p10; e2fsck -fy /dev/mmcblk2p10 &amp;amp;&amp;amp; sync&amp;lt;/code&amp;gt;&lt;br /&gt;
# Once this command pipeline finishes, type &amp;lt;code&amp;gt;sync &amp;amp;&amp;amp; reboot -f&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Your PinePhone should reboot into Ubuntu Touch. Now head to Settings -&amp;gt; Updates and install the new update! &lt;br /&gt;
&lt;br /&gt;
If these steps did not solve your issue, please create a new thread here on the Pine64 forums, note what the problem looks like, then say that you've tried these steps already.&lt;br /&gt;
&lt;br /&gt;
This is caused by corruption on the userdata partition. Normally this should be fixed by 'e2fsck' in the initramfs, however an error in image creation means that that version of e2fsck is unable to correct corruption. This has been fixed in all new PinePhone updates, so if you update from the factory image to any other image available to the PinePhone now, you will not experience this issue any longer.&lt;br /&gt;
&lt;br /&gt;
==== I turned on my PinePhone running Ubuntu Touch. The red LED is lit and it will not boot. ====&lt;br /&gt;
# Hold the power button until the light turns off&lt;br /&gt;
# Hold the power button until the light turns on&lt;br /&gt;
&lt;br /&gt;
You may need to repeat these steps more than once.&lt;br /&gt;
&lt;br /&gt;
This is caused by u-boot apparently trying to use the eMMC before it is ready. We are not entirely sure why this occurs yet.&lt;br /&gt;
&lt;br /&gt;
==== Can I install a different OS on my Community Edition? ====&lt;br /&gt;
&lt;br /&gt;
Yes! While all of the Community Edition Pinephones come with an OS preinstalled, you are free to use any OS on the integrated storage (the eMMC) or an SD card, see [[PinePhone Installation Instructions]] and [[PinePhone Software Releases]] on how to install them.&lt;br /&gt;
&lt;br /&gt;
=== Other ===&lt;br /&gt;
&lt;br /&gt;
==== How can I enable SSH? ====&lt;br /&gt;
&lt;br /&gt;
In Ubuntu Touch you can run &amp;quot;sudo start ssh&amp;quot; to get a one-time start, or edit /etc/init/ssh.override and remove the manual line to make it auto-start.&lt;br /&gt;
&lt;br /&gt;
In other distributions you may have to install ssh through its package manager and then proceed to use its init system to enable it. For Manjaro, Arch, and Mobian you can use &amp;quot;systemctl enable&amp;quot; and &amp;quot;systemctl start&amp;quot; command to enable and start ssh.&lt;br /&gt;
&lt;br /&gt;
==== What works, what doesn't? ====&lt;br /&gt;
&lt;br /&gt;
For Ubuntu Touch see https://gitlab.com/ubports/community-ports/pinephone#what-works-what-doesnt.&lt;br /&gt;
&lt;br /&gt;
Other distributions will have different levels of functionality. Please refer to the release page of your chosen distribution for further information.&lt;br /&gt;
&lt;br /&gt;
====  I can't connect to a 2.4Ghz Wi-Fi network in Ubuntu Touch. ====&lt;br /&gt;
&lt;br /&gt;
Reboot your device by holding the power button until the &amp;quot;Power&amp;quot; dialog appears, then pressing &amp;quot;Restart&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
If that does not fix the issue, note that all the following conditions must be met to use WiFi on the PinePhone:&lt;br /&gt;
&lt;br /&gt;
# The plastic tab between the battery and the device's battery contacts has been removed&lt;br /&gt;
# The battery is installed&lt;br /&gt;
# The WiFi killswitch, #2, on the rear of the device is switched &amp;quot;ON&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Wi-Fi in the PinePhone only seems stable after a warm reboot like this.&lt;br /&gt;
&lt;br /&gt;
==== What's the status of Android for the PinePhone? ====&lt;br /&gt;
&lt;br /&gt;
Currently, there isn't any major push to get Android running well on the PinePhone. The developer Icenowy did get a Android image to run and partly work, it was however slow and buggy, with major functions not working. A solution for running some of your android apps may be found in Anbox as of now. Anbox is currently not included in Ubuntu Touch. In other distributions your millage may vary on what applications will run and how well.&lt;br /&gt;
&lt;br /&gt;
==== Why are my apps loading slower than on my Android phone? ====&lt;br /&gt;
&lt;br /&gt;
Android has multiple techniques in place to speed up launching applications after the first launch, such as the &amp;quot;Dalvik cache&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Using a alternative filesystem such as F2FS on the eMMC (which is considerably faster than running software on the SD card) may help improve performance slightly. Over time you can expect further optimizations and improvements in various distributions that will help speed up the PinePhone.&lt;br /&gt;
&lt;br /&gt;
=== SMS ===&lt;br /&gt;
&lt;br /&gt;
==== The phone does not receive SMS ====&lt;br /&gt;
&lt;br /&gt;
Sometimes incoming SMS messages are not being received, but outgoing ones, phone calls and data are working fine. One potential cause could be SMS messages that linger in the modem's queue (10 or more of them). This queue appears to be persistent across reboots and also re-imaging the OS.&lt;br /&gt;
&lt;br /&gt;
On Mobian and Manjaro, the ModemManager does all of the communications with the 3G modem including phone calls, cellular data, GPS and SMS. This may not be the case with other PinePhone OSes.&lt;br /&gt;
&lt;br /&gt;
You can access the ModemManager using the mmcli command.&lt;br /&gt;
&lt;br /&gt;
'''Mobian:'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;$ sudo mmcli -m 0 --messaging-list-sms&lt;br /&gt;
Found 10 SMS messages:&lt;br /&gt;
/org/freedesktop/ModemManager1/SMS/0 (received)&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Manjaro:'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;$ sudo mmcli -m 3 --messaging-list-sms&lt;br /&gt;
/org/freedesktop/ModemManager1/SMS/77 (received)&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For Mobian, delete all of the messages like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;$ sudo mmcli -m 0 --messaging-delete-sms=1&amp;lt;/code&amp;gt; (Repeat with 1 through 10 to delete all of the messages)&lt;br /&gt;
&lt;br /&gt;
For Manjaro, delete all of the messages like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;$ sudo mmcli -m 3 --messaging-delete-sms=77&amp;lt;/code&amp;gt; (Repeat with all listed messages)&lt;br /&gt;
&lt;br /&gt;
Note that the &amp;quot;-m 0&amp;quot; or &amp;quot;-m 3&amp;quot; refers to modem 0 or 3 (the only one in a PinePhone). For more help on the messaging related actions available in mmcli you can check the help with &amp;lt;code&amp;gt;mmcli --help-messaging.&amp;lt;/code&amp;gt; This article is also helpful in learning: https://electronproton.com/mmcli-command-examples/. For your particular configuration, you may need to try different &amp;quot;-m #&amp;quot; combinations, e.g., &amp;quot;-m 2&amp;quot; or &amp;quot;-m 4.&amp;quot; &amp;quot;-m 0&amp;quot; is not always the default.&lt;br /&gt;
&lt;br /&gt;
It should also be noted that recent releases of Mobian and postmarketOS now include a userspace daemon called [https://gitlab.com/mobian1/devices/eg25-manager eg25-manager], which helps manage the modem and ensure proper operation.&lt;br /&gt;
&lt;br /&gt;
== Shipping ==&lt;br /&gt;
=== I did not receive an order confirmation ===&lt;br /&gt;
Check your &amp;quot;spam&amp;quot; folder. It was reported that some users did not receive an order confirmation. You will also still get a shipping notification when the device ships out, even if you didn't get a order confirmation email.&lt;br /&gt;
&lt;br /&gt;
=== When does the phone ship? ===&lt;br /&gt;
For up-to-date information when the phone's shipping date is estimated, see the edits in this forum post: https://forum.pine64.org/showthread.php?tid=9942.&lt;br /&gt;
&lt;br /&gt;
=== It is shipping day but I did not receive a shipping notification ===&lt;br /&gt;
For shipments with DHL the shipping notification is sent out as soon as the packet reached DHL's warehouse and scanned (it can take up to 24 hours after scanning after the shipment is added to DHL's database). For all other shipments (via Ascendia) the notification is sent out sometime after shipment.&lt;br /&gt;
&lt;br /&gt;
=== When does my phone ship if I order now? ===&lt;br /&gt;
Orders made after Friday, 22nd May 2020 are shipped after the first bulk of pre-orders has been shipped. The exact date is not known yet due to various reasons, it may be a few weeks after the first bulk shipped. [https://forum.pine64.org/showthread.php?tid=9942 The forum] will be edited with updated information and you will receive a shipping notification when the device was shipped.&lt;br /&gt;
&lt;br /&gt;
=== What about import taxes? ===&lt;br /&gt;
Import taxes have to be payed by the buyer depending on the jurisdiction of the country of the buyer. Please check with your local laws if there are import taxes to pay and if so how to do the tax filing.&lt;br /&gt;
&lt;br /&gt;
== Accessories ==&lt;br /&gt;
&lt;br /&gt;
=== Protection ===&lt;br /&gt;
==== Which screen protector should i use? ====&lt;br /&gt;
&lt;br /&gt;
Protecting your screen is important, especially for devices like the PinePhone that doesn't have access to the newest glass technology.&lt;br /&gt;
The Braveheart and Community Editions of the PinePhone comes with a plastic film screen protector installed, and Pine64 sells a tempered glass screen protector [https://pine64.com/product/pinephone-tempered-glass-screen-protector/ in their store].&lt;br /&gt;
&lt;br /&gt;
You can also buy a third party screen protector, as the screen protectors for the iPhone 11 Pro Max/XS Max fit the PinePhone pretty well based on [https://forum.pine64.org/showthread.php?tid=8458&amp;amp;pid=65409#pid65409 this] forum post.&lt;br /&gt;
&lt;br /&gt;
=== Batteries ===&lt;br /&gt;
==== I want a replacement battery, which one should I buy? ====&lt;br /&gt;
&lt;br /&gt;
Replacement batteries for US customers are available in the store.&lt;br /&gt;
&lt;br /&gt;
Currently the PinePhone battery is known to be compatible with replacement batteries for the Samsung J700. Specifically, models &amp;quot;EB-BJ700BBC&amp;quot; and &amp;quot;EB-BJ700BBE&amp;quot; are compatible with all PinePhone models, and &amp;quot;EB-BJ700CBE&amp;quot; is compatible with Community Editions [https://www.reddit.com/r/PINE64official/comments/kcof97/pinephone_replacement_battery_found_and_tested/gfrx4p2/?utm_source=reddit&amp;amp;utm_medium=web2x&amp;amp;context=3 after UBPorts] (due to plastic tabs on its bottom which only the newer phones [https://forum.pine64.org/showthread.php?tid=11901 have tolerance for]).&lt;br /&gt;
&lt;br /&gt;
=== External hardware ===&lt;br /&gt;
&lt;br /&gt;
==== Will Pine64 sell other addons made for the PinePhone? ====&lt;br /&gt;
&lt;br /&gt;
Yes, currently there is a keyboard case [https://forum.pine64.org/showthread.php?tid=8537&amp;amp;pid=55396#pid55396 with similarities to the Psion 5] which includes an internal battery, and a [https://www.pine64.org/2020/05/15/may-update-pinetab-pre-orders-pinephone-qi-charging-more/ Qi wireless charging] add-on planned, both of which Pine64 intends to directly sell. There is the potential for future add-ons such as a game pad, however that is currently just an idea and not in any way planned.&lt;br /&gt;
&lt;br /&gt;
==== Which 3rd party hardware can connect to my PinePhone? ====&lt;br /&gt;
&lt;br /&gt;
See [[PinePhone Hardware Accessory Compatibility]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:PinePhone]]&lt;/div&gt;</summary>
		<author><name>Memleek</name></author>
	</entry>
</feed>