Archiv der Kategorie: real life und so

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

Ubuntu chroot initrd

Sollte zufällig euer Softwareraid nach einer wiederherstellung nicht mehr booten und euch viel zu spät auffallen, dass unter / die symlinks auf initrd.img und vmlinuz fehlen, dann liegt es vielleicht daran, dass euer apt kleine probleme mit subskripten hat.

Softraid Rettung:

!!! Grub wiederherstellen aus chroot !!!

 

http://wiki.hRtzner.de/index.php/Festplattenaustausch_im_Software-RAID

 

http://wiki.hetzner.de/index.php/Hetzner_Rescue-System#Einbinden_von_LVM-Volumes

eine Lösung: https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1325142

Für 64bit Systeme sind die Datenamen dann mit :amd64

my quick-fix work-around was to change the exit code errors into warnings:

apt-get -q update

# on 32bit version:
sed -i -e ‘s/exit $?/exit 0/’ \
“/var/lib/dpkg/info/libpam-systemd:i386.prerm”
service systemd-logind stop

apt-get –yes install systemd-services

sed -i -e ‘s/exit $?/exit 0/’ \
“/var/lib/dpkg/info/libpam-systemd:i386.postinst”

apt-get –yes install libpam-systemd
apt-get -f install –yes

sed -i -e ‘s/exit $?/exit 0/’ \
“/var/lib/dpkg/info/whoopsie.prerm”
apt-get –yes remove whoopsie libwhoopsie0

apt-get –yes upgrade

Hamish

413 Request Entity Too Large

Gelöst durch:

erhöhen von

post_max_size und
upload_max_filesize

in der php.ini: /etc/php5/apache2/php.ini

solltet ihr ssl benutzen und im apache ErrorLog folgendes stehen:

request body exceeds maximum size (#Zahl) for SSL buffer

einfach die folgende Zeile in die Apache-SiteConfig schreiben
SSLRenegBufferSize 100000000

gefunden: https://github.com/thinserver/OpenLawyers/issues/1

Ich sollte Tester für K2 Inline Skates werden

Ihre Top Modelle halten bei mir alle ca. 2 Jahre 🙁

Update:

Es kommt wohl durchaus öfter vor, dass sich die Schuhnieten verabschieden.

Lösungsmöglichkeiten:

Schrauben (USD Cuff Screws) wurden heute geliefert –> Skates wieder ganz (Wartezeit zwei Tage – und die auch nur, weil ich mitten in der Nacht bestellt habe und nicht einfach direkt am gleichen Tag).
Nach ca. 60km kann ich dem ganzen ein definitives Daumen hoch geben.

Kommunalwahl in Karlsruhe

Am 25.05.2013 finden hier in Karlsruhe Europa- und Kommunalwahlen statt.

Da ich das Kohi ja als Zweitwohnzimmer betrachte, finde ich die Aktion des Kulturrings die kulturpolitischen Vertreter aller im Gemeinderat vertretenen Fraktionen und Gruppen zu befragen ziemlich gut.

Hier die Fragen:

  1. Können Sie fünf freie Kulturträger nennen?
  2. Welches war die letzte Kulturveranstaltung, die Sie besucht haben?
  3. Welche Bedeutung haben Ihrer Meinung nach die freien Kulturträger in einer wachsenden Stadt?
  4. Freie Kulturträger fühlen sich von der Politik häufig in ihrer Bedeutung nicht angemessen gewürdigt. Was würden Sie dagegen unternehmen?
  5. Sie haben die Notwendigkeit und Möglichkeit eine der folgenden Einrichtungen zu schließen – welche wählen Sie und warum?
    • Badisches Staatstheater
    • KSC
    • Substage
  6. Wie tragen Sie dafür Sorge, dass im Masterplan-Projekt Kreativpark Alter Schlachthof das Leitbild verwirklicht wird?

Die Antworten findet ihr hier:

Standpunkte zur Kulturpolitik – die Videos