Some “Note to Self” Research and Tech (mostly for Mac) Stuffs

Tech Troubleshooting

Mac: Problem with the keyboard volume controller

Error/Problem: Volume controller stops working etc.
Solution: If quitting and restarting coreaudiod doesn’t work, use the following command in the Terminal.

sudo kill -9 `ps ax | grep 'coreaudiod' | grep -v grep | awk '{print $1}'`

LaTeX: biber gave return code 2

Error/Problem: For whatever reason, biber or biblatex stopped working with the error “… gave return code 2…”
Solution: Just reset the biber cache via the following command in Terminal (Mac).

rm -Rf "$(biber --cache)"

Ahkab: Problem producing plots in Python3

Error/Problem: Plotting graphs using ahkab in Python3 produces the error “module ‘pylab’ has no attribute ‘hold’”.
Solution: ‘Hold’ for plots is enabled by default on Python3.

  1. First, find out the directory of which ahkab was installed using pip3 list -v.
  2. In the ahkab folder, open plotting.py. Then, look for the lines containing pylab.hold(True) and pylab.hold(False). Either remove them completely or comment them out.
  3. An alternative solution is to use ahkab with Python2. However, this is not encouraged due to the deprecation of Python2 and also the lack of support with most transitting towards Python3.

Adding Windows Network Printer (Mac)

These steps apply for Mac OS X 10.11 El Capitan and later. Adjust accordingly for older versions.

  1. System Preferences -> Printers and Scanners
  2. Click on “+ ” to add a new printer
  3. Select “Advanced” from the top toolbar. If you don’t see it, right-click on the toolbar and select “Customize Toolbar…”. Drag the “Advanced” button into the toolbar.
  4. Under “Type”, choose “Windows printer via spools
  5. Under “Device”, choose “Another Device
  6. Under “URL”, enter “smb://printserver/printername
  7. Enter the “Name” of your printer. “Location” is optional
  8. Use” the “Generic PCL Driver” for El Capitan and newer or “General PCL 6 Driver” for older versions of Mac OS X
  9. Click on the “Add” button
  10. You might be prompted to enter your login credentials. Choose “Registered User”, enter your login username “admin\username” followed by your password
  11. Done. You should be able to use the printer now.

If you ever come across a printing problem with the error message “Hold On Authentication”, you can reset the password to the network printer via the following command in Terminal:

sudo lpadmin -p printername -o auth-info-required=username,password

Fixing Hardware Acting Crazy on a Mac, i.e. trackpad not working, screen acting weird, etc.

These steps can be used on most modern Macs. I suggest that you try the PRAM Reset first. If problem still persists, you can then attempt the SMC Reset.

PRAM Reset

  1. Shut down your Mac.
  2. Turn on your Mac.
  3. Press and hold the keys Command + Option + P + R simultaneously before the gray screen appears. Else, restart the whole process.
  4. Wait for your Mac to restart itself again and that you hear the startup chime.
  5. You can let go of the keys now. Your Mac will start as it normally does.

SMC Reset

  1. Shut down your Mac.
  2. a) For MacBooks without removable batteries
    • Keep the MagSafe cable attached.
    • Press (on the left hand side of the keyboard) the Shift + Control + Option and the Power keys simultaneously.
    • Let go of all keys at the same time.

    b) For iMacs and other non-laptop based Macs

    • Disconnect the power cable.
    • Press the Power key for 5 seconds and then let go.
    • Reattach the power cable.
  3. Turn your Mac back on.