Friday, December 22, 2023

Upgrading to Fedora 38

Upgraded from Fedora 37 to 38 following the standard instructions.  There were no errors indicated during the upgrade.  The packages was downloaded, installed and the system rebooted.   When I came back to the machine after the upgrade and got to the login screen, my USB mouse was functioning sporadically.  I could still log in with the keyboard but it felt slow and Fedora had a warning that something didn't load correctly.

I powered down the system and then turned in back on (the usual if the hardware isn't working first give it a "kick") and everything seemed to be working normally.  It might be because my mouse is connected to the desktop through the monitor's USB input?

Once I was back on, I did a 

sudo dnf update

to see if I was current and it gave the following error

Problem 1: cannot install the best update candidate for package libheif-freeworld-1.15.1-4.fc38.x86_64
  - nothing provides libheif(x86-64) = 1.17.5 needed by libheif-freeworld-1.17.5-1.fc38.x86_64 from rpmfusion-free-updates
 Problem 2: problem with installed package libheif-freeworld-1.15.1-4.fc38.x86_64
  - package libheif-freeworld-1.15.1-4.fc38.x86_64 from @System requires libheif(x86-64) = 1.15.1, but none of the providers can be installed
  - package libheif-freeworld-1.15.1-4.fc38.x86_64 from rpmfusion-free requires libheif(x86-64) = 1.15.1, but none of the providers can be installed
  - cannot install both libheif-1.16.2-2.fc38.x86_64 from updates and libheif-1.15.1-2.fc38.x86_64 from @System
  - cannot install both libheif-1.16.2-2.fc38.x86_64 from updates and libheif-1.15.1-2.fc38.x86_64 from fedora
  - cannot install the best update candidate for package libheif-1.15.1-2.fc38.x86_64
  - nothing provides libheif(x86-64) = 1.17.5 needed by libheif-freeworld-1.17.5-1.fc38.x86_64 from rpmfusion-free-updates
================================================================================
 Package             Arch     Version            Repository                Size
================================================================================
Skipping packages with conflicts:
(add '--best --allowerasing' to command line to force their upgrade):
 libheif             x86_64   1.16.2-2.fc38      updates                  298 k
Skipping packages with broken dependencies:
 libheif-freeworld   x86_64   1.17.5-1.fc38      rpmfusion-free-updates    59 k

Transaction Summary
================================================================================
Skip  2 Packages

Nothing to do.
Complete!
The output's suggestion of using --best and --allowerasing didn't work so search yielded two threads about this issue from months ago:
  • https://discussion.fedoraproject.org/t/unknown-update-error-with-libheif/81302
  • https://discussion.fedoraproject.org/t/rpmfusion-free-updates-libheif-freeworld-and-libheif-version-conflict/82240/7
Although the threads implied that it's been resolved and people had proposed different workarounds the simplest solution for me was simply to remove libheif-freeworld package:

sudo dnf remove libheif-freeworld

This seemed to resolve the issue.

The above threads indicated that a fix was submitted but it might now be broken again since when I searched for the various package versions on Fedora and rpmfusion, the working versions of the packages weren't there:

sudo dnf search --showduplicates libheif
Maybe it's the timing of my upgrade that ran into this problem.  Fortunately, it was a quick and easy fix but sadly I can't say that this was a completely seamless upgrade.

Sunday, October 29, 2023

Workshop Upgrades to Improve Organization and Workflow

Continuing my efforts to have better organization and improve the workflow in my limited space garage workshop (1/2 of a 2 car garage but where we have to be able to park one car), I tried to tackle two birds with one stone by using many of the scrap materials that were left over from previous projects that was taking up space to build an assembly table with some storage underneath and a mobile bench top tools cart.


All the materials used for the table were stuff I had lying around so the design was partially dictated by what I had on hand, but the final result matched exactly what I wanted:  a 3' x 3' mobile table (since in a small shop, I often had to move things around).  Having it be 3 feet allows me to be on one side and reach across to the other side without having to walk around the table.

A shelf on the bottom gave me additional storage keep items off the ground and I can move the table around while having all the tools move together.


I added drawer slides so that I can expand the work area, have storage and have easier access to the items.  When not in use everything goes back into a compact 3'x3' space.

Before building the assembly table, I was using two temporary Bora 2' x 4' Centipede workbenches which took up slightly more then 4' x 4' of space.  They had limited space beneath the top and everything would be sitting directly on the ground.  I had a bench top sander, band saw, planar and jointer on it which took up most of the space leaving me just a small corner as a work surface.  Again, with only materials that I had lying around, I made a mobile cart to hold all the tools in a more compact dimension (3x2) that I can roll around and store to the side.


In the above picture, you'll also noticed that I moved the miter saw from the built-in cabinet to a mobile stand (a repurposed Bosch table saw cart I previously built but not used since I sold the saw) that I added an OEM Kapex top.  Now, I have the saw, the bench top tools cart and router table (also on a mobile cart) lined up in a row so they take up less space but are still easy to access when I need them.

I added wings and fence with a stop block to the miter saw. 



I bought this pine plank around 10 years ago with the intention of using it as a wing for the miter saw.  The track fence is probably just as old (or older) and was also intended to be used for the wing to make repeatable cuts.  Well, better late then never, right?  I finally set it up.  The wings (yes, there is one for the other side) can be detached and folded so they can be stored away.  The fence can slide on-and-off of the brackets on the back. 

I also made some changes to the MFT3 and the cart it sits on.


I replaced the fence it came with with a UJK fence and I removed the fold-down bracket that held the Festool track and use bench dogs sitting in the 20mm holes to attached the track.  This allows me to not worry about making sure the bracket is calibrated to be 90 degrees to the bench dog holes and I also don't have the track standing up vertically all the time and having to reach over to pull it down.

I finally added drawer slides to the cart so I can pull out the trays and have easy access to the items stored behind the systainers.  I had bought the slides 11 years again with then intention of doing this and only gotten to it this year.

The dust extractor faces the back of the cart which made turning it on manually very inconvenient.  It turns on automatically when the connected tool turns on, but if I just wanted to use the dust extractor to clean up, I'd have to walk around to turn it on.  I added a Bluetooth on-off switch to the end of the hose so that I can turn it on manually without having to go behind the cart.


The final setup has not only increased the functionality, flow and convenience of my workspace, it also gave me more space even though I've gotten more tools the past year and it cleared away a lot of materials that were lying around.


Sunday, July 30, 2023

Pixel Green Screen of Death

While on vacation, my Google Pixel phone experienced the Green Screen of Death.  Basically, what happens is that the screen will either not turn on at all, flash a few lines, or flicker a primarily green color before the whole display turns dark.  The phone is still functioning in the background as you can hear the notifications and it still senses your finger touches, but you can't see anything.  

I had a separate tablet with me on the trip so I quickly searched to see if this is a known issue and if there was any easy fix.   Searching on Google, I found out that it's what people call the Green Screen of Death so it's not unheard of, but nobody can fully explain the cause.  The general consensus is that this is a hardware failure and requires the phone screen to be replaced.  The speculation is that it is caused by the phone overheating, but whether it's a defect in the design or manufacturing is still under debate.  I don't have any definitive answers but will share my experience here.  My situation started after I left the phone in the armrest of my rental car for a couple of hours one morning.  When I took it out and turned on the screen, it started flickering and then turned dark.  After a few seconds, the screen came on only to flicker and turn dark again.  The phone felt warm but not burning.  It might have felt a bit warmer than when it is doing a fast charge. 

On YouTube, there are a number of videos that offer a "fix" to the problem, but none of them mention that their fixes are just temporary.    Their "fix" mainly is to press down on the screen at different locations starting with simple taps and if that doesn't work then move to more firm presses with your thumbs until the screen comes on.  Since that's really the only solution I found (besides the "Call Google and get a replacement"), I gave it a try and it kinda worked.  Sometimes the display will come on but inevitably it will go dark.  I'm not sure if the pressing thing really helped or if it was just that the display just turned on while I was pressing.  I guess the theory is that the screen lost some kind of contact inside the body and pressing the screen will help it regain that contact.   Are there that many moving parts inside of a smart phone for something to come loose due to heat?  I think it's more plausible that the heat damaged some components so I don't think the phone will recover on its own.

Until I get the phone fixed or replaced, I wanted to make sure that the phone can continue to function enough so I can transfer the data over.  That meant keeping the phone somewhere cool and minimizing moving or using it.  The screen seems to work longer when the phone remains cool.  I tried to charge it one time and when it warmed up while charging the screen started glitching more quickly.  

Not having a mobile phone these days is really inconvenient.  We rely on it for maps, photos, and so much more beyond phone calling, but I guess a positive outlook is that it forced me to really disconnect from the grid while on vacation.  This experience also made me aware that Google has pledged to make their phones DIY repairable so you can now buy genuine Google parts to replace the screen, battery and camera.  That gives me a bit more confidence in getting another Pixel.  My experience with the Pixel has been good and I usually noticed the battery capacity dropping after a few years rather than any hardware failure so being able to replace the battery (even though it doesn't look super easy) is better.

I also learned that you can get the phone fixed quickly at a ubreakitifixit shop if one is nearby.  What I worry about sending a phone to a shop is that unless the phone is completely wiped clean then it might be possible for the shop to access the data on the phone.  These days we have so much data on the phone and if the problem is a broken screen then you can't even wipe the phone before sending it in.





Monday, July 17, 2023

Basic tools for homeowners

 New homeowners often find themselves constantly visiting the hardware store the first few weeks after moving into their new home.  Those visits take time and can be intimidating given all the items available so here's my suggestion for an inital shopping list that will hopefully save you some times and lower the number of trips to the store.

  • Tape measure - this is used so often that you might consider buying two
  • Knife/Box cutter - you'll be opening a lot of boxes and packaging.  A multi-tool might be a good option for versatility.
  • Screw driver - After driving back-and-forth, you might hope this is the drink but sorry, no.  Have at least one philips head screw driver and a flat head screw driver.  The latter is also useful to pry open paint cans lids, etc.
  • Pliers - a pair of hand pliers can save a lot of pain trying to get an old nail or object out.
  • Level - Checking that something is level happens more than I expected.
  • Paint brush - useful for both applying paint and also brushing things off/
  • Painter's tape - People swear by duck tape, but I use the famous blue painters tape for everything and not just for painting because it comes off easily.
  • Hammer - I don't use a hammer all that much but when needed there isn't many other substitites so keep one around.
  • Sand paper - For sanding and removing things stuck on surfaces.
  • Vynyl gloves - inexpensive and protects your hand from chemicals and other gross stuff.
  • Eye protection - Listen to Norm!
  • Dust mask - Don't want to breath in dusts and molds.
  • Power drill & drill bits - Save time and your wrists and get a power drill.  I recommend getting a drill and driver set as they are common and cost effective.
  • Stud finder - Don't rely on your Tindr app.  Get a real stud finder so your picture frames don't fall off the wall.
  • 5 gallon bucket - Useful for bringing your tools around to where you need them and can use to hold other stuff.  I suggest getting two (or get a tool bag to replace one of the buckets)
  • Paper towels - DIY can be a dirty job
  • Baby wipes - It's gentle on a baby's skin so probaby also for your painted walls.
  • spackling compound - I know  you don't make mistakes but the previous person might not have put the hanger your spouse wanted.
  • putty knife - Cover up the mistake by the other person.

My most essential tools for woodworking

When I first started learning woodworking, I watched shows like the New Yankee Workshop and videos on Youtube.  I was envious of all the tools and gears that the creators had but over time I realized that I don't work like them or build things the same way they do.  The tools that I reach for my projects turned out to be different from what is often shown on the videos.  To give another perspective on what are tools to consider for the hobbyist, here are what I use for almost every project.

Used for Every Project

Measuring tape - There's no project that doesn't require some way to do measurements.  Even if you are going to buy rather than build, you will need to be able to measure.

Mechanical pencils - I don't recall any project that I've done that didn't require having a pencil to write or mark something.  It was so common for me to be searching for a pencil that I ended up buying a bunch of cheap mechanical pencils and having them everywhere so that I don't constantly stop to look for one to write with.

Combination square - I didn't expect this to be my #1 most useful tool for woodworking.  You don't usually see it being shown or highlighted in woodworking videos, but this the versatility and usefulness of this understated tool means that I use it for every project.  I use it to mark, set repeatable heights, as a straight edge, 45/90 degree finder and a host of other activities.  I started with a basic one and eventually knew that if I bought an high end one I'd have no regrets.

Used for Most Projects

Drill & Driver and screw drivers - Most projects will require installing fasteners (e.g. screws) so either a set of screw drivers or a power tool (driver) will be used.  A drill is used for drilling holes but can also can drive screws but I  prefer having separate drills and drivers. 

Woodglue or Screws - Joining things together requires either glue, screws or nails.  I don't use nails much so it's either glue or screws for me.  For screws, I prefer the square head screws rather than phillips screws but it's not so common to find in US hardware stores.  Torx head screws can be found but they might be more expensive.

Saw - Having a saw is very useful.  I'd recommend starting with a Japanese handsaw which are less expensive but cuts better (in my opinion).  I also find Japanese handsaws to be more versatile then western style handsaw.  There are also powered saws such as table saws, track saws, circular saw, etc.    Having something to cut with is VERY useful but there are times when I buy materials to size that meant I didn't have to do my own cutting.

 Very Useful

Woodworking square - My first "splurge" tool was a Woodpecker woodworking square and I nearly always reach for it at some point when I'm working on a project.  I mostly use it to check for square but I also use it to hold things square and check for straightness.

Mallet - I use a rubber mallet a lot more then I use a hammer to avoid marring surfaces when I really need to pound something.

Sunday, February 26, 2023

Chevy's Salsa

 Modified version of this recipe for Chevy's salsa:

  • 2 lbs fresh tomatoes
  • 1 large onion, sliced
  • 1 jalapeno pepper
  • 1/4 cup fresh chopped cilantro
  • 1 table spoon black pepper
  • 1 teaspoon salt
  • 2 teaspoon minced garlic
  1. Grill tomatoes, onion and jalapeno on open flame until slightly charred and tomatoes soften and split.
  2. Remove from grill and let cool
  3. Drain accumulated liquid
  4. Remove stem of jalapenos and tomatoe ends
  5. Blend (approx 10 sec) all ingredients in blender
  6. Chill and serve.

Monday, February 13, 2023

First Cross Cut Sled

I decided make myself a small basic crosscut sled to use with my table saw.  YouTube is filled with videos on how to make a crosscut sled ranging from simple to ones with built-in clamps, adjustable kerf openings and many other features.  I won't go over how to build the sled as there are enough videos on YouTube to learn from. I will just share what I learned from building the sled.

Not knowing what features I would really need, I didn't want to spend too much time and money on my first sled.  I figure that I just need to build one and try it out to see how I would use it.



As basic as this sled is, it isn't the most basic type of crosscut sleds which just needs one fence and one runner.   I decided to have fences on both ends and have it sit on two runners since it felt safer and more stable to me.

There needs to be runners that rides along the miter slots.  The majority of videos on Youtube shows how to make them using wood, but some Youtubers advocate buying metal ones to save on the hassle.  Wood runners can change in size over time causing the sled to wobble or become difficult to move.  Instead of either, I made mine out of HDPE plastic which I can cut on the tablesaw until it fits into the slots.  The easiest way I found is to buy a cutting board and cut it to size, but I made two mistakes.  I first bought one that was 1 inch thick thinking that I could always cut it down to right width and thickness but while getting the right width was pretty simple cutting to get the right thickness caused the plastic to bow.  Even a 1/2" thick board was a little taller the the height of the slots and you want the thickness to be less  then the height of the slot so debris on the floor of the slot doesn't lift up the sled.  With plastic, you also need to pre-drill your screw holes or it will cause the plastic to bulge out as the screw is driven in.  In the future, I'll go with 1/4".

The fence that sits away from you is there to help hold the sled together and doesn't need to be flat and or be 90 degrees to the blade.  The fence closest to you needs to be both.  I glued two pieces of plywood together (both had a slight bow) and sandwiched them between two straight box levels to get them flat.  I made sure that the height of the fence is higher then the saw blade so it doesn't get cut through and I figure that higher the fence the less chance of me getting my fingers too close to the blade.  Then I realize that the fence was too tall and it made it hard to reach down to hold my cutting pieces so I can to cut down two sides of the fence where I would be holding on.

The blade guard block behind the fence is to prevent your thumbs from getting too close to where the saw will come out if you push the sled too far forward.  While I rounded everywhere else on the fence, I kept that block guard sharp to further discourage my thumbs from getting near it.

Making the runners took most amount of time but that might be because I got lucky when setting the fence to be perpendicular from the blade.  I put in a screw on one end of the fence so that I can pivot it.  Then I used a woodworking square against the fence and saw blade until it was 90 degrees.  I clamped down the fence and was prepared to use the 5-cut method to calibrate it but after I found that I was within .001 and .0005 of an inch I decided that was good enough for me!


Having a crosscut sled can help with some of the cuts that I used have to do with a hand saw since they were too hard to do on a track saw or too dangerous on a miter saw.  I expect the small size is enough for my needs except with doing miter joints when the length is long.

Building this sled doesn't require a lot of techniques and it took one afternoon


Wednesday, January 18, 2023

New Yankee Workshop Now On Youtube!

I just noticed this week that The New Yankee Workshop is now officially on Youtube!  The New Yankee Workshop is an iconic woodworking show that ran on PBS for 21 years.  The Youtube channel doesn't have all the episodes but even the official website didn't have them all.  The only way to get all the episodes was to buy the complete series DVD which costs $3000.


They seem to have a lot of difficulties bringing the episodes online or at least was bringing them online very slowly.  As of this writing, the official website has had most of its contents removed and has a message saying they're rebuilding it.

Monday, January 16, 2023

Nier:Automata Ver1.1a Anime Reaction

Nier:Automata is one of my favorite games of all time.  It was a game that at the conclusion of the game, I just sat there staring at the screen thinking and FEELING the experience that I just went through.  Yeah, I loved the game.

When it was announced that there will be an anime adaptation to be released in January, 2023, I was excited but also worried.  I wondered if the anime can really capture the same feeling that I had while playing the game?  



So far two episodes have been released.  Episode 1 tried to be very faithful to the game and creates many of the scenes, but I still walked away more worried.  The game just felt more epic and the computer art felt more aligned with the tone of the world so the anime failed to match.

Episode two diverged from just trying to recreate the game and that felt much better.  The story of the second episode felt like it can fit within Nier:Automata and I enjoyed.

How will the rest of the season go?  I'm not sure.  I will continue to watch and I hope they utilize the music of the original Nier:Automata more since it is a beautiful soundtrack which fans and newcomers will enjoy.  I can't imagine anyone being disappointed if they don't hear original new composition in the anime.


Goodbye OnHub!

 On January 11, 2023  Google shutdown support for the 7 years old OnHub WIFI router.  Technically, Google shutdown the Google Home App support of the OnHub because OnHub devices were technically made and sold by other companies (either ASUS or TP-Link) depending on which OnHub you had.  However, since the software was all handled by Google, if the software doesn't work then you can't do anything with it.  It will still "run" but no configuration changes can be made nor can you see any info about the device.  The only thing you can still do is to factory reset and delete the whole network.  It's unfortunate that once Google decided to stop supporting the device that they are essentially dead.

I found the OnHub to have been a great WIFI router that was powerful and easy to manage.  It had enough customization for my uses and didn't require me to be an IT admin for it. Even though there were probably a few features that I wished it added, it was balanced enough that I was willing to sacrifice those features.  I wished that before its end-of-life, Google provided a way to download its setting and load it to a new network.  Even though I replaced the OnHub with a Google Wifi (not the Nest Wifi), I had to manually put in all the setting information including tracking down all the devices that connects to it so that I can give each a recognizable name.  Other settings like groups, schedules, reserved IPs, IP range, etc. all had to be manually entered.  Most of it is pretty quick but the device naming is a pain.

Over on the OpenWRT forum there are developers trying to give the hardware additional life by replacing the software on it so it is not reliant on Google and Google's cloud.  That would be great as it saves devices from going to landfills and honestly the hardware is still perfectly fine even to this day.

Setting Up Windows with CyberPower UPS

To set up a Microsoft Windows PC to power down during a power outage does not require installing any proprietary software.  

Simply create a new power profile in Windows and go to the advance setting to set the conditions you want to power down.  



For example, the machine can be configured to power down when the battery reaches a certain point.  This works because when the CyberPower UPS is connected to the Windows machine through a USB connection, Windows will sees it as being on battery power like a laptop.  It will see how much power is left.

More details about the battery probably will need the CyberPower software but for simple shutdowns no additional software is needed.

Setting Up Fedora Linux With Cyberpower UPS

These are my notes on how I set up my Fedora Linux desktop to listen to a Cyberpower UPS to known when to shutdown when there is a power outage.  This is only for one machine connected directly to the UPS through usb and doesn't cover when there are multiple machines that needs to be shutdown.

The simplest way to configure your Linux system to work with a Cyberpower UPS is probably to use Cyberpower's PowerPanel for Linux software, but I didn't use it since I wanted to see if I can use non-proprietary software.  Instead, I used the open-source Network UPS Tools (NUT) but it required a bit of manual work to get it configured.

All I want to do is to have my PC shutdown a few minutes after the power go out of the house so I bought a Cyberpower UPS and use the direct USB connection for it to communicate with the PC.

Once connected, check that Linux can see the UPS:

# lsusb

You should see the UPS listed among the list of USB devices.

Install the NUT software:

# sudo dnf install nut nut-client

This will install NUT and there are 5 key configuration files to be aware of:

  1. ups.conf - settings for UPS driver
  2. upsd.conf - settings for UPS daemon
  3. upsd.users - access control file for the UPS daemon
  4. upsmon.conf - settings for the UPS monitoring daemon
  5. upssched.conf - settings for scheduler daemon

Once NUT is installed, you can use one of its tools to identify the UPS and it will give you info that you can use in the config files:

# sudo nut-scanner

Add the information to the /etc/ups/ups.conf

[cps1500avr]
        driver = "usbhid-ups"
        port = "auto"
        vendorid = "0764"
        productid = "0501"
        product = "ST Series"
        vendor = "CPS"
        bus = "004"

The cps1500avr can be anything you want.  It is the name you'll be using to identify the UPS.  "usbhid-ups" is the driver for Cyberpower UPS.  All of this info came from the nut-scanner.

Add a udev rule, /etc/udev/rules.d/50-usp.rules,  so that Linux understand the UPS:

SUBSYSTEM=="usb", ATTR{idVendor}=="0764", ATTR{idProduct}=="0501", GROUP="nut" TAG+="systemd", ENV{SYSTEMD_WANTS}+="nut-server.service nut-monitor.service"

The TAG+ part is something I found on this blog for an issue with the system service not seeing the UPS and thus not able to start when the system starts up. 

Reload the UDEV rule:

# sudo udevadm control --reload-rules
# sudo udevadm trigger

Test that the driver can start and then start/enable the service:

# sudo upsdrvctl start
# sudo systemctl start nut-driver-enumerator.service
# sudo systemctl enable nut-driver-enumerator.service

Now we need to add the NUT user that will be used to monitor the UPS to /etc/ups/upsd.users

[nutmon]
        password = <password>
        uspmon primary
        action = SET
        instcmds = ALL

"nutmon" can be anything you like and then you can start the server and ask it to print out the UPS info that it sees.

# sudo systemctl start nut-server.service
# sudo systemctl enable nut-server.service
# upsc cps1500avr

Edit /etc/ups/upsmon.conf by adding:

MONITOR cps1500avr@localhost 1 nutmon  <password> primary

Start and enable the monitoring service

# sudo systemctl start nut-monitor.service
# sudo system enable nut-monitor.service

Finally, we need to tell NUT what to do when certain events happens such as when the battery is low or when it notices that the power is out.  Edit /etc/ups/upssched.conf (thanks to this article for the example)

# Gives the script to run the commands for various signals
CMDSCRIPT /usr/bin/upssched-cmd

PIPEFN /var/lib/ups/upssched.pipe
LOCKFN /var/lib/ups/upssched.lock

# Send alerts immediately on change in line power
AT ONBATT * EXECUTE onbatt
AT ONLINE * EXECUTE onpower

# (Optional) Silence the beeper after 2 minutes
AT ONBATT * START-TIMER mute_beeper 120
AT ONLINE * CANCEL-TIMER mute_beeper

# Shutdown after 5  minutes on battery (5 * 60 = 300)
AT ONBATT * START-TIMER onbatt_shutdown 300

# Cancel timer if power's restored
AT ONLINE * CANCEL-TIMER onbatt_shutdown

# Battery replacement indicated by cron'd quick test
AT REPLBATT * EXECUTE replace_batt

Then edit the command script you put in (in my case it is /usr/bin/upssched-cmd):

UPS_USERNAME="nutmon"
UPS_PASSWORD="<password>"
UPS_LINK="cps1500avr@localhost"


case $1 in
    onbatt)
        # make sure beeper is enabled
        upscmd -u ${UPS_USERNAME} -p ${UPS_PASSWORD} ${UPS_LINK} beeper.enable
        # alert
        message="Power outage, on battery"
        logger -t upssched-cmd "$message"
        ;;
    onpower)
        message="Power restored"
        logger -t upssched-cmd "$message"
        ;;
    mute_beeper)
         message="(2) minute limit exceeded, muting beeper"
         upscmd -u ${UPS_USERNAME} -p ${UPS_PASSWORD} ${UPS_LINK} beeper.mute
         ;;
    onbatt_shutdown)
        message="Triggering shutdown after (5) minutes on battery"
        logger -t upssched-cmd "$message"
        /sbin/upsmon -c fsd
        ;;
    replace_batt)
        message="Quick self-test indicates battery requires replacement"
        logger -t upssched-cmd "$message"
        ;;
    *)
        logger -t upssched-cmd "Unrecognized command: $1"
        ;;
esac
Test that it will shutdown by sending it the same shutdown signal from the UPS:
sudo upsmon -c fsd

If all goes well, get the service to start on boot:

# sudo systemctl enable nut.target
# sudo systemctl enable nut-driver.target

From now on, if the power outtage lasts more then 5 minutes (i.e. the UPS is running on battery), your system will shut down.  You'll need to manually turn the system back on when the power returns.

Notes

  • I'm not sure if something automatically started and enabled the specific driver (nut-driver@cps1500avr.service) or if I did it and just forgot to note it down.
  • This article from the Archlinux wiki described a problem that sounds like the same problem that the UDEV TAG part addresses but uses a different approach.

Sunday, January 15, 2023

Life for the Stadia Controller Post-Stadia

Update:  The official instructions to enable Bluetooth mode on the Stadia controller has been published.  The deadline to enable this is December 31, 2023.


Google Stadia will be shutting down on Jan 18, 2023 and while I wish Stadia had found more success the shutdown won't impact me that much given that Google is paying people back for the money they spent on Stadia game and hardware purchases.  I was surprised by this as I'm not sure I remember any other company willing to refund you money on things you bought years ago when they close.  One thought that I did have when the shutdown announcement was made was what will I do with the controllers?

The Stadia controller is pretty nice and well-built and it seem a shame to just throw them away.  I looked to see if I can use them with my PC which was possible but only through a wired connection... until now.   Despite Stadia going away, Google announced that they will release an update for the controller that will enable it to be used as a bluetooth controller.  

Learning About Lights

On a bulb, there might be a number such as F32T8/TL741 but what does the numbers mean?
  • F32 means it is a 32W bulb.
  • T8 gives the size (T8 is a 1" diameter tube).
  • 7 - I'm not sure what this means.
  • 41 means the color temperature is 4100 Kelvin.
    • 2000 K is like sunset/sunrise
    • 3000 K is warm yellow light
    • 4000 K is a warm white light like early day light (has a bit of yellow)
    • 5000 K is also daylight and is a good option for a garage.
    • 6000 K gives a noticeable blue tinge.
What the number doesn't indicate is the brightness (i.e. Lumen) or the color rendering index (CRI).

When it comes to lumen, the right number depends on what the area you want to light up.   A 60W incandescent bulb is about 700 lumens.  Putting a 5000 lumen light in your bedroom will be too bright and harsh but it might be just right for a 2 car garage.

The CRI is a number from 0 to 100 where 100 gives the best color reproduction on the object while a 1 will make everything look like a single color.

Saturday, January 7, 2023

Kernel 6.0.16 (and 6.0.1.17?) Causes Freeze (and how to keep previous kernels)

Update 4: Kernel 6.0.18 works!

Update 3: According to users on Reddit, 6.0.17 still exhibit the problem.  One user said that 6.0.18 has the fix.

Update 2: Decided to remove the back kernel package using the dnf remove command in the previous update rather then dnf history since I only wanted to remove the kernel.  That removed the .16 kernel from the boot loader and had the .15 as the default.

sudo dnf remove $(rpm -qa | grep ^kernel | grep 16-300)

Update:  Seems like others are also affected by the same issue with a suggestion on how to remove and block the 6.0.16 kernel.  

Find and remove  6.0.16 kernel packages:

sudo dnf remove $(rpm -qa | grep ^kernel | grep 16)


Blacklist the 6.0.16 packages from getting installed again by editing /etc/dnf/dnf.conf

# Bad packages
excludepkgs=kernel*-6.0.16-300.fc37.x86_64

Tracking bugs on Fedora:


---------------------------------------------------------------------------

Today I did a typical update of my Fedora system which included a new kernel (kernel-6.0.16-300.fc37.x86_64), but when I rebooted and logged in the system will freeze.  This might be the first time (or at least it's been a long time) that I've had a Fedora upgrade not be seamless.

Fortunately, when Fedora upgrades the kernel, it keeps copies of the previous two versions so switching back simply requires watching for the GRUB boot loading screen and picking the previous kernel.  Just make sure you do this before the system automatically boots to the latest version.

I was able to determine the freeze is caused by the kernel since booting the previous kernel showed no problems after logging in.  Knowing that I have at least one working kernel, I had two choices.  Uninstall the latest kernel or keep using the old one and wait to see if any future updates fixes the problem.

I've not uninstalled a kernel on Fedora before and was unsure what would happen.  I could also simply try to revert the entire update, but that still leaves the same question.  Using dnf, you can review what was done by:

sudo dnf history

To see the details of a specific transaction, use the ID that the history command gives and use:

sudo dnf history info <id>

With dnf, you can chose to undo or rollback a transaction.  Undo will do the opposite of what was done (e.g. uninstall or reinstall the packages) of the specific reaction while rollback will undo everything between the between the transaction and the current system.

Since I didn't want to do either since this involved the kernel, I decided to just keep rebooting to the previous kernel even though it is inconvenient and hope that it gets a fix for whatever is causing the problem.

Protecting the Previous Kernel

What if it took a few more kernel updates before the problem gets fixed and the working kernel gets removed during the update?

The versionlock plugin will lock and keep the kernel on the system.

sudo dnf install python3-dnf-plugins-extras-versionlock
sudo dnf versionlock add kernel-6.0.15-300.fc37.x86_64
The delete option will let you remove the lock:
sudo dnf versionlock delete kernel-6.0.15-300.fc37.x86_64

Thursday, January 5, 2023

Add Build info to a Go Binary

Having the build info directly in a binary is useful in helping to identify one binary from aonther especially if you do a lot of compilations.  Manually updating that information in to the source before build is cumbersome and error prone so it's better to automate it.

This can be done in Go using -ldflags with the build command.  For example, if you have a main.go file such as this:

package main                                                                    

import "fmt"
var(
    build string
)

func main() {
    fmt.Printf("build date: %v\n", build)                            
 
)
Then you can build it with -ldflags to change the value of build with the current date when using the go build command:
go build -ldflags "-X main.build=`date`" main.go

Be careful that other parts of your program doesn't change the value during runtime since it is just a variable.

To make it a little safer, you can put the variables into another package and don't allow it to be updated.   You can, for example, create a package called "buildinfo"

package buildinfo                                                                      
                                                                                   
var (                                                                              
    builddate = "0"                                                                
)                                                                                  
                                                                                   
func GetBuild() string {                                                           
                                                                                   
    return builddate                                                               
}                                                                                  

that is called by your main.go:

package main                                                                       
                                                                                   
import (                                                                           
    "fmt"                                                                          
                                                                                   
    "example/buildinfo"                                                                
)                                                                                  
                                                                                   
func main() {                                                                      
                                                                                   
    fmt.Printf("build date: %v\n", build.GetBuild())                                                             
                                                                                
}

You will then build your application with:

go build -ldflags="-X 'example/buildinfo.builddate=`date`'"

Running the program will now output something like this:

build date: Thu Jan  5 12:33:38 PM

Sunday, January 1, 2023

Dust Collection and Portable Table Saw Carts

Working in a limited space means that I have to constantly move equipment around in order to have access to what I need.  This takes times and takes away some of the fun since it feels like that I spent more time setting up than I am actually building things.  To help myself setup faster, I made two mobile carts.  One is for my shop vac dust collection and the second is for my portable table saw.

Dust Collection Cart



The cart is pretty basic and holds the shop vac on the bottom and the sawdust separator on top.   The connectors detaches easily so I can quickly connect tools to it and the outlet strip gives me access to power when I need it.  Now I don't find myself dragging along the separator, vac, power strip and tools separately and can roll them all to wherever I'm working.

Table Saw Cart



My workflow doesn't center around a table saw so I usually keep it on the side until I need to use it.  That means having to find a place to set it up, plug it into the dust collector, and put up a out feed table to support the cut-off.  By putting the saw on a cart with wheels, I can move it around easily.  The area under the saw can hold saw accessories and the fold-up out feed table makes it more convenient then having a separate table.

I can how roll the two cart to where I'm going to use them and quickly connect the saw to the dust collector and start working!