[4.3] Where does the Settings interface get it's information?

625 views
Skip to first unread message

Michael Cunningham

unread,
Aug 17, 2013, 1:17:24 PM8/17/13
to andro...@googlegroups.com
I have nearly everything working on the LE1600 in 4.3; but can't figure out a few simple things:

1) How does the Settings Interface control WiFi?
     The LE1600 uses an ipw2200 WiFi card; which comes up as eth1.. It's pretty apparent that the GUI is looking for wlan0... where do I change it to look for eth1?

2) How does the Settings interface control the brightness?
    The "Auto" brightness is controlled differently than the brightness level on the intel_video backlight control, and need to change the actions taken when clicking the "Auto" button

3) Where does the Settings Interface get battery info?
    Battery info is in abundance in /proc; but nothing useful shows up on the battery screen; 

4) Where are the Model-Specific statistics in the "About" page pulled from?
    Is there any way to disable useless fields (Carrier, Baseband); and populate the rest with more appropriate information from /sys/class/dmi/id ?

V/r,
Mike

Masaki Muranaka

unread,
Aug 17, 2013, 11:35:11 PM8/17/13
to andro...@googlegroups.com
Hello,

> 1) How does the Settings Interface control WiFi?
> The LE1600 uses an ipw2200 WiFi card; which comes up as eth1.. It's pretty apparent that the GUI is looking > for wlan0... where do I change it to look for eth1?

I don't have any ipw2200 card. But does this page help you?
https://bbs.archlinux.org/viewtopic.php?id=78419
I think there is no preference GUI page to change device name.


2013/8/18 Michael Cunningham <comm...@gmail.com>:
> --
> 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/groups/opt_out.



--
--
Masaki Muranaka
Monami-ya LLC, Japan.

Chih-Wei Huang

unread,
Aug 18, 2013, 11:52:10 AM8/18/13
to Android-x86
2013/8/18 Michael Cunningham <comm...@gmail.com>:
> I have nearly everything working on the LE1600 in 4.3; but can't figure out
> a few simple things:
>
> 1) How does the Settings Interface control WiFi?
> The LE1600 uses an ipw2200 WiFi card; which comes up as eth1.. It's
> pretty apparent that the GUI is looking for wlan0... where do I change it to
> look for eth1?

Android-x86 automatically detects the wifi interface
from /sys/class/net/. So it's not a problem your card driver
uses eth1. You can check if it detects correctly by

* getprop wlan.interface
* see if service dhcpcd_eth1 is created in init.x86.rc

If not, you should check if your card use a standard wireless driver.
If wlan.interface is correct but service dhcpcd_eth1 is not created,
it's a know race condition of the boot script.
Unfortunately there is no easy solution for it.
(you can try the debug mode to see if it's created easier)

> 2) How does the Settings interface control the brightness?
> The "Auto" brightness is controlled differently than the brightness
> level on the intel_video backlight control, and need to change the actions
> taken when clicking the "Auto" button

It's controlled via liblights.
You have mentioned a bug in liblights for intel_video.
Doesn't your patch fix it?

> 3) Where does the Settings Interface get battery info?
> Battery info is in abundance in /proc; but nothing useful shows up on
> the battery screen;

Not sure what you talked about.
You may try to look at the code in
BatteryService.java and its jni part.

> 4) Where are the Model-Specific statistics in the "About" page pulled from?
> Is there any way to disable useless fields (Carrier, Baseband); and
> populate the rest with more appropriate information from /sys/class/dmi/id ?

Hack the code, of course. :)


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

Michael Cunningham

unread,
Aug 19, 2013, 4:02:52 AM8/19/13
to andro...@googlegroups.com
Chih-Wei,
IRT the ipw2200, I got it working by:
1) Hacking the kernel source
(kernel/drivers/net/wireless/ipw2x00/ipw2200.c and adding the following at
line 11737, in the ipw_pci_probe() function:
strcpy(net_dev->name, "wlan%d");
2) Re-enabling WEXT in wpa_supplicant
(external/wpa_supplicant_8/wpa_supplicant/android.config), which took
several other changes in that area; including pulling wireless_copy.h from
the ics tree; and adding the following to
(external/wpa_supplicant_8/private_lib/driver_cmd_wext.h). Apparently it's
been awhile since anyone used WEXT with this tree :)
#define WPA_EVENT_DRIVER_STATE
"CTRL-EVENT-DRIVER-STATE "
3) Again Hacking the kernel source to enable
LIB80211_CRYPT_TKIP, LIB80211_CRYPT_CCMP, LIB80211_CRYPT_WEP - for some
reason, in (kernel/net/wireless/Kconfig) the configuration for these 3 does
not have a description, so their only ever compiled as modules; and wext
does not load them by default like nl80211 does. Could have been
easier-solved by just adding a modprobe line to the init.sh.

IRT liblights; I have got most working; but in some special
situations (resuming from any time the screen gets shut off) the brightness
is not set properly; I'm assuming that it's being set to a static number
somewhere; but can't find where.

IRT The battery; it just says 100%, 0s on battery; on the battery
page... regardless if it is running on batteries or AC adapter; I'd rather
have some real info here; but now with ACPI off; I need to write kernel
drivers for the battery/ac adapter/power button/thermal zone; that pulls the
info from EC0. (BACKGROUND: the Motion Computing LE1600's ACPI is broken in
linux)

IOT get Android 4.3 x86 to compile for non-sse3 cpu's; you need to
change line #118 of (build/core/combo/TARGET_linux-x86.mk) to:
TARGET_GLOBAL_CFLAGS += -march=pentium-m -mstackrealign
-mmmx -msse -msse2 -mno-sse3 -mfpmath=sse -m32
If you don't remove -msse3 from that; SSE3 is used regardless if you
set -mno-sse3 later; I would suggest this be moved to the device-specific
folder; rather than the global build directory.

Additionally, What needs to be fed to a uinput device to get a
pointer to display on the screen? And is there any reason why right-clicks
and middle-clicks crash the settings app and browser? I've already disabled
them in my "driver" for the digitizer; but found it strange that native apps
would not have some form of error handling for these events.

After I get the last bit of cosmetic stuff fixed (WiFi Signal Level,
Battery Status, visible cursor, screen rotation, brightness control) fixed;
I'll release a binary image for the LE1600; but considering the amount of
changes that need to be made in the core files, I can't really submit a
proper device folder for it :/

V/r,
Mike
--
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/iLVz2hcqcFk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to

Chih-Wei Huang

unread,
Aug 20, 2013, 12:33:32 PM8/20/13
to Android-x86
Sounds you have good progress.
Please send me the changes you made
in the patch format.

About the x86 GLOBAL_CFLAGS,
it's defined by Intel and Google.
They decided that's the x86 ABI.
I've tried to argue with them but no effect.
So even you can build a target with no-sse3,
it's probably can't run an x86 app built
from the NDK.



2013/8/19 Michael Cunningham <comm...@gmail.com>:
> 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/groups/opt_out.



Peter Yoon

unread,
Aug 20, 2013, 10:12:35 PM8/20/13
to andro...@googlegroups.com
Hi Mike, 

I am hacking on Fujitsu s6120 which has same chipset to your LE1600.
 
Barely I could bring-up aosp 4.3 UI, but it's graphics HAL is working only on framebuffer mode 
- which is very slow.

Did you enable drm-i915 based graphics HAL on LE1600? 

Michael Cunningham

unread,
Aug 21, 2013, 1:38:56 AM8/21/13
to andro...@googlegroups.com
Chih-Wei Huang,
   I would rather wait to get it stable before releasing patches; I've made several un-necessary changes (like renaming the ipw2200 interface) that had no effect, but I left in place because they do not cause any problems.. Once I get it running stable (not crashing randomly, or overheating the be'jesus out of the little tablet by running at 1.5GHz with no SpeedStep) I'll release a proper "device" folder, with appropriate out-of-tree patches.
   In my threads on here, I cover most of the important changes that have been made.
   Is there a simple method to produce a top-level diff showing all changes that have been made to the tree?

Peter Yoon,
   My test-kernel config for 4.3 is available at http://theigb.com/le1600/le1600-defconfig
   This is NOT a production kernel release; I have nearly every module disabled, and most of the hardware drivers set to compile in the kernel; to speed up testing.
   My current test-boot process involves transferring the .iso from the VM that it's compiled on, to the my windows 7 workstation; then FTP'd to my server; and DD'd to a flash drive... each MB I stripped out saves me about 5s in transfers :)
   But to answer your question; yes, I have DRM_I915 enabled; and I don't use the vesa mode. On the LE1600, you have to append i915.modeset=1 to the kernel boot parameters.


Also, a bit of info for anyone that tries to get android working on a Motion Computing LE1600:
   Make sure you boot with acpi=off, or with a kernel compiled with no ACPI. Linux does not get along with ACPI on this tablet. Linux likes to make up it's own memory locations.

SOUND: Primary volume control should use "Front"; Master has no effect. The Internal Speakers are connected to "LineIn Jack"; Headphone port is "Rear Jack", Mic Port is "Front Jack", Onboard Bottom Left Mic is Mic1 Jack, Onboard Bottom Right Mic is Mic2 Jack, Onboard Top Right Mic is Center/LFE Jack. External Amplifier needs to be off (sends line-level output to the speakers)
alsa_amixer -c $c set Master on
alsa_amixer -c $c set Master 31
alsa_amixer -c $c set Front on
alsa_amixer -c $c set Front 31
alsa_amixer -c $c set Capture cap
alsa_amixer -c $c set Capture 31
alsa_amixer -c $c set Mic 31
alsa_amixer -c $c set 'External Amplifier' off
alsa_amixer -c $c set 'Mic Input Source' 'Mic1 Jack'
alsa_amixer -c $c set 'Mic Select' 'Mic1'
alsa_amixer -c $c set 'Rear Jack' 'Front Output'
alsa_amixer -c $c set 'Mic1 Jack' 'Input/Disabled'
alsa_amixer -c $c set 'LineIn Jack' 'Front Output'
alsa_amixer -c $c set 'Line Input Source' 'Mute'
alsa_amixer -c $c set 'Center/LFE Jack' 'Input/Disabled'
alsa_amixer -c $c set 'Front Jack' 'Front Output'
alsa_amixer -c $c set 'Headphone Amp' 'Rear Jack'
alsa_amixer -c $c set 'Headphone +3dB Boost' on

Key Mappings:
setkeycodes 0xf9 115 # This is the button above the DPAD; set to VOLUME UP
setkeycodes 0xf4 114 # This is the button below the DPAD; set to VOLUME DOWN
setkeycodes 0x3c 227 # This is the "Rotate Screen" button.. Needs android code to rotate the screen.
setkeycodes 0x96 238 # This is the RFKILL button above the power button.. again, needs android code to do something with it.
  All of the other buttons (UP, DOWN, LEFT, RIGHT, ENTER, ESCAPE) are properly mapped already. The SES Key (above the fingerprint reader) Sends 3 scancodes, 0x1D, 0x38, and 0xD3 (CTRL+ALT+DEL); 

Digitizer:
  Grab the "wacom" folder from ICS (ics-x86/device/ibm/thinkpad/wacom), by Stefan Seidel. It works fairly well as-is; After getting it to compile and package; add the following to init.sh.
        setserial /dev/ttyS0 uart 16550A port 0x238 irq 5
        wacom-input &

All the other stuff is covered above.

I have gone through every byte of the SystemIO, and every byte of system memory referenced from the DSDT; and have yet to find the magic "enable" bit for the USB bluetooth.. Internally, it's physically connected to Port 2, of the same USB Hub that the fingerprint reader is on. When Bluetooth is disabled in windows, the device dissapears; like it's been unplugged; but it is not controlled via LPC, SMBus, nor ICH GPIO... 

V/r,
Mike

Chih-Wei Huang

unread,
Aug 21, 2013, 1:53:31 AM8/21/13
to Android-x86
2013/8/21 Michael Cunningham <comm...@gmail.com>:
> Chih-Wei Huang,
> I would rather wait to get it stable before releasing patches; I've made
> several un-necessary changes (like renaming the ipw2200 interface) that had
> no effect, but I left in place because they do not cause any problems.. Once
> I get it running stable (not crashing randomly, or overheating the be'jesus
> out of the little tablet by running at 1.5GHz with no SpeedStep) I'll
> release a proper "device" folder, with appropriate out-of-tree patches.

Since we don't maintain individual device folder for particular targets
in jb-x86, I would rather you can put changes to the only
android_x86 target as possible. Though I guess something may be
incompatible so hard to be merged.

> In my threads on here, I cover most of the important changes that have
> been made.
> Is there a simple method to produce a top-level diff showing all changes
> that have been made to the tree?

Please generate each patch for each git repository you changed.
(by git format-patch)

Peter Yoon

unread,
Aug 21, 2013, 2:06:39 AM8/21/13
to andro...@googlegroups.com
Hi Mike,

   My test-kernel config for 4.3 is available at http://theigb.com/le1600/le1600-defconfig
   This is NOT a production kernel release; I have nearly every module disabled, and most of the hardware drivers set to compile in the kernel; to speed up testing.
   My current test-boot process involves transferring the .iso from the VM that it's compiled on, to the my windows 7 workstation; then FTP'd to my server; and DD'd to a flash drive... each MB I stripped out saves me about 5s in transfers :)
   But to answer your question; yes, I have DRM_I915 enabled; and I don't use the vesa mode. On the LE1600, you have to append i915.modeset=1 to the kernel boot parameters.


Regarding DRM_I915,  I also turned-on this compilation flag in kernel. But kernel-side DRM_I915 is supporting both mode - framebuffer and gpu mode.

My question was - Is Android graphics HAL working in  gpu mode? 
Your android system image might have 2 sets of Graphics HAL.
 (1)  framebuffer mode :  /sytem/lib/hw/gralloc.default.so + /system/lib/egl/libGLES_android.so
 (2)  gpu mode : /system/lib/hw/gralloc.drm.so + /system/lib/egl/libGLES_mesa.so   ( It is defined by /device/generic/x86/gpu/gpu_mesa.mk)

Could you answer if your system works with (1) or (2) ?
You can check it by logcat. Because SurfaceFlinger prints which set is loaded.

Thanks
Peter 

Michael Cunningham

unread,
Aug 21, 2013, 7:04:12 AM8/21/13
to andro...@googlegroups.com
Peter Yoon,
   I only see libGLES_mesa.so being loaded in logcat; so I'm assuming #1.
   You can go through the logcat and see if I'm missing something if you like- http://theigb.com/le1600/boot_logcat.txt

Chih-Wei Huang,
   After a few epic fails with git; I found the repo diff command.. http://theigb.com/le1600/le1600.diff
   This of course does not have the kernel config, nor the wacom-input files; but both are already easily accessible.. Kernel Config is at http://theigb.com/le1600/le1600-defconfig and the wacom-input driver is in the ics-x86 tree at device/ibm/thinkpad/wacom
   My wacom-input folder is heavily molested; but the one above works ok.. (no stylus button/eraser support; and it needlessly spams the hell out of uinput)

V/r,
Mike

Peter Yoon

unread,
Aug 21, 2013, 8:10:30 AM8/21/13
to andro...@googlegroups.com
Mike,

I checked the logcat you shared - http://theigb.com/le1600/boot_logcat.txt,
and recognized that  it's gpu mode.

 (2)  gpu mode : /system/lib/hw/gralloc.drm.so + /system/lib/egl/libGLES_mesa

Referring your logcat, I can do further debugging to enable gpu mode on my device.

Thanks,
Peter

On Wednesday, August 21, 2013 8:04:12 PM UTC+9, Michael Cunningham wrote:
Peter Yoon,
   I only see libGLES_mesa.so being loaded in logcat; so I'm assuming #1.
   You can go through the logcat and see if I'm missing something if you like- http://theigb.com/le1600/boot_logcat.txt

Chih-Wei Huang

unread,
Aug 21, 2013, 8:15:57 AM8/21/13
to Android-x86
2013/8/21 Peter Yoon <pey...@gmail.com>:
> I checked the logcat you shared - http://theigb.com/le1600/boot_logcat.txt,
> and recognized that it's gpu mode.
>
> (2) gpu mode : /system/lib/hw/gralloc.drm.so +
> /system/lib/egl/libGLES_mesa
>
> Referring your logcat, I can do further debugging to enable gpu mode on my
> device.

If your configuration is inherited from the android_x86 target,
i915 GLES hardware acceleration must have been enabled.

Chih-Wei Huang

unread,
Aug 25, 2013, 10:47:37 PM8/25/13
to Android-x86
2013/8/21 Michael Cunningham <comm...@gmail.com>:
> Chih-Wei Huang,
> After a few epic fails with git; I found the repo diff command..
> http://theigb.com/le1600/le1600.diff

Thank you for the patch.

I still hope you created the patches by
git commit and then git format-patch
so you can write the commit messages yourself.
git diff or repo diff doesn't contain the commit messages.
(though I can try to create for you, it may not correct)

I've pushed in the kernel patch.
The liblights diff has already merged.

For diff in external/wpa_supplicant_8,
it's better to move WPA_EVENT_DRIVER_STATE
from driver_cmd_nl80211.c to driver_cmd_common.h.
I've made the change and pushed it in.

For the changes in device/generic/x86/,
please limit them only for your target like others.
The wacom-input should be defined as a
service in init.x86.rc and only started on needed.

Why change the option of uvesafb?
From the previous discussion I think
you use i915, not uvesafb.

I'll not add the patch in build/.
I don't like it either, but I don't want to
break the abi defined by google.


> This of course does not have the kernel config, nor the wacom-input
> files; but both are already easily accessible.. Kernel Config is at
> http://theigb.com/le1600/le1600-defconfig and the wacom-input driver is in
> the ics-x86 tree at device/ibm/thinkpad/wacom
> My wacom-input folder is heavily molested; but the one above works ok..
> (no stylus button/eraser support; and it needlessly spams the hell out of
> uinput)



Reply all
Reply to author
Forward
0 new messages