Jump to content

Samsung Galaxy Tab 3 Lite (samsung-goyavewifi)

From postmarketOS Wiki
Samsung Galaxy Tab 3 Lite
[[
Samsung-goyavewifi running LxQT with themes and fastfetch in a terminal.
Samsung-goyavewifi running LxQT
|200px|alt=]]
Manufacturer Samsung
Name Galaxy Tab 3 Lite
Codename samsung-goyavewifi
Model SM-T113(NU)
Released 2015
Type tablet
Hardware
Chipset Spreadtrum SC8830
CPU 4x 1.2 GHz Cortex-A7
GPU Mali-400 MP2
Display 600x1024 TFT
Storage 8 GB
Memory 1 GB
Architecture armv7
postmarketOS
Category downstream
Mainline
Instead of a Linux kernel fork, it is possible to run (Close to) Mainline.
no
pmOS kernel
The kernel version that runs on the device's port.
Linux 3.10.17 downstream
Unixbench score
Unixbench Whetstone/Dhrystone score. See Unixbench.
486.0
Device package device-samsung-goyavewifi
Kernel package linux-samsung-goyavewifi
Features
Flashing
Whether it is possible to flash the device with pmbootstrap flasher.
Works
USB Networking
After connecting the device with USB to your PC, you can connect to it via telnet (initramfs) or SSH (booted system).
Works
Internal storage
eMMC, SD cards, UFS...
Works
SD card
Also includes other external storage cards.
Works
Battery
Whether charging and battery level reporting work.
Works
Screen
Whether the display works; ideally with sleep mode and brightness control.
Partial
Touchscreen
Works
Multimedia
3D Acceleration
Broken
Audio
Audio playback, microphone, headset and buttons.
Partial
Camera
Broken
Connectivity
WiFi
Works
Bluetooth
Broken
GPS
Untested
Miscellaneous
FDE
Full disk encryption and unlocking with unl0kr.
Untested
USB OTG
USB On-The-Go or USB-C Role switching.
Works
Sensors
Accelerometer
Handles automatic screen rotation in many interfaces.
Works

Contributors

Users owning this device

  • Al3x
  • AmateurPenguin (Notes: lxQt, black)
  • Choc (Notes: running pmOS)
  • Ernk11323 (Notes: Running PostmarketOS)
  • HAKANKOKCU (Notes: Running PostmarketOS, have 2 which other has Lineage.)
  • Vicenre22 (Notes: i have 3 tablets (2 modded stock firmware and 1 for EDK2 porting with mainline))


How to enter flash mode

  • Download mode: Volume Down + Home + Power and press Volume Up
  • Recovery mode: Volume Up + Home + Power

Installation

Warning WARNING: Make sure you backed up your data!

Start with pmbootstrap init
Select your opinions but make sure device is samsung-goyavewifi and DE is not wayland.
2.Run pmbootstrap install
3.Device has an EMMC that is about 8GB. Installing onto EMMC is not recommended.
You need to export image file. (Because native sdcard flasher takes over 10 mins.)
5.run pmbootstrap export

6. If you are going to install into the sdcard, image is located here:

~/.local/var/pmbootstrap/chroot_native/home/pmos/rootfs

7.execute

$ pmbootstrap flasher flash_kernel # in download mode!


8.Done!

For first boot: You need to wait atleast 3 or 5 minutes to lightdm fully appear. (lightdm is slow) Notes: If your device doesnt show anything(just samsung galaxy tab 3 lite screen and nothing) try to ssh 172.16.42.1 if ssh throws error connection refused wait for 1~2 minutes. There may be something going wrong.

Display

Display works.

  • No gpu accel or drm, can only run x11.
  • Due to a patch "sprd swapped colors patch", no splash when booting.(Without the patch, Xorg crashes, both probably because the display is 16bit).
    • The error code of pbsplash is tfb_acquire_fb() failed with error code: 7 .
  • for any DE installation that uses lightdm (for example; xfce, mate), you need to install postmarketos-base-downstream
  • blanks after inactivity, likely some power-saving feature
    • echo 0 > /sys/class/graphics/fb0/blank turns it back on
  • Suspending doesnt work. X fails with
FBDEV(0): FBIOPUT_VSCREENINFO: Invalid argument
FBDEV(0): mode initialization failed
Fatal server error: AddScreen/ScreenInit failed for driver 0
  • lxqt ghosts on default theme and on some themes (only in taskbar) and notifications.
    • a quick fix is changing themes.
  • if you want to change the scale (in lxqt) add these to /etc/environment
QT_SCALE_FACTOR=0.75
QT_AUTO_SCREEN_SCALE_FACTOR=0.75

You can change the numbers to increase or decrease the scale.

Audio

  • Needs soc-sprd-audio-sc8830 package
  • Headphones and back speaker works
  • Headset and Handset only gives microphone and it's low volume, but /usr/share/alsa/ucm2/conf.d/sprdphone/HiFi can be patched to fix both. Like this
  • Back speakers freak out when plugged to a thing.

PulseAudio

Need to add these lines at /etc/asound.conf:

defaults.ctl.card 1
defaults.pcm.card 1
defaults.pcm.device 1

Also need to edit this line in /etc/pulse/default.pa:

load-module module-udev-detect

To:

load-module module-udev-detect tsched=0

WiFi

You can copy /system/etc/wifi from stock rom to the device, then wifi works.

Steps to fix wifi 1.Download wifi firmware below or extract yours from stock system image.

  • If you want to extract yours, you need to use an system unpacker.

2.SCP to your device and copy to the home folder of your device

$ sudo scp ~/wifi/* # your user name@172.16.42.1:~/*
# then, in your device
$ sudo mkdir /system
$ sudo mkdir /system/etc
$ sudo mkdir /system/etc/wifi
$ sudo cp ~/* /system/etc/wifi
$ sudo reboot

Now wifi should work.

Added them here: HAKANKOKCU/firmware-samsung-goyavewifi

Couldn't get firmware-aosp-broadcom-wlan working.

Photos

Here are some photos of the device. Black:

Camera

  • There is a video0 device.

sudo v4l2-ctl --stream-mmap --stream-count=1 --stream-to=raw.dat finishes with VIDIOC_REQBUFS returned -1 (Not a tty)
I'll try with sudo script /dev/tty0

3D Acceleration

  • Due to downstream kernel, lima doesnt work.
  • Lima is needed for the Mali 400 graphics.

Performance

  • Resource usages on goyavewifi when lxqt is running.

htop resource usages

  • This device can run firefox.
  • You can use NetSurf.
  • An example of netsurf showing this page.

netsurf

Useful tips

About swaps

  • You should enable swap for more ram and more performance.

You can make a swap file. Here is for a swap file sized 1024 MB;

~ $ dd if=/dev/zero of=/path/to/your/swapfile bs=256 count=4 # change path to your swapfile path (i recommend /system or /)
~ $ mkswap /path/to/your/swapfile # change the path
~ # swapon /path/to/your/swapfile # change the path
~ # nano /etc/fstab 
<add this line>
/path/to/your/swapfile swap swap sw,nofail 0 0 /path/to/your/swapfile
<end>

You can mount your sdcard

/home/user # mkdir /sdcard
/home/user # mount /dev/mmcblk1p1 /sdcard

You can also use udisks2 and gvfs, but sometimes doesn't work. For NTFS, you need ntfs-3g

Making it permanent

  • You can make mounting sdcard permanent;
/home/user # ash -c "echo 'sudo mount /dev/mmcblk1p1 /sdcard' > /etc/local.d/sdcard.start 
/home/user # chmod +x /etc/local.d/sdcard.start

You can mount system partitions:

/home/user # mkdir /system
/home/user # mount /dev/mmcblk0p23 /system

The fdisk output are located here

There are no boot screen or anything, how do I know whether device is booted or booting?

1. Look at the screen at 65 degrees.
If screen suddenly changes color(white to green),then you are booting.
You can see the difference looking at 60 to 80 degrees.
Note: Make sure the microusb port is looking left.

Input

HID buttons

  • event0: sci-keypad
    • home, power, volume keys
      • you can check raw data from /dev/input/event0

Touchscreen

  • event1: MELFAS_MMS449_Touchscreen
    • in portrait
    • includes "Recents" and back buttons
    • stops working on suspend, cat /sys/class/input/event1/device/device/device_enable reenables it
    • If you booted device in charging mode (battery icon with lightning) then the touchscreen dont work because in android,the device doesnt boot (in charging mode) so it doesnt need the touch screen.
  • Rotation fix: add this to /etc/X11/xorg.conf.d/00-fbdev-rotate-CCW.conf
Section "Device"
    Identifier "LCD"
    Driver "fbdev"
    Option "Rotate" "CCW"
EndSection
  • Note:this changes screens rotation to fix touch with rotation
  • Udev fix ( no rotation )
  • You can also add this at /etc/udev/rules.d/00-touchscreen-dev.rules:
SUBSYSTEM=="input", ATTRS{phys}=="1-0048/input0", ENV{LIBINPUT_CALIBRATION_MATRIX}="0 1 0 -1 0 1"

This needs a full reboot.

Headset

  • event2: headset-keyboard
    • works

Accelerometer

  • event3: accelerometer_sensor (STM K2HH)

Have to do this to get it working:

~ # echo 0 > /sys/class/input/event3/device/poll_delay
~ # echo 1 > /sys/class/input/event3/device/enable

You can confirm it working with evtest

Issues or Errors

  • In any DE with polkit, sometimes an error occurs that policykit has crashed. so any apps with root/changing brightness will not work. It sometimes works, sometimes doesn't.

No matter what, in dock or app menu no apps are displayed. So don't use xfce.

  • Using system as a swap partition is broken.After rebooting the system will fail to boot even if the system is installed to userdata or any other partition.
  • Console or None selections on pmbootstrap init has display issues.
  • Changing kernel cmdline doesnt work.

UART

This device can log UART with 619K (or 680K) resistor. 151K wouldn't log almost any S-Boot logs but OS exec'ed with kexec would still log.

To get S-Boot logs, put 619K resistor between ID and GND. While it's powering on, hold home button to get logs. This seems permanent in my device but shouldn't really affect normal usage. Just logs more stuff if you have CONFIG_FRAMEBUFFER_CONSOLE on.

For some reason, sdcard doesn't want to work while UART is active with micro usb.

Uart

Additional notes