Archiv der Kategorie: Allgemein

Resolve display flicker on the InfinityBook Pro 14 Gen6 by tuxedo

The guide by tuxedo tells you how to disable `PSR` which stands for panel-self-refresh.

But psr is a very useful feature to conserve.

Thanks to the reddit user 909876b4-cf8c I went down the rabbit hole to figure out what tuxedos custom solution actually does. They force psr version 1. link

I'm booting with i915.enable_psr=0

And after calling $ echo 0x3 > /sys/kernel/debug/dri/0/i915_edp_psr_debug

my display is still working fine and psr is enabled

cat /sys/kernel/debug/dri/0/i915_edp_psr_status 
Sink support: yes [0x03]
PSR mode: PSR1 enabled
Source PSR ctl: enabled [0x81f00ee6]
Source PSR status: IDLE [0x04010000]
Busy frontbuffer bits: 0x00000000

Optional: For a flicker free experience follow the guide in https://bennis-blog.de/2021/11/19/pop_os-nvidia-on-the-infinitybook-pro-14-gen6/ to add the kernel parameter `i915.enable_psr=0`

The actual fix

Create a systemd unit file to enable psr version 1.

$sudo nano /etc/systemd/system/infinitybook_psr_fix.service

# ---
[Service]
Type=oneshot
ExecStart=bash -c 'echo 0x3 > /sys/kernel/debug/dri/0/i915_edp_psr_debug'
[Install]
WantedBy=graphical.target
# If graphical.target doesn't work for you
# WantedBy=multi-user.target
# ---

$sudo systemctl daemon-reload
$sudo systemctl enable infinitybook_psr_fix.service
$sudo systemctl start infinitybook_psr_fix.service

# Confirm that it worked by calling 
sudo cat /sys/kernel/debug/dri/0/i915_edp_psr_status 

This fix might resolve the screen flickering for all HDPI displays on Alder Lake (12th gen Intel)

Nachhall von Gestern

Rücksendung der Schlüssel des Hauses meiner Kindheit mit folgendem Text:

Dieser Schlüssel war für mich das Symbol auf ein mögliches Zusammenfinden.

Unser letztes Gespräch hat leider gezeigt, dass es dazu nicht kommen kann.

Dina trägt nicht die Schuld an unserer Entfremdung, sondern deine Stimmungsschwankungen, Vorwürfe und Machtspiele.

Bitte hole dir die Hilfe, die du so dringend brauchst z.B. https://www.bmfsfj.de/bmfsfj/service/publikationen/psychologische-beratung-hilft–96026

Ich wünsche dir von Herzen ein erfülltes Leben.

Dein Sohn Benjamin
(2022-01-08)


Neues aus dem Irrenhaus

Situation:
Mein kleiner Bruder (>18J) ist inzwischen zurück aus dem Krankenhaus, eine heftige Infektion hat er weiterhin und nimmt Antibiotika.

Jetzt ist mein Erzeuger der Meinung: Das Problem ist der unregelmäßige Schlafrhythmus und setzt einen Timer auf das Wlan um so einen gesunden Rhythmus zu erzwingen.

(Meine Auffassung des ganzen ist, dass heftige Schmerzen und Antibiotika den unregelmäßigen Schlafrhythmus bedingen)

Aus Gründen habe ich meinem Erzeuger deshalb eine Nachricht geschickt, dass er sich psychologische Hilfe suchen soll und aufhören seine Probleme auf meinen kleinen Bruder zu projizieren. [lange Geschichte: er hat die Trennung von seiner Ex-Frau nie verarbeitet und gibt ihr / seinen Kindern die Schuld (Wortbeispiel: Wir hätten gegen ihn intregiert und hätten ihm bewusst psychischen Schaden zugefügt, aber er liebt uns noch …)]

Das Ergebnis dieser Nachricht war ein Anruf/Rant (ich kam wenig zu Wort) nach dem Motto:

  • Was fällt mir ein ihn so zu beleidigen
  • Ich hätte ihn damals (Rausschmiss meinerseits an Weihnachten. Siehe: Weihnachten und Weihnachten die 2te – oder der tollste Tag im Jahr) bewusst provoziert und außerdem hatte ich ja einen Schlüssel und hätte jederzeit wieder kommen können
    Er hat außerdem ein Beweisphoto vom Auto damals, er kann/will es mir aber nicht zuschicken, sondern wechselt lieber das Thema
  • Ob ich mich ohne Ekel im Spiegel anschauen kann
  • Hat meine Fähigkeit zur Selbstreflektion angezweifelt (siehe die Liste der Vorwürfe)
  • Mein kleiner Bruder (chronische Krankheit) hängt den ganzen Tag nur in seinem Zimmer herum, ist aber gleichzeitig eine enorme Belastung
  • Er liebt uns
  • Das Zimmer meines Bruders ist total zugemüllt (es steht voll, aber definitiv keine Müllhalde)
  • Er hat sich den Arsch für uns aufgerissen
  • Er hat mir Fahrrad fahren beigebracht
  • Er verdient gut
  • Er braucht keine psychologische Hilfe (braucht er IMHO seitdem ich ~14 Jahre alt war)
  • Ich wüsste ja bald wie es einem Vater so geht
  • Diverse Dinge über meine Mutter
  • Wir hätten als Kinder Psychoterror gegen ihn betrieben. Beispiele die genannt wurden: Haare im Waschbecken, Mülleimer nie geleert
  • Ich wäre ja fertig mit seinem Teil der Familie, da ich den Nachnamen meiner Frau angenommen habe
    (ich will eigentlich nur den selben Namen wie meine Kinder und da die Beziehung mit meinem Erzeuger nicht so toll ist hing ich eben auch nicht so sehr am Namen – er war auch zur Hochzeit eingeladen, genau wie die Oma)
  • ….
  • Er setzt meinen Bruder morgen in den Zug: Jetzt bin ich dran mit kümmern.
    Daran, dass eine Entfernung von >300km zu den Ärzten keine gute Idee, hat er nicht gedacht. Unabhängig der Wohnsituation (Wohnung vs. Haus)

Danach gab es noch ein Gespräch mit seiner Frau D. Sie begann damit meinen Erzeuger als Vater des Jahres zu preisen, der nur das Beste für meinen Bruder im Sinn hat. Eines ihrer Beispiele war der viele Stress, e.g. der neue 450€ Job den er nur aus Liebe zu seinem Sohn, damit er ihm ein Taschengeld zahlen kann, angefangen hat. Auf meine Rückfrage ob das auch so kommuniziert wurde, war die Antwort “Nein, aber sie interpretiert das so”.
Sie konnte mir dann aber zustimmen, dass es nicht zielführend ist meinen Bruder in den Zug zu setzen ist.
Auf den Rant von weiter oben angesprochen hieß es: Ich müsse ja verstehen, dass er das Opfer ist und persönlich sehr getroffen. (ich bin die Person die er vor die Tür gesetzt hat)

Fazit:
Das Gespräch war ein Fehler / zumindest nicht zielführend. Keines der Themen aus meiner Jugend wurde von ihm verarbeitet, die Verdrängung ist immer noch heftig.
Die Situation meines Bruders wurde auch nicht besser.
–> Kontakt des Erzeugers gelöscht und Nummer gesperrt

F*ck Querdenker, Impfskeptiker, usw.

Mein kleiner Bruder liegt im Krankenhaus, bekommt intravenös Antibiotika und mein Erzeuger empfiehlt ihm MMS (Verbraucherzentrale) gegen die Bakterien – for fucks sake.

Nachtrag: In einem späteren Gespräch wurde wohl noch davon abgeraten den Ärzten zu vertrauen und er solle sich selbst um seine Gesundheit kümmern. Nicht nur ist das eine wohldokumentierte Strategie der Spinner, untergräbt Jahrhunderte der Forschung und Medizin, sondern es gibt auch noch dem Kranken Schuld daran, dass es ihm nicht besser geht. – Ich finde das einfach nur pervers.
Noch besser: Eine Ablehnung dieser Schwurbel-Einstellung wurde mit “dir geht es wohl noch nicht schlecht genug” kommentiert.

Pop!_OS (nvidia) on the InfinityBook Pro 14 Gen6 by tuxedo

Summary of what I did.

Added the kernel parameter i915.enable_psr=0 using sudo kernelstub -a i915.enable_psr=0 to resolve the screen flicker issue. Even better: https://bennis-blog.de/2022/05/14/resolve-display-flicker-on-the-infinitybook-pro-14-gen6-by-tuxedo/

Installed:

  • tuxedo-control-center
  • tuxedo-keyboard
  • tuxedo-touchpad-switch (touchpad-led support – also add to startup applications)
  • tuxedo-pinfix-tgl-dkms (not sure if required)

For power tuning, I installed tlp and mostly adjusted

/etc/tlp.conf L0319: RUNTIME_PM_DRIVER_BLACKLIST="" so that runtime_pm is enabled for the nvidia card (it sometimes turned on [maybe after sleep]).

As the touchpad sometimes stops to work (mostly on login), I created a simple script that fixes the issue.

 #!/bin/bash
sudo rmmod i2c_hid_acpi
sudo modprobe i2c_hid_acpi

Maybe: set deep sleep: (I didn’t do that because the Nvidia card wakes up after standby)

sudo kernelstub -a "mem_sleep_default=deep"



Accelerated video playback. https://wiki.archlinux.org/title/Hardware_video_acceleration

I failed to get va-api working with firefox (seems to be a known bug), but chrome is working fine following the arch wiki or https://www.linuxuprising.com/2021/01/how-to-enable-hardware-accelerated.html

For some reason `vdpau-va-driver_0.7.4-7_amd64.deb` is missing from the ubuntu repos. You can simply install it from here (debian). It enables va-api with nvidia.

[not required after 22.04] I also installed https://pipewire-debian.github.io/pipewire-debian/ with wireplumber.

WARNING: OPAL boot currently doesn’t work, as the SSD is power cycled on reboot.

Further notes:

gnome-shell extensions:

https://extensions.gnome.org/extension/3628/arcmenu/
https://extensions.gnome.org/extension/904/disconnect-wifi/
https://extensions.gnome.org/extension/1319/gsconnect/
https://extensions.gnome.org/extension/307/dash-to-dock/
https://extensions.gnome.org/extension/1401/bluetooth-quick-connect/
https://extensions.gnome.org/extension/779/clipboard-indicator/
https://extensions.gnome.org/extension/36/lock-keys/
https://extensions.gnome.org/extension/906/sound-output-device-chooser/
https://extensions.gnome.org/extension/1287/unite/
https://extensions.gnome.org/extension/1485/workspace-matrix/
https://extensions.gnome.org/extension/1276/night-light-slider/

disabled:
Cosmic Dock
Pop COSMIC
Pop Shell

Patched Nautilus for better search: https://www.linuxuprising.com/2020/06/how-to-install-nautilus-with-type-ahead.html
simply: https://launchpad.net/~lubomir-brindza/+archive/ubuntu/nautilus-typeahead

How to setup zero overhead full disk encryption with S3 sleep support

Background

Modern (NVMe) SSDs encrypt all data by default. Also called self-encrypting drive (SED). They just don’t require a password to access the data. Instead of adding an additional layer of encryption e.g. using LUKS (additional power usage), I opted to use the capabilities of the device to secure access to the stored data.

Disclaimer:
I use this setup for my installation of Pop! OS 21.04 – This guide is mostly for my own memory.

More information:

I use a fork of sedutil as that supports newer systems and for S3 sleep support
https://github.com/ChubbyAnt/sedutil, https://github.com/ratcashdev/sedutil/tree/badicsalex-s3-sleep-support
WARNING:
This fork of sedutil is not compatible with the original one, as it uses a different hashing algorithm

Very high level overview of the boot process

Cold boot:
The self encrypting device (SED) presents a (strangely) named read only ShadowMBR.
Those 128MB of memory contain the pre-boot authentication image (PBA) with tools to unlock the drive and after that chain-boot (or restart) to boot your real system. It is currently based on syslinux, but can hopefully be replaced by systemd-boot sometime in the future https://github.com/systemd/systemd/issues/16089.

S3 sleep:
Switching into S3 sleep shuts down the drive, locking it.
A systemd service is setup to store the unlock key in the kernel and unlock the drive on resume.

Preparations

Backup all your data!

Download the rescue image from https://github.com/ChubbyAnt/sedutil/releases/tag/1.15-5ad84d8

(For S3 sleep support) Checkout and build sedutil-cli from https://github.com/ratcashdev/sedutil/tree/badicsalex-s3-sleep-support, or use my self-compiled version

Setup full disk encryption

Follow: https://github.com/ChubbyAnt/sedutil#encrypting-your-drive

EFI Setup

Create and rearrange the following boot entries (I did this from within my EFI settings)

  1. The EFI boot file in the ShadowMBR
  2. Your normal EFI boot entry

Setup S3 Sleep Support

Based on https://github.com/ladar/sedutil/issues/4

Install sedutil-cli with S3 sleep support (see preparations).

Get your hashed password

sedutil-cli --printPasswordHash <password> /dev/nvme?

Create the systemd service file /etc/systemd/system/seds3sleep.service

(adjust the password hash and /dev/nvme0n1)

NOTE: The additional n1 is no error

[Service]
Type=oneshot
ExecStart=/opt/sedutil-1.15.1-87/sedutil-cli -n -x --prepareForS3Sleep 0 <Admin1 password hash> /dev/nvme0n1

[Install]
WantedBy=multi-user.target
Enable this service. # systemctl enable seds3sleep.service && systemctl start seds3sleep.service

bad.horse

Schaut mal vorbei 🙂

und noch wichtiger, macht ein traceroute/tracepath – geht leider nicht per ipv6 🙁

traceroute -m 60 bad.horse

Für die noch Unwissenden:
Dr Horrible’s Sing-Along Blog

traceroute to bad.horse (162.252.205.157), 60 hops max, 60 byte packets
1 * 2.994 ms 2.979 ms 2.965 ms
2 * 11.606 ms 18.897 ms 18.911 ms
3 * 18.918 ms 18.884 ms 18.891 ms
4 84.116.191.6 (84.116.191.6) 18.889 ms 18.922 ms 22.367 ms
5 de-fra01a-ri2-xe-5-1-1.aorta.net (84.116.133.114) 27.566 ms 84.116.132.193 (84.116.132.193) 25.131 ms de-fra01a-ri2-xe-5-1-1.aorta.net (84.116.133.114) 25.169 ms
6 de-fra01b-ri1-ae-0.aorta.net (84.116.134.6) 25.165 ms hu-bud02a-ra4-xe-3-0-0.aorta.net (84.116.134.10) 15.781 ms de-fra01b-ri1-ae-0.aorta.net (84.116.134.6) 15.682 ms
7 ge-3-0.ir1.frankfurt-he.de.xo.net (80.81.192.182) 18.409 ms 17.097 ms 22.760 ms
8 207.88.15.77.ptr.us.xo.net (207.88.15.77) 38.083 ms 32.522 ms 38.050 ms
9 vb1042.rar3.nyc-ny.us.xo.net (207.88.13.202) 120.580 ms 120.595 ms 120.557 ms
10 207.88.12.104.ptr.us.xo.net (207.88.12.104) 191.350 ms 191.308 ms 193.921 ms
11 207.88.12.138.ptr.us.xo.net (207.88.12.138) 196.560 ms 193.882 ms 196.488 ms
12 207.88.12.103.ptr.us.xo.net (207.88.12.103) 193.841 ms 201.349 ms 196.377 ms
13 te-4-1-0.rar3.denver-co.us.xo.net (207.88.12.22) 176.367 ms 178.996 ms 176.242 ms
14 216.156.16.3.ptr.us.xo.net (216.156.16.3) 176.253 ms 176.192 ms 176.059 ms
15 216.156.1.128.ptr.us.xo.net (216.156.1.128) 172.124 ms 171.795 ms 176.983 ms
16 ip65-46-51-50.z51-46-65.customer.algx.net (65.46.51.50) 176.517 ms 184.513 ms 184.457 ms
17 core.core.xmission.net (166.70.1.1) 191.710 ms 200.864 ms 178.603 ms
18 egw-xmission.saltv1.ut.us.sn11.net (166.70.8.31) 180.838 ms 178.556 ms 180.794 ms
19 sandwichnet.dmarc.lga1.atlanticmetro.net (208.68.168.214) 171.876 ms 174.847 ms 178.406 ms
20 bad.horse (162.252.205.130) 178.286 ms 178.324 ms 168.631 ms
21 bad.horse (162.252.205.131) 171.062 ms 181.741 ms 181.309 ms
22 bad.horse (162.252.205.132) 181.109 ms 174.201 ms 176.738 ms
23 bad.horse (162.252.205.133) 183.625 ms 185.334 ms 181.567 ms
24 he.rides.across.the.nation (162.252.205.134) 184.447 ms 187.110 ms 194.229 ms
25 the.thoroughbred.of.sin (162.252.205.135) 194.213 ms 192.691 ms 202.562 ms
26 he.got.the.application (162.252.205.136) 202.226 ms 199.733 ms 195.140 ms
27 that.you.just.sent.in (162.252.205.137) 199.724 ms 203.772 ms 206.303 ms
28 it.needs.evaluation (162.252.205.138) 210.492 ms 208.204 ms 210.609 ms
29 so.let.the.games.begin (162.252.205.139) 210.485 ms 209.062 ms 212.923 ms
30 a.heinous.crime (162.252.205.140) 220.206 ms 226.476 ms 216.340 ms
31 a.show.of.force (162.252.205.141) 229.920 ms 224.969 ms 223.082 ms
32 a.murder.would.be.nice.of.course (162.252.205.142) 230.455 ms 227.853 ms 231.353 ms
33 bad.horse (162.252.205.143) 235.653 ms 228.670 ms 232.637 ms
34 bad.horse (162.252.205.144) 235.531 ms 242.611 ms 239.582 ms
35 bad.horse (162.252.205.145) 249.041 ms 246.166 ms 248.955 ms
36 he-s.bad (162.252.205.146) 245.018 ms 247.421 ms 244.658 ms
37 the.evil.league.of.evil (162.252.205.147) 254.465 ms 257.244 ms 257.247 ms
38 is.watching.so.beware (162.252.205.148) 269.856 ms 259.916 ms 266.352 ms
39 the.grade.that.you.receive (162.252.205.149) 266.339 ms 266.331 ms 266.323 ms
40 will.be.your.last.we.swear (162.252.205.150) 277.056 ms 277.027 ms 273.451 ms
41 so.make.the.bad.horse.gleeful (162.252.205.151) 277.020 ms 277.013 ms 285.107 ms
42 or.he-ll.make.you.his.mare (162.252.205.152) 278.818 ms 282.077 ms 282.108 ms
43 o_o (162.252.205.153) 282.085 ms 282.059 ms 288.041 ms
44 you-re.saddled.up (162.252.205.154) 285.395 ms 292.051 ms 289.325 ms
45 there-s.no.recourse (162.252.205.155) 301.343 ms 301.342 ms 301.286 ms
46 it-s.hi-ho.silver (162.252.205.156) 304.323 ms 308.594 ms 304.308 ms
47 signed.bad.horse (162.252.205.157) 304.250 ms 298.667 ms 305.277 ms