Category: My Hardware

Ubuntu 13.04 and the Fight for the Mouse

The mouse is something that should just work.  Is it a bad sign when your mouse won’t work at all?  You can see my problems with UNetbootIn on my previous post.

Even after I got it installed correctly, I still had trouble with all of my mouse input types.  I still haven’t figured out how to get the Touchpad features working (like multi-touch) or the USB to reliably work.  If you have any ideas, please comment.

Touchpad

The touchpad works as far as normal mouse features.  The pointer moves and the right and left clicks work.  The problem is that it isn’t recognized as a touchpad.  Therefore, the scrolling and multi-touch features work.  In the mouse settings, you’ll notice that all of the touchpad features are gone.

Mouse & Touchpad Settings

I tried a couple of quick searches, and I didn’t find anything new.  So, I just followed the same instructions that I used on 12.10.  I used this download link.  Then, I extracted and installed with…

sudo tar -xf ~/Downloads/psmouse-alps-dst-0.4.tar -C /usr/src/
sudo bash /usr/src/psmouse-alps-dst-0.4/install.sh

Unfortunately, the build failed with this message in the middle of it:


cleaning build area....
make KERNELRELEASE=3.8.0-22-generic -C /lib/modules/3.8.0-22-generic/build M=/var/lib/dkms/psmouse/alps-dst-0.4/build/src psmouse.ko....(bad exit status: 2)
Traceback (most recent call last):
 File "/usr/share/apport/package-hooks/dkms_packages.py", line 22, in <module>
 import apport
ImportError: No module named apport
Error! Bad return status for module build on kernel: 3.8.0-22-generic (x86_64)
Consult /var/lib/dkms/psmouse/alps-dst-0.4/build/make.log for more information.
Build failed

I tried installing the linux-source package.  That didn’t fix the error at all, so I tried installing the python-apport package.  That one fixed one of the errors, but it still didn’t completely compile.

Next, I found the driver on Git Hub: psmouse-alps.  I downloaded the zip file from the front page, and I extracted it to the /usr/src directory:

sudo unzip psmouse-alps-master.zip -d /usr/src/
cd /usr/src/psmouse-alps-master/
sudo dkms add .
sudo modprobe -r psmouse
sudo dkms build -m psmouse -v custom-1.2 --all
sudo dkms autoinstall --force
sudo modprobe psmouse

I got closer, but the autoinstall wouldn’t work.  It couldn’t find the directory.  So, I took the install script from the other directory and updated it to this:


DLKM=alps-master
KERN=$(uname -r)
echo "MAIN: Driver source files by Dave Turvene. Install script by garyF."
echo "MAIN: Install script updated by Stephen Phillips."
echo "MAIN: Removing previous versions of psmouse-alps-dst..."
sudo dkms remove psmouse/$DLKM --all
echo "MAIN: Building current driver from source files..."
sudo dkms build psmouse/$DLKM
if [[ $? == 0 ]]; then
echo "MAIN: Installing the driver"
sudo dkms install psmouse/$DLKM
sudo rmmod -v psmouse
sudo modprobe -v psmouse
echo "MAIN: Done installing. Go to System Settings > Mouse and Touchpad to configure :-)"
else
printf "Build failed\n"
cat /var/lib/dkms/psmouse/$DLKM/build/make.log
fi

I found this error message:

/usr/src/linux-headers-3.8.0-22-generic/arch/x86/Makefile:103: CONFIG_X86_X32 enabled but no binutils support

Update: I finally fixed it.

Bluetooth Mouse

My first attempt didn’t work on my bluetooth mouse.  My second attempt ended up working with no problem.

I went to the bluetooth icon by the clock and clicked Bluetooth settings.  I made sure that it was on.  I don’t think that the visible was necessary, but I turned it on just in case.  Then, I hit the bluetooth button on the bottom of my mouse.  The power light flash green and red to show it was broadcasting.

On the settings dialog, I hit the plus sign to add a device.

Adding a Bluetooth Device

The first time I tried, it wouldn’t find any devices.  I gave up.  Several updates and reboots later, I tried again, and this time, my mouse was in the list:

Bluetooth Device List

I selected the device and clicked Continue.  It was that simple:

Bluetooth Mouse Setup

USB Mouse

In previous versions, my USB mouse had stopped working.  I did some research and found a few bugs, but I never found a solution.  This time it worked at first, but after a minute or two, it just stopped working.  It seems to be hit or miss for some reason.

Here’s the dmesg output:


[12571.959955] usb 3-3: new full-speed USB device number 2 using xhci_hcd
[12571.978603] usb 3-3: New USB device found, idVendor=046d, idProduct=c52f
[12571.978610] usb 3-3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[12571.978614] usb 3-3: Product: USB Receiver
[12571.978617] usb 3-3: Manufacturer: Logitech
[12572.024103] input: Logitech USB Receiver as /devices/pci0000:00/0000:00:14.0/usb3/3-3/3-3:1.0/input/input14
[12572.024384] hid-generic 0003:046D:C52F.0002: input,hidraw1: USB HID v1.11 Mouse [Logitech USB Receiver] on usb-0000:00:14.0-3/input0
[12572.026241] input: Logitech USB Receiver as /devices/pci0000:00/0000:00:14.0/usb3/3-3/3-3:1.1/input/input15
[12572.026434] hid-generic 0003:046D:C52F.0003: input,hiddev0,hidraw2: USB HID v1.11 Device [Logitech USB Receiver] on usb-0000:00:14.0-3/input1
[12572.026479] usbcore: registered new interface driver usbhid
[12572.026483] usbhid: USB HID core driver

I’ll have to research this more later.

Ubuntu 13.04 A Ruckus with Ringtail

This past weekend, I finally got the time to go through installing Ubuntu 13.04 (Raring Ringtail).  Here’s to documenting it…

Install_001

I have been trying to rebuild my laptop with each new version of Ubuntu.  This is proving a little more challenging, but this is my first post.  This is as much of a story as my other posts, and if you have any suggestions please comment.

Preparing the Installation Media

The troubles started at the outset for me.  The default tool for putting an iso on a USB drive had been crashing, so I have dropped back to UNetbootIn.  I had mentioned that on several posts, and this one is no different.

It worked fine at first, but after I went through the install, my wireless wasn’t recognized.  Then, I found that my USB ports weren’t working; at least, I couldn’t mount a USB key or external drive.  Also, my touchpad wouldn’t work.

I did a little searching around, and I found Husain’s Chronicle.  He mentioned that the problem seems to be common with everyone who used UNetbootIn.  It seems very strange to me because the problem happens not when you boot off the USB but after booting to an installation made by the USB drive.  Still, I went to my other computer that happened to be running Linux Mint, and I used the “USB Image Writer” program:

USB Writer

The only thing that I noticed different was the boot loader was different.  The install went exactly the same, but when I booted, I had no trouble with the touchpad, the wireless, or the USB drives.

Partitioning

I tried the option to remove the Ubuntu 12.10 partitions and reinstall, but that didn’t work for me.  I have special preferences on where I want my partitions.  Yes, I have to be difficult.

I have a solid state drive (apparently /dev/sdb) that I want to use as my root.  My thought is that I want all of the binaries and the swap partition on the faster solid state drive.  Then, I have a 1TB drive (/dev/sda) that I want to use for my home folder where I will place all of my files, pictures, virtual machines, etc.

I set the large partition to format and to mount on the /home folder:

Selecting Home Partition

Next, I removed all of the partitions on my SSD drive and created an 8G swap partition at the end:

Creating the Swap Partition

Finally, I created my root partition with the rest of the space:

Adding the Root Partition

Encrypting the Drive

This time I decided to encrypt my home folder to add a little security.  This is my first try at this, so I’ll have to see how things work.  So far, it doesn’t seem like any complication for the security that it adds.

Encrypting the Home Folder

On the first boot, it prompted me to save my key.

Encryption key message

So, I ran ecryptfs-unwrap-passphrase.  Note that it says, but I missed it the first time: when it asks for the “Passphrase”, it is asking for the password that you associate with your user account, the one when you login to your computer.

Cleaning Up the Launchers

One of the first issues that I notice is that the launcher on the left is full of icons that I don’t necessarily use all of the time.  So, I removed most of them to make room for running applications:

Unlocking Launchers

Adding Google Software

Google offers a software repository.  Rather than just trying to install chrome by downloading the deb, I installed the repository with:

wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
sudo sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'
sudo apt-get update
sudo apt-get install google-chrome-beta

I had expected chrome to show up in the Ubuntu Software Center, but it never did.  It worked fine to install from the command-line though.

Shutter

Shutter is one of the first things that I install so that I can document and blog my install.  It is an easy install from the Software Center:

Shutter in the Software Center

For configuration, I don’t like the way the program sticks the screenshots in the Pictures folder.  To me, that is for photos rather than screenshots.  So, I create my own screenshots folder:

Creating the Screenshots folder

Then, under Edit > Preferences, I set it to use the new folder:

Shutter folder setting

On previous versions, I had to tweak the settings to get it to show by the clock.  This install, I didn’t have to do anything, and it shows up!

Shutter by the clock

Since I am always taking screenshots of things, I set it to start automatically.  I checked the first two options on the “Behavior” tab:

Shutter on Startup options

Restoring Backups

I copied off all of my important content off to an external USB drive.  I installed grsync to make copying easier.  Then, I copied the following directories back:

  • ~/Documents: This is where I put all my document files
  • ~/Pictures: I have Shotwell pointed at this directory, so it contains all the pictures from my cell phone and digital camera
  • ~/MIS: I keep my work files in a different directory
  • ~/app: This has all of my programming stuff (“application development”)
  • ~/VirtualBox VMs: These are the virtual computers
  • ~/.config/google-chrome: The settings for Chrome (extensions, bookmarks, etc)
  • ~/.gnome2/keyrings: My saved passwords
  • ~/.Skype: Skype history
  • ~/.remmina: The settings for my remote connections
  • ~/.ssh: The keys for my remote ssh connectinos
  • ~.local/share/shotwell: The settings and thumbnails for my photos (moved from ~/.shotwell, see Ask Ubuntu)
  • ~/.sword: The downloaded Bible files for Xiphos (and the underlying Sword library)
  • ~/.VirtualBox: The settings for my virtual machines
  • ~/.filezilla: The settings for my FTP connections
  • ~/.sqldeveloper: The connection settings for SQL developer
  • /etc/NetworkManager/system-connections and /etc/NetworkManager/VPN: this saves all of my wireless connections and VPN connections

Other Utilities

I like to use the “Main Menu” program, or alacarte to update the list of applications for the Applications Dash.

Main Menu program

Bumblebee for the Discrete Video Card

WebUpd8 has a great article for installing Bumblebee.  I decided to try the Bumblebee Configurator GUI.  Notice that the program name changed from gtk to gui — bumblebee-config-gui.


sudo add-apt-repository ppa:alessandrofac93/bumblebee-config-gtk-dev
sudo apt-get update
sudo apt-get install bumblebee-config-gui

Issue … I started it with “sudo bumblebee-config”.  All I got was this output:


Traceback (most recent call last):
 File "/usr/bin/bumblebee-config", line 17, in <module>
 wnd = BumblebeeMainWindow()
 File "/usr/lib/python2.7/dist-packages/bumblebee_config/bumblebee_main_window.py", line 53, in __init__
 if self.aptHelper.checkBumblebeeInstalled():
 File "/usr/lib/python2.7/dist-packages/bumblebee_config/apt_helper.py", line 112, in checkBumblebeeInstalled
 if cache['bumblebee'].isInstalled:
 File "/usr/lib/python2.7/dist-packages/apt/cache.py", line 204, in __getitem__
 raise KeyError('The cache has no package named %r' % key)
KeyError: "The cache has no package named 'bumblebee'"

There is a bug opened for this issue.  Just as a guess, I tried to add the repositories:

sudo add-apt-repository ppa:ubuntu-x-swat/x-updates
sudo add-apt-repository ppa:bumblebee/stable

sudo apt-get update

After that, it worked fine:

Bumblebee Configurator

I found that I needed to click on the “Configure Bumblebee” button first to choose the Nvidia driver:

Configuring the Driver for Bumblebee

I clicked the “Install Bumblebee” button, and it started installing…

Installing Bumblebee

When I ran check status, I got this message:


Bumblebeed status:
[ 7161.740177] [INFO]Configured driver: nvidia
[ 7161.742547] [INFO]Switching method 'bbswitch' is available and will be used.
[ 7161.744668] [ERROR]Module 'nvidia-current' is not found.

Everything still seemed to work fine, though.  The nvidia-current package was actually installed.  I don’t know why it reports that “not found” message.

 

Troubleshooting: Playing DRM Videos from Amazon

This is the second time this has happened.  I keep getting:

Sorry we were unable to stream this video.  This is likely because your flash player could not be updated.

I had just reinstalled my media laptop with Linux Lite OS (a flavor of Ubuntu), and I was trying to watch a video from Amazon.  It was one of the Prime Instant Videos.

To fix the issue, I followed McDougall’s instructions.  Basically, it was just installing the “hal” package and deleting the .adobe and .macromedia settings directories:

sudo apt-get install hal
rm -r ~/.adobe ~/.macromedia

Finally, I rebooted and retried.  It all worked fine after that.

Resources

Ubuntu 12.10 and Discrete Video Card

One of the main driver things that I have to install is the video card.  My laptop has a discrete video card.  Without installing the driver, the graphics seem to work pretty well, but with the driver, I get a very noticeable improvement in power consumption.  After installing the driver, the battery lasts significantly longer.  Also, glxspheres does a nice job of showing the graphics performance difference with and without the acceleration.

Read More

Sound for Inspiron 17R

alfC got me into researching how to get the SubWoofer working on my laptop.  I didn’t buy my laptop for high quality sound (as long as Skype works for teleconferencing with co-workers, I’m good), so I didn’t even notice that it wasn’t working.  So, here’s my research…

The Problem

On Ask Ubuntu, the question was asked: How to activate subwoofer in Inspiron 17r?

Here’s the issue.  The subwoofer control is disabled:

The sound works fine to me.  The subwoofer is just a bonus feature, at least in my opinion.  Still, it would be cool to get it to work.

About My Soundcard

I found my driver was snd-hda-intel:


skp@chestnut:~$ lsmod | grep -i snd_hda_intel
snd_hda_intel 33491 3
snd_hda_codec 134212 3 snd_hda_codec_hdmi,snd_hda_codec_idt,snd_hda_intel
snd_pcm 96580 3 snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec
snd 78734 16 snd_hda_codec_hdmi,snd_hda_codec_idt,snd_hda_intel,snd_hda_codec,snd_hwdep,snd_pcm,snd_rawmidi,snd_seq,snd_timer,snd_seq_device
snd_page_alloc 18484 2 snd_hda_intel,snd_pcm

Here are the details on my card:


skp@chestnut:~$ lspci | grep -i "audio device"
00:1b.0 Audio device: Intel Corporation 7 Series/C210 Series Chipset Family High Definition Audio Controller (rev 04)

I read in the documentation that you can find the model like this:


skp@chestnut:~$ cat /proc/asound/card0/codec* | grep Codec
Codec: IDT 92HD91BXX
Codec: Intel PantherPoint HDMI

Alsa-Base.conf Attempt

I found a Debian system that seems similar: Installing Debian On Asus UX32VD.  Just to try, I added this line to the end of the /etc/modprobe.d/alsa-base.conf file.

options snd-hda-intel model=alc269-dmic

To test, I found from Ubuntu documentation, that I could use this command to restart just this sound:

sudo alsa force-reload

Unfortunately, it didn’t work!

Default.pa Attempt

So, on to trying another solution from here and here.

Next, I added a line to the /etc/pulse/default.pa file:

load-module module-combine channels=6 channel_map=front-left,front-right,rear-left,rear-right,front-center,lfe

After restarting alsa, it seemed to work. I got a new Output device that had the Subwoofer enabled:

I still can’t hear the output in the Test sound window.  But, at least I have the front and back speakers working:

HDA Analyzer Tool

I found an HDA Analyzer Tool in this question.  You can see the instructions here.

Here’s how I downloaded it:

wget -O run.py http://www.alsa-project.org/hda-analyzer.py

It needed root access, so I ran it like this:

sudo python run.py

Possibly Related

My Server Configuration

These were the steps that I went through to configure my server after installing Ubuntu.  (just to help remember)

Installing SSH

My first requirement for a server is that I be able to get to it from my laptop.  SSH will allow me to both open remote terminal sessions and copy files from nautilus.

I simply installed this ssh metapackage from the Software Center.

My first attempt to connect brought me this message:


@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.

This was because I was reinstalling my server, and I had connected to the previous installation with my laptop.  The fix was easy (it was actually in the message):

ssh-keygen -R israel

To set it up to where I could connect without a password, I ran this command:

ssh-copy-id israel

Printing

I have an HP printer, so I chose to install the HPLIP Toolbox from the Software Center.

I could launch it through ssh with the command “hp-toolbox”.  Then, I chose the Setup Device option off the Device menu for my printer.

I selected USB:

Then, I selected the device:

Then, I entered the information about the printer:

This added, the printer.  Next, I made it the default printer:

To make the printer accessible over the network, I had to tweak the cups configuration.  I edited the /etc/cups/cupsd.conf.  I added a Listen line with the machine’s hostname.

I also turned “Browsing” on to make it easier to discover the printer.

To make the network name resolve correctly, I removed this line from /etc/hosts:

Finally, I restarted the cups service with the command:

sudo service cups restart

That gave me some access, but I still had issues.  Then, I found an easier way to do it.  I ran the the printer configuration:

system-config-printer

On the printer dialog, there is a Server > Settings option.

There, I checked the sharing options to open things up for my private network.

Java Installation

I have a personal application that I use at home, and Java is a requirement for that.  I took the easy route and installed Java using Web Upd8’s method.  That just meant running these three commands:

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer

I confirmed that it installed with:


skp@israel:~$ java -version
java version "1.8.0-ea"
Java(TM) SE Runtime Environment (build 1.8.0-ea-b55)
Java HotSpot(TM) Client VM (build 24.0-b22, mixed mode)
skp@israel:~$ javac -version
javac 1.8.0-ea

Finally, I needed to add a mysql user.  I don’t need to install mysql because it’s embedded into my application, but I do need the user.  I used this command:

useradd -r mysql

Resources