Zum Inhalt

rephlex.de Posts

Fix for UEFI + Hardware RAID + Linux = megaraid_sas io_page_fault

Short remider to myself and the rest of the world:

  • Upgrade Firmware to latest (yes, 2013 is better than 2011)
  • Set UEFI to UEFI ONLY! It's 2021 as of now, so nobody should be using BIOS anymore. Seriously.
  • Boot Kernel with iommu=soft option (in grub press "e" if you are locked out already)
  • Put iommu=soft boot option to /etc/default/grub (GRUB_CMDLINE_LINUX_DEFAULT) and do a update_grub && reboot to make it a permanent fix
  • If running AMD + Proxmox, use amd_iommu=on iommu=pt
  • If running INTEL + Proxmox, use intel_iommu=on iommu=pt

Leave a Comment

Linux: Make uPD720201 great again!

After returning my first USB3 PCIe Card because it randomly stopped working and, just to experience the same problems with the card I got in exchange – thanks amazon – i finally found the root cause and permanent fix.

The Renesas uPD720201 USB 3.0 Host Controller seems to have broken S3 power saving implenented. Since you probably are not using your full size PCIe card while on battery, you can safely disable power saving features.

Edit your /etc/default/grub and add usbcore.autosuspend=-1 to your GRUB_CMDLINE_LINUX_DEFAULT. Afterwards run update_grub.

Turn your PC off and unplug from the wall outlet, this will bring your card out of S3 sleep.

Then boot your PC again – problem solved!

Leave a Comment

Ubuntu: disable automatic screen blanking

gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-battery-timeout 0
gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-ac-timeout 0
gsettings set org.gnome.desktop.screensaver idle-activation-enabled false
gsettings set org.gnome.settings-daemon.plugins.power idle-brightness 100
Leave a Comment

DIY Surveillance Camera Recording

my crontab:

# start recording on boot
@reboot sleep 10; /usr/local/bin/startrecord.sh &> /dev/null

# restart every 10 minutes to create a new file
*/10 * * * * killall ffmpeg ; sleep 5 ; /usr/local/bin/startrecord.sh &> /dev/null

# purge old recordings
0 */6 * * * find /data/office-kamera -type f -mtime +12 -delete

/usr/local/bin/startrecord.sh

#!/bin/bash

#cam1
/usr/bin/ffmpeg \
 -rtsp_transport tcp -i rtsp://user:password@10.0.100.21:554/11 \
 -c:v mpeg2video -b:v 16M -bufsize 16M -maxrate 16M /data/office-kamera/$(date +\%Y-\%m-\%d.\%H-\%M).cam1.mpg \
 -c:a mp2 -ac 1 -ab 64k -ar 44100 \
 -y -update 1 -r 3 -f image2 -q:v 10 -vf "scale=iw/2:ih/2,transpose=2" /var/www/html/cam/cam1.jpg \
  &>/tmp/cam1.log &

Important: We use mpeg2 for a purpose! Forget matroska/h264/hs65. If your recording stops the hard way (power outage, crashing ffmpeg process, rising of the dead), no file trailer is written and you can NOT play or reconstruct your video when using mp4. For that reason we choose mpeg2, because you can still view fragments from a 20 year old CD-R that has been through a blender, or if you drop a thermonuclear weapon on your hard drive.

This will also put image frames to /var/www/html/cam/, where you can host a HTML document that displays your image and refreshes it via javascript if you like.

Finding you cameras RTSP URL is key. Just google "camera model rtsp url". If you have any questions feel free to ask. Consider donating via paypal if it works for you;)

1 Comment

Reducing SAMBA Server / smbd load when transferring large files

We have a 4 core Intel i3 machine running ubuntu set up in our office, responsible for two jobs:

  • recording 5 security cameras to disk (ffmpeg)
  • being a general purpose fileserver.

The machine has a single, 3TB SATA disk and no RAID. The data on the machine doesn't matter, and doesn't need to be 100% available.

When we transferred a disk image (500GB) to it via SAMBA, it would run out of memory and start swapping, slowing down the already busy disk to a point where the machine would be completely unresponsive and need to be reset.

We fixed this by disabling oplocks in /etc/smb.conf:

[global]
oplocks = no

No further tuning reqired.

Leave a Comment

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 remove all backups in Plesk for Linux

If you ever find yourself confronted with a Plesk system that is running out of disk space, and you just want to get rid off all the misconfigured "keep forever" backups, here's how to remove them all from the command line:

/usr/local/psa/admin/bin/pmm-ras --get-dump-list | egrep "name=\".*.xml" | awk -F '"' '{ print $2 }' | xargs -I {} /usr/local/psa/admin/bin/pmm-ras --verbose --debug --delete-dump --dump-specification={} --session-path=/var/log/plesk/PMM
Leave a Comment