08 December, 2021

Stop the POP! from Debian/Ubuntu sound devices

By default the Linux kernel will put unused devices into a power saving mode to promote battery life on portable devices. This has the unfortunate effect of causing an audible pop when the kernel wakes the sound driver to emit sound after which it will put the driver back into power saving mode after a time without activity for the driver. Causing another pop - naturally 😒

To check if your driver module is configured to do this cat the following file

cat /sys/module/snd_hda_intel/parameters/power_save

If a 1 is returned then yes, your sound device is using the power save feature.
You can temporarily turn it off with the following:

echo "0" | sudo tee /sys/module/snd_hda_intel/parameters/power_save 

Test you notification sounds, they sound now be clear and pop free.

This option can be permenantly disabled, by creating an option file in /etc/modprobe.d 

This can be done with the following:

echo "options snd_hda_intel power_save=0" | sudo tee -a /etc/modprobe.d/audio_disable_powersave.conf

Enjoy your pop free sound !

17 November, 2021

Installing Proxmox with Linux raid

I this article I will explain how to setup Debian using LVM & RAID 1 (mirror). Then install Proxmox on top and setup the necessary thinpool.
 
NOTE: This is *NOT* a supported installation of Proxmox and as such should not be used in a production environment. It is provided as an educational material only.
 
First install Debian as normal, when prompted create a raid mirror and LVM volumes for the root filesystem and the swap.

A standard install + ssh server will easily fit into an 8G volume leaving about 4G free.

Once installed check for updates (apt update && apt-dist-upgrade). Check the status of the raid array using mdadm --detail /dev/md0
 
Ensure that mdadm reports that the array is in a clean state (I.e. healthy). 

It should look something like this:

/dev/md0:
     Version : 1.2
     Creation Time : Mon Nov  1 14:28:10 2021
     Raid Level : raid1
     Array Size : 33534976 (31.98 GiB 34.34 GB)
     Used Dev Size : 33534976 (31.98 GiB 34.34 GB)
     Raid Devices : 2
     Total Devices : 2
     Persistence : Superblock is persistent

     Update Time : Wed Nov 17 13:50:53 2021
     State : clean
     Active Devices : 2
    Working Devices : 2
    Failed Devices : 0
    Spare Devices : 0

Consistency Policy : resync

              Name : TESTPVE4:0  (local to host TESTPVE4)
              UUID : da8e61c0:9bb61b6c:aea14209:b4ce52a8
            Events : 1538

    Number   Major   Minor   RaidDevice State
       3       8        1        0      active sync   /dev/sda1
       2       8       17        1      active sync   /dev/sdb1

running pvs to scan your physical volumes should be similar to this:

 PV         VG  Fmt  Attr PSize  PFree  
 /dev/md0   pve lvm2 a--  31.98g 928.00m

Your volume groups should be similar to this:

  VG  #PV #LV #SN Attr   VSize  VFree  
  pve   1   4   0 wz--n- 31.98g 928.00m

And lastly your logical volume scan should look like this:

  LV            VG  Attr       LSize  Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  root          pve -wi-ao----  9.31g                                                    
  swap          pve -wi-ao----  3.72g                                                    

Now that your system is running with LVM running on raid , dont forget to install the grub bootloader on the second disk of the mirrored array (/dev/sdb). Otherwise you will not be able to boot if /dev/sda fails.

grub-install /dev/sdb

This can be tested by shutting down the system and unplugging /dev/sda and booting up again. The system should (after complaining that a disk is missing) boot up normally. 

NOTE: If you perform the test above wait for the array to rebuild once both drives are connected, use mdm --detail /dev/md0 to monitor the array and continue once the array is marked as clean.

If all looks well you can create the LVM thinpool for use by proxmox by running lvcreate

lvcreate -L 18G --thinpool data pve

In this example a thinpool of 18G is created named data within the pve volume group. You will need to adjust the command as appropriate for your needs.

If all goes well running lvs should show all you previous logical volumes as well as your new thin pool !

  LV            VG  Attr       LSize  Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert

  data          pve twi-aotz-- 18.00g             8.02   13.93                           
  root          pve -wi-ao----  9.31g                                                    
  swap          pve -wi-ao----  3.72g                                                   

Next up, install Proxmox onto your Debian installation by following the instructions contained in the Proxmox documentation.

20 September, 2021

Wuauclt Usage

 WUAUCLT.EXE 

A command line utility to control the Windows Update Automatic Update CLient

This utility is provided for all Windows operating systems prior to the release of Windows 10/Server 2016. It provides the ability to invoke an update scan or report statistics to a WSUS (Windows Software Update Service).

For reasons known only to Micrososoft, they did not include a help option (/?) as one of  the parameters for this utility. I've only listed options that have a known effect to the client.

  • /DetectNow - To run an immediate poll of the WSUS server for updates
  • /resetAuthorization - To reset the authorization on the server and the client. In fact, it is a new registration on the WSUS server. Useful when the client registraation is corrupt, deleting it on the server and the command wuauclt /detectnow /resetAuthorization re-registered on the server with simultaneous request for list of updates
  • /reportnow To reset the statistics on the server the Other parameters are not so obvious and, most importantly, their application is not clear and usually causes no change
  • /ShowSettingsDialog - Displays the dialog to set the schedule for the installation of the updates
  • /ResetEulas - to reset the EULA for updates
  • /ShowWU - go to website of MS updates
  • /ShowWindowsUpdate - go to website of MS updates
  • /UpdateNow - Immediately starts the update process, clicking the same button in the notification window when updates are available.
  • /ShowWUAutoScan - unknown
  • /ShowFeaturedUpdates - unknown
  • /ShowOptions - unknown
  • /ShowFeaturedOptInDialog - unknown
  • /DemoUI - Show icon in tray - settings dialog schedule the installation of updates or setup, depending on the status.

 

07 September, 2019

Debian Buster: Prevent the "POP" from audio device when sound played

Debian Buster by default will have the power saving features enabled for most devices, this includes the audio device. This is all well and good when buster is installed on a mobile device, but is annoying on a desktop device.

The problem that this causes is that the kernel will shutdown the audio device in order to save power, with the downside that an audible pop/click will be heard when a sound is made (and example would be the "bell" in the terminal or a notification sound).

A few seconds after the sound is played the kernel will put the audio device back into power saving.

This can be temporarily disabled with the following two commands. Note that this if for the intel hda and will not survive a reboot.

echo 0  > /sys/module/snd_hda_intel/parameters/power_save 
echo N > /sys/module/snd_hda_intel/parameters/power_save_controller

This will only work if you have an intel system board and are using the inbuilt sound. If you are unsure, examine the pci bus with lspci -v 

To make this setting stick I setup rc-local support in systemd. This will make systemd execute the /etc/rc.local script if it exists.

First, check to see if systemd has a rc-local service defined.

sudo systemctl status rc-local

By default this will not exist, so lets create one !
first we create a service definition file rc-local.service in /etc/systemd/system/

sudo nano /etc/systemd/system/rc-local.service

and past in the following contents

 [Unit]
 Description=/etc/rc.local Compatibility
 ConditionPathExists=/etc/rc.local

[Service]
 Type=forking
 ExecStart=/etc/rc.local start
 TimeoutSec=0
 StandardOutput=tty
 RemainAfterExit=yes
 SysVStartPriority=99

[Install]
 WantedBy=multi-user.target

Next, create /etc/rc.local and put the commands we used before to turn off the power saving feature.

sudo nano /etc/rc.local

Paste in the following:


#!/bin/bash

sleep 10
echo 0 > /sys/module/snd_hda_intel/parameters/power_save 
echo N > /sys/module/snd_hda_intel/parameters/power_save_controller


Set the script to be executable with chmod +x /etc/rc.local
Next we enable our service in systemd with:


sudo systemctl enable rc-local

and start it with:

sudo systemctl start rc-local.service

To confirm that the service is running:

sudo systemctl status rc-local.service

You should see output similar to this:

● rc-local.service - /etc/rc.local Compatibility
   Loaded: loaded (/etc/systemd/system/rc-local.service; enabled; vendor preset:
  Drop-In: /usr/lib/systemd/system/rc-local.service.d
           └─debian.conf
   Active: active (exited) since Sat 2019-09-07 09:37:45 AEST; 33min ago
  Process: 4583 ExecStart=/etc/rc.local start (code=exited, status=0/SUCCESS)

Reboot and enjoy your pop free sound.




 
 

09 July, 2019

How to install steam on Debian 10 (Buster)


Note: console commands are listed as bold and italic.

Ensure that contrib and non-free are added to your sources.list (/etc/apt/sources.list). I've provided an example of mine below:

deb http://mirror.aarnet.edu.au/debian/ buster main contrib non-free
deb-src http://mirror.aarnet.edu.au/debian/ buster main contrib non-free

deb http://security.debian.org/debian-security buster/updates main contrib non-free
deb-src http://security.debian.org/debian-security buster/updates main contrib non-free

# buster-updates, previously known as 'volatile'
deb http://mirror.aarnet.edu.au/debian/ buster-updates main contrib non-free
deb-src http://mirror.aarnet.edu.au/debian/ buster-updates main contrib non-free




update your apt cache with sudo apt update. If all goes well, you can install your non-free grapohics driver, which in my case is nVidia.

with sudo apt install nvidia-driver

Since the Steam client is a 32bit application we will also need to enable the i386 architecture in apt.

use dpkg --add-architecture i386 since we've made a change to apt, you'll need to update your apt cache again with sudo apt update.

Finally install the nvidia-driver-libs-i386 package with sudo apt install nvidia-driver-libs-i386.

You should end up with both the 64bit and 32bit nvidia libraries, which should look similar to this:

dpkg -l | grep nvidia-driver
ii  nvidia-driver                        418.74-1 amd64 NVIDIA metapackage
ii  nvidia-driver-bin                  418.74-1 amd64 NVIDIA driver support binaries
ii  nvidia-driver-libs:amd64     418.74-1 amd64 NVIDIA metapackage (OpenGL/GLX/EGL/GLES libraries)
ii  nvidia-driver-libs:i386         418.74-1 i386 NVIDIA metapackage (OpenGL/GLX/EGL/GLES libraries)
ii  nvidia-driver-libs-i386:i386 418.74-1 i386 NVIDIA metapackage (OpenGL/GLX/EGL/GLES 32-bit libraries)


Finally, we can install steam with sudo apt install steam.
 

 

04 July, 2017

Active Directory Users and Computers filter for disabled computer accounts

Use the following LDAP filter shows all the disabled computers in a particular OU:

(&(objectCategory=computer)(userAccountControl:1.2.840.113556.1.4.803:=2))

To filter out disabled computers, showing only active objects use this:

(&(objectCategory=Computer)(!(userAccountControl:1.2.840.113556.1.4.803:=2)))

08 June, 2017

Distribution Point Pre-Requisits

Installing a Distribution Point for ConfigMgr (SCCM) can be as simple as adding a site server and selecting the distribution point role, most of the time the install is flawless but it can take what feels like as ice age to complete as ConfigMgr will install IIS and the other pre-requisits.

Myself, I prefer to pre-install the pre-requisits myself to speed up the installation process.
If, like me your impatient then add the features/roles below for a basic distribution point.
  • Remote Differential Compression
  • Background Intelligent Transfer Service (BITS) 
  • Web Server (IIS)
  • IIS Configuration:
    • Application Development: 
      • ISAPI Extensions
    • Security: 
      • Windows Authentication
    • IIS 6 Management Compatibility:
      • IIS 6 Metabase Compatibility
      • IIS 6 WMI Compatibility.
If you intend to also have PXE support on your distribution point, also add the Windows Deployment Services role but DO NOT configure it.