July 6, 2017

LG G6 - Quick Charge 3.0 Not Working?

I finally got my G6 to charge properly with Quick Charge 3.0!  Here is what I learned...

The following conditions must be met, or else the G6 steps down power during charging and you will not get a proper QC 3.0 charge:

  • battery must be below 80% capacity
  • screen must be turned off
  • screen saver mode must be disabled

The LG G6 has a Snapdragon 821 SoC that supports Qualcomm's Quick Charge 3.0 technology for rapid charging. However, I haven't been getting very fast charge times on my G6.  I tried the stock charger/cable and even several QC-compatible 3rd party accessories.  While the G6 showed a "Fast Charging" notification, it didn't seem very fast at all.  It also seemed to charge faster over wireless (Qi) than with a charger and cable attached!

So I bought a QC-compatible USB multimeter to test the voltage and current the G6 was drawing during a charge.  Just as I suspected, I was *not* getting a Quick Charge at all.  The adapter that comes with the G6 is supposed to be able to charge at 9V/1.8A, but I couldn't see it draw anything beyond a 5V/0.5A.  After much frustration and troubleshooting, I realized I had my G6 configured to run Screen Saver mode during charging.  After disabling the Screen Saver, I finally saw it charge at the full 9V/1.8A!

Also note:
  • when the "Fast Charging" notification is displayed, it just means a QC compatible charger/cable was detected, not that it's actually charging at QC 3.0 speed.
  • Screen Saver setting is located at: Settings > Display > Screen saver

February 2, 2017

Batch Convert Images from PNG to JPEG

This post briefly shows how to recursively scan a directory tree for PNG images and convert them to JPEG format.  To achieve this, we use the `find` shell command and ImageMagick's `convert` utility.  We use GNU Parallel to speed up processing time by executing conversions in parallel.  This should make efficient use of all CPU cores.

First, install ImageMagick and GNU Parallel.  For example, on Debian/Ubuntu you would run:

$ sudo apt-get install imagemagick
$ sudo apt-get install parallel

Once these are  installed, `cd` to the root of the directory tree containing your images, and run:

$ find . -iname "*.png" | parallel convert -quality 95% {} {.}.jpg

This shell pipeline will:

* recursively search under the current directory
* match files that have the [case-insensitive] `.png` extension
* convert each PNG image to JPEG format at 95% quality
* save the new image with the file extension changed to `.jpg`

Once converted, you can delete the original PNG images with:

$ find . -iname "*.png" | parallel rm {}