Monday, September 6, 2021

Fix for Dell Touchpad Two-finger Scroll Stops Working After Waking from Sleep / Suspend (Ubuntu 20.04)

This is the basic fix...

sudo modprobe -r hid_multitouch
sudo modprobe hid_multitouch


I created this file...

sudo vim /lib/systemd/system-sleep/psmouse-refresh


And in it I put this...

#!/bin/bash

# $1 is the state (pre or post)-sleep
if [[ $1 == post ]]; then
    sudo modprobe -r usbhid
    sudo modprobe -r psmouse
    sudo modprobe -r hid_multitouch
    sudo modprobe psmouse
    sudo modprobe usbhid
    sudo modprobe hid_multitouch
fi


Thursday, April 8, 2021

NETGEAR readyshare with nautilus on linux

How to access a USB drive connect to my NETGEAR router using nautilus on linux…

smb://readyshare/USB_Storage

Sunday, July 2, 2017

SubiBox: A Raspberry Pi, Kivy, KivyPie, mpd, rotary dial telephone jukebox.

This project has been developed for a Raspberry Pi Zero W.  These are my notes.


Installed KivyPie (based on pipaOS which is based on Raspbian) on a sd card.  Edited boot/interfaces.txt to use my wifi credentials.

glError 0x505

Displaying the album art with Kivy resulted in gl errors.  I needed to change the memory configuration of the Raspberry Pi so that the GPU had more memory.  I did this using raspi-config and setting the GPU to use 256MB.  This improved things, but ultimately I also needed to reduce the album art file sizes.

Automatic Start Jukebox on Boot

I had to edit the sytemctl getty service so that the user would automatically be logged in.  Then I edited ~/.profile so that the jukebox app is started.

USB SoundCard

/usr/share/alsa/alsa.conf

defaults.ctl.card 0
defaults.pcm.card 0

... to ...
 
defaults.ctl.card 1
defaults.pcm.card 1

Saturday, June 10, 2017

mpd Configuration

Getting mpd to accept connection from foreign hosts.  Gets me every time.  Change (in /etc/mpd.conf) bind_to_address from “localhost” to “any”.

Tuesday, June 6, 2017

The Moon

3.8e7 m^3 gold leaf is needed
1 micron thick
surface area of the moon: 3.8e13 m^2
Gold found: 20.7m^3 to 50m^3


It would take $30.17 quadrillion dollars (USD) to buy the amount of gold needed to gold-leaf the moon.  This is 502 times more money than exists in the world.  Also, it would require 300-4200 times more gold than has been collected by humans.

Friday, March 31, 2017

Adding Aux/BT to Subaru Stereo through CD changer

Fri 31 Mar 2017 02:28:03 PM MST

This is a log of my attempt to add auxiliary input to the Subaru P120 car stereo (i.e., receiver, head unit).  This device, manufactured by Panasonic, uses a variant of the Alpine MBus protocol.  The protocol in this radio is slightly different (how different I don't know yet, but the timing is different) than the solutions found by Olstyle and kjanesch (which this project will borrow heavily from).

From the pseudochanger readme...
"Alpine MBus is a bidirectional one-wire serial interface used for communication between audio head units and peripherals like CD players, CD changers, and tape decks. A period for each bit is 3 ms, and low/high bits are indicated by how long the line is held low. Low for the first 600us indicates a 1, low for 1800 us indicates a 0. Data is a multiple of four bits, and a four-bit check follows the packet, an XOR of all the other 4-bit chunks.

The Panasonic variant uses different ping and ACK codes, sends some data at different times, and does what looks like type detection by sending out a cycle of codes. The included library reflects these differences.

This project was developed specifically for the 2002 Subaru WRX head unit, model CQ-EF7260A, and should work with other Panasonic head units that have the same 16-pin connector on the back, as also found in some Mazdas and Hondas.
My P120 receiver (also 2002) is a AM/FM/WB with cassette.  It has the 16-pin connector.  It is confusing why it doesn't work with the original pseudochanger code by kevinsjanesch.  The zero and one bit timings are not 600us/1800us but on the order of 250us/325us, which is bizarre.  This timing leaves little room for error in distinguishing the bits.  Perhaps my unit is bad, but that's what I get on my logic analyzer.

Credits / References

http://www.hohensohn.info/mbus/
https://github.com/kjanesch/pseudochanger
https://sites.google.com/site/kevinsjanesch/projects/subaru-line-in
https://github.com/Olstyle/MBus