Ubuntu 21.04.1 Nexus 7 2012 rev. E1565 kernel-5.15.0-rc4-next-20211011-postmarketos-grate

LuxiTD
29/8/2021 12:30Phản hồi: 0
Ubuntu 21.04.1 Nexus 7 2012 rev. E1565 kernel-5.15.0-rc4-next-20211011-postmarketos-grate
Ubuntu 21.04 Hirsute Hippo pre-image server armhf kernel 5.15.0-rc4-next-20211011-postmarketos-grate
https://drive.google.com/drive/u/0/folders/1X7s3Qg2sX4pc5M-_FTlzON68Gptr1ro5
Ubuntu 21.04 Hirsute Hippo kernel-5.15.0-rc4 - Google Drive
drive.google.com


Ubuntu 21.04 Hirsute Hippo pre-image server armhf kernel 5.14.0-rc3-next-20210729-grate
https://drive.google.com/drive/folders/1jhq1v5ejOazDB1wSF-ZS0FxBc_QIPUFD
ubuntu - Google Drive
drive.google.com


Cần có micro-usb keyboard để input trong command line

Cách kiểm tra Nexus 7 2012 là mã cũ PM269 hay E1565. Tham khao:

https://wiki.postmarketos.org/wiki/Google_Nexus_7_2012_(asus-grouper)
Google Nexus 7 2012 (asus-grouper) - postmarketOS
wiki.postmarketos.org


Variants

  • grouper rev. PM269 - without GSM (oldest)
  • grouper rev. E1565 - without GSM (modern revision)
  • tilapia rev. E1565 - with GSM

Do I have grouper or tilapia?


TWRP (adb shell) $ grep androidboot.baseband=unknown /proc/cmdline && echo grouper || echo tilapia

Which hardware revision of grouper do I have?



TWRP (adb shell) $ find /sys/devices/ | grep -c max776 && echo You have E1565

TWRP (adb shell) $ find /sys/devices/ | grep -c tps6591 && echo You have PM269



Đặt máy về bootloader, để flash boot.img qua fastboot hoặc dùng method của postmarketOS. Kết nối Nexus 7 vào máy tính qua cáp usb chuẩn 1.0 → 2.0

Quảng cáo


$ sudo adb start-server

$ sudo adb reboot bootloader

$ sudo fastboot flash boot <boot_filename>.img

Vào TWRP for grouper 3.3.1-0 trở lên https://dl.twrp.me/grouper/

Download TWRP for grouper

Download TWRP Open Recovery for grouper
dl.twrp.me

Dùng adb shell trên PC/laptop hoặc Advance/Terminal trong twrp để umount mmcblk0p9 (làm 2 lần cho chắc ăn) [với tilapia (bản 3G) là mmcblk0p10]

1. TWRP(Advance → Terminal): $ df
2. TWRP(Advance → Terminal): $ umount /dev/block/mmcblk0p__ <- fill partition number
3. TWRP(Advance → Terminal): $ umount /dev/block/mmcblk0p__ <- fill partition number

Quảng cáo



On PC/Laptop terminal:

$ adb push <rootfs_filename>.img /dev/block/mmcblk0p__ <- fill partition number

  • grouper has likely data on /dev/block/mmcblk0p9 but make sure!
  • tilapia has likely data on /dev/block/mmcblk0p10 but make sure!

Khi cài bản ubuntu pre-image server này vào, ubuntu mặc định sẽ boot bằng cloud-init và vào thẳng root khi nhấn Enter tại dòng thông báo hoặc disable cloud-init bằng empty file, tránh lỗi "used fallback datasource" như sau:

# sudo touch /etc/cloud/cloud-init.disabled

Bạn cần đổi passwd cho user ubuntu mặc định bằng

# sudo passwd ubuntu

# exit

login: ubuntu
passwd: [your_passwd]

Tạo wpa.conf cho kết nối wifi voi wpa_

# sudo su

# sudo wpa_passphrase [your_ssid_name] [your_router_passwd] > wpa.conf

Loading wpa.conf vào wpa_supplicant và ping thử google.com

# sudo wpa_supplicant -B -i wlan0 -c wpa.conf

# sudo dhclient wlan0

# sudo ping -c 3 google.com

Tạo kết nối wifi bang iwd daemon

# sudo apt install iwd

# sudo systemctl stop wpa_supplicant

# sudo systemctl disable wpa_supplicant

# sudo systemctl start iwd

# sudo systemctl enable iwd

# sudo iwctl

[iwctl]# device list

[iwctl]# station wlan0 scan

[iwctl]# station wlan0 get-networks

[iwctl]# station wlan0 connect [your_ssid]

Passwd: [your_router_passwd]

[iwctl]# exit

# sudo ip a

# sudo dhclient wlan0

# sudo ping -c 3 google.com

Update repository:

# sudo apt update && sudo apt upgrade

# sudo add-apt-repository ppa:grate-driver/ppa

# sudo apt install alsa-ucm-conf libvdpau-tegra xserver-xorg-video-opentegra linux-firmware libd3dadapter9-mesa libegl-mesa0 libgbm1 libgl1-mesa-dri libglapi-mesa libglx-mesa0 libosmesa6 mesa-opencl-icd mesa-va-drivers mesa-vdpau-drivers mesa-vulkan-drivers

Cài DE như Lubuntu, Xubuntu, Kubuntu, MATE, GNOME, Phosh, Budgie, Cinamon, Elementary, v.v...

GPU driver opentegra from grate-driver launchpad
https://launchpad.net/~grate-driver/+archive/ubuntu/ppa/+packages?field.name_filter=&field.status_filter=published&field.series_filter=hirsute

Packages in “grate-driver” : grate-driver : “grate-driver” team

Opensource drivers for NVIDIA Tegra from the GRATE project https://github.com/grate-driver
launchpad.net


Trong /opt folder có các utils temp_throttle, cpufreq.start, clear_ram, sysctl.conf v.v…

Remove RaspBerryPi package
# sudo apt purge --auto-remove u-boot-rpi:armhf linux-firmware-raspi2 linux-headers-5.11.0-1007-raspi linux-headers-5.11.0-1016-raspi linux-headers-raspi linux-image-5.11.0-1007-raspi linux-image-5.11.0-1016-raspi linux-image-raspi linux-modules-5.11.0-1007-raspi linux-modules-5.11.0-1016-raspi linux-raspi linux-raspi-headers-5.11.0-1007 linux-raspi-headers-5.11.0-1016 ubuntu-raspi-settings

# sudo apt install bluez dconf-gsettings-backend dconf-service libdconf1

Remove cloud-init

# sudo dpkg-reconfigure cloud-init

# sudo systemctl stop cloud-init

# sudo systemctl disable cloud-init

# sudo apt purge --auto-remove cloud-init

# sudo rm -rf /etc/cloud/ && sudo rm -rf /var/lib/cloud/

Disable systemd service load failed

# sudo systemctl --failed

# sudo systemctl disable networking

# sudo systemctl disable rpi-reconfigure-raspi-firmware

# sudo systemctl disable rpi-set-sysconf

Bypass emergency shell/emergency mod

# sudo systemctl mask emergency.service

# sudo systemctl mask emergency.target

Installing gnome-shell-common for testing

# sudo apt install tlp tlp-rdw rfkill dhcpcd5 build-essential gdm3 gnome-shell-common gnome-terminal human-theme

# sudo systemctl daemon-reload

# sudo systemctl default

# sudo reboot

Install build-essential, rfkill, bluez5, bluez-utils, neard, alsautils, alsa-base

**Virtual memory, kernel parameters and CPU frequencies Ondemand governor

$ sudo nano /etc/sysctl.conf

# content of this file will override /etc/sysctl.d/*

vm.swappiness=100
vm.vfs_cache_pressure=500
vm.dirty_background_ratio=5
vm.dirty_ratio=20
#vm.dirty_background_bytes = 11758094
#vm.dirty_bytes = 23516188
vm.dirty_writeback_centisecs=500
vm.dirty_expire_centisecs=200
vm.lowmem_reserve_ratio=32 32
vm.min_free_kbytes=3072
vm.user_reserve_kbytes=6144
vm.admin_reserve_kbytes=3072
vm.panic_on_oom=0
vm.overcommit_memory=1
vm.overcommit_ratio=50
#vm.drop_caches=3
vm.laptop_mode=0
vm.mmap_min_addr=4096
vm.oom_kill_allocating_task=0
vm.extfrag_threshold=500
vm.oom_dump_tasks=1
vm.page-cluster=0
vm.stat_interval=1
vm.compact_unevictable_allowed=0
vm.highmem_is_dirtyable=0

kernel.panic=10
kernel.panic_on_oops=1
kernel.tainted = 0
kernel.ctrl-alt-del = 1
kernel.threads-max = 15503
kernel.random.write_wakeup_threshold = 128
kernel.usermodehelper.bset=4294967295 4294967295
kernel.usermodehelper.inheritable=4294967295 4294967295
kernel.printk = 4 4 1 7
kernel.kptr_restrict = 2
kernel.randomize_va_space = 2
kernel.perf_event_paranoid = 3
kernel.keys.root_maxkeys=200
kernel.keys.root_maxbytes=20000
kernel.perf_event_paranoid=1
kernel.perf_cpu_time_max_percent=3
kernel.shmmax=268435456
kernel.shmall=2097152
kernel.msgmni=2048
kernel.msgmax=64000
kernel.sem=500 512000 64 2048
kernel.auto_msgmni=1
kernel.sched_child_runs_first=1
kernel.hung_task_timeout_secs=0

fs.file-max = 99222
fs.epoll.max_user_watches = 138922

net.core.somaxconn = 128
net.core.wmem_max = 131072
net.core.rmem_max = 131072
net.core.wmem_default = 112640
net.core.rmem_default = 112640
net.core.warnings = 1

net.ipv4.tcp_ecn=1
net.ipv4.tcp_fastopen=3
net.ipv4.tcp_timestamps=0
net.ipv4.tcp_tw_reuse=1
net.ipv4.tcp_wmem=1536 21845 131072
net.ipv4.tcp_rmem=1536 21845 131072

$ sudo sysctl -p

$ sudo nano /opt/cpufreq.start

# Set the governor to ondemand for all processors
for cpu in /sys/devices/system/cpu/cpufreq/policy*; do
echo ondemand > ${cpu}/scaling_governor
done

# Reduce the boost ignore_nice_load to 0
echo 0 > /sys/devices/system/cpu/cpufreq/ondemand/ignore_nice_load

# Reduce the boost io_is_busy to 0
echo 0 > /sys/devices/system/cpu/cpufreq/ondemand/io_is_busy

# Reduce the boost powersave_bias to 0 <-- tăng giảm xung của cpu/gpu
echo 0 > /sys/devices/system/cpu/cpufreq/ondemand/powersave_bias

# Reduce the boost sampling_down_factor to 2
echo 2 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor

# Reduce the boost sampling_rate to 20000
echo 20000 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate

# Reduce the boost threshold to 95%
echo 95 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold

$ sudo sh /opt/cpufreq.start

***Control CPU frequency matching with thermal, using shell scripts

https://github.com/Sepero/temp-throttle/tree/4e6fa06ea036129c4a815fc5d4494556578624e1

GitHub - Sepero/temp-throttle at 4e6fa06ea036129c4a815fc5d4494556578624e1

A shell script for throttling system CPU frequency based on a desired maximum temperature - GitHub - Sepero/temp-throttle at 4e6fa06ea036129c4a815fc5d4494556578624e1
github.com


Low_temp = max_temp - 3

$ sh temp_throttle 59

Create startup temperature for cpu throttle at login
$ visudo

ALL ALL=(ALL) NOPASSWD: /path/to/temp_throttle

$ sudo chown root:root /path/to/temp_throttle

$ sudo chmod 755 /path/to/themp_throttle

Settings → Sessions and Applications Startup

Command: sudo /path/to/temp_throttle 58

***Fix sound ALC5642 cho tegra-rt5640***

https://help.ubuntu.com/community/SoundTroubleshooting
SoundTroubleshooting - Community Help Wiki
help.ubuntu.com


https://forum.ubuntuusers.de/topic/medion-akoya-e2228t/2/
Medion Akoya E2228t › System einrichten und verwalten › Systemverwaltung, Installation, Aktualisierung › Forum › ubuntuusers.de
forum.ubuntuusers.de


$ sudo lsmod | grep "^snd" | cut -d " " -f 1

snd_soc_tegra30_i2s
snd_soc_tegra30_ahub
snd_soc_tegra_pcm
snd_soc_tegra_machine
snd_soc_core
snd_pcm_dmaengine
snd_pcm
snd_timer
snd

$ sudo nano /etc/modules

snd_soc_rl6231
snd_soc_rt5640
snd_soc_tegra30_i2s
snd_soc_tegra30_ahub
snd_soc_tegra_pcm
snd_soc_tegra_machine
snd_soc_tegra_wm8903
snd_soc_core
snd_soc_wm8903
snd_pcm_dmaengine
snd_pcm
snd_timer
snd

$ sudo reboot

Checking soc soundcard loaded:

$ sudo cat /proc/asound/card*/id

ALC5642

$ sudo alsa force-reload

$ alsamixer -c 0

Enable các thông số thiết lập (phím M hoặc phím mũi tên lên/xuống): "Speaker R" "Speaker L" "DAC MIXR INF1" "DAC MIXL INF1" "SPOL MIX DAC R1" "SPOL MIX DAC L1" "Stereo DAC MIXR DAC R1" "Stereo DAC MIXL DAC L1"

***Auto rotate screen using gawk and iio-sensor-proxy***

https://github.com/donbowman/kde-auto-rotate

GitHub - donbowman/kde-auto-rotate: Autorotate the display & pointers on a convertible laptop

Autorotate the display & pointers on a convertible laptop - donbowman/kde-auto-rotate
github.com


Switch code left-up to normal, switch code right-up to bottom-up. Following readme to install or download edit package: https://www.mediafire.com/file/pvfqfm2zee84xzz/

Chia sẻ

Xu hướng

Xu hướng

Bài mới









  • Chịu trách nhiệm nội dung: Trần Mạnh Hiệp
  • © 2024 Công ty Cổ phần MXH Tinh Tế
  • Địa chỉ: Số 70 Bà Huyện Thanh Quan, P. Võ Thị Sáu, Quận 3, TPHCM
  • Số điện thoại: 02822460095
  • MST: 0313255119
  • Giấy phép thiết lập MXH số 11/GP-BTTTT, Ký ngày: 08/01/2019