Archiv der Kategorie: Schule/Studium

HP ProBook 440 G4, Ubuntu 17.04 Nvidia Prime and SecureBoot

Short review:

The Display is way better than other reviews state.
Yes, it’s bad in direct sunlight, but I can live with that.

With the brightness turned up I’ll get about 8h of battery while writing in LATEX or Markdown and occasionally browsing in Chrome.

The HDD slot is a slim one (7mm height).

Secureboot with Nvidia Prime / Optimus / nvidia-prime

This will sign all your new modules automatically on a new kernel.

Reminder: keep your secret key save, e.g. encrypt your harddrive.

Based on: https://gist.github.com/Garoe/74a0040f50ae7987885a0bebe5eda1aa

# Place all files in ~/.ssl folder

mkdir ~/.ssl
cd ~/.ssl

# Generate custom keys with openssl

openssl req -new -x509 -newkey rsa:2048 -keyout MOK.priv -outform DER -out MOK.der -nodes -subj „/CN=Owner/“

Create file: sign-all-modules: (replace username with yours)

#!/bin/bash

echo „Signing the following modules“
for filename in /lib/modules/$(uname -r)/updates/dkms/*.ko; do
/usr/src/linux-headers-$(uname -r)/scripts/sign-file sha256 /home/<USERNAME>/.ssl/MOK.priv /home/<USERNAME>/.ssl/MOK.der $filename

echo „$filename“
done

 

# INSTALL FILE TO RUN AFTER KERNEL UPGRADE

sudo install ~/.ssl/sign-all-modules /etc/kernel/postinst.d/

#Add the key to the trusted keys database

sudo apt-get install mokutil
sudo mokutil –import ~/.ssl/MOK.der

# install the nvidia driver

Follow https://help.ubuntu.com/community/BinaryDriverHowto/Nvidia, but don’t disable secure boot

# run the script once

cd /etc/kernel/postinst.d/

sudo  ./sign-all-modules

# reboot

and install keys in EFI

Switch Graphics Cards

Just install PRIME INDICATOR PLUS – http://www.webupd8.org/2016/10/prime-indicator-plus-makes-it-easy-to.html

sudo add-apt-repository ppa:nilarimogard/webupd8
sudo apt update
sudo apt install prime-indicator-plus

Activate Sleep/Standby on lid close

https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1574120

edit your /etc/systemd/logind.conf
add: HandleLidSwitchDocked=suspend

Side effect: your laptop will sleep with the lid closed and an external monitor attached.

Three Finger as Middle Mouse Button

Klick the touchpad on the upper right corner.

OR:

run:

synclient ClickFinger3=2
and
synclient TapButton3=2

make it permanent:
add the commands to the file ~/.profile

Save Power

install laptop-mode-tools: https://wiki.ubuntuusers.de/laptop-mode-tools/

in English with gui: http://www.webupd8.org/2014/01/install-laptop-mode-tools-164-with.html

or you can use sudo powertop –auto-tune
and make those changes permanent: https://askubuntu.com/questions/112705/how-do-i-make-powertop-changes-permanent

 

Mute Button won’t change color

known bug, but a workaround exists for kernel >= 4.12

download and install kernel from: http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.13-rc1/

(sudo dpkg -i * in the kernel-dl folder)

then

add „options snd-hda-intel model=mute-led-gpio“ in „/etc/modprobe.d/alsa-base.conf

https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1683277

Android Encryption with CustomROM

If you are using a CustomROM on your device and the Encryption process gets stuck at the nice little robot with the gears and adb-logcat only says:

E/Cryptfs ( 217): Bad magic for real block device /dev/block/platform/msm_sdcc.1/by-name/userdata
E/Cryptfs ( 217): Orig filesystem overlaps crypto footer region. Cannot encrypt in place.

it means that your userdata filesystems fills the whole partition.

Android needs a little space left at the end of the filesystem to store encryption-metadata.

But there is a fix for this: https://forum.xda-developers.com/showthread.php?t=2122702

Hurray 🙂

Beware: there is an issue with accessing your data with some recoveries
https://github.com/TeamWin/Team-Win-Recovery-Project/issues/334

—————-

Sollte euer Android mit Custom Rom, z.B. Cyanogenmod auf dem Verschlüsselungsbildschirm (Roboter mit Zahnrädern) hängen bleiben und im log nur:

E/Cryptfs ( 217): Bad magic for real block device /dev/block/platform/msm_sdcc.1/by-name/userdata
E/Cryptfs ( 217): Orig filesystem overlaps crypto footer region. Cannot encrypt in place.

stehen, dann gibt es hier einen fix: https://forum.xda-developers.com/showthread.php?t=2122702

Das Problem ist, dass das userdata-Dateisystem die komplette Partition füllt, Android aber ein wenig Platz am Ende benötigt um Metadaten für die Verschlüsselung zu speichern.

Aber Achtung: es scheint derzeit ein Problem mit verschiedenen Recoveries zu geben:
https://github.com/TeamWin/Team-Win-Recovery-Project/issues/334

Bevor ihr fragt . . . meine Abiergebnisse

Also bisher (ohne mündliche Prüfung / bzw. mit 0P) 1,7
Wenn
ich in der mündlichen Prüfung 15P mache, habe ich ein 1,4er Abi.

Ergebnisse:
IT (doppelt gewertet) 14 Schnitt

Schriftliche Prüfung Schnitt von 12.1 – 13.1
IT (doppelt gewertet) 14 13,3
Mathe 13 11,6
Deutsch (doppelt) 7 *mist* 12,3
Chemie 11 *auch mist* 13,6

Thema der mündlichen Prüfung in GGK:

Das Internet als 5. Gewalt