2020-06-20 20:02:20 +02:00
# source
2020-06-20 19:41:59 +02:00
[Gentoo wiki - Dell XPS 13 2-in-1 (7390) ](https://wiki.gentoo.org/wiki/Dell_XPS_13_2-in-1_(7390 ))
[Ubuntu wiki - Dell XPS 13 2-in-1 (7390) ](https://wiki.ubuntu.com/Dell/XPS/XPS-13-7390-2-in-1 )
2020-06-22 06:47:37 +02:00
[Arch Linux - Dell XPS 13 2-in-1 (7390) ](https://wiki.archlinux.org/index.php/Dell_XPS_13_2-in-1_(7390 ))
2020-06-20 19:41:59 +02:00
2020-06-22 06:47:37 +02:00
# Bios setup
* have to disable Raid ... Enable AHCI
* Disable secure boot in bios to permit Hibernate
2020-06-21 11:42:45 +02:00
# install ubuntu full ZFS
2020-06-21 12:04:49 +02:00
Boot the Ubuntu 20.04 Desktop installer/live CD.
Click the “Try Ubuntu” button.
2020-06-21 11:42:45 +02:00
launch a terminal
~~~
$ sudo su
# apt install ssh
~~~
2020-06-21 11:51:08 +02:00
set a passwd to root to permit remote ssh
2020-06-21 11:42:45 +02:00
~~~
# passwd
New password :
Retype new passord :
passwd: password updated successfully
~~~
2020-06-21 14:47:41 +02:00
Edit */etc/ssh/sshd_config* to Enable PermitRootLogin change *prohibit-password* to *yes* like bellow.
2020-06-21 11:42:45 +02:00
2020-06-21 14:44:46 +02:00
~~~{.shell}
2020-06-21 11:42:45 +02:00
#PermitRootLogin prohibit-password
PermitRootLogin yes
~~~
~~~
service ssh restart
~~~
find yout IP with : *ip a*
then connect remotely with : *ssh*
2020-06-20 19:41:59 +02:00
# update zsys-setup
to enable zfs encryption and create a swap partition right sized for hibernation.
2020-06-21 12:03:17 +02:00
## enable zfs encyption on rpool
2020-06-20 19:41:59 +02:00
2020-06-21 12:03:17 +02:00
bpool remain unencrypt.
2020-06-20 19:41:59 +02:00
2020-06-21 12:04:49 +02:00
Search for “zpool create”, and make sure you have found the create command that has “rpool” on the last line.
Before the “zpool create” insert: echo MYPASSWORD |
Before the last line of the command insert these lines:
2020-06-20 19:41:59 +02:00
2020-06-21 14:44:46 +02:00
~~~{.cpp}
2020-06-20 19:41:59 +02:00
-O recordsize=1M \
-O encryption=aes-256-gcm \
-O keylocation=prompt \
-O keyformat=passphrase \
~~~
2020-06-21 12:58:45 +02:00
2020-06-21 13:09:49 +02:00
## in case you wanted to change zpool passwd
2020-06-21 12:58:45 +02:00
2020-06-21 14:44:46 +02:00
~~~{.shell}
$ zfs change-key rpool
2020-06-21 13:09:49 +02:00
~~~
2020-06-20 19:41:59 +02:00
## create swap partition to permit Hibernate
2020-06-21 13:19:50 +02:00
add theses 2 lines in : */usr/share/ubiquity/zsys-setup*
2020-06-21 13:19:14 +02:00
2020-06-21 14:44:46 +02:00
~~~{.shell}
2020-06-21 13:19:14 +02:00
MEMSIZE=$(cat /proc/meminfo | grep MemTotal | awk -F' ' '{print $2}')
SWAPVOLSIZE=$(( MEMSIZE / 1024 ))
~~~
2020-06-21 14:36:02 +02:00
like bellow :
2020-06-21 14:44:46 +02:00
~~~{.shell}
2020-06-21 12:03:17 +02:00
# Convert to MiB to align the size on the size of a block
SWAPVOLSIZE=$(( SWAPSIZE / 1024 / 1024 ))
MEMSIZE=$(cat /proc/meminfo | grep MemTotal | awk -F' ' '{print $2}')
SWAPVOLSIZE=$(( MEMSIZE / 1024 ))
prepare_target "${TARGET}"
format_disk "${DISK}" "${PARTBASE}" "${PARTESP}" "${PARTBPOOL}" "${PARTRPOOL}" "${SWAPVOLSIZE}"
init_zfs "${TARGET}" "${DISK}${PARTBASE}${PARTBPOOL}" "${DISK}${PARTBASE}${PARTRPOOL}"
init_system_partitions "${TARGET}" "${DISK}${PARTBASE}1" "${DISK}${PARTBASE}${PARTESP}"
~~~
2020-06-20 19:41:59 +02:00
2020-06-21 12:04:49 +02:00
Run ubiquity to start the installer and install as normal, selecting “Use entire disk” and the option to use ZFS.
2020-06-20 19:41:59 +02:00
2020-06-20 19:59:46 +02:00
source : [Linsomniac's Articles - Encrypting ZFS on Ubuntu 20.04 ](https://linsomniac.gitlab.io/post/2020-04-09-ubuntu-2004-encrypted-zfs/ )
2020-06-20 19:41:59 +02:00
# UHD screen
2020-06-21 14:44:46 +02:00
~~~
!!!
https://forum.xfce.org/viewtopic.php?id=13617
a essayer : xfconf-query -c xsettings -p /Gdk/WindowScalingFactor -s 2
xfconf-query -c xsettings -p /Gdk/WindowScalingFactor -s 2
~~~
2020-06-20 19:41:59 +02:00
## Changer la taille de police dans les applications Qt sous Xfce
2020-06-21 14:44:46 +02:00
voir source : [https://www.ezvan.fr/taille-police-qt.html]()
2020-06-20 19:41:59 +02:00
2020-06-21 14:44:46 +02:00
editer : ~/.Xresources : Ce fichier est utilisé par le serveur X pour configurer ses applications clientes.
2020-06-20 19:41:59 +02:00
2020-06-21 14:44:46 +02:00
~~~{.shell}
!-------------------------------------------------------------------------------
! Xft settings
!-------------------------------------------------------------------------------
2020-06-20 19:41:59 +02:00
2020-06-21 14:44:46 +02:00
Xft.dpi: 240
Xft.antialias: true
Xft.rgba: rgb
Xft.hinting: true
Xft.hintstyle: hintslight
Xft.autohint: false
Xft.lcdfilter: lcddefault
~~~
2020-06-20 19:41:59 +02:00
2020-06-21 14:44:46 +02:00
Il faut ensuite utiliser la commande xrdb pour appliquer ces paramètres :
2020-06-20 19:41:59 +02:00
2020-06-21 14:44:46 +02:00
~~~{.shell}
$ xrdb -merge ~/.Xresources
~~~
2020-06-20 19:41:59 +02:00
## console grub ...
2020-06-22 06:58:06 +02:00
Boot menu uses a tiny font (GRUB menu).
Best way to address this would be to have GRUB automatically select the right font, but GRUB is kept small on purpose, or to install a larger GRUB font when installing Ubuntu.
Workaround: let the default GRUB terminal driver, gfxterm, switch to a supported mode such as 1600x1200 (NB to list video modes, disable secure mode in the BIOS and run the videoinfo command in the GRUB shell accessed by pressing "c" from the GRUB menu):
~~~
2020-06-22 07:06:51 +02:00
GRUB_GFXMODE=1280x1024
2020-06-22 06:58:06 +02:00
~~~
2020-06-21 07:45:35 +02:00
~~~
2020-06-22 06:58:06 +02:00
update-grub
~~~
Splash screen uses too small logo and somewhat too small fonts (Plymouth).
2020-06-20 19:41:59 +02:00
2020-06-22 06:58:06 +02:00
Plymouth has logic to detect the proper scaling to apply, but it's still too small; workaround by forcing the scale on the kernel cmdline:
2020-06-20 19:41:59 +02:00
2020-06-22 06:58:06 +02:00
Add to GRUB_CMDLINE_LINUX in /etc/default/grub.
2020-06-20 19:41:59 +02:00
2020-06-22 07:06:51 +02:00
~~~
2020-06-22 06:58:06 +02:00
plymouth.force-scale=3
2020-06-22 07:06:51 +02:00
~~~
2020-06-20 19:41:59 +02:00
2020-06-21 07:51:23 +02:00
~~~
2020-06-22 06:58:06 +02:00
update-grub
~~~
Console terminal uses too small fonts.
Note that the package shipping the Ubuntu Monospace font for the terminal, fonts-ubuntu-console, is not installed by default and only ships 8x16 fonts.
2020-06-20 19:41:59 +02:00
2020-06-22 07:06:51 +02:00
Change the font by running :
~~~
dpkg-reconfigure console-setup
~~~
select a font face that supports a larger font size, for instance the Terminus font, and select a large font size such as 16x32; you need to reboot for the new font to be set.
2020-06-20 19:41:59 +02:00
# activate hibernation in system
2020-06-21 14:46:33 +02:00
Disable secure boot in bios to permit Hibernate.
2020-06-20 19:41:59 +02:00
souce : [](https://doc.ubuntu-fr.org/tutoriel/activer_hibernation)
2020-06-22 07:58:16 +02:00
~~~
apt install pm-utils
~~~
2020-06-20 19:41:59 +02:00
~~~
update-initramfs -u -k $(uname -r)
pm-hibernate
~~~
~~~
printf "RESUME=UUID=$(blkid | awk -F\" '/swap/ {print $2}')\n" | head -n 1| sudo tee /etc/initramfs-tools/conf.d/resume
2020-06-22 08:00:34 +02:00
~~~
you can check with : *blkid*
~~~
2020-06-20 19:41:59 +02:00
update-initramfs -u -k all
~~~
2020-06-20 19:52:45 +02:00
change /etc/default/grub : add your resume UUID into GRUB_CMDLINE_LINUX_DEFAULT
~~~
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash resume=UUID=75034ff5-...-9e4564e16d34"
~~~
2020-06-22 08:08:20 +02:00
## enable hibernate in system
/etc/polkit-1/localauthority/50-local.d/com.ubuntu.enable-hibernate.pkla
~~~
[Réactive hiberner par défaut dans upower]
Identity=unix-user:*
Action=org.freedesktop.upower.hibernate
ResultActive=yes
[Réactive hiberner par défaut dans logind]
Identity=unix-user:*
Action=org.freedesktop.login1.hibernate;org.freedesktop.login1.handle-hibernate-key;org.freedesktop.login1;org.freedesktop.login1.hibernate-multiple-sessions;org.freedesktop.login1.hibernate-ignore-inhibit
ResultActive=yes
~~~
2020-06-22 09:01:44 +02:00
## configure hibernate to auto switch from sleep to hibernate
edit : */etc/systemd/sleep.conf*
And add this value to it (The number represents seconds you want to pass in sleep, after which the computer will switch to hibernation, so you can put it in 60 seconds or something short just to check it's working and after that you can put whatever ammount of time you want):
~~~
[Sleep]
HibernateDelaySec=7200
~~~
2020-06-22 08:08:20 +02:00
[](https://doc.ubuntu-fr.org/tutoriel/activer_hibernation)
2020-06-20 19:41:59 +02:00
kernel lockdown prevent hibernation :
2020-06-21 07:50:48 +02:00
[](https://unix.stackexchange.com/questions/591488/why-does-the-kernel-lockdown-prevent-hibernation)
[](https://rephlex.de/blog/2019/12/27/how-to-hibernate-and-resume-from-swap-file-in-ubuntu-20-04-using-full-disk-encryption/)
2020-06-20 19:41:59 +02:00
2020-06-22 07:58:16 +02:00
Hiberner au bout de x secondes après une mise en veille
[](https://doc.ubuntu-fr.org/veille_et_hibernation)
2020-06-21 07:57:20 +02:00
## encrypt swap partition
~~~
2020-06-21 08:07:32 +02:00
apt-get install ecryptfs-utils
2020-06-21 07:57:20 +02:00
apt install cryptsetup-bin
2020-06-21 08:07:32 +02:00
swapoff -a
cryptsetup luksFormat --cipher aes-xts-plain64 --verify-passphrase --key-size 256 /dev/nvme0n1p2
2020-06-21 07:57:20 +02:00
~~~
2020-06-21 07:50:06 +02:00
2020-06-21 08:07:32 +02:00
[](https://help.ubuntu.com/community/EnableHibernateWithEncryptedSwap#Preparation)
2020-06-21 08:33:36 +02:00
[](http://tlbdk.github.io/ubuntu/2018/10/22/encrypted-swap.html)
2020-06-21 08:52:54 +02:00
[](https://forums.linuxmint.com/viewtopic.php?t=287015)
2020-06-21 08:55:00 +02:00
~~~
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash resume=/dev/mapper/cryptswap1"
~~~
2020-06-20 19:41:59 +02:00
# rotate
2020-06-21 07:50:06 +02:00
2020-06-20 19:41:59 +02:00
~~~
apt install iio-sensor-proxy
2020-06-21 07:50:06 +02:00
~~~
2020-06-20 19:41:59 +02:00
install : screen rotator : https://github.com/GuLinux/ScreenRotator
2020-06-21 07:45:35 +02:00
# zpool trouble mount it from live systeme
2020-06-20 19:41:59 +02:00
~~~
boot on usb drive
zpool import -R /mnt rpool
zfs load-key rpool
zfs mount rpool/USERDATA/nomad_e8bdbt
~~~