About W. Jason Woodrow

Nearly 30 years of professional and hobby computer and networking experience; many years of Facilities Management (low voltage, security access and recording systems, cabling, wireless, etc); more than a decade of singing and helping singers with the electronics used at gigs.

Chrome locks up in Linux

UPDATE 4-5-20: Same issues continue with the added feature that Chrome completely freezes up and won’t die even with kill -9 until I find the parent process. So back to Firefox. Kinda weird that a multi-billion dollar company can’t be bothered to make a stable browser for Linux. Guess we’re the redheaded stepchild.

None of the “fixes” like using flags when opening Chrome make any difference.

Reference my earlier post from December 2019

Here is how to get the broken Chrome window to die:

jw@PC:~$ ps -A|grep chrome
11992 ? 00:00:32 chrome
12001 ? 00:00:00 chrome
12005 ? 00:00:00 chrome
12025 ? 00:00:05 chrome
12027 ? 00:00:01 chrome
12043 ? 00:00:00 chrome
12073 ? 00:00:14 chrome
12177 ? 00:00:00 chrome
12204 ? 00:00:00 chrome
12275 ? 00:00:00 chrome
12304 ? 00:00:00 chrome
12333 ? 00:00:00 chrome

jw@PC:~$ kill -9 11992

Kill the earliest process in the list. I find that I have to use the “-9” option also.

Mushrooms: Coffee grounds, good or bad?

A lot of substrate and spawn recipes call for either fresh or used coffee grounds. Most actual testing shows that the caffeine in the grounds causes less growth than would happen without it. Still, if you have a lot of grounds, mushrooms will grow on it, and will break down the caffeine. This gives a use for spent grounds, as long as they are fresh (less than 24 hours, or you get mold). But there is no evidence that the mushrooms really like coffee grounds versus hardwood or soy hulls. There is no point in adding fresh coffee grounds to spawn or substrate.

However, one famous mushroom grower says that in his experience adding brewed coffee to sclerotia producing species of mushrooms will provide a distinct boost to their growth. I haven’t seen any side by side comparisons or lab experiments to verify this. But given his years of growing experience, I wanted to mention his recommendation.

Caffeine is created by the plant to inhibit growth of competing plants. Therefore grounds should not be put into your garden as a supplement to the soil.
https://www.theguardian.com/lifeandstyle/2016/oct/23/coffee-grounds-are-not-good-for-plants-its-a-myth

In the study linked below regarding mushrooms and coffee grounds, caffeine inhibited mycelial growth and fruiting, but amount was negligible in fruiting bodies (250kg mushrooms for equivalent of 1 cup espresso). They concluded that mushrooms could be used to detoxify coffee grounds before disposal. But it doesn’t help them grow.
https://www.ncbi.nlm.nih.gov/pubmed/31115628

However, one site grows oyster mushrooms specifically to put the otherwise useless coffee grounds to good use. And they say they have used 75,000 kilos of coffee ground to produce 20 tons of mushrooms. They do warn that you must use very fresh grounds, or you will get mold. The giant blocks of spent substrate are then used as compost in gardening.

Growing Mushrooms In Coffee Grounds

Mushrooms: “Lime” and “Gypsum”, are they needed?

I’ve been reading and watching a LOT of information in the past couple of months about growing mushrooms (any kind). There are forums that have been running for decades, some new ones, and lots of videos on YouTube.

I’ve learned in that time that there is rather a lot of misinformation, beliefs, superstitions, and some very good information based on science and experiments.

Mushrooms often grow on recently dead wood, some grow on manure and wood, some grow on the roots of living trees in a symbiotic relationship. A few even grow on dead bugs or animals. For some reason, people imagine that they “need” all kinds of nutrients that aren’t found in wood. They really don’t. They evolved to eat wood. (Same thing goes for house cats and meat. They just need meat, no veggies, no grain, no potatoes. They eat plants to help themselves vomit.)

When people want to grow mushrooms at home or for a business, they try to find methods and recipes for “substrates” (mixes of growing materials that the mushrooms like to eat) that are easy to make and cheap to source. Others experiment with all kinds of substrates, and throw in things like bee pollen and coffee grounds. Some people absolutely swear that by adding ____ to their mix, they get great results, and have done so for years. Those beliefs don’t really help advance the science and facts of growing mushrooms.

Two items in particular get mentioned often in both spawn and substrate recipes: Lime and Gypsum. The problem with these terms is that they are generic and have multiple meanings, and that leaves a lot of people confused about what is really meant. They are added to “help the pH”, though most aren’t sure how exactly.

Here are some terms and factual meanings:

PH
pH is a measurement of hydrogen ion concentration, on a scale of 0 to 14, 7 is considered neutral (neither acid or base). Below 7 is acidic, higher than 7 is alkaline.

GYPSUM
Gypsum is the dihydrate of calcium sulfate (CaSO4 2H2O). Gypsum does NOT usually affect pH. This is contrary to a lot of postings about why it is added to mushroom grain spawn or substrate. Instead what gypsum provides are calcium and sulfur, which mushrooms may like. It is added to grain spawn (rye, oats, wild bird seed, etc) to keep the grains from sticking together, and to provide calcium. Calcium carbonate might also be used as a calcium supplement.

Gypsum is typically used in agriculture to help break up clay soil, provided one also adds significant organic matter. Most gardens don’t need it, just more organic matter (compost).

Here is a link to a PDF by Washington State University about what gypsum does and does not do for soil: https://s3.wp.wsu.edu/uploads/sites/403/2015/03/gypsum.pdf

LIME

“Lime” can mean several things, because there are different chemicals each called “lime”. One kind is used to buffer pH, another is used to pasteurize or sterilize straw substrate, other kinds should not be used for mushrooms at all.

The kind of lime usually added to adjust pH is calcium carbonate (CaCO3), and the carbonate ion part is what raises the pH (makes more alkaline) by neutralizing acids (hydrogen ions). This should be used sparingly in mushroom substrate. Most mushrooms apparently like the pH to be fairly neutral, or just slightly alkaline. 2% lime CaCO3 is considered good for oyster mushroom substrate, according to this research abstract:

https://www.researchgate.net/publication/287905250…

Here are the various kinds of “lime”:

Calcium Carbonate “lime” (CaCO3) is NOT for pasteurizing – this is limestone, marble, chalk, eggshell, coral or oyster shell. This material is used as a pH buffer in substrate and media. This type of lime does not cause a major change in pH, but acts as a buffer. This means it holds the pH steady as the mushrooms grow. This is the preferred amendment for substrate to ensure the substrate does not go too acid during the growth cycle.

Calcium Hydroxide Ca(OH)₂ or Hydrated Lime or Quicklime will create a pH increase but is used primarily for pasteurizing or sterilizing substrate. Don’t add this as a nutrient.

High Magnesium Lime, Builders Lime, Dolomite Lime, or just Dolomite CaMg(CO3)2 has high magnesium and WILL NOT WORK for growing mushrooms. It will stunt growth (according to the link above).

= = = = = = = = = = =
Wood ashes, bleach, or soap can also be used to pasteurize straw also. The idea is to kill off bacteria and molds that can hinder your mushroom growth.

This website has great info on growing mushrooms at low cost:
https://alohamedicinals.com/low-cost-and-low-tech-methods-for-growing-mushrooms/

Inside the First Alert (BRK) BRK-7010B Smoke Alarm

Today my smoke alarm system reminded me that I forgot to change the batteries around New Years, like I normally do. In the process of changing the 9v batteries, one of them seemed stuck. I wiggled and pried and the whole battery holder and battery came out. Oops. One of the pressure-contacts for the holder seemed damaged by my force, and I guessed at how it should be folded back to work right. I was wrong, and the battery holder would not go back in all the way. The metal tabs in the back were bent and in the way.

I decided to order a new one, and then in the meantime take this one apart and see how it goes together, and how the battery compartment works.

The circuit board layer of the unit is held together by 4 plastic latches:

4 Latch Locations

These latches clip onto 4 tiny wedges in the lid:

Latch clips

The battery compartment slides on slots and has tabs that keep it aligned. I snapped these off when I forced the battery holder out. Oops.

Batt in holder 1Pressure clipsPressure clips 2

The circuit board has pressure contacts that aren’t visible without taking the circuit board off, and I didn’t want to damage it further by trying.

Batt contact locationBatt contact location 2

Once I saw how the battery holder engages the circuit board (not immediately obvious), I was able to correctly re-fold the pressure clips so they would slide over the circuit board and make contact.

I also noticed that the battery can be held in place by two very small tabs that can also prevent removing the battery. These are overcome by pushing the battery towards the inside of the unit, then prying downward.

Batt Holder 2

I was able to reassemble the unit and it seems to work normally now, but with some dents from where I pryed it apart.

WHAT IF IT KEEPS BEEPING AFTER REPLACING THE BATTERY?

According to a video I watched…
1. Make sure your battery is actually new. I’ve had some in packages that were nearly dead. The common way to test without a meter is to touch the terminals of the battery to your tongue. A small ZZZZT feeling says that it has power. A tiny almost nothing zzzt feeling means it is nearly dead.

2. Remove the battery, press the test button for 30 seconds. Put the battery back in. Press the test button again until it alarms and let go of the button. This should reset the unit.

WHERE TO BUY REPLACEMENTS?
I bought my smoke detectors as a pack of 6 from Amazon a few years ago (currently $15 for one, beware of price gouging for multi-packs). The physical detector needs to be replaced every 10 years since they become less sensitive over time. I also opted for the optical type of detector to cut down on the false alarms from cooking. When I would open the oven, a wave of hot air would go to the ceiling, travel a ways, and then set off the alarm that was looking for heat instead of smoke. The optical ones detect actual smoke, and since actual fires tend to generate a lot of smoke first, these are the best approach in my opinion, versus the ionization type.

Keep in mind that this model expects to be wired into your house electricity and to communicate with the other smoke alarms. If your house isn’t wired for this, then you’ll need stand-alone detectors.

Replace the batteries once a year, and the detectors every 10 years. If you are not comfortable replacing the unit (since it deals with high-voltage wiring), please hire a qualified electrician to do the replacements.

Firefox won’t play MP4 files

I noticed after Chrome stopped working in Linux and I switched back to Firefox 71, that FF would not play a lot of videos or GIFs. This was true on some YouTube videos, all of Vimeo, and even locally opened MP4 (h264 with AAC audio, or h265, either HD or 4K) files I made. These files play fine on VLC. Apparently there is some kind of patent issue with MP4, and it would require that they pay something to the patent holder. Here is a link to the Mozilla page that alludes to this:
https://support.mozilla.org/en-US/kb/html5-audio-and-video-firefox

This may also relate to the problem I’ve seen with animated gifs, but I’m guessing.

It would have been nice for them to simply state that Firefox will not play MP4 files.

corrupt

It isn’t related to plugins or adblockers. I dug around for a few hours reading various suggestions from years ago all the way up to a few months back. There were several saying “Oh, just clear your cache and cookies”. Bullshit! This has to do with FF not knowing what to do with a particular format.

I recompiled ffmpeg and a bunch of libraries, but that didn’t help Firefox. I hate that I have to guess at why the latest version of a modern browser can’t play common video types. If Mozilla would state exactly why they won’t play certain types of files on their knowledgebase, that would be helpful. Or tell us what steps to take to enable the browser to play those files. As I said, other programs on the same computer play them with no problems, that reduces the issue to Firefox.

I purged and reinstalled Firefox entirely using these steps:


sudo apt purge firefox

sudo rm -rf .mozilla

sudo rm -rf .macromedia [remove vintage Flash player stuff. May not exist.]

sudo rm -rf .adobe [remove vintage Flash player stuff. May not exist.]

cd .cache
Delete the mozilla folder

cd /etc
sudo rm -rf firefox

cd /usr/lib
sudo rm -rf firefox
sudo rm -rf firefox-addons

Reboot your computer to get rid of any temporary files.

sudo apt install firefox

Firefox still is not able to play MP4 files. Ridiculous!

I also checked the steps in this StackOverflow posting and it made no difference, Firefox still insists that all MP4 files are “corrupt”.

Chrome won’t open in Ubuntu

UPDATE 4-5-20: Same issues continue with the added feature that Chrome completely freezes up and won’t die even with kill -9 until I find the parent process. So back to Firefox. Kinda weird that a multi-billion dollar company can’t be bothered to make a stable browser for Linux. Guess we’re the redheaded stepchild.

UPDATE 12-27-19: The issue of Chrome not opening seems to be related to two files called “Preferences” and “Network Persistent State” (maybe just Preferences) found in the home hidden directory .config/google-chrome/Default/ If I set these two files to be owned by root and not writable by my own login, then Chrome will open, but will not remember any extensions or settings I configured the last time I used Chrome. If I set the same files (via chmod and chown) to my login and permissions to read+write, then Chrome will not open. I just see the spinner on my cursor indicating it is trying to open, but then I have to kill the process via terminal. I sent this info to the Chrome developers via a popup in Chrome when it couldn’t read my Preferences.

UPDATE: Still no real explanation for why Chrome works fine for several months and then stopped. Also, no explanation for why some of these “fixes” work once or twice and then stop. If I start with a completely new profile, it will work again for a while. This makes me think there is some setting that is being changed that breaks it, but no idea what since it works fine and then suddenly won’t open.

Well, my “fix” worked once before doing the same behavior again. I have to find the process and harshly kill it.
ps -A|grep chrome
kill -9 process number

jw@JW-PC:~$ ps -A|grep chrome
9855 ? 00:00:00 chrome
9864 ? 00:00:00 chrome
9868 ? 00:00:00 chrome
9888 ? 00:00:00 chrome
9891 ? 00:00:00 chrome
jw@JW-PC:~$ kill -9 9855

I set my environment variable “MESA_GLSL_CACHE_DISABLE=true”, based on a Debian bug site statement, and that worked one time for opening Chrome. Thereafter it reverted to not opening at all. Frustrating!
To set the environment variable type this:
export MESA_GLSL_CACHE_DISABLE=true

Another site said to start Chrome via terminal and type
google-chrome --disable-gpu --disable-software-rasterizer

That worked a few times, but then gave the error
ERROR:gpu_channel_manager.cc(450)] ContextResult::kFatalFailure: Failed to create shared context for virtualization.

So I tried various other option flags that worked for others, but no luck for me.

(Original Post)
Recently Chrome began acting up on my system, as in it simply would not open. The process was running, but it would not display. If I ran google-chrome from a terminal, I saw an error about sandboxing:
ERROR:sandbox_linux.cc(372)] InitializeSandbox() called with multiple threads in process gpu-process

I used Firefox to go online and search for the error. I found a Debian bug site that mentioned that changing the configuration of the mesa graphic drivers could help. I was not able to find a config file for these drivers, but found that I could add the repository for the drivers and get the latest version. That fixed it for me.

Here is the site with info on adding the repository:
http://tipsonubuntu.com/2019/02/08/install-mesa-graphics-driver-18-3-3-ubuntu-18-04/

I went from version 19.0.8 to 19.2.1 and Chrome opened right up. Wish I’d seen this fix before blowing away my old profile…

Yanmis YF-7 two-relay timer

I bought a Yanmis YF-7 from Amazon about a month ago and am finally getting around to playing with it. It can be powered by a 9V battery and has a programmable timer for controlling two on-board relays.

[EDIT: Unit failed. I had it in a drawer for a few months, took it out to try using it and it won’t turn on. It just heats up like it has a short (none visible) and nothing is connected to it besides a 9V battery. Sadness is mine.]

The main problem I’ve found so far is that there is no documentation for it. They sent no manual with it, and an internet search yielded just a tiny amount of information from the German Amazon website, and then from competitor’s models that have similar programming. They did say that I could email them for a manual, but I don’t like giving a live email address out. I’d much prefer that they had a link for downloading a PDF manual.
Click here for a PDF of this document

So, I will post what I find here, and try to keep it updated with the latest information.

YANMIS YF-7 USER GUIDE by W. Jason Woodrow 2019

Yanmis YF-7
Part Number: Yanmisepv0txaurd
UPC: 746771544984
Description: Multifunctional Delay Relay, DC 7-30V

9V model buttons

The unit can be powered by a single 9V battery. The unit has two relays each with a red LED on the board that indicates which one is currently powered. They operate independently, and can operate simultaneously depending on programming.

When the unit is powered-on, by default it will display dashes on the LED display “- – – -” meaning all timers have run out of time.

The buttons at the bottom are K1, K2, K3, K4.

PROGRAM MODE
K1 held for 1 full second will enter program mode.
In Program mode, P will blink in the leftmost column. Choose which program you want, based on the number. P-##. Lowest ## is 11, highest is 48.
Settings are saved as they are made.

P: choose program from 11-18, 21-28, 31-38, 41-48 (excluding 19, 20, 29, 30, 39, 40), 32 programs total (although there are 3 that appear to be duplicates of others).

K2 increments the left digit
K3 increments the right digit
K4 decrements the right digit
Holding any of the these buttons cycles through the numbers

SET TIMERS
A timer (controls Relay 1)
B timer (often controls Relay 1)
C timer (controls Relay 2)
D timer (often controls Relay 2)

In program mode, press K1 briefly to display the A timer. See the chart below describing how the decimal affects the time. Press K1 briefly again to show B timer, etc. D timer is the last setting.

When display shows four dashes “- – – -” you have exited program mode and saved the settings. To enter Program mode again, press and hold K1 for one full second.

NOTE: In timer mode (A, b, C, d) K4 moves the location of the decimal or removes it. K2 increments all three digits, K3 decrements all three digits. Holding K2 or K3 cycles through the digits.

DECIMAL PLACEMENT MEANING EXAMPLES
This part is a little confusing, and it can affect the way the other timers are interpreted by the device. If you stick to one method for all the timers, you’ll get the most consistent results.

A004. (decimal showing after last digit) is 4 minutes (Range is 1 to 999 minutes)
A004 (no decimal showing) is 4 seconds (Range is 1 to 999 seconds [16min 39sec])
A04.0 is 4 seconds (Range is 0.1 to 99.9 seconds [1min 39.9sec])
A4.00 is 4 seconds (Range is 0.01 to 9.99 seconds)

PROGRAM MODES
Through testing each mode, I was able to figure out if it started the timer based on power-on, trigger pulse high, trigger pulse low, or trigger steady power. A couple of modes were too odd to completely figure out.

For Triggers, I used a wire to feed from the negative power input to the two triggers (called Signals in the picture).

P-11: Trigger 1 keeps Relay 1 activated as long as trigger power remains. Same for Trigger 2 and Relay 2. Timers are not used.

P-12: Each trigger toggles the relay closed or open as many times as triggered. Timers have no function

P-13: Trigger 1 closes relay 1 for time set on timer A. Trigger 2 closes relay 2 for time set on timer C. B and D timers have no function.

P-14: appears to be the same as P-13

P-15: appears to be the same as P-13

P-16: appears to be the same as P-13

P-17: appears to be the same as P-13, except that the timer only shows “—-” (4 dashes)

P-18: Triggers inactive, Timers A & C start at power-on.

P-21: Trigger 1 runs Timer A then closes Relay 1 until power-off. (Trigger 1 can run timer again, but relay remains open until power-off).
Trigger 2 runs Timer C then closes Relay 2 until power-off.

P-22: Similar to P-21, except power to triggers have to remain on (cannot be a pulse). Timer will reset if trigger loses power.

P-23: Pulse to Trigger 1 runs Timer A then activates relay 1 until next trigger pulse which powers off relay 1 and starts timer A again. (Relay is off while timer runs, relay activates when timer reaches 0).
Pulse to Trigger 2 runs Timer C then activates Relay 2 until next trigger pulse which powers off Relay 2 and starts Timer C again.

P-24: Trigger 1 power must stay on, runs Timer A then activates relay. When Trigger 1 goes low, Timer A runs for time set on B and then closes relay. HOWEVER, see note below.

Trigger 2 power must stay on, runs Timer C then activates relay. When Trigger 2 goes low, Timer C runs for time set on D and then closes relay. HOWEVER, see note below.

HOWEVER, it also depends on how decimal is set on timers A and C.
Examples:
A04.0 B07.0 C02.0 D03.0
A runs for 4 seconds, then runs for 7 seconds (Timer shows A during 2nd time)
C runs for 2 seconds, then runs for 3 seconds (Timer shows C during 2nd time)

A4.00 B07.0 C02.0 D03.0
A runs for 4 seconds, then runs for 0.7 sec, so it is like decimal was moved on B to B0.70
C runs for 2 seconds, then runs for 3 seconds (Timer shows C during 2nd time)

P-25: Toggle. Trigger 1 power must stay on, runs Timer A then activates relay. Stays activated when Trigger 1 goes low. Trigger 1 power must stay on, runs Timer A then deactivates relay.
(Same for Trigger 2 and Timer C)

P-26: Any change of state to Trigger 1 starts Timer A. If power to Trigger 1 is left on, Timer A will trigger when power is removed from Trigger 1. Or trigger can be pulsed with same effect.
Same for Trigger 2 and Timer C.

P-27: Same as P-23

P-28: Power on starts Timer A, then Timer C, Relay 2 activated, Timer A again, then Relay 1 activated. Relays stay activated until power-off. Triggers no effect. (I don’t understand this one’s purpose)

P-31: At power-on both relays activate, runs timers A, C, deactivates Relay 2, A, D, deactivates Relay 1, B, D, B, D, activates Relay 2, B, C, deactivates relay 2, B, activates Relay 1, D, A, C, A, D…. (I don’t understand the purpose of this one)

P-32: Loop. Trigger 1 power must stay on, activates Relay 1 runs Timer A, then deactivates Relay 1 while Timer B runs. Loops as long as power is on trigger.
Same for Trigger 2 and Timer C and D.

P-33: Loop. Same as P-32 BUT only needs a pulse for trigger. Next pulse to trigger cancels timers. Trigger 1 pulse activates Relay 1 runs Timer A, then deactivates Relay 1 while Timer B runs.
Same for Trigger 2 and Timer C and D.

P-34: Similar to P-31, except after activating and deactivating both timers, it stops. Triggers inactive.

P-35: Pulse to Trigger 1 starts timer A, then Relay 1 activates with Timer B, then stops until next trigger.
Same for Trigger 2 and Timer C and D.

P-36: Same as P-35, but Trigger power must remain on.

P-37: Pulse to Trigger 1 starts timer A and activates Relay 1, Timer B starts and Relay 1 deactivates, then stops until next trigger.
Same for Trigger 2 and Timer C and D.

P-38: Pulse to Trigger 1 starts timer A and activates Relay 1, Timer B starts and Relay 1 deactivates, Timer A repeats once more and activates Relay 1, then stops until next trigger.
Same for Trigger 2 and Timer C and D.

P-41: Trigger 1 goes LOW, Timer A starts and Relay 1 activates. Stops when Timer A finishes.
Same for Trigger 2, Timer C and Relay 2.

P-42: Trigger 1 goes LOW, Timer A starts. Timer B starts and Relay 1 activates. Stops when Timer B finishes.
Trigger 2 goes LOW, Timer C starts. Timer D starts and Relay 2 activates. Stops when Timer D finishes.

P-43: Same as P-42

P-44: Nothing seems to happen at all.

P-45: Power-on Relay 1 on for Timer A, then Relay 2 on for Timer B. Stops after Timer B.
Triggers not effective.

P-46: Trigger 1 HIGH, Relay 1 on for Timer A, then Relay 2 on for Timer B. Stops after Timer B.
Trigger 2 not effective.

P-47: Same as P-46.

P-48: Loop. Power-on Timer A on and Relay 1 activates, Relay 1 deactivates for Timer B. Timer C on and Relay 2 activates, Relay 2 deactivates for Timer D. Keeps doing this.