Zum Inhalt

Kategorie: Allgemein

Metaebene, persönliches, Blog-bezogenes

Compiling and running ethminer 0.19.0 on Ubuntu 21.04

git clone https://github.com/ethereum-mining/ethminer.git
cd ethminer
git checkout tags/v0.19.0
git submodule update --init --recursive
rm -rfv build && mkdir build && cd build

export CC=/usr/bin/gcc-8
export CXX=/usr/bin/g++-8
cmake .. && make . && sudo make install

ethminer -P stratum://0x2a9d3072a8feb1578c2f10069010480b8742c39c@eu1.ethermine.org:4444

Notes to self:

  • use gcc-8
  • have at least 4GB Memory on the GPU
  • use a CUDA-10 compatible card
Leave a Comment

Bosch Logixx 7 Waschtrockner WHV28540/06: Fehlerspeicher auslesen und Testprogramme Starten

Fehlercode auslesen

  • Drehschalter auf 0 (aus)
  • Drehschalter auf Pos. 4 (3 Uhr)
  • Temperaturwahltaste gedrückt halten, mit gedrückter Taste Drehschalter um eine Position im Uhrzeigersinn drehen
  • Temperaturwahltaste loslassen
  • Fehlercode wird angezeigt

Bekannte Fehlercodes:

  • E09: NTC-Fühler am Luftauslass -> kann der Fühler sein, kann aber auch die Platine oder das Verbindungskabel sein (NTC lässt sich mit Widerstandsmessung und Referenzwert-Diagramm testen)

Testprogramme / Service-Modus:

  • Drehschalter auf 0 (aus)
  • Drehschalter auf 6 Uhr
  • Temperaturwahltaste gedrückt halten, mit gedrückter Taste Drehschalter um eine Position im Uhrzeigersinn drehen
  • Temperaturwahltaste loslassen
  • Testprogramme können mit dem Drehschalter gewählt und mit Start-Taste gestartet werden
Leave a Comment

How to hibernate and resume from swap file in Ubuntu 20.04 using full disk encryption

On my laptop, I am running full disk encryption (LUKS with a single encrypted ext4 partition), and a single, large swap file as large as my system RAM (16GB).

Here's how to make it work:

Make your swapfile have at least the size of your systems RAM:

sudo swapoff /swapfile
sudo dd if=/dev/zero of=/swapfile bs=$(cat /proc/meminfo | grep MemTotal | grep -oh '[0-9]*') count=1024 conv=notrunc
sudo mkswap /swapfile
sudo swapon /swapfile

Note the UUID of the partiton containing your swapfile:

$ sudo findmnt -no SOURCE,UUID -T /swapfile
/dev/nvme0n1p5 20562a02-cfa6-42e0-bb9f-5e936ea763d0

Reconfigure the package uswsusp correctly:

sudo apt -y install uswsusp
sudo dpkg-reconfigure -pmedium uswsusp
# Answer "Yes" to continue without swap space
# Select "/dev/disk/by-uuid/20562a02-cfa6-42e0-bb9f-5e936ea763d0" replace the UUID with the result from the previous findmnt command
# Encrypt: "No"

Edit the SystemD hibernate service using sudo systemctl edit systemd-hibernate.service and fill it with the following content:

[Service]
ExecStart=
ExecStartPre=-/bin/run-parts -v -a pre /lib/systemd/system-sleep
ExecStart=/usr/sbin/s2disk
ExecStartPost=-/bin/run-parts -v --reverse -a post /lib/systemd/system-sleep

Note the offset of your swapfile relative to the partition start:

$ sudo swap-offset /swapfile
resume offset = 34818

Tell grub to resume by editiing your etc/default/grub

NOTE: THE OFFSET IS DIFFERENT FROM SYSTEM TO SYSTEM! YOU NEED TO USE THE VALUE RETURNED ON YOUR SYSTEM!

GRUB_CMDLINE_LINUX_DEFAULT="resume=UUID=20562a02-cfa6-42e0-bb9f-5e936ea763d0 resume_offset=34818 quiet splash"

Update grub:

sudo update-grub

Create /etc/initramfs-tools/conf.d/resume

RESUME=UUID=20562a02-cfa6-42e0-bb9e-5e936ea763d0 resume_offset=34816
# Resume from /swapfile

Update initramfs:

sudo update-initramfs -u -k all

Now you can just hibernate your system with

sudo systemctl hibernate
37 Comments

Clean default sources.list file for Ubuntu 20.04 focal

deb http://de.archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse
deb http://de.archive.ubuntu.com/ubuntu/ focal-updates main restricted universe multiverse
deb http://de.archive.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
deb http://de.archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse

deb-src http://de.archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse
deb-src http://de.archive.ubuntu.com/ubuntu/ focal-updates main restricted universe multiverse
deb-src http://de.archive.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
deb-src http://de.archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse

deb http://archive.canonical.com/ubuntu focal partner
deb-src http://archive.canonical.com/ubuntu focal partner
1 Comment

Saving battery life on linux using powertop

Most distributions come with a handy tool called powertop, that is able to automatically set kernel parameters to save energy.

sudo powertop --auto-tune

Settings are not permanent, to you can use the following snippet to create and load a systemd unit file to load the settings after rebooting your machine:

cat << EOF | sudo tee /etc/systemd/system/powertop.service
[Unit]
Description=PowerTOP auto tune

[Service]
Type=idle
Environment="TERM=dumb"
ExecStart=/usr/sbin/powertop --auto-tune

[Install]
WantedBy=multi-user.target
EOF

systemctl daemon-reload
systemctl enable powertop.service
systemctl start powertop.service

1 Comment

Workaround of the month: Fix broken n32 o32 virtalenv on Gentoo mips when emerging spidermonkey-52.9.1pre1

Virtualenv ist utterly broken when you run Gentoo on MIPS using n32.

This will lead to spidermonkey-52.9.1pre1 failing to emerge, because of "ImportError: No module named pkgutil" or the like. Here's how to fix it:

Step 1: as root, create a user patch directory and download my patch for virtualenv into it, so emerge applies it to the source as soon as you re-emerge the package

mkdir -p /etc/portage/patches/dev-python/virtualenv-16.0.0
wget -O /etc/portage/patches/dev-python/virtualenv-16.0.0/virtualenv-16.0.0-multilib.patch https://rephlex.de/blog/wp-content/uploads/2019/01/virtualenv-16.0.0-multilib.patch.txt

Step 2: and download multiarch.patch into the directory we just created

Step 3: as root, test if the patch executes:

cd /usr/portage/dev-python/virtualenv
ebuild virtualenc-16.0.0.ebuild clean prepare

Step 4: re-emerge dev-lang/python-exec and dev-python/virtualenv

emerge dev-lang/python-exec dev-python/virtualenv

Step 5: Create a necessary symlink

ln -s /usr/lib32/python2.7 /usr/lib/python2.7

You're done!

Leave a Comment

Gentoo GNU/Linux on an SGI Octane

UPDATE: gentoo/octane is released. CLICK HERE!

Finally!

More info will be coming soon. Just come teaser to get you interested 😉

I AM running Linux 4.12 in full 64 bits, gcc 8, a current glibc, and all the modern software. WITH audio. WITH accellerated graphics. And my root volume is on 3x147GB SCSI Software RAID-0 stripeset goodness. And yes, I do have multiple backups. Boom!

rephlex@octane ~ $ uname -a && cat /etc/*release && cat /proc/cpuinfo && df -h && free -m
Linux octane 4.12.0 #2 SMP Fri Dec 14 21:41:04 CET 2018 mips64 R12000 V2.3 FPU V0.0 SGI Octane GNU/Linux
Gentoo Base System release 2.2
NAME=Gentoo
ID=gentoo
PRETTY_NAME="Gentoo/Linux"
ANSI_COLOR="1;32"
HOME_URL="http://www.gentoo.org/"
SUPPORT_URL="http://www.gentoo.org/main/en/support.xml"
BUG_REPORT_URL="https://bugs.gentoo.org/"
system type : SGI Octane
machine : Unknown
processor : 0
cpu model : R12000 V2.3 FPU V0.0
BogoMIPS : 449.02
wait instruction : no
microsecond timers : yes
tlb_entries : 64
extra interrupt vector : no
hardware watchpoint : yes, count: 0, address/irw mask: []
isa : mips1 mips2 mips3 mips4
ASEs implemented :
shadow register sets : 1
kscratch registers : 0
package : 0
core : 0
VCED exceptions : not available
VCEI exceptions : not available

processor : 1
cpu model : R12000 V2.3 FPU V0.0
BogoMIPS : 449.02
wait instruction : no
microsecond timers : yes
tlb_entries : 64
extra interrupt vector : no
hardware watchpoint : yes, count: 0, address/irw mask: []
isa : mips1 mips2 mips3 mips4
ASEs implemented :
shadow register sets : 1
kscratch registers : 0
package : 0
core : 0
VCED exceptions : not available
VCEI exceptions : not available

Dateisystem Größe Benutzt Verf. Verw% Eingehängt auf
/dev/root 133G 3,1G 123G 3% /
devtmpfs 10M 0 10M 0% /dev
tmpfs 62M 224K 62M 1% /run
shm 310M 0 310M 0% /dev/shm
/dev/md127 269G 7,9G 247G 4% /home
gesamt benutzt frei gemns. Puffer/Cache verfügbar
Speicher: 619 123 63 0 432 471
Swap: 7999 3 7996

1 Comment