How to make accelerated video work on Lenovo Miix 2 8 tablet?

1,551 views
Skip to first unread message

Vaidotas

unread,
Dec 27, 2014, 11:26:56 AM12/27/14
to andro...@googlegroups.com
Greetings everyone,

I've been testing new kernel 3.18 all day today, but couldn't get accelerated video working correctly. Video works with "nomodeset" parameter, but is VERY slow. Booting without "nomodeset" parameter console messages are displayed until
fb: switching to inteldrmfb from EFI VGA
and then screen blinks from white to black and that's it. No more video output. But backlight is still on and by looks of LED on USB flash drive, the boot sequence still continues. I managed to get logcat log by specifying DATA= parameter to another USB flash drive and waiting for a bit after boot. (attached data-log.zip).
There seems to be no way of getting dmesg logs when screen goes out.
I have exactly the same problem with same kernel on "fedlet" (a fedora spin for tablets), so I presume it might be problem related to kernel, not mesa.

One time I somehow managed to boot into Android with "accelerated video". That time everything worked much faster than with "nomodeset" parameter set. But it crashed and I wasn't able to repeat steps, how it was done exactly or get any logs. It might have been a combination of booting with DEBUG=2, drm.debug=0xe and video=VGA-1:800x1280@75e (not sure about correct value of that last one parameter, as I tried many different versions).
Whole boot was a bit different too, first, when I typed "exit" in debug mode, it blinked, like usual, but then console came back, with some messages (attached in screen.jpg). And then, after typing "exit", Android booted up with UI working at pretty decent speed.

One more thing, I was trying this patch (modified a bit, as it doesn't work as is) https://bugzilla.kernel.org/show_bug.cgi?id=86551 , but it seems it didn't do any good.

If anyone has any ideas, on how to proceed with debugging, e.g. get dmesg log after screen goes out, I would be really glad for your help.

I am booting 32bit Android using efi boot files from fedlet, with parameters copied from default isolinux.cfg file.

On the side note, touchscreen finally works on Lenovo Miix 2 8 tablet, also there should be easy way to make wifi, sound and hardware buttons work (it does in fedlet).
data-log.zip
screen.jpg

Chih-Wei Huang

unread,
Dec 28, 2014, 4:11:17 AM12/28/14
to Android-x86
Do not add 'nomodeset' if you want to enable hardware accelerated display.

From the log you attached,
12-27 16:56:38.824 1684 1684 D hwcomposer: Intel hwcomposer module
12-27 16:56:38.824 1684 1684 I SurfaceFlinger: Using composer version 1.0
12-27 16:56:38.824 1684 1684 W SurfaceFlinger: no suitable EGLConfig
found, trying a simpler query
12-27 16:56:38.824 1684 1684 I SurfaceFlinger: EGL information:
12-27 16:56:38.824 1684 1684 I SurfaceFlinger: vendor : Android
12-27 16:56:38.824 1684 1684 I SurfaceFlinger: version : 1.4
Android META-EGL
12-27 16:56:38.824 1684 1684 I SurfaceFlinger: extensions:
EGL_KHR_get_all_proc_addresses EGL_ANDROID_presentation_time
EGL_KHR_image_base EGL_KHR_gl_texture_2D_image
EGL_KHR_gl_texture_cubemap_image EGL_KHR_gl_renderbuffer_image
EGL_KHR_create_context EGL_ANDROID_image_native_buffer
12-27 16:56:38.824 1684 1684 I SurfaceFlinger: Client API: OpenGL_ES
12-27 16:56:38.824 1684 1684 I SurfaceFlinger: EGLSurface: 8-8-8-8,
config=0xb704c980
12-27 16:56:38.921 1684 1684 I SurfaceFlinger: OpenGL ES informations:
12-27 16:56:38.921 1684 1684 I SurfaceFlinger: vendor : Intel
Open Source Technology Center
12-27 16:56:38.921 1684 1684 I SurfaceFlinger: renderer : Mesa DRI
Intel(R) Bay Trail
12-27 16:56:38.921 1684 1684 I SurfaceFlinger: version : OpenGL ES
3.0 Mesa 9.2.0-devel (git-247b990)

The OpenGL ES is enabled by mesa. Good.
But there are many errors from SurfaceFlinger later:

SurfaceFlinger: received signal 12 in thread 1727, resending to 1976

many services died and Zygote restarted forever.

I think there are something else wrong.
Probably the filesystem is damaged.
> --
> You received this message because you are subscribed to the Google Groups
> "Android-x86" group.
> To unsubscribe from this group and stop receiving emails from it, 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
Android-x86 project
http://www.android-x86.org

Vaidotas

unread,
Dec 28, 2014, 8:50:50 AM12/28/14
to andro...@googlegroups.com
Tried rebuilding image from scratch, also using a build from another user from one of the threads - results the same. I think kernel parameters debug.drm and video does absolutely nothing. In multiple restarts I managed to boot with accelerated display only once, and I was unable to reproduce it again. Might be that it works randomly. Maybe problem is with hardware or kms video drivers. No idea how to proceed.

Vaidotas

unread,
Jan 11, 2015, 4:09:56 AM1/11/15
to andro...@googlegroups.com
Yesterday tried booting this image: https://groups.google.com/d/msg/android-x86/-i-D2C7hdZk/Oqw9SlscMXsJ , video acceleration worked correctly on first boot. But booting today video still fails. Not really sure what has changed. Tried booting several times again - no luck, on modeswitch screen goes blank, but backlight stays on. Could hardware be faulty? Although windows works without issues.

Miker

unread,
Jan 11, 2015, 9:36:03 AM1/11/15
to andro...@googlegroups.com

Just so guess.  But was your internet connected on first boot?

Mike

Sent with AquaMail for Android
http://www.aqua-mail.com

On January 11, 2015 3:10:48 AM Vaidotas <jos...@gmail.com> wrote:

Yesterday tried booting this image: https://groups.google.com/d/msg/android-x86/-i-D2C7hdZk/Oqw9SlscMXsJ , video acceleration worked correctly on first boot. But booting today video still fails. Not really sure what has changed. Tried booting several times again - no luck, on modeswitch screen goes blank, but backlight stays on. Could hardware be faulty? Although windows works without issues.

--

Vaidotas

unread,
Jan 11, 2015, 10:22:00 AM1/11/15
to andro...@googlegroups.com
No, wireless wasn't working. But that's not related to my issue.

Miker

unread,
Jan 11, 2015, 11:55:30 AM1/11/15
to andro...@googlegroups.com

Thinking maybe it did a download on install and fluffied on reboot....

Mike

Sent with AquaMail for Android
http://www.aqua-mail.com

Vaidotas

unread,
Jan 17, 2015, 7:26:35 AM1/17/15
to andro...@googlegroups.com
Finally got log after screen blanks out. Maybe someone can help identify problems and get hardware accelerated video running.

<6>[  961.483435] [drm] Initialized drm 1.1.0 20060810
<6>[  961.544659] [drm] Memory usable by graphics device = 2048M
<7>[  961.544668] checking generic (80000000 3e8000) vs hw (80000000 10000000)
<6>[  961.544672] fb: switching to inteldrmfb from EFI VGA
<6>[  961.544729] Console: switching to colour dummy device 80x25
<6>[  961.544798] [drm] Replacing VGA console driver
<7>[  961.546297] i915 0000:00:02.0: irq 267 for MSI/MSI-X
<6>[  961.546314] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
<6>[  961.546318] [drm] Driver supports precise vblank timestamp query.
<6>[  963.133512] vgaarb: device changed decodes: PCI:0000:00:02.0,olddecodes=io+mem,decodes=io+mem:owns=io+mem
<6>[  963.657071] ACPI: Video Device [GFX0] (multi-head: yes  rom: no  post: no)
<6>[  963.657841] acpi device:1a: registered as cooling_device4
<6>[  963.657984] input: Video Bus as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/LNXVIDEO:00/input/input2
<6>[  963.658078] [drm] Initialized i915 1.6.0 20140905 for 0000:00:02.0 on minor 0
<6>[  964.951932] [drm] GMBUS [i915 gmbus dpb] timed out, falling back to bit banging on pin 5
<3>[  966.719278] Raw EDID:
<3>[  966.719284]      00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
<3>[  966.719288]      00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
<3>[  966.719291]      00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
<3>[  966.719294]      00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
<3>[  966.719296]      00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
<3>[  966.719299]      00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
<3>[  966.719302]      00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
<3>[  966.719305]      00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
<4>[  966.719312] i915 0000:00:02.0: HDMI-A-2: EDID block 0 invalid.
<6>[  968.309347] fbcon: inteldrmfb (fb0) is primary device
<6>[  985.193660] Console: switching to colour frame buffer device 100x80
<6>[  985.274287] i915 0000:00:02.0: fb0: inteldrmfb frame buffer device
<6>[  985.274292] i915 0000:00:02.0: registered panic notifier
<6>[  986.106878] input: PC Speaker as /devices/platform/pcspkr/input/input3
<6>[  986.193749] cfg80211: Calling CRDA to update world regulatory domain
<4>[  987.096149] mmc1: queuing unknown CIS tuple 0x80 (5 bytes)
<4>[  987.100949] mmc1: queuing unknown CIS tuple 0x80 (7 bytes)
<4>[  987.110853] mmc1: queuing unknown CIS tuple 0x80 (31 bytes)
<4>[  987.120746] mmc1: queuing unknown CIS tuple 0x80 (31 bytes)
<3>[  987.169392] brcmfmac: brcmf_sdio_drivestrengthinit: No SDIO Drive strength init done for chip 4324 rev 5 pmurev 17
<6>[  987.169937] usbcore: registered new interface driver brcmfmac
<3>[  987.703321] brcmfmac: brcmf_c_preinit_dcmds: Firmware version = wl0: Oct 25 2013 14:06:19 version 6.10.197.104 (r432142) FWID 01-f7200fce

Vaidotas

unread,
Jan 19, 2015, 1:24:00 PM1/19/15
to andro...@googlegroups.com
Another day - another log file. Today I logged bootup with debug.drm=14 parameter. Screen blinked and blanked out as usual. It shows quite a lot of data and I'm not sure where to start to search for issues.
dmesg-drm-debug-14.log

JJ Meijer

unread,
Jan 19, 2015, 2:30:13 PM1/19/15
to andro...@googlegroups.com
Did you add androidboot.hardware=android_x86 to the kernel parameters? If not this might be the problem.

Op maandag 19 januari 2015 19:24:00 UTC+1 schreef Vaidotas:

Vaidotas

unread,
Jan 19, 2015, 3:09:17 PM1/19/15
to andro...@googlegroups.com
I see no difference with and without androidboot.hardware=android_x86 . I'm currently comparing your dmesg log with my own, and unfortunately hardware differences are much bigger than I have expected.

Vaidotas

unread,
Jan 19, 2015, 4:16:20 PM1/19/15
to andro...@googlegroups.com
Today I somehow got accelerated video to boot up twice. Not really sure what helps, but if I start windows 8 first, then shutdown to boot menu (shutdown.exe  /r  /o /t 0), choose boot from device, efi usb. This method increases chances of working video acceleration (or hardware is just messing with me, cannot be sure here). Also started using androidboot.hardware=android_x86 in my boot parameters, but cannot confirm for sure that it helps.
There's something strange with "efi: mem00:" outputs. Looks like that on successful boot I get only up to mem33, otherwise it goes to mem51 or so. Could it be bug with EFI? Is memory not clearing or something?

Got a pretty good overall hardware support with JJ Meijer's latest iso build.

WORKS:
* video hardware acceleration (sometimes, only after full reboot)
* touchscreen
* sound (that's a new one in android-x86 for me)
* volume controls
* wifi - can list networks and connect to wireless router, browse internet without problems
* keyboard input doesn't work by default, after fiddling with input it started working
* app store works, simple apps work
* google music works

DOESN'T WORK:
* brightness - always on max
* autorotate
* bluetooth
* battery (shows ! sign)
* camera
* suspend fails (restarts android)
* youtube video fails to play
* home button does wrong function



Vaidotas

unread,
Jan 20, 2015, 2:20:19 PM1/20/15
to andro...@googlegroups.com
One other thing I could figure out by comparing working video and not working video logs: when tsc is unstable - video doesn't work. Not sure if that is related and how to fix it.

<4>[  135.446440] Clocksource tsc unstable (delta = 227945878 ns)
<6>[  135.470201] Switched to clocksource refined-jiffies

pstglia

unread,
Jan 20, 2015, 6:45:10 PM1/20/15
to andro...@googlegroups.com
Check which clocksources do you have available:

cat /sys/devices/system/clocksource/clocksource0/available_clocksource

if you have available "acpi_pm" or "hpet" try using then by 

1) writing /sys/devices/system/clocksource/clocksource0/current_clocksource with desired clocksource

OR

2) Append a kernel parameter:

Ex:
notsc clocksource=acpi_pm

Got this info from here:

It's a bit old, but maybe it helps

Vaidotas

unread,
Jan 21, 2015, 12:12:03 PM1/21/15
to andro...@googlegroups.com
I have only 3 available clocksources: refined-jiffies, jiffies and tsc. Trying to force refined-jiffies or jiffies clocksources results in same blank sceen issue. One time boot was successful, but I was unable to repeat it with same boot parameters.

pstglia

unread,
Jan 23, 2015, 1:01:34 PM1/23/15
to andro...@googlegroups.com
The only thing I can suggest now is checking newer kernel releases to check if there's any fix related to tsc/baytrail

martin brook

unread,
Jan 23, 2015, 1:35:25 PM1/23/15
to andro...@googlegroups.com

--

pstglia

unread,
Jan 23, 2015, 2:18:16 PM1/23/15
to andro...@googlegroups.com

static struct freq_desc freq_desc_tables[] = {
        /* PNW */
        { 6, 0x27, 0, { 0, 0, 0, 0, 0, FREQ_100, 0, FREQ_83 } },
        /* CLV+ */
        { 6, 0x35, 0, { 0, FREQ_133, 0, 0, 0, FREQ_100, 0, FREQ_83 } },
        /* TNG */
        { 6, 0x4a, 1, { 0, FREQ_100, FREQ_133, 0, 0, 0, 0, 0 } },
        /* VLV2 */
        { 6, 0x37, 1, { FREQ_83, FREQ_100, FREQ_133, FREQ_166, 0, 0, 0, 0 } },
        /* ANN */
        { 6, 0x5a, 1, { FREQ_83, FREQ_100, FREQ_133, FREQ_100, 0, 0, 0, 0 } },
};
 


Vaidotas

unread,
Jan 27, 2015, 5:47:46 PM1/27/15
to andro...@googlegroups.com
Updated kernel to 3.18.4, issue with video acceleration (or to be more precise, video blanking out on "fb: switching to inteldrmfb from EFI VGA") still exists.

Chih-Wei Huang

unread,
Jan 29, 2015, 4:39:36 AM1/29/15
to Android-x86
The message is normal on loading i915 driver which
replaces the efifb.

Thanks to pstglia's hint.
I found the hardware acceleration seems stop working
is due to the clocksource switched from tsc to others.
If I manually switch the clocksource back to tsc,
the display becomes normal.

Unfortunately on Baytrail we seems only have 3 clocksources:
tsc, refined-jiffies, jiffies. Except tsc, the others are too slow
to run android. That's why the system becomes so sluggish.
hpet was disabled by Intel since it's buggy on Baytrail,
while acpi-pm is also unavailable on Baytrail (I don't know why).

So it seems the only fix is force to use tsc.
You may try to add tsc=reliable to kernel cmdline
which disables clocksource verification at runtime.
Works for me.

Vaidotas

unread,
Jan 29, 2015, 1:32:29 PM1/29/15
to andro...@googlegroups.com
No luck booting with tsc=reliable parameter. It worked on second boot, but I was unable to repeat video working on 5 later boot ups with same parameter. There's no message about tsc being unstable though.

Vaidotas

unread,
Jan 30, 2015, 3:03:17 PM1/30/15
to andro...@googlegroups.com
Is there any useful debug information that I could get if, by chance, system boots up with accelerated video? I got several dmesg logs, but they are not very useful.

pstglia

unread,
Feb 1, 2015, 4:30:21 PM2/1/15
to andro...@googlegroups.com

Is there any useful debug information that I could get if, by chance, system boots up with accelerated video? I got several dmesg logs, but they are not very useful.

You can include drm.debug=7 as a kernel parameter. It'll print lots of debugging output about DRM. Maybe it give us some more hints 

Have you also tried disabling power management (specially cpufreq)? 

Don't remember if you have tried this but... Android-IA works on your hw?

Regards,
pstglia

Vaidotas

unread,
Feb 2, 2015, 2:41:14 PM2/2/15
to andro...@googlegroups.com
I've posted dmesg log with drm.debug=14 here: https://groups.google.com/d/msg/android-x86/PMPu2P02dWI/gRkWOh7axBMJ . Will drm.debug=7 provide more information? It is really tricky to get logs when screen is off.

Tried booting with acpi=off and with intel_pstates=disable separately - no luck, both times screen went blank.

I haven't tried Android IA, as my tablet has 32bit UEFI.

Vaidotas

unread,
Feb 3, 2015, 2:14:30 PM2/3/15
to andro...@googlegroups.com
Here's the dmesg log with drm.debug=7 kernel parameter. I used recent android_x86-5.0.2_r1-20150202.img file to boot from USB flash drive. Video blanked out on KMS switch as usual.
I'm still trying to get dmesg log with drm.debug from successful boot-up.



On Sunday, February 1, 2015 at 11:30:21 PM UTC+2, pstglia wrote:
dmesg-log-fail.log

pstglia

unread,
Feb 4, 2015, 7:17:33 PM2/4/15
to andro...@googlegroups.com
Hi Vaidotas,


Here's the dmesg log with drm.debug=7 kernel parameter. I used recent android_x86-5.0.2_r1-20150202.img file to boot from USB flash drive. Video blanked out on KMS switch as usual.
I'm still trying to get dmesg log with drm.debug from successful boot-up.

Thanks for the info. As I could check drm.debug shows nothing wrong with gpu driver. 

Guess I was  threating gpu as the bad guy, while he can be the victim in fact...

Remember when Chih-Wei pointed something about a FS corrupted in the beginning of this thread? Well, I checked the logcat output you posted again and checked lots of failures while trying to read/write on fs:

12-27 16:56:46.154  1991  2015 W BatteryStats: java.io.FileNotFoundException: /data/system/batterystats.bin.tmp: open failed: EACCES (Permission denied)
...
12-27 16:56:46.330  1991  1991 W FileUtils: Failed to chmod(/data/system): android.system.ErrnoException: chmod failed: EPERM (Operation not permitted)
12-27 16:56:46.330  1991  1991 W FileUtils: Failed to chmod(/data/system/packages.list): android.system.ErrnoException: chmod failed: ENOENT (No such file or directory)
...
12-27 16:56:46.398  1991  1991 W FileUtils: Failed to chmod(/data/system/users): android.system.ErrnoException: chmod failed: ENOENT (No such file or directory)
...
12-27 16:56:47.187  1991  1991 W PackageManager: Failed to parse /system/priv-app/BackupRestoreConfirmation: Unable to create data dirs [errorCode=-1]


Apparently, your issue is related to some component that controls internal flash memory / sdcards. 
Just like JJ Meijer was doing, I think we should try something about that (sdhci and other components related)

What about trying a new kernel version? I checked there was some changes related to sdhci between 3.19-rc4 and 3.19-rc5


I cannot assure these will solve your problem. Are just guesses... It's up to you keep trying or not :)
I can see you are persistent. I believe you gonna make it work on your hardware

Ps: I've wrote a silly script to collect data (dmesg, logcat) on backgroung. Attached here just in case...
It receives 2 args: the wait interval between each collect (in seconds) and an output directory.


data_collector.sh

Mike Lu

unread,
Feb 5, 2015, 11:05:39 AM2/5/15
to andro...@googlegroups.com
Hi Vaidotas,

Probably I shouldn't ask it in this thread but where did you get the img file? The nightly server doesn't work and I can't find any EFI builds on the Web later than KK R2. I'd really like to see changes in the new kernel for sound etc. By the way, I have a ThinkPad 10 with similar hardware as Miix 2.

Thanks in advance.

Regards,

Mike

Vaidotas

unread,
Feb 5, 2015, 3:01:40 PM2/5/15
to andro...@googlegroups.com
Thanks for script pstglia, this will be very useful for debugging. Some similar diagnostic collection script should be included in Android-x86 by default, to help gather all interesting debug info from all sorts of devices.
Currently I'm waiting for stable release of 3.19 kernel, then I'll try to build it with more debug information enabled.

Vaidotas

unread,
Feb 6, 2015, 1:05:55 PM2/6/15
to andro...@googlegroups.com
I got it here: https://groups.google.com/d/msg/android-x86/RX2qNkRJ0UI/XGTOjhAxC30J
The difference between iso and img on my tablet is that img image boots much faster. iso image has 29 seconds delay on boot.

rbg

unread,
Feb 6, 2015, 2:21:14 PM2/6/15
to andro...@googlegroups.com
the only difference I'm aware of is that the .img file is generated by
make -jx efi_img and that automatically rebuilds with a 64bit kernel...as well as ???

Chih_Wei would know all the details...

Mike Lu

unread,
Feb 7, 2015, 6:49:40 AM2/7/15
to andro...@googlegroups.com
Thanks for your build (access request sent). The fact is that my version of ThinkPad 10 (Z3795 with 64-bit EFI) doesn't have an option to boot in legacy mode so it would just ignore MBR-based boot media. Currently the 4.4-R2 EFI build (booting as LiveUSB) runs superfast with HW acceleration but my SDIO cards (bcm43241) won't work, plus sound, backlight, battery etc. so I was just waiting for a kernel update to fix that.

Regards,

Mike
Reply all
Reply to author
Forward
0 new messages