Fauxdacious(tm) Media Player for Linux Released

I’m pleased to announce the initial release of Fauxdacious(tm) Media Player, v.3.7-beta1!  Fauxdacious is my recent FORK of “Audacious“,  The reason for this fork is that I’ve accumulated numerous changes (hacks) that I’ve made over the years to Audacious.  While I’ve submitted the patches of most of my enhancements to the Audacious team for mainline inclusion, they’ve rejected most and completely redid one in a way that I felt limited it’s usefulness.  The final straw came last month when I rewrote their FFMpeg plugin to support an option to display the video portion of media that contains video and they rejected it out of hand.  I was initially pretty perturbed with them because I believe this enhancement is a very useful addition and I started to get the impression that they really aren’t interested in code contributions from outside parties and started to write a rather angry screed here to my dear readers, but after further contemplation, I have concluded that it’s not warranted nor helpful to anyone.
I think the problem is that Audacious is a very mature (and very good, I might add) software project and therefore they are more limited in what they can and should change, and that their perceived “not invented here” attitude is probably necessary at this point to maintain it’s integrity.  By forking, I can be more open to new ideas and features, which can potentially take it in new directions.  It should be remembered that Audacious itself was originally a fork of the now defunct XMMS media player!  I plan to continue offering further patches and changes I make to Fauxdacious available to the Audacious team for their consideration, but will no longer be concerned about whether they choose to include them.  I can also therefore be more open to new patches offered by others, which the Audatious team may reject, as well as cherry-picking new bugfixes, upgrades, and features that they include into their future releases.
Please be advised that though I’ve been a computer programmer for over thirty years, my C++ skills are very limited and Audacious is huge and very complicated, so my ability to support and fix bugs is limited.  Therefore, if you have an issue with Fauxdacious, your best bet would be to first check their forums, then try real Audacious.  You need to determine if it fails there also, or if the issue only affects Fauxdacious!  If Audacious replicates the bug, then report it there, but if not, then notify me (as it is then an issue with my Fauxdacious patches), and I need to fix it!  Please DO NOT file bugs with Audacious regarding this project unless you can replicate it there without notifying me first!  This will be non-trivial, since it is not possible to my knowledge to install both Fauxdacious and Audacious on the same system at the same time.  By installing one, you will overwrite parts of the other, but you should still be able to switch between the two!
Fauxdacious Features not currently found in Audacious:
1)   A “visualization” option for displaying the video of ffmpeg files and streams that contain a video stream in a popup window.  Since Audacious already has “visualization” plugins that pop up a separate window to display stuff like fractals, equalizer graphs, etc. that are tied to what’s playing, my original idea was to create a “visualization” plugin that would display the actual video part of the stream, if it contained one.  Screenshot below with my new “Lavadacious” skin (included):
2)   The ability to toggle the recently-added Audacious record / dub option via it’s “audtool” DBus-based command-line tool permitting creation of quicker one-button desktop launcher activation, or even script activation of dubbing, ie. using Cron to record your favorite late-night radio show!
3)  Filewriter option to automatically deactivate equalizer and all effects plugins when recording so they’re not doubled down on during playback.  NOTE:  This is also under the Audatious team’s consideration.
4)  Option to divert audio output to stdout in the user’s choice of selected audio formats for further processing by another program.  This is a rejected feature added to Audacious’s “FileWriter” plugin.  The idea here is to be able to use Fauxdacious as an audio component in pipes.  It also permits continuous recording across multiple files / tracks into a single stream.
5)  Better (imho) stdin input (for streaming) of most formats as well as playlists.  Again this is for using Fauxdacious as a component in pipes.  I use this sometimes in combination with “youtube-dl” to quickly download and stream Youtube videos without saving the download to a file.  Audacious actually implemented this at my urging a while back, but my rejected patches not only permit streaming media through stdin, but also lists of media files to process, ie. generated by a script, etc. which they do not support.  Here’s my script for instant-play of youtube videos via Fauxdacious:
youtube-dl --no-continue --no-playlist --no-cache-dir --no-progress --no-call-home --youtube-skip-dash-manifest --prefer-ffmpeg -q -f mp4 --no-part $1 -o - 2>/dev/null | fauxdacious -Dcq stdin://-.mp4
(You’ll never be able to do that with Audacious!)
With Fauxdacious’s stdin implementation, one can also do something creative like:
ls ~/Music/*Swift*.mp3 | fauxdacious -Dc -
6)  New option (-P) to use the Pause button to simply mute (ie. commercials) while stream continues to play, allowing you to listen to something else in another instance (see next feature).  I often keep two instances open while listening to online commercial radio streams (which are in commercial for nearly half the time anyway with typically 5-6 minute breaks).  I have the other instance playing my own (legally) downloaded music without the Pause-Mute option, and with one button-click, can switch to and resume my music where it left off while the commercials (in the first instance) blather on (muted) to the bit bucket! :D  Otherwise, one must either pause the radio stream, and resume where it left off (at the beginning of the commercial break) or mute the system’s speakers preventing the playing of anything else!
7)  Command line option “-D” – Delete all playlists.  Audacious added multiple playlists via tabs in their GTK/Qt interfaces which is quite nice, but could never get used to it as I only use the classic WinAmp skin interface which only supports (displays) a single playlist.  When starting Audacious with a new file or list of files, by default, it creates a new playlist, leaving all the others intact and invisible to you, which becomes annoying.  By starting Fauxdacious with “-D”, any existing playlists are deleted for you.  A second new option “-c” clears all entries from the current playlist.  by starting up with “-Dc”, you are guarenteed to start up with a clean slate containing only your current playlist.  If you start it with no files, you start up with a clean, empty playlist!
8)  New “-z” option to start up without the equalizer on.
9)  New “-n” option to activate a new “instance” of Fauxdacious by specifying an alternate config file name.  I use this, as described in #6 above to have two separate instances of Fauxdacious running at the same time with different playlists (and / or different configurations).  The default config file is named “config” (~/.config/audacious/config).  a new, separate “instance” is specified by “-n newconfig” where “newconfig” is the name of a different config file (can be a copy).  This “name” can then be used in the “audtool” command to specify which instance of Fauxdacious to manipulate!
Here’s my script for toggling between music and radio (and adjust the volume difference between the radio and my music) activated by a desktop launcher button:
audStatus=`cat /tmp/audstatus`
if [ "X$audStatus" = "X1" ]; then
audtool instance configwbap playback-pause set-volume -12
audtool playback-play
echo "2" >/tmp/audstatus
audtool playback-stop
audtool instance configwbap playback-play set-volume +12
echo "1" >/tmp/audstatus
The Audacious team leader told me that it was not worth my effort to add video capability to Audacious since there are many excellent video players out there, but I disagree.  Sure, there are (I like VLC and Mplayer myself), but I really like the Audacious interface, and am spoiled used to it!  I also like to use Audacious’s sound-enhancing effects plugins while listening to audio or video! I admit I probably use my audio player a bit different than most.  I’m sortta a Linux command-line and scripting kinda guy and that’s what most of these hacks are for.  If you are too and / or like being able to watch videos while using Audacious’s wonderful audio-enhancing plugins, features, and beautiful classic WinAmp skins, then Fauxdacious(tm) is definitely for you!
Ok, so how do you get Fauxdacious?!
DISCLAIMER:  First of all, before downloading and installing Fauxdacious, please be aware that I consider this “beta”-quality software and therefore likely to contain a few bugs.  Therefore, I provide you this software “as-is” and I assume no liability for any damages resulting from it’s installation and use.  By using this software, you acknowledge that you are assuming all risk of any damages or injury that may result from such use!
1)  Uninstall libaudcore, audacious, and audacious-plugins from your system (if you are currently using Audacious).  This shouldn’t remove your Audacious configurations, but you should copy your ~/.config/audacious/* files somewhere else first, just in case something goes wrong!
2)  If you already have a fairly up-to-date version of Audacious running, you probably already have the dependencies installed.  If not, here’s a list.  Note, most of these aren’t required to actually get Fauxdacious (or Audacious) to run, but many are needed for particular plugins in order to process different types of media.
   Depends: libasound2
Depends: libatk1.0-0
Depends: libaudcore3
Depends: libavcodec56
Depends: libavformat56
Depends: libavutil54
Depends: libbs2b0
Depends: libc6
Depends: libcairo2
Depends: libcddb2
Depends: libcdio-cdda1
Depends: libcdio13
Depends: libcue1
Depends: libcurl3-gnutls
Depends: libdbus-1-3
Depends: libdbus-glib-1-2
Depends: libfaad2
Depends: libflac8
Depends: libfluidsynth1
Depends: libfontconfig1
Depends: libfreetype6
Depends: libgcc1
Depends: libgdk-pixbuf2.0-0
Depends: libgl1-mesa-glx
Depends: libgl1-mesa-glx
Depends: libglib2.0-0
Depends: libgtk2.0-0
Depends: libjack-jackd2-0
Depends: libjack-jackd2-0 libjack0
Depends: liblircclient0
Depends: libmms0
Depends: libmodplug1
Depends: libmp3lame0
Depends: libmpg123-0
Depends: libneon27-gnutls
Depends: libnotify4
Depends: libogg0
Depends: libpango-1.0-0
Depends: libpangocairo-1.0-0
Depends: libpangoft2-1.0-0
Depends: libpulse0
Depends: libsamplerate0
Depends: libsdl2-2.0-0
Depends: libsidplayfp4
Depends: libsndfile1
Depends: libsndio6.0
Depends: libsoxr0
Depends: libstdc++6
Depends: libvorbis0a
Depends: libvorbisenc2
Depends: libvorbisfile3
Depends: libwavpack1
Depends: libx11-6
Depends: libxcomposite1
Depends: libxml2
Depends: libxrender1
Depends: zlib1g
3)  Download both Fauxdacious and the Fauxdacious Plugins tarballs from these respective links.
4)  Untar each.  Switch to the newly-created subdirectory (./fauxdacious-3.7/ for the first).  If you are running a pretty modern Debian-based Linux distro, you can probably simply open a terminal and do:
sudo make install
cd /usr/local/bin
sudo ln -s audacious fauxdacious
5)  If this does not work for you, you’ll need to compile from scratch.  This will involve installing the development versions of several of these libraries.  Here’s a list from the Audacious team and this command will install them for you on a Debian-based system:
sudo apt-get install git automake build-essential libasound2-dev \
libavformat-dev libbinio-dev libbs2b-dev libcddb2-dev libcdio-cdda-dev \
libcue-dev libcurl4-gnutls-dev libdbus-glib-1-dev libfaad-dev libflac-dev \
libfluidsynth-dev libgl1-mesa-dev-lts-utopic libgtk2.0-dev libguess-dev \
libjack-jackd2-dev liblircclient-dev libmms-dev libmodplug-dev libmp3lame-dev \
libmpg123-dev libneon27-gnutls-dev libnotify-dev libpulse-dev \
libsamplerate0-dev libsdl1.2-dev libsidplayfp-dev libsndfile1-dev libsoxr-dev \
libvorbis-dev libwavpack-dev libxml2-dev
6)  Repeat step 4 for the fauxdacious-plugins-3.7.tgz tarball by untarring and switching to the fauxdacious-plugins-3.7/ and try the “sudo make install” command there.
7)  After completing the installation of both tarballs, you should then do:
cd /usr/local/bin
sudo ln -s audacious fauxdacious
If all this fails and / or you wish to go back to Audacious, simply switch back into fauxdacious-plugins-3.7/ and do a “make distclean” command, then do the same in fauxdacious-3.7/ and do the same thing, then reinstall your Audacious packages. (libaudcore, audacious, and audacious-plugins) and you should be back to normal.
8)  To enable video play, edit your “~/.config/audacious/config” file and add the following lines:  (You can change “Fauxdacious Video” to whatever title you would like to appear above the video window).  If you also use the Afterstep windowmanager (as I do), you may want to add the line “afterstep=TRUE” under the “[skins]” section!
video_windowtitle=Fauxdacious Video
TO DO:  I still need to fix an annoying error msg. popup that sometimes comes up saying it can’t find a (should’ve been deleted) playlist.  Right now, it works fine in spite of this.  Next step is to eventually figure out how to “package” all this up into Debian “packages” for simpler installation!  Another thing is including the QT interface (right now I use the WinAmp skins interface and built it with the GTK interface, but not the QT stuff.  I also could use someone with Windows and a good C++ compiler to build a Windows binary version (Audacious has one).  This is something I’m completely clueless about though!

Hacked Audacious Audio Player to play Video!

My favorite (audio) player that I use all the time for music, online radio stations, and even listening to “videos” of someone standing at a pulpit delivering a sermon is “Audacious“, an advanced, free and open-source audio player with both a GTK, QT, and beautiful Winamp skin interface that can play the audio part of nearly anything thrown at it! Over the years I’ve hacked on it a bit to add a few features that make my own use of it a bit easier.  It also has many plug-ins, including “visualization” plug-ins that can pop up a window and display cool visual effects as the music plays.  One day recently, I was listening to a streaming mp4 video sermon and started wondering “why couldn’t there be a visualization plug-in that would simply display the video portion in the visualization window?” I googled around for such a plug-in and found none.  I decided to post on the Audacious plug-in forum (my actual thread) inquiring as to whether anyone else was working on something like this or for advice on how to go about doing one myself.  I got a response back fairly quickly from John Lindgren, the main author of Audacious suggesting that it was probably not worth my time and doubting my ability to create anything comparable to top-flight video players.  I too doubt my abilities to create a top-flight video player but I’m not really interested in doing that, rather my desire is to just create something simple that works reasonably well.  Besides, I’m a retired software developer, have plenty of spare time, and need an occasional programming challenge to keep my mind and skills sharp! Anyway, I took John’s reply as a challenge and now, I’m happy to report that I have a working video option patch to Audacious! To quote the famous words of Buggs Bunny – “He don’t know me vewy well, does he :D!” (Remember – I’M Jim POSSIBLE!)
Jim PossibleI ended up eschewing the “Visual Plug-in” option since those can be turned on and off on the fly and I quickly realized that we needed this either on or off BEFORE the stream is opened, so I ended up zeroing in the “ffaudio” plug-in, which already processes all the formats that have video that I want to play (mp4, avi, flv, swf, etc.) It looks for the audio packets and discards all the rest.  My initial thought for something quick and dirty was to try simply piping the output as it came in to an external program, such as “ffplay.” I quickly got this working pretty well such that I could pause and stop the audio playback in Audacious and the video would pause and play pretty much in sync with the audio! Perfect for streaming, but I wanted MORE!
When playing a downloaded file Audacious has a slider that lets you seek within the audio, which with the video being piped, naturally craters! Therefore, if I wanted a plug-in option worthy of Audacious, I needed to actually process the video within Audacious itself.  I began looking at the ffplay source code and searching around for how to process video streams with ffmpeg and with much trial and error, got it working somewhat.  The controls in Audacious worked, including seeking for the most part (but randomly cratered on some seeks), and the video was often a bit “jerky.” Still not satisfied, I looked at my code closer and found that the problem was that the video and audio packets, which are processed in the order they are received, are often clustered together in bunches.  Therefore, some way was needed to “interlace” them together as much as possible.  Since Audacious is an audio player and does a beautiful job of processing the audio, I wanted to leave this alone as much as possible and let the audio drive the processing, so I decided to try queuing the video packets until an audio packet is read, then processing the next video packet in the queue before processing the audio packet.  This greatly improved things!
Still not happy, I played around some more and realized that while my methodology assumed that the number of audio and video packets would be roughly the same, the reality is that most videos I tested seem to have roughly twice the number of audio packets as video.  I tried one more thing:  only popping a video packet off the queue every OTHER audio packet and suddenly, much to my surprise, the “jitter” was all but GONE! I also got the seek failures all but eliminated by changing the seek mechanism from AVSEEK_FLAG_ANY to AVSEEK_FLAG_BACKWARD to force the seek to the nearest “key” packet after doing some more research.  Anyway, I now have a working patched “ffaudio” plug-in that will, if the user sets the new “play_video” option to TRUE, will pop up a video “visualization” window when playing a stream that contains video! Obviously, it’s not “perfect” like a true video-player such as VLC or mplayer, but tweaking the new queue size (“video_qsize”) and pixel scaling algorithm options (“video_sws_scale”) in the config file, most videos play nearly perfect for me (usually the more noticeable “imperfections” are due to my internet connection and affect all video players!) I’ve submitted my hacked plug-in to the Audacious team for possible inclusion, but based on previous experience, I have some doubts as to when (or whether) they will actually accept it, so if you want to use it now, I’ve included the source here!  (it’s a single file:  ffaudio-core.cc).  To build, download the source for Audacious and Audacious-Plugins, and all the necessary development packages, save and replace the file:  audacious-plugins/src/ffaudio/ffaudio-core.cc with the code included here, rebuild, add the following to your ~/.config/audacious/config file, and give it a try (The last four are commented out with their default values, but you probably don’t need to uncomment or change them.
video_windowtitle=Audacious Video
You will also need to tweak the Makefile in audacious-plugins/src/ffaudio/ to look like this:

SRCS = ffaudio-core.cc ffaudio-io.cc itunes-cover.cc

include ../../buildsys.mk
include ../../extra.mk

plugindir := ${plugindir}/${INPUT_PLUGIN_DIR}

LD = ${CXX}

LIBS += ${GTK_LIBS} ${FFMPEG_LIBS} -lswscale -lavcodec -laudtag -lX11 -lSDL -lz -lm

And the audacious-plugins/extras.mk file to include these two lines to use the SDL library:
Also, if using a version of Audacious higher that v3.6.0, edit ffaudio-core.cc looking for comments containing “BUILD NOTE” as they will direct you to tweak other things for newer versions of Audacious!
You can find some other instructions for building Audacious from scratch here:  http://redmine.audacious-media-player.org/boards/1/topics/788.
Now I’m enjoying streaming youtube video using youtube-dl with one click of a mouse button through my Awesomely-hacked “Fauxdacious” version of Audacious using the following script file on Linux (you’ll need to change “fauxdacious” to “audacious” and most likely:  “stdin://-.mp4” to “-“):
/usr/local/bin/youtube-dl --youtube-skip-dash-manifest -f mp4 --no-part $1 -o - 2>/dev/null | fauxdacious -Dc stdin://-.mp4

Image:  Me watching my alter-ego “Derick Wildstar” gettin’ the girl in The Starblazers Movie:
Space Battleship Yamato 2010” in “Fauxdacious” – YEAH! :D

Copying / Replicating your Linux Install to a Different Hard Drive

I’ve had my current Linux install on a 300 gig drive for over a year now while my previous system was on a 500 gig drive, along with an ancient copy of Windows XP.  That drive has been laying around collecting dust.  I’ve been wanting to “copy” it over to
this larger drive.  My initial thought was to “replicate” my current disk over to it the way I did it in this previous post:  “How to Clone a Dying Hard Disk.”  This however, would’ve wiped the Windows XP partition, which came with my computer that I just haven’t quite brought myself to do (I might want to compile some Windows binaries with it with PAR, and for whatever reason, I’ve never been able to get ActivePerl to install on my other Windows 7 installation after several attempts).  Anyway, I was looking for another way to just copy individual partitions, rather than the entire drive.  Here’s what some research suggested and what I was able to get to work (YMMV! – WARNING: MANIPULATING PARTITIONS IS INHERENTLY DANGEROUS, A MISTYPED COMMAND CAN INSTANTLY DELETE YOUR DATA!  I can NOT guarantee that these steps will work for you in your situation, I can only state here from memory what worked for me!  I’m not responsible if this does not work for you, so if you are not comfortable attempting this, then DON’T!):

0)  (Optional, informative) Check if your running distro is fully up-to-date with packages, update anything that you need/want to update. Do hdparm -i; -I; -t; and -T commands writing out the results, save ’em to compare to your new drive if you want to compare the performance of the two disks.

1)  Boot up into a LiveCD and use GParted to (re)create and format partitions, MAKING ABSOLUTELY *SURE* YOU SELECT THE *NEW* DISK EACH TIME!!!!!!!! Also make sure your LiveCD didn’t mount anything (if so UMOUNT it!)

2)  Try using GParted to copy the old partitions to the new ones one at a time.
(MAKE SURE YOU SELECT YOUR EXISTING PARTITION(S) FIRST to copy, then paste into your NEW drive!)

If this fails (or GParted won’t let you paste) for a partition, try (as root with NEITHER mounted):

     e2image -ra -p /dev/sd<FROM> /dev/sd<TO>

Failing this: try mounting the first as readonly (mount -r), then the 2nd as read/write, and do:

     cp -afv /mnt/sd<FROM>/* /mnt/sd<TO>

Yes, this DOES copy symlinks, etc. AND preserves ownership, permissions, and timestamps!

3)  Get the UUID’s of your NEW partitions using:

     ls -l /dev/disk/by-uuid

and save this in a text editor/file somewhere.

4)  Mount your NEW (copied) root partition, and edit your NEW /etc/fstab, /etc/mtab, /boot/grub/menu.lst, and ALL files within /etc that contain “UUID”, since they ALL need to be changed.  Each old UUID needs to be changed to the UUID of the corresponding partition that it was copied to!  ALSO make sure you fix your menu.lst file to the NEW hd(0,#) for the new partitions your kernel(s) are in!!!  If you are moving to a disk that already has Windows on it from one that doesn’t, you’ll for sure have to change the “#” above AND add this to your NEW /boot/grub/menu.lst file

For Windows XP:
     title Microsoft Windows XP Professional
     root (hd0,0)
     chainloader +1

For Windows 7:
     title Microsoft Windows XP Professional
     title Windows 7
     hide (hd0.0)
     rootnoverify (hd0,1)
     chainloader +1

5)  Power down, REMOVE your old disk drive, make your new one primary, and try booting.  Most likely it won’t work, but no harm in tryin’!

6)  Power down and reboot in your LiveCD, and do as root:

     mkdir /mnt
     mount /dev/sd<yourNewRootPartition> /mnt
     mount --bind /dev /mnt/dev
     mount --bind /proc /mnt/proc
     mount --bind /sys /mnt/sys
     chroot /mnt

This makes your new hard-drive installation your “root” (/)!

     cd /boot

Select a SINGLE linux kernel you want to boot that isn’t working and do (as root):

     update-initramfs -k <version> -v

EXAMPLE where <version> is 4.0.0-antix.1-486-smp, if your chosen kernel is: vmlinuz-4.0.0-antix.1-486-smp

7)  Update-grub:

     >find /boot/grub/menu.lst
     >root (hd0,#)      <-based on output from find!
     >setup (hd0)

8)  Update-grub Again, just to make sure!

     grub-install      (if you're SURE grub's still broke AND you're SURE you're installing to MBR)

9)  Remove LiveCD, reboot selecting the kernel you did the update-initrams command on earlier (others likely won't boot) & do sign of the cross!

10)  After successfully booting into a linux kernel, go repeat the update-initrams you did earlier on each kernel, else removing any you don't need.

11)  Reboot into Windows (if you have it) to make sure it's ok.

12)  Reboot into your preferred production kernel!

Helpful links:

Copy Your Linux Install to a Different Partition or Drive, by (©) Ningappa Koneri, Linux Journal, July 9, 2009.
chroot to repair GRUB - How does it work?, by (©) Ubuntu Forums, Feb. 21, 2011.

RED ALERT! Time To Go On Defense (In Stocks)!

Flashing Emergency LightsBears WrestlingI have been watching the stock market for several months looking for a “top” to form sometime late this year as the current bull market in equities is now over six years old.  For this entire year we’ve seen the market stuck in a sideways trading range between S&P 2040 and 2140.  This has been the longest such period in the last hundred years.  I’ve been watching for two diametrically opposed potential endings for this pattern while noting that there had not been a serious correction in recent times.  The bullish case is that this has been a “rolling correction” taking the market to the bottom of a longer term trend channel that, when the correction completed the market would resume higher going into Autumn, most likely when there would be more clarity on the direction of interest rates and in the Greek, et. al. debt situations.  Furthering this case has been the lack of bullish / mania sentiment that usually accompanies a major market top.  The bearish case is that the market, particularly breadth was tiring and that repeated failures to break out would eventually lead to a breakdown.  Furthering this case is the looming debt bubble, the fact that true long-term economic growth is nearly impossible under currently socialist policies worldwide without near-zero interest rates and central bank stimulus to prop up financial assets.

Elliott Wave theory has also been presenting both these patterns for several months now as I’ve been waiting for the market to select one of the conflicting patterns, something the market has been extremely reluctant to do all Summer.  As recently as a week ago, I was reasonably confident that the bullish pattern was going to temporarily prevail into the Autumn, but now the market has finally and clearly chosen the bearish course as of this Thursday, having broken critical support at 2040.  In fact, it not only broke support, it smashed it and followed through massively Friday to paste a nasty “19-handle” on our backsides Friday closing at NINETEEN-71!

D Fense
image courtesy (©) “Going Like Sixty
As a retiree fearing the possibility of this happening, I sold some non-taxable holdings to cash over the last month while staying mostly invested against what I felt was the more likely bullish scenario playing out.  Now, however, I am and am advising SELLING ALL non-taxable stock holdings to cash, with maybe some into bonds, along with at least half of one’s taxable holdings to avoid the potential of a deep correction to at least 1800, or worse, a new bear market.  Whatever I do not plan to sell Monday, I will be looking to sell on any short term bounces as I believe 2040 is now strong resistance!   While I base most of this on technical indicators (Elliott Wave, etc.), I also have some non-technical, non-scientific “gut instincts” that suggest that September could be a major turning point in the current global financial and political situation.  First, there is the IMF that seems to be preparing for a global move away from the Dollar as a reserve currency, possibly replacing it with it’s SDR currency and gold selling off to very attractive levels and nearing a major, major bottom.  There’s also the Shemitah.  While I don’t put a lot of stock in these types of indicators, it does seem to line up well with more technical data that I do follow.  In short, just about EVERYTHING is flashing RED!  One thing I am looking to continue to purchase a few more of is gold and silver coins, particularly circulated U.S. silver coins minted 1964 and earlier.  These are currently trading around 15-16X face value!   Below are some recent charts and articles from several people I have grown to respect for their usually timely investment information that has helped me avoid major losses in the past.

Chart on S&P 500 (INX) for Sunday August 16th 2015
Article and Chart on S&P 500 (INX) for Sunday August 16th 2015, by (©) Avi Gilbert, Elliott Wave Trader.net, via MarketWatch.com.
S&P 500 Daily Bars, by Simon Maierhofer, July 30, 2015
Recent Profit Radar Report S&P 500 Calls, July 30, 2015
Secret Sauce Chart, by Simon Maierhofer, August 13, 2015
Deep Tissue S&P 500 Analysis, August 13, 2015
Articles and charts by (© 2015) Simon Maierhofer, via iSPYETF.
Nested ABCD Structures Trying to Trigger Lower, by (©) L.A. Little
Stock-market technicals suggest a breakdance lower
Turns Bearish and Breaks Multiple Swing Point Lows, by (©) L.A. Little
Ugly stock-market action may result in attractive buy opportunity
Articles and charts by (© 2015) L.A. Little, via MarketWatch.com.
Market Alert: We Have Reached Our Sell Trigger“, Aug. 21, 2015, by (©) Ken Moraif, Moneymatters.net.  I’ve been following this guy for many years now.  His ability to avoid bear markets is uncanny. Market timer Tom McClellan sees stocks set up for ‘ugly decline’“, Aug. 17, 2015, by (©) Tomi Kilgore, via MarketWatch.com.  This guy called it two days before it began, to the (earliest) day!

Lenovo / IBM Scrollpoint Mouse with Smooth & Horizontal Scrolling in Linux

Lenovo Scrollpoint Mouse
IBM Scrollpoint Mouse“, by Lenovo
After all these years (over 10), I finally stumbled upon a Linux driver for my IBM Scrollpoint Mouse that actually supports horizontal scrolling – BOOYAH!!!!!!! :D  I’ve had this beautiful little mouse with the glowing blue scroll button for years and had it fully working under Linux EXCEPT that I could not use the little blue, lit-up scroll pushey-thingy to scroll horizontally.  Scrolling vertically worked so-so (a bit too sensitive/jerky/fast) by default.  It appears to have three different sensitivities in the vertical axis so that if you push gently, it scrolls slowly, then speeds up as you push harder (up or down).  It’s much easier for quick scrolling than having to sit and spin a wheel hard!  Now I feel this would be the perfect mouse, if Lenovo would just make a WIRELESS version!

I had tried to pay a C-programmer friend years ago to write me a driver for it (to no avail) and even considered trying to figure out how to hack one up myself to support this, but I knew it would likely turn into a huge project with a very steep learning curve.  Besides, I really didn’t want to go to that extreme anyway.  Every few years I’ve googled around to see if anyone else had already found a way to get it to work, and today I finally got a hit!  (at https://github.com/pdewacht/hid-scrollpoint/).  It’s a kernel driver called “hid-scrollpoint”, written by Peter De Wachter.  (Thank you Mr. De Wachter!)  You’ll need to download all three files (a Makefile, a C header file, and a C source file) from the first link mentioned above, on GitHub!  You will also need to install your kernel headers to build.  NOTE:  If you don’t care about horizontal scrolling and just want smooth vertical scrolling and use of all three buttons, then just skip all this and do only steps 2 and 5 below.

1)  Put these three files in a subdirectory and then:

    $>sudo make modules_install
    $>sudo depmod -a
    $>ls -l /lib/modules/`uname -r`/extra/hid-scrollpoint.ko

This should put the new kernel driver “hid-scrollpoint.ko” in the proper place (/lib/modules/`uname -r`/extra/) or somewhere nearby.

2)  You’ll need to create a file in /etc/X11/xorg.conf.d/ You can name it anything, but I chose: “ibm_scrollpoint.conf”.  It should contain:

    Section "InputClass"
       Identifier "ScrollPoint"
       MatchUSBID "04b3:3100|04b3:3103|04b3:3105|04b3:3108|04b3:3109"
       Option "VertScrollDelta" "16"
       Option "HorizScrollDelta" "16"
       Option "AccelerationProfile" "2"

I later added the optional “AccelerationProfile” line to speed up the mouse a bit when moving it fast – see http://www.x.org/wiki/Development/Documentation/PointerAcceleration/.  You can also tweak the “16” values later if you like, though these defaults seem to work very well for me.  After creating this file, or adding this section to your /etc/X11/xorg.conf, you’ll need to restart X for this to take effect.

3)  Plug in your IBM/Lenovo USB Scrollpoint mouse and do:

    $>lsmod | grep "hid"

You should see at least these three drivers (loaded in order from bottom up):

    hid_generic 907 0
    hid_scrollpoint 1168 0
    usbhid 33909 0

If not, do:


and look for a line like:

    Bus 003 Device 012: ID 04b3:3108 IBM Corp. 800dpi Optical Mouse w/ Scroll Point

If the pair of four-digit hex numbers you find there (mine are 04b3:3108, but ymmv!) isn’t in the “MatchUSBID” line you added, then modify that line to include them and restart X.  If still no go, make sure you ran “depmod -a” as root and that the file “hid-scrollpoint.ko” got installed, see if you can do a “sudo modprobe hid-scrollpoint” without error, then reboot and restart X!  If modprobe says he can’t find “hid-scrollpoint” after running “depmod -a”, reboot and try modprobe again.

4)  There’s one more issue you’ll likely run into: By default, my system likes to load the “hid_generic” module before “hid_scrollpoint”.  If that is the case for you, then you’ll see this when you run the aforementioned “lsmod” command:

    hid_scrollpoint 1168 0
    hid_generic 907 0
    usbhid 33909 0

In this case, you’ll have to find some way to force “hid_scrollpoint” to load FIRST.  I did it in my startup.  NOTE: It does NOT seem to hurt to go ahead and load both of these in the right order using “modprobe” at system startup even if the mouse is not attached at startup, ie. with a laptop / or if switching between other mice.  Also, once loaded in the proper order, they fortuitously remain loaded even after unpluging the mouse and / or switching to a different USB mouse, nor does it seem to affect my touchpad or trackpoint (I have both on my Dell Latitude D620 laptop).  After having the drivers in the right order and then starting X, both horizontal and vertical scrolling should work smoothly in applications, such as Firefox, that support it, ie. have horizontal scrollbars.  You can adjust the numerical parameters for “VertScrollDelta” and “HorizScrollDelta” to something other than “16” if you want faster / slower scrolling!  Running “xev” should also show the scroll events as buttons 4 and 5 (vertical) and 6 and 7 (horizontal)!  I also did not have to change any of Firefox’s default scrolling options.

5)  You must RESTART X or REBOOT!:

If the drivers are in the wrong order, then horizontal scrolling will not work.  Anyway, here’s my /var/log/Xorg.0.log file showing the pertinent lines and how they should look (ymmv):

[ 24191.151] (II) config/udev: Adding input device HID 04b3:3108 (/dev/input/event1)
[ 24191.151] (**) HID 04b3:3108: Applying InputClass "evdev pointer catchall"
[ 24191.151] (**) HID 04b3:3108: Applying InputClass "ScrollPoint"
[ 24191.151] (II) Using input driver 'evdev' for 'HID 04b3:3108'
[ 24191.151] (**) HID 04b3:3108: always reports core events
[ 24191.151] (**) evdev: HID 04b3:3108: Device: "/dev/input/event1"
[ 24191.202] (--) evdev: HID 04b3:3108: Vendor 0x4b3 Product 0x3108
[ 24191.202] (--) evdev: HID 04b3:3108: Found 3 mouse buttons
[ 24191.202] (--) evdev: HID 04b3:3108: Found scroll wheel(s)
[ 24191.202] (--) evdev: HID 04b3:3108: Found relative axes
[ 24191.202] (--) evdev: HID 04b3:3108: Found x and y relative axes
[ 24191.202] (II) evdev: HID 04b3:3108: Configuring as mouse
[ 24191.202] (II) evdev: HID 04b3:3108: Adding scrollwheel support
[ 24191.202] (**) Option "VertScrollDelta" "16"
[ 24191.202] (**) Option "HorizScrollDelta" "16"
[ 24191.202] (**) evdev: HID 04b3:3108: YAxisMapping: buttons 4 and 5
[ 24191.202] (**) evdev: HID 04b3:3108: EmulateWheelButton: 4, EmulateWheelInertia: 10, EmulateWheelTimeout: 200
[ 24191.202] (**) Option "config_info" "udev:/sys/devices/pci0000:00/0000:00:1d.7/usb3/3-8/3-8.2/3-8.2.2/3-8.2.2:1.0/0003:04B3:3108.0008/input/input20/event1"
[ 24191.202] (II) XINPUT: Adding extended input device "HID 04b3:3108" (type: MOUSE, id 9)
[ 24191.202] (II) evdev: HID 04b3:3108: initialized for relative axes.
[ 24191.203] (**) HID 04b3:3108: (accel) keeping acceleration scheme 1
[ 24191.203] (**) Option "AccelerationProfile" "2"
[ 24191.203] (**) HID 04b3:3108: (accel) acceleration profile 2
[ 24191.203] (**) HID 04b3:3108: (accel) acceleration factor: 2.000
[ 24191.203] (**) HID 04b3:3108: (accel) acceleration threshold: 4
[ 24191.204] (II) config/udev: Adding input device HID 04b3:3108 (/dev/input/mouse0)
[ 24191.204] (**) HID 04b3:3108: Applying InputClass "ScrollPoint"

UPDATE NOTE:  If you upgrade your kernel (and headers) the horizontal scrolling will quit after rebooting!  You’ll need to do the following once, the first time after upgrading and rebooting:

    Repeat Step 1 above.
    Reboot -OR- do the following:
    Unplug the mouse.
    $>sudo rmmod hid_generic
    $>sudo modprobe hid_scrollpoint
    $>sudo modprobe hid_generic
    Plug the mouse back in.
    Restart X


Get every new post delivered to your Inbox.

%d bloggers like this: