Jump to content

Samsung Galaxy S8 (samsung-dreamlte): Difference between revisions

From postmarketOS Wiki
Ampurex (talk | contribs)
mNo edit summary
Halamix2 (talk | contribs)
mNo edit summary
Line 78: Line 78:
3. Setup pmbootstrap:
3. Setup pmbootstrap:


<source lang="shell-session">
<syntaxhighlight lang="shell-session">
$ pmbootstrap init
$ pmbootstrap init
...
...
Line 89: Line 89:
User interface [weston]:              <- choose your preferred UI
User interface [weston]:              <- choose your preferred UI
...
...
</source>
</syntaxhighlight>


4. Create a twrp flashable .zip
4. Create a twrp flashable .zip
<source lang="shell-session">
<syntaxhighlight lang="shell-session">
$ pmbootstrap install --android-recovery-zip --recovery-install-partition=data
$ pmbootstrap install --android-recovery-zip --recovery-install-partition=data
</source>
</syntaxhighlight>


5. [[Installation_from_recovery_mode]]
5. [[Installation_from_recovery_mode]]
Line 103: Line 103:


1. Verify that the wlan0 interface exists
1. Verify that the wlan0 interface exists
<source lang="shell-session">
<syntaxhighlight lang="shell-session">
$ ip link
$ ip link
</source>
</syntaxhighlight>


2. Turn on wifi
2. Turn on wifi
<source lang="shell-session">
<syntaxhighlight lang="shell-session">
$ nmcli radio wifi on
$ nmcli radio wifi on
</source>
</syntaxhighlight>


3. List available wifis
3. List available wifis
<source lang="shell-session">
<syntaxhighlight lang="shell-session">
$ nmcli device wifi list
$ nmcli device wifi list
</source>
</syntaxhighlight>


4. Connect to your wifi
4. Connect to your wifi
<source lang="shell-session">
<syntaxhighlight lang="shell-session">
$ nmcli device wifi connect "$SSID" password "$PASSWORD"
$ nmcli device wifi connect "$SSID" password "$PASSWORD"
</source>
</syntaxhighlight>


5. Verify that you have been given an ip address on the wlan0, or swlan0, interface
5. Verify that you have been given an ip address on the wlan0, or swlan0, interface
<source lang="shell-session">
<syntaxhighlight lang="shell-session">
$ ip a
$ ip a
</source>
</syntaxhighlight>


or if you are using SXMO, just run
or if you are using SXMO, just run
<source lang="shell-session">
<syntaxhighlight lang="shell-session">
# nmtui
# nmtui
</source>
</syntaxhighlight>
select "Activate a connection" and connect to your wifi.
select "Activate a connection" and connect to your wifi.


Line 137: Line 137:
On mate or sxmo the screen brightness can be changed with:
On mate or sxmo the screen brightness can be changed with:


<source lang="shell-session">
<syntaxhighlight lang="shell-session">
echo a value between 0 and 36600
echo a value between 0 and 36600
# echo 18300 > /sys/devices/platform/panel_drv@001/backlight/panel/brightness
# echo 18300 > /sys/devices/platform/panel_drv@001/backlight/panel/brightness
</source>
</syntaxhighlight>


On xfce you can run set the brightness with xfpm-power-backlight-helper:
On xfce you can run set the brightness with xfpm-power-backlight-helper:


<source lang="shell-session">
<syntaxhighlight lang="shell-session">
set a value between 0 and 100
set a value between 0 and 100
# pkexec xfpm-power-backlight-helper --set-brightness 50
# pkexec xfpm-power-backlight-helper --set-brightness 50
</source>
</syntaxhighlight>


== USB OTG keyboard ==
== USB OTG keyboard ==


Connecting a USB keyboard does not work (tested on xfce). The keyboard shows up in dmesg and lsusb correctly, and  
Connecting a USB keyboard does not work (tested on xfce). The keyboard shows up in dmesg and lsusb correctly, and  
<source lang="shell-session">
<syntaxhighlight lang="shell-session">
# libinput list-devices
# libinput list-devices
</source>
</source>
shows it. However,  
shows it. However,  
<source lang="shell-session">
<syntaxhighlight lang="shell-session">
$ xinput list
$ xinput list
</source>
</source>
Line 162: Line 162:


elogind-daemon reports something like  
elogind-daemon reports something like  
<source lang="shell-session">
<syntaxhighlight lang="shell-session">
Watching system buttons on /dev/input/event8 (keyboard name)
Watching system buttons on /dev/input/event8 (keyboard name)
</source>
</source>
Line 172: Line 172:


Connecting a USB mouse works (tested on sxmo). The mouse shows up in dmesg and lsusb correctly, and  
Connecting a USB mouse works (tested on sxmo). The mouse shows up in dmesg and lsusb correctly, and  
<source lang="shell-session">
<syntaxhighlight lang="shell-session">
# libinput list-devices
# libinput list-devices
</source>
</syntaxhighlight>
shows it and
shows it and
<source lang="shell-session">
<syntaxhighlight lang="shell-session">
$ xinput list
$ xinput list
</source>
</syntaxhighlight>
also shows it. However, the mouse cursor appears to be invisible in SXMO.
also shows it. However, the mouse cursor appears to be invisible in SXMO.


Line 184: Line 184:


Audio (tested on SXMO) does not work. According to
Audio (tested on SXMO) does not work. According to
<source lang="shell-session">
<syntaxhighlight lang="shell-session">
$ aplay -l
$ aplay -l
**** List of PLAYBACK Hardware Devices ****
**** List of PLAYBACK Hardware Devices ****
Line 211: Line 211:
   Subdevices: 1/1
   Subdevices: 1/1
   Subdevice #0: subdevice #0
   Subdevice #0: subdevice #0
</source>
</syntaxhighlight>
the card shows up as Exynos8895Mader but it does not work. This was tested by running
the card shows up as Exynos8895Mader but it does not work. This was tested by running
<source lang="shell-session">
<syntaxhighlight lang="shell-session">
$ speaker-test
$ speaker-test


Line 222: Line 222:
Using 16 octaves of pink noise
Using 16 octaves of pink noise
Playback open error: -16,Resource busy
Playback open error: -16,Resource busy
</source>
</syntaxhighlight>
and
and
<source lang="shell-session">
<syntaxhighlight lang="shell-session">
$ aplay /usr/share/sounds/alsa/Front_Center.wav
$ aplay /usr/share/sounds/alsa/Front_Center.wav
aplay: main:831: audio open error: Resource busy
aplay: main:831: audio open error: Resource busy
</source>
</syntaxhighlight>


== Sensors ==
== Sensors ==


<source lang="shell-session">
<syntaxhighlight lang="shell-session">
$ sudo apk add linux-tools-iio
$ sudo apk add linux-tools-iio
$ lsiio
$ lsiio
Line 259: Line 259:
Device 008: light_sensor
Device 008: light_sensor
Device 009: light_ir_sensor
Device 009: light_ir_sensor
</source>
</syntaxhighlight>


{{note|'''Note:''' Sensors might not work out-of-the-box, more work is required!}}
{{note|'''Note:''' Sensors might not work out-of-the-box, more work is required!}}
Line 267: Line 267:
=== Partition layout ===
=== Partition layout ===


<source lang="shell-session">
<syntaxhighlight lang="shell-session">
# fdisk -l /dev/block/sda
# fdisk -l /dev/block/sda
Note: sector size is 4096 (not 512)
Note: sector size is 4096 (not 512)
Line 303: Line 303:
   23        1318528        1318783      1024K  0700  NAD_REFER
   23        1318528        1318783      1024K  0700  NAD_REFER
   24        1318784        15614847      54.5G  0700  USERDATA
   24        1318784        15614847      54.5G  0700  USERDATA
</source>
</syntaxhighlight>


=== Unixbench results ===
=== Unixbench results ===

Revision as of 11:43, 1 February 2025

Samsung Galaxy S8
Samsung Galaxy S8
Samsung Galaxy S8
Manufacturer Samsung
Name Galaxy S8
Codename samsung-dreamlte, samsung-dream2lte
Released 2017
Type handset
Hardware
Chipset Samsung Exynos 8895
CPU 4x 2.3 GHz Mongoose M2 & 4x 1.7 GHz Cortex-A53
GPU Mali-G71 MP20
Display 1440 x 2960 Super AMOLED
Storage 64 GB
Memory 4 GB
Architecture aarch64
Software
Original software Android
Original version 7.1
postmarketOS
Category testing
Pre-built images no
Mainline partial
postmarketOS kernel 4.4.111
Unixbench Whet/Dhry score 4559.4
Features
Flashing
Works
USB Networking
Works
Internal storage
No data
SD card
No data
Battery
Works
Screen
Works
Touchscreen
Works
Multimedia
3D Acceleration
Broken
Audio
Broken
Camera
Broken
Camera Flash
No data
Connectivity
WiFi
Works
Bluetooth
Broken
GPS
Broken
NFC
No data
Modem
Calls
Broken
SMS
Broken
Mobile data
Broken
Miscellaneous
FDE
Partial
USB OTG
Works
HDMI/DP
No data
Sensors
Accelerometer
No data
Magnetometer
No data
Ambient Light
No data
Proximity
No data
Hall Effect
No data
Haptics
No data
Barometer
No data


Contributors

Maintainers

Users owning this device


How to enter recovery/odin mode

  • Press and hold Bixby Key + Volume Down + Power simultaneously while device is powered off for odin mode
  • Press and hold Bixby Key + Volume Up + Power simultaneously while device is powered off for recovery mode.

What works

  • Phone boots
  • Touchscreen
  • Framebuffer with msm-fb-refresher
  • Phone is charging and battery status is working
  • Volume and power buttons on gnome
  • Weston, GNOME (no longer works), Sxmo-de-dwm, Xfce4, MATE, Lxqt
  • Screen brightness changing on (at least) mate, sxmo xfce and lxqt (see Screen brightness)
  • USB OTG Devices (Keyboards, USB Hubs, Mouse, Flash drives, USB Wireless headset (tested with Razer Nari), Portable Music Players (tested with Samsung YP-U4) (tested all in SXMO))
  • Wifi with firmware package
  • Mainline (WIP)

Installation

1. Install pmbootstrap

2. Unlock the bootloader and flash twrp

3. Setup pmbootstrap:

$ pmbootstrap init
...
Vendor [samsung]: samsung              <- enter this
Device codename [dream]: dream         <- enter this
Available kernels (2):
* dreamlte: Kernel for the Samsung Galaxy S8
* dream2lte: Kernel for the Samsung Galaxy S8+
Kernel [dreamlte]: dreamlte            <- choose your device model
User interface [weston]:               <- choose your preferred UI
...

4. Create a twrp flashable .zip

$ pmbootstrap install --android-recovery-zip --recovery-install-partition=data

5. Installation_from_recovery_mode

Wifi

To connect to a wifi the same steps as for the Medion Lifetab S9714 (medion-kai) works:

1. Verify that the wlan0 interface exists

$ ip link

2. Turn on wifi

$ nmcli radio wifi on

3. List available wifis

$ nmcli device wifi list

4. Connect to your wifi

$ nmcli device wifi connect "$SSID" password "$PASSWORD"

5. Verify that you have been given an ip address on the wlan0, or swlan0, interface

$ ip a

or if you are using SXMO, just run

# nmtui

select "Activate a connection" and connect to your wifi.

Screen brightness

On mate or sxmo the screen brightness can be changed with:

echo a value between 0 and 36600
# echo 18300 > /sys/devices/platform/panel_drv@001/backlight/panel/brightness

On xfce you can run set the brightness with xfpm-power-backlight-helper:

set a value between 0 and 100
# pkexec xfpm-power-backlight-helper --set-brightness 50

USB OTG keyboard

Connecting a USB keyboard does not work (tested on xfce). The keyboard shows up in dmesg and lsusb correctly, and

# libinput list-devices
</source>
shows it. However, 
<syntaxhighlight lang="shell-session">
$ xinput list
</source>
does not show it, and it is not recognised in /var/log/Xorg.log.

elogind-daemon reports something like 
<syntaxhighlight lang="shell-session">
Watching system buttons on /dev/input/event8 (keyboard name)
</source>
in dmesg when the keyboard is connected. Maybe elogind is "hogging" the keyboard? Patching elogind to ignore the device does not make a difference though, X still does not recognise the keyboard.

however, in SXMO the USB Keyboard works as expected.

== USB OTG mouse ==

Connecting a USB mouse works (tested on sxmo). The mouse shows up in dmesg and lsusb correctly, and 
<syntaxhighlight lang="shell-session">
# libinput list-devices

shows it and

$ xinput list

also shows it. However, the mouse cursor appears to be invisible in SXMO.

Audio

Audio (tested on SXMO) does not work. According to

$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Exynos8895Mader [Exynos8895-Madera], device 0: RDMA0 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: Exynos8895Mader [Exynos8895-Madera], device 1: RDMA1 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: Exynos8895Mader [Exynos8895-Madera], device 2: RDMA2 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: Exynos8895Mader [Exynos8895-Madera], device 3: RDMA3 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: Exynos8895Mader [Exynos8895-Madera], device 4: RDMA4 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: Exynos8895Mader [Exynos8895-Madera], device 6: RDMA6 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: Exynos8895Mader [Exynos8895-Madera], device 7: RDMA7 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: Exynos8895Mader [Exynos8895-Madera], device 22: DP Audio snd-soc-dummy-dai-22 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0

the card shows up as Exynos8895Mader but it does not work. This was tested by running

$ speaker-test

speaker-test 1.2.5.1

Playback device is default
Stream parameters are 48000Hz, S16_LE, 1 channels
Using 16 octaves of pink noise
Playback open error: -16,Resource busy

and

$ aplay /usr/share/sounds/alsa/Front_Center.wav
aplay: main:831: audio open error: Resource busy

Sensors

$ sudo apk add linux-tools-iio
$ lsiio
Device 010: light_flicker_sensor
Device 011: proximity_sensor
Device 012: proximity_alert_sensor
Device 013: rotation_vector_sensor
Device 014: game_rotation_vector
Device 015: sig_motion_sensor
Device 016: step_det_sensor
Device 017: step_cnt_sensor
Device 018: tilt_detector
Device 019: pickup_gesture
Device 020: scontext_iio
Device 021: light_cct_sensor
Device 022: uncal_accel_sensor
Device 023: meta_event
Device 024: wake_up_motion
Device 000: 15b70000.adc
Device 001: accelerometer_sensor
Device 002: geomagnetic_sensor
Device 003: uncal_geomagnetic_sensor
Device 004: gyro_sensor
Device 005: uncal_gyro_sensor
Device 006: interrupt_gyro_sensor
Device 007: pressure_sensor
Device 008: light_sensor
Device 009: light_ir_sensor
Note Note: Sensors might not work out-of-the-box, more work is required!

Additional info

Partition layout

# fdisk -l /dev/block/sda
Note: sector size is 4096 (not 512)
Found valid GPT with protective MBR; using GPT

Disk /dev/block/sda: 124928000 sectors,  576M
Logical sector size: 4096
Disk identifier (GUID): 52444e41-494f-2044-4d4d-43204449534b
Partition table holds up to 128 entries
First usable sector is 6, last usable sector is 15615994

Number  Start (sector)    End (sector)  Size       Code  Name
   1            1024            2047       4096K   0700  BOTA0
   2            2048            3071       4096K   0700  NA
   3            3072            8191       20.0M   0700  EFS
   4            8192           10239       8192K   0700  PARAM
   5           10240           12287       8192K   0700  UP_PARAM
   6           12288           14335       8192K   0700  BOTA2
   7           14336           24575       40.0M   0700  BOOT
   8           24576           36351       46.0M   0700  RECOVERY
   9           36352           38399       8192K   0700  BOTA1
  10           38400           49151       42.0M   0700  RADIO
  11           49152           49407       1024K   0700  TOMBSTONES
  12           49408           49663       1024K   0700  DNT
  13           49664           49791        512K   0700  PERSISTENT
  14           49792           50047       1024K   0700  MISC
  15           50048           51071       4096K   0700  STEADY
  16           51072           55167       16.0M   0700  KEYREFUGE
  17           55168         1168767       4350M   0700  SYSTEM
  18         1168768         1296767        500M   0700  CACHE
  19         1296768         1299327       10.0M   0700  HIDDEN
  20         1299328         1312127       50.0M   0700  OMR
  21         1312128         1313407       5120K   0700  CP_DEBUG
  22         1313408         1318527       20.0M   0700  NAD_FW
  23         1318528         1318783       1024K   0700  NAD_REFER
  24         1318784        15614847       54.5G   0700  USERDATA

Unixbench results

========================================================================
   BYTE UNIX Benchmarks (Version 5.1.3)

   System: samsung-dreamlte: Linux
   OS: Linux -- 4.4.111 -- #1-postmarketOS SMP PREEMPT Thu Nov 12 22:35:19 UTC 2020
   Machine: aarch64 (unknown)
   Language: en_US.utf8 (charmap=, collate=)
   02:23:52 up 2 min,  load average: 8.04, 3.89, 1.52; runlevel

------------------------------------------------------------------------
Benchmark Run: Sat Nov 14 2020 02:23:52 - 02:28:42
8 CPUs in system; running 1 parallel copy of tests

Dhrystone 2 using register variables       10703098.1 lps   (10.0 s, 7 samples)
Double-Precision Whetstone                     4156.1 MWIPS (9.9 s, 7 samples)

System Benchmarks Partial Index              BASELINE       RESULT    INDEX
Dhrystone 2 using register variables         116700.0   10703098.1    917.1
Double-Precision Whetstone                       55.0       4156.1    755.7
                                                                   ========
System Benchmarks Index Score (Partial Only)                          832.5

------------------------------------------------------------------------
Benchmark Run: Sat Nov 14 2020 02:28:42 - 02:33:36
8 CPUs in system; running 8 parallel copies of tests

Dhrystone 2 using register variables       55058190.3 lps   (10.0 s, 7 samples)
Double-Precision Whetstone                    24234.1 MWIPS (10.4 s, 7 samples)

System Benchmarks Partial Index              BASELINE       RESULT    INDEX
Dhrystone 2 using register variables         116700.0   55058190.3   4717.9
Double-Precision Whetstone                       55.0      24234.1   4406.2
                                                                   ========
System Benchmarks Index Score (Partial Only)                         4559.4

Mainline

It boots! However only very limited hardware has support for now.

Note

GNOME no longer works, it shows GDM and after you log in with GNOME (wayland) it turns the screen off. Selecting GNOME on Xorg and logging in will immeditately send you back to GDM.

Links