Skip to content

Running postmarketOS on a Acer Iconia Tab A500 with this kernel #8

Closed

Description

@RQWorldblender

I had some success running postmarketOS running on a Acer Iconia Tab A500 within this week, with build files I published at https://gitlab.com/Worldblender/pmaports/-/tree/device/acer-picasso. However, during my testing, I found that the following aren't working or not fully tested:

  • Battery detection
  • Accelerometer
  • Cameras, front and back
  • 3D acceleration via the GPU
  • microUSB port for RNDIS ethernet
  • Wi-Fi (missing HCD files that I have, but haven't placed into the rootfs)
  • Not turning off on shutdown (the power LED is still on even though the LCD has been turned off, but it's harder to tell while charging)

Here are some images of this tablet running:
IMG_20200613_213013
IMG_20200613_213313
IMG_20200614_152910

I would like to do more to enhance the experience on this tablet, but I'm not sure where I can started myself.

Activity

  1. digetx commented on Jun 20, 2020

    @digetx
    Member

    Hello Richard!

    Very nice to see yours work on the pmOS support for A500!

    In order to get the battery / LEDs / power-off to work, you'll need to enable the following options in the kernel config:

    CONFIG_ACER_A500_EC_MFD=y
    CONFIG_ACER_A500_EC_BATTERY=y
    CONFIG_ACER_A500_EC_LEDS=y
    

    you may enable them as =m as well. If you have the EC drivers already enabled, then please post a full dmesg log.

    Cameras are expected to not work because there are no drivers in the upstream kernel for them.

    3D acceleration has a limited support. Mesa driver is in-progress, it's not usable as of today, but still you'll need the grate's mesa driver for things like VDPAU because it retrieves the libvdau-tegra library name using mesa's DRI. Both Opentegra Xorg driver and libvdpau-tegra are using 3d for the compositing acceleration.

    Accelerometer should work, please explain in a more details what exactly doesn't work.

    # find /sys/devices/soc0/7000c000.i2c/i2c-0/i2c-5/5-000f/iio:device1 -maxdepth 1 -type f -exec cat {} \;
    22
    0, 1, 0; 1, 0, 0; 0, 0, -1
    25 50 100 200 400 800
    -505
    250:1
    0.019163
    cat: '/sys/devices/soc0/7000c000.i2c/i2c-0/i2c-5/5-000f/iio:device1/in_accel_sampling_frequency': Invalid argument
    0.009582 0.019163 0.038326
    realtime
    17
    MAJOR=250
    MINOR=1
    DEVNAME=iio:device1
    DEVTYPE=iio_device
    OF_NAME=accelerometer
    OF_FULLNAME=/i2c@7000c000/gyroscope@68/i2c-gate/accelerometer@f
    OF_COMPATIBLE_0=kionix,kxtf9
    OF_COMPATIBLE_N=1
    kxtf9
    

    MicroUSB port should work, I'm using usbnet all the time on A500. Although, perhaps in my case it's the EEM driver and not RNDIS. I'll try to check the RNDIS.

    Here is my current kernel config USB setup:

    CONFIG_USB_USBNET=y
    CONFIG_USB_NET_CDC_EEM=y
    CONFIG_USB=y
    CONFIG_USB_EHCI_HCD=y
    CONFIG_USB_EHCI_TEGRA=y
    CONFIG_USB_ACM=y
    CONFIG_USB_WDM=y
    CONFIG_USB_STORAGE=y
    CONFIG_USB_CHIPIDEA=y
    CONFIG_USB_CHIPIDEA_UDC=y
    CONFIG_USB_CHIPIDEA_HOST=y
    # CONFIG_USB_CHIPIDEA_MSM is not set
    # CONFIG_USB_CHIPIDEA_IMX is not set
    # CONFIG_USB_CHIPIDEA_GENERIC is not set
    CONFIG_USB_GADGET=y
    CONFIG_USB_CONFIGFS=y
    CONFIG_USB_CONFIGFS_SERIAL=y
    CONFIG_USB_CONFIGFS_ACM=y
    CONFIG_USB_CONFIGFS_OBEX=y
    CONFIG_USB_CONFIGFS_NCM=y
    CONFIG_USB_CONFIGFS_ECM=y
    CONFIG_USB_CONFIGFS_ECM_SUBSET=y
    CONFIG_USB_CONFIGFS_RNDIS=y
    CONFIG_USB_CONFIGFS_EEM=y
    CONFIG_USB_CONFIGFS_MASS_STORAGE=y
    CONFIG_USB_CONFIGFS_F_LB_SS=y
    CONFIG_USB_CONFIGFS_F_FS=y
    CONFIG_USB_CONFIGFS_F_UAC1=y
    CONFIG_USB_CONFIGFS_F_UAC1_LEGACY=y
    CONFIG_USB_CONFIGFS_F_UAC2=y
    CONFIG_USB_CONFIGFS_F_MIDI=y
    CONFIG_USB_CONFIGFS_F_HID=y
    CONFIG_USB_ETH=y
    CONFIG_USB_ETH_RNDIS=y
    CONFIG_USB_ETH_EEM=y
    

    For the Bluetooth and WiFi you'll either need to compile the corresponding kernel drivers as a loadable kernel modules or embed firmware files into kernel image by setting CONFIG_EXTRA_FIRMWARE in the kernel's config:

    CONFIG_EXTRA_FIRMWARE="brcm/BCM4329B1.hcd brcm/brcmfmac4329-sdio.bin brcm/brcmfmac4329-sdio.txt"
    CONFIG_EXTRA_FIRMWARE_DIR="/path_to_firmware_files"
    

    where /path_to_firmware_files should contain the brcm/ directory.

  2. RQWorldblender commented on Jun 20, 2020

    @RQWorldblender
    Author

    I took most of what you suggested now, and will be running another build soon. Here are the relevant files:
    config-postmarketos-grate.armv7.txt

    One more thing I forgot to ask: what about the vibrator? Can it be used in any capacity by programs running on pmOS?

    I will be making a unified kernel package that can be used by all other devices supporting this kernel. I'm not sure of how many USB ethernet/wi-fi devices I should enable in the kernel or have them compiled as modules. I do need alternatives to the built-in wi-fi in case I can't get it to work.

    I haven't been able to test the accelerometer because I haven't used a desktop environment such as GNOME 3, Phosh, or Plasma Mobile that supports rotation on it yet. I would prefer to use any of them as their interfaces are well-designed to support touch screens, but I'm not sure of how well they will run with the current state of the 3D acceleration, if they end up using Wayland. X11 desktop environments such as i3wm, MATE, or XFCE4 will likely work the best, but they may not be well-designed for touch screens.

    Here, I will also link to my private cloud storage holding one of the original Android ROMs (version 4.0.3 from Acer) which also holds the firmware for the Broadcom BCM4329 SDIO wi-fi card: http://45.21.218.32:9092/owncloud/index.php/s/z0F5d3e9Va5eoHE | I need to think about how to package the non-free firmware for use with pmOS, so that I don't have to inject the files myself.

  3. digetx commented on Jun 21, 2020

    @digetx
    Member

    Vibrator will work with any program that supports input feedback UAPI, although I don't know whether generic toolkits support haptic feedback. You could use fftest utility in order to turn on/off vibration motor if you want to test it.

    Perhaps you could add firmware files into initrd as alternative to embedding them into kernel image. Please be aware that initrd may not work on some Android devices if kernel's zImage file is too big, for example Nexus 7 has such problem, so you should always try to minimize the size of zImage. In general, when you're making a public kernel build, you should enable as many drivers as possible and they should be compiled as a loadable kernel modules.

    Please notice that only A500 and Nexus 7 are known to work well with the grate-kernel, other devices have incomplete device-trees and need some more work.

    Everything Wayland won't work well without GL, X11 should be the best option for now.

    You could test rotation on any X11 DE by using a very recent version of iio-sensor-proxy and https://github.com/donbowman/kde-auto-rotate (it doesn't require kde). You could also just run monitor-sensor if you want to see what orientation is reported by accelerometer, again the most recent version of iio-sensor-proxy is required or you'll get wrong orientation.

    The Android's firmware doesn't work with the upstream WiFi driver on A500, IIRC. You may grab all the working firmware files from https://github.com/grate-driver/linux-firmware.

  4. digetx commented on Jun 22, 2020

    @digetx
    Member

    @RQWorldblender, the RNDIS works on A500 here:

     usb 2-1.4.1.3: new high-speed USB device number 5 using ehci-pci
     usb 2-1.4.1.3: New USB device found, idVendor=0525, idProduct=a4a2, bcdDevice= 5.08
     usb 2-1.4.1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
     usb 2-1.4.1.3: Product: RNDIS/Ethernet Gadget
     usb 2-1.4.1.3: Manufacturer: Linux 5.8.0-rc1-next-20200622-00149-g5fff5bf71546 with tegra-udc
     cdc_ether 2-1.4.1.3:1.0 usb0: register 'cdc_ether' at usb-0000:00:1d.0-1.4.1.3, CDC Ethernet Device, c6:1d:04:5c:37:d6
    

    What host/desktop OS are you using? Is it some Linux distro?

  5. RQWorldblender commented on Jun 22, 2020

    @RQWorldblender
    Author

    I do have RNDIS after I used the kernel config options you showed me. I did my initial testing on pmOS, but settled on using the rootfs from the Ubuntu MATE 18.04 Raspberry Pi images from https://ubuntu-mate.org/ports/raspberry-pi/ as my daily driver. It contains a full-blown GUI experience with a decent amount of programs installed OOTB. Note that I'm still using the same boot images I made for pmOS, as the initramfs functions only look for partitions named "pmOS_boot" and pmOS_root".

    One thing I noticed is that the micro HDMI output is detected while running pmOS, but not yet on the Ubuntu MATE image. This may be because the drivers are preinstalled on every pmOS rootfs I make. The PPA at https://launchpad.net/~grate-driver/+archive/ubuntu/ppa helped me get micro HDMI output on this distro, after I removed the fbturbo driver.

    What web browsers can I use since Firefox will likely not work, although with an inferior experience due to poor Javascript performance? Chromium can run on this tablet, but its performance will likely suffer.

    I really can't open any programs that require OpenGL at all. Is there a way I can fall back to software rendering so that at least these programs can open properly?

    I have been trying as many desktop environments as I can, but KDE 5 Plasma in particular, won't open up plasma shell at all, meaning that I can't really interact unless I open up a terminal to launch programs in.

  6. digetx commented on Jun 23, 2020

    @digetx
    Member

    Firefox won't work on Tegra20 devices because Mozilla dropped Tegra20 support about 2 years ago by enforcing ARM NEON compilation flags. It should be possible to revert it, but then you'll have to maintain your own firefox build. It's possible to use a pre-NEON firefox version, but it's quite outdated now.

    The Pale Moon browser works on Tegra20 since it's based on older firefox codebase.

    Javascript usually isn't a problem if adblock is active. Lack of GL support is more noticeable on a "heavy" websites. I was using Chromium about year or two ago and it was okay back then, I stopped using it at all once Ubuntu switched Chromium to a snap package. IIRC, the snap package is built using wrong compiler flags (ARM NEON), so it doesn't work on Tegra20. If you need Chromium, then you may install an older pre-snap Ubuntu deb package, or maybe you can borrow a newer deb from Debian.

    Nowadays I'm using KDE falkon webbrowser (which is chromium based), it works very well on A500. I'm also using Plasma 5 on A500 as the main DE and it works great!

    It's possible to use software rendering and you'll need it for things like SDDM. Please pull the latest update from grate-driver PPA, I re-added Mesa build for Ubuntu Bionic there, it will provide a working SW rendering.

    Add these lines to /etc/security/pam_env.conf:

    QT_IM_MODULE=qtvirtualkeyboard
    QT_QUICK_BACKEND=software
    LIBGL_ALWAYS_SOFTWARE=1
    

    The QT_IM_MODULE provides Qt's virtual keyboard in SDDM and everywhere else. But it is a bit unusable outside of SDDM, so it's better to use something else, like onboard keyboard for example. Add this line to ~/.profile to get rid of the QT's virtual keyboard after login:

    unset QT_IM_MODULE
    

    Be prepared that first run of SDDM may take few minutes because of the fonts-cache generation.

    Now you can enjoy Plasma 5 on A500!

  7. RQWorldblender commented on Jun 24, 2020

    @RQWorldblender
    Author

    Your suggestions to use the environment variables really helped me reach the Plasma desktop! Thank you again!
    I noticed the Mesa libraries in the PPA by surprise, but it's good they landed now. I use LightDM instead of SDDM as the display manager, as its gtk-greeter doesn't require compositing.

    What about GNOME Shell, where it doesn't open up because Mutter complains about no drivers found? Hence the Clutter backend can't load at all? Are there some environment variables I can use to enable GNOME Shell to successfully load, or is it a no go? I've been struggling to find a desktop environment that will work OOTB with the touch screen, so if GNOME Shell can't be run at all, I guess I'll have to settle on KDE Plasma.

    The problems I ran into on other desktop environments include:

    • Not being able to click or scroll further in submenus on GTK3 ones
    • Menus too small for touch use on GTK2 ones
    • No right-click or middle-click access without hardware mouse or Onboard OSK
  8. okias commented on Jun 24, 2020

    @okias
    Contributor

    GNOME-Shell relies on 3D acceleration, so it would be extremely slow. If you'd like to try something from GNOME world, you could try Phosh, but it's still relaying on 3D acceleration.

  9. digetx commented on Jun 25, 2020

    @digetx
    Member

    Yes, the desktop GNOME Shell requires GL support, nothing we can do about it for now. KDE Plasma is what I use, not sure if there is any touch-oriented DE that doesn't require GL.

    • The submenus is indeed a problem in some applications
    • The menu size is usually okay to me. But I guess it could be tuned in a GTK theme?
    • Some applications support long-tap for a right click, like falkon for example. It is possible to change the volume-keys binding by setting them to a mouse click in the device-tree 😄
  10. 84 remaining items

  11. added a commit that references this issue on Sep 26, 2021
  12. RQWorldblender commented on Jul 4, 2022

    @RQWorldblender
    Author

    The lack of NEON on the Nvidia Tegra 2 of this tablet (which more and more applications are using these days, including the Firefox web browser) has made me consider selling my Acer Iconia Tab A500. Though I enjoyed using a mainline Linux kernel on a real ARM tablet, frequent issues of running out of memory especially during web browsing have also plagued me.

    Even though I enjoyed my time repurposing this tablet to become a Linux one, I think it's time that I move onto some more recent hardware. I know about planned obsolescence, but when most manufacturers are including NEON support in their ARM SOCs, and most mainstream applications are taking advantage of it, I can greatly feel the effects of this. Again, I'm grateful for all the mainlining efforts done (thanking you too, @digetx), them being the reason why I could get postmarketOS supported for this tablet.

    If anyone is interested in buying this tablet from me, just contact me and I'll try to work something out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions