Screen flickering on i915 graphics using Debian 9

Recently I had a problem with my Lenovo ThinkPad E550 laptop which is running Debian 9. Problem was that occasionally display would start flickering, “jumping” or just blacking out for couple of seconds. Problem was most noticeable when using Terminal, Gedit, Chrome etc.

Apparently, problem is with (default) SNA acceleration in recent X.Org. I had to revert to older and mature backend: UXA. Read more about it here.

To fix this and revert to UXA acceleration method, create /usr/share/X11/xorg.conf.d/20-intelaccel.conf file with these contents:

Section "Device"
   Identifier  "Intel Graphics"
   Driver      "intel"
   Option      "AccelMethod" "uxa"
EndSection

 

Unitoptek IP camera RTSP URL

Recently I’ve bought cheap IP camera from AliExpress. I don’t want to write about camera’s quality (which is actually quite good for the price), you can read about it from hundreds of feedbacks on above link.

This camera has no documentation, and to access it, you have to use Internet Explorer and install ActiveX control. Yeah, I know.

If you’re alike me, you probably want RTSP link so you can connect it to ZoneMinder or some other video surveillance software system. If you wonder if RTSP link is displayed in camera’s software, it’s not.

I’ve searched and tried many, maany URLs from Internet, and this is working RTSP url for this camera:

rtsp://ip_address:554/user=admin&password=your_password&channel=1&stream=0.sdp

If you haven’t setup password for admin user (you really should), just leave password empty, like this:

rtsp://ip_address:554/user=admin&password=&channel=1&stream=0.sdp

This link will also work for other clones of this camera: Anten TEK, Dongjia etc.

Static IP address in Raspbian

If you installed Raspbian on RaspberryPi and tried to set static IP address using /etc/network/interfaces  you have noticed that it doesn’t work.

Problem is, Raspbian is using dhcpcd – a DHCP client for setting IP address. You can try to:

  • remove dhcpd daemon and set the address in interfaces  file, or
  • set the static IP address for your RaspberryPi in your DHCP server.

But, the really best and simplest solution is to set static IP address thru dhcpcd.

Open /etc/dhcpcd.conf  file and add this content at the end of the file:

static ip_address=192.168.1.10/24
static routers=192.168.1.1
static domain_name_servers=192.168.1.1

This IP address is then set for eth0  interface. If you have more than one interface, you need to add interface interface_name  before static ip_address line:

interface wlan0
static ip_address=192.168.1.11/24
...

Renaming default username in Raspian (on RaspberryPi)

When you install Raspbian on RaspberryPi, default username is pi. Often, you want to change it to custom username (and keep uid 1000). Here’s how to change it, along with user’s home directory:

usermod -l new_username -m -d /home/new_username pi
  • -l new value of the login name
  • -m move contents of the home directory to the
    new location
  • -d new home directory for the user account

Also, change default user’s group name:

groupmod -n new_username pi

To successfully change it, pi user can’t be logged in. You have to log in as root (or another user in sudo group) and execute above commands.

Automatic Mikrotik shutdown at specific time

I’m using Mikrotik wAP access point for home Wi-Fi. At night, for various reasons, I don’t want my Wi-Fi on, so I set up automatic shutdown at midnigth and automatic start up at 6am.

Problem is, in Mikrotik, you can schedule automatic shutdown but not startup. When the device was shut down, only way to start it up again is to plug it out from power outlet and plug it in again. To do this automatically, you’ll need outlet power timer switch similar to this.

Continue reading

Forwarding mail in ISPConfig 3 without leaving copy

In ISPConfig 2 there was a little nice feature for mail user where you could easily forward mail to another mail address, with or without leaving a copy on server:

ispconfig1

It was really useful feature because user could always forward mail and leave a copy (or not) on server with single click. ISPConfig 3 does not have that feature (well, it has, but you can’t easily select to keep copy or not) but it has custom for mailbox where you can define filter using Sieve.

Continue reading

Enabling swap in Linux

In Linux, when physical memory (RAM) is full, inactive pages in memory are moved to the swap. Swap space is located on hard drive, which is significantly slower than RAM. While swap space can help machines with a small amount of RAM, it should not be considered a replacement for more RAM. However, it’s very useful when you need a little bit more RAM for a brief piece of time, like compiling software etc.

Many VPS providers (like Digital Ocean) don’t enable swap automatically, and you need to enable it by yourself. Here’s how:

Continue reading