Surface Pro 3 - Logcats, Dmesg Output, iio sensors - Help Appreciated

970 views
Skip to first unread message

Matt Parnell

unread,
Jun 18, 2015, 10:04:20 PM6/18/15
to andro...@googlegroups.com
I'm still somewhat new to developing with Android, but the Surface Pro 3 only has a few usability issues preventing it from being near complete as far as this project is concerned. The first is the requirement of the kernel patches I have mentioned in another discussion, I believe Chi-Wei was investigating those. 4.1 includes some but not all of them.

I am running my own x86_64 builds using the appropriate patches against a 4.0 kernel. Could some of you who are more experienced here take a look and educate me, or point me to code changes/examples to get the rest of this working, please?

One interesting note is that if I use the debug boot item, I cannot boot as the type cover keeps disconnect and reconnecting in the console, or at least, some of the devices inside of it do.

Sensors output (from Linux, using an iio service for systemd - github.com/hadess/iio-sensor-proxy ):
    • Could someone please tell me how to get those sensors working under Android? I believe the magnetometer is used to detect if the type cover/keyboard is attached or not, which may relate to the crash when it is removed or reconnected to the device
    • The NTRIG devices are related to the bluetooth pen, which I believe we should be able to also get working, since I think some examples of pressure sensitive pens are out there
dmesg (android):
  • http://pastebin.com/raw.php?i=e0gmP91R
    • note the i2c issues and others - there's an LKML topic about the i2c errors, and it implies they aren't truly fatal
    • audio devices are detected, but I get no sound output on my builds...older kernels had working audio
    • DRM is loaded but opengl is null under the tablet information tab

Logcat, with the keyboard disconnect/reconnect crash:

  • http://pastebin.com/raw.php?i=fzgSabgV
  • Halp! I have no idea what I'm doing yet, especially with Android and it's codebase, as I'm more of a vanilla Linux person at the moment. I really want to learn and help and get this thing working!


Thanks everyone!



Chih-Wei Huang

unread,
Jun 19, 2015, 8:50:03 PM6/19/15
to Android-x86

2015-06-19 10:04 GMT+08:00 Matt Parnell <mpar...@gmail.com>:
> I'm still somewhat new to developing with Android, but the Surface Pro 3
> only has a few usability issues preventing it from being near complete as
> far as this project is concerned. The first is the requirement of the kernel
> patches I have mentioned in another discussion, I believe Chi-Wei was
> investigating those. 4.1 includes some but not all of them.

Sorry. I'm too busy to follow it recently.
Could you put the patches you applied in a
git repository so people can check them easier?

> I am running my own x86_64 builds using the appropriate patches against a
> 4.0 kernel. Could some of you who are more experienced here take a look and
> educate me, or point me to code changes/examples to get the rest of this
> working, please?
>
> One interesting note is that if I use the debug boot item, I cannot boot as
> the type cover keeps disconnect and reconnecting in the console, or at
> least, some of the devices inside of it do.
>
> Sensors output (from Linux, using an iio service for systemd -
> github.com/hadess/iio-sensor-proxy ):
>
> http://pastebin.com/raw.php?i=Jf2MX3Kt
>
> Could someone please tell me how to get those sensors working under Android?

I've published the iio sensor hal last week.
Haven't you tried it?

> audio devices are detected, but I get no sound output on my builds...older
> kernels had working audio

Does audio work on a normal Linux distribution?
If yes, save the alsa state and put it to android -x86.

> DRM is loaded but opengl is null under the tablet information tab

A known issue.

--
Chih-Wei
Android-x86 project
http://www.android-x86.org

Matt Parnell

unread,
Jun 20, 2015, 12:32:29 AM6/20/15
to andro...@googlegroups.com
I can just upload my kernel tree to github if that's easier? No need to apologise.

For the iio sensors - I just need to learn how to properly setup the devices - I'm not super comfortable with hardware level code, as far as writing it from the ground up.

The audio does work for me but I need to update the kernel to the same or greater version before I can try this.

--
You received this message because you are subscribed to a topic in the Google Groups "Android-x86" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/android-x86/q-B7lrRzeiM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to android-x86...@googlegroups.com.
To post to this group, send email to andro...@googlegroups.com.
Visit this group at http://groups.google.com/group/android-x86.
For more options, visit https://groups.google.com/d/optout.

Chih-Wei Huang

unread,
Jun 20, 2015, 4:47:34 AM6/20/15
to Android-x86
2015-06-20 12:32 GMT+08:00 Matt Parnell <mpar...@gmail.com>:
> I can just upload my kernel tree to github if that's easier? No need to
> apologise.

Yes, that's exactly what I want.

> For the iio sensors - I just need to learn how to properly setup the devices
> - I'm not super comfortable with hardware level code, as far as writing it
> from the ground up.

You don't need to setup it.
The code is supposed to detect your sensor
and work properly.
If not, provide some debug information as I said.

So just test it and report the result.

> The audio does work for me but I need to update the kernel to the same or
> greater version before I can try this.

Which version?

Matt Parnell

unread,
Jun 20, 2015, 8:45:48 PM6/20/15
to andro...@googlegroups.com
The repo is pushing right now to the location below. The android-4.0 branch is a fork of the vanilla Android-x86 kernel, only with the config and patches required for the SP3 to work. We may need to spit separate configs for the SP3 as a result of the two kernel modules that need built in (see git log). Also currently broken is support for the Japanese keyboard cover, which has also been removed in another commit.

https://github.com/ilikenwf/android_kernel_ms_surfacepro3

I didn't realize I don't need to set anything up. That said the code does not detect the sensors. The kernel obviously does, but I believe the triggers and values are different with the Surface sensors. Other than the pastebin debug output, I'll post the required information per your IIO thread when time permits me to do so (so, shortly, within the coming hours).

Interestingly the mouse input for the NTRIG pen works, and shows a cursor when used, but I am unsure if the pressure sensitivity and bluetooth connection are supported. While the pen shows a mouse cursor, the multitouch touchpad shows a circle.

For the working audio, kernel 3.18 and 3.19 worked correctly if I recall. The Surface Pro 3 uses the Realtek HD audio module.

Matt Parnell

unread,
Jun 20, 2015, 9:02:21 PM6/20/15
to andro...@googlegroups.com
Please see the attached iio related (and modprobe) output. Please note I also included the triggers as they may be important as well.
iio.txt
iio2.txt
iio3.txt
lsmod.txt
trigger.txt

Chih-Wei Huang

unread,
Jun 21, 2015, 12:55:43 AM6/21/15
to Android-x86
2015-06-21 9:02 GMT+08:00 Matt Parnell <mpar...@gmail.com>:
> Please see the attached iio related (and modprobe) output. Please note I
> also included the triggers as they may be important as well.

From lsmod.txt your module is hid_sensor_accel_3d
which is already supported by Intel's HID sensor hal.

First, check if you have the property set correctly:
(should be done by /etc/init.sh)

hal.sensors=hsb (for kitkat-x86)
ro.hardware.sensors=hsb (for lollipop-x86)

(which android-x86 version did you test?)

If yes, check the logcat and
adb shell dumpsys sensorservice

Chih-Wei Huang

unread,
Jun 21, 2015, 12:01:19 PM6/21/15
to Android-x86
2015-06-21 8:45 GMT+08:00 Matt Parnell <mpar...@gmail.com>:
> The repo is pushing right now to the location below. The android-4.0 branch
> is a fork of the vanilla Android-x86 kernel, only with the config and
> patches required for the SP3 to work. We may need to spit separate configs
> for the SP3 as a result of the two kernel modules that need built in (see
> git log). Also currently broken is support for the Japanese keyboard cover,
> which has also been removed in another commit.
>
> https://github.com/ilikenwf/android_kernel_ms_surfacepro3

Thank you. I read the four patches.
I have no problem about the camera and buttons patches.
However, I have a little concern about the battery and sleep
patches since they affect all devices.

Have these patches be sent to lkml and
reviewed by kernel developers?

Chih-Wei Huang

unread,
Jun 22, 2015, 2:48:13 AM6/22/15
to Android-x86
OK, I found the two patches in vanilla kernel 4.1.
I cherry-pick them to our android-4.0 branch.
The camera and buttons patches are also applied.
Thank you for the contribution.

Matt Parnell

unread,
Jun 22, 2015, 10:33:23 AM6/22/15
to andro...@googlegroups.com
Yes, you beat me to explaining that the battery and ...I forget which other have already been committed upstream.

Next I have to investigate getting sensors working, and determining why the UI crashes sometimes when the keyboard is added or removed.



rbg

unread,
Jun 22, 2015, 8:48:15 PM6/22/15
to andro...@googlegroups.com
Due to recent GIT updates for KitKat, (Mesa / Kernel / Broadcom / and others since the first of June)....

   the Latest-Git-Test-Builds have been updated for KitKat here:

Matt Parnell

unread,
Jun 23, 2015, 10:37:58 PM6/23/15
to andro...@googlegroups.com
Do those use the new 4.0 kernel, with these commits? I've been developing for Lollipop so I'll have to give them a try.

--

Matt Parnell

unread,
Jun 23, 2015, 10:49:58 PM6/23/15
to andro...@googlegroups.com
Nevermind - I'm trying it and it is fully stable! I hadn't tried kitkat lately. Only things that don't seem to be working are the sensors and the volume rocker buttons. I am currently running the 32 bit build, I am curious if the 64/32 or pure 64 builds will work properly?

As for your build environment - are you using a 64 or 32 bit machine? It seems to me my 32 bit builds may be flawed, like something is being linked against a 64 bit library or something - or it's because I'm using the Lollipop branch. I'd like to figure it out so that I can replicate your success and further work on sensors and volume buttons.

Either way, may I post links to those builds on XDA, if I give you credit?

rbg

unread,
Jun 24, 2015, 12:30:02 AM6/24/15
to andro...@googlegroups.com
KitKat has been on kernel 4.0 for a while, Chih-Wei has just updated it to kernel 4.06,
 check in these forums.

rbg

unread,
Jun 24, 2015, 12:31:09 AM6/24/15
to andro...@googlegroups.com
> KitKat is the latest stable release from android-x86, Lollipop is un-released and still being
   worked on by developers.

 > my build environment is a 64bit cpu with 64 bit Ubuntu 14.04LTS....ALL build environments for
   AOSP are required to be 64 bit build since GingerBread 2.3 I think you'll find...there are "hacks"
   to get around it I've seen but to me NOT WORTH the trouble/issues they may present..

 > I have no issues people posting links to builds BUT, it would serve android-x86 project more if instead
   people posted links to the announcements of releases / builds. This way more users get exposure to the
   forums and help available from others in them and can contribute themselves...

 I simple pull the sources from git and build them, ensure they boot ok on a few different machines, then
 make them available to the user community to try and offload the developers, hopefully they then get good
 feedback on issues.

rbg

unread,
Jun 24, 2015, 2:35:19 PM6/24/15
to andro...@googlegroups.com
Chih-Wei, Matt

think these two patches are needed also.....



On Monday, June 22, 2015 at 2:48:13 AM UTC-4, Chih-Wei Huang wrote:
SP3_x86_defconfig.patch
SP3_x64_defconfig.patch

Matt Parnell

unread,
Jun 24, 2015, 2:45:14 PM6/24/15
to andro...@googlegroups.com
Yes, I was going to mention that - but I believe that Chih-Wei may prefer to split off a separate device tree for the SP3 at this point, or at least, separate configs as those modules aren't required by other devices.

We may also require changes to init.sh to get the sensors working. I'm not yet sure how to deal with the NTRIG pressure pen, auto brightness, rotation, magnetometers, etc...or if we'll ever get to that point anyway, but it is something to consider.

--

rbg

unread,
Jun 24, 2015, 3:00:09 PM6/24/15
to andro...@googlegroups.com
if configured as modules they should only get loaded if the device requires it NO??

config_surface_button=m
         _hid_multitouch=m  (as it presently is, though android-recommended.cfg has always said =y)

Matt Parnell

unread,
Jun 24, 2015, 3:01:17 PM6/24/15
to andro...@googlegroups.com
The multitouch is required to be built in according to one source, I forget the exact reason.

rbg

unread,
Jun 24, 2015, 3:12:43 PM6/24/15
to andro...@googlegroups.com
yes for tabs/phones I could see that....guess it's =m for android-x86 as could cause conflicts
on some PC's / Laptops that do not have multitouch....makes sense now

Chih-Wei Huang

unread,
Jun 24, 2015, 9:20:41 PM6/24/15
to Android-x86
2015-06-25 2:45 GMT+08:00 Matt Parnell <mpar...@gmail.com>:
> Yes, I was going to mention that - but I believe that Chih-Wei may prefer to
> split off a separate device tree for the SP3 at this point, or at least,
> separate configs as those modules aren't required by other devices.

It's unnecessary to create another config file.
Please specify what configs you need exactly.

Matt Parnell

unread,
Jun 25, 2015, 11:04:11 AM6/25/15
to andro...@googlegroups.com
Just the two options that rbg mentioned.

rbg

unread,
Jun 25, 2015, 12:44:59 PM6/25/15
to andro...@googlegroups.com
actually I think the only change should be as follows..

config_surface_button=m
Reply all
Reply to author
Forward
0 new messages