Showing posts with label Ubuntu. Show all posts
Showing posts with label Ubuntu. Show all posts

Sunday, 30 September 2012

Cinnamon Performance -- It was Chrome's Fault

I've written lately about my struggles with sluggish Ubuntu and Mint desktops. Finally, I discovered that Chrome was the problem. At one point in my ramblings, I recommended using Mate instead of Cinnamon. Well, I'm happy to report that my slow Dell Vostro 1440 runs Cinnamon just fine, as long as I'm not running Chrome.

Sunday, 16 September 2012

Ubuntu and Mint Very Slow

I've been struggling for some time with poor performance of Ubuntu, and now Mint, on my Dell Vostro 1440. Admittedly it's a cheap laptop, but in this day and age a Linux desktop should run decently on pretty much anything, as long as you're not using a lot of fancy desktop effects.

Running top I was seeing a lot of wait time. When the performance was really bad, I'd see over 90 percent wait time. Typically I'd be dipping into swap space when performance was bad, but it would be bad without swapping (I "only" have 2 GB of RAM). I would see this when running only Thunderbird and Chrome, although Chrome with a lot of tabs open.

I spent many frustrating hours Googling for performance issues on Ubuntu or Mint and didn't find anything really promising.

Finally, last weekend I was dropping off some old computer gear for recycling at our local Free Geek and saw a pretty sweet Dell laptop for sale. I started playing with it, partly to see how it performed. They sell used computers with Ubuntu, and Ubuntu comes with Firefox. Firefox was snappy as all get out, and on a lower powered CPU than mine at home.

So I went home and tried Firefox. It works great. So I started Googling performance problems with Chrome on Linux and got all sorts of hits. This one looks like it's turning into a bit of an omnibus bug report, but has some good info and links to other places.

It looks like one factor is that Google has made its own Flash viewer, since Adobe is no longer supporting new versions of Flash on Linux. Many people report disabling the Google Flash viewer helps, but it didn't work for me.

Others report that it is indeed due to memory usage of Chrome with many tabs. Others report that it has something to do with using hardware graphics rendering, that the hardware is actually slower. Still others report issues with Chrome scanning for devices, and particularly webcams.

My gut says it's a combination of things -- perhaps all of the above are involved, but you only see the performance problem when two or more of the factors coincide.

I haven't found a solution that works for me yet, so I'm somewhat reluctantly using Firefox. It's certainly a lot faster than it was two years ago. However, I miss the combined link and search field in Chrome, amongst other things. It does seem like Firefox has stolen most of Chrome's good ideas, so it's not as hard as I thought it might be to readjust.

Thursday, 16 February 2012

Sluggish Ubuntu Video

Since I got my Dell Vostro 1440, I felt that it wasn't quite as responsive as it should have been. Yesterday I spent a little time trying to figure out why that might be. (A little time -- like all morning.) I stumbled across what seemed like good instructions on troubleshooting Linux video. At the start of all the instructions was a warning to make sure the user was in the video group. If not, the user's desktop wouldn't be able to use the graphics hardware.

Well I checked my groups, and sure enough I wasn't in the video group. I added myself to the video group, and after logging out and in, and a day of use, I'm confident in saying that the desktop is much more responsive.

More Googling turned up a useful command: 'glxinfo | grep "direct rendering"'. It will tell you "yes" if you're going straight to the graphics hardware.

Wednesday, 9 November 2011

A New Computer -- Wireshark

I'm not a network expert by any stretch of the imagination, but I've occasionally solved problems by poking around a bit with Wireshark.

Of course, if my network is down I'm not going to be able to download Wireshark. Fortunately, I remembered to re-install Wireshark on my new computer before I needed it. I installed it using the Ubuntu Software Centre.

A new feature of Wireshark that I didn't know about: If you add yourself to the "wireshark" group, you can do live captures without running Wireshark as root.

sudo adduser --disabled-login --disabled-password wireshark
sudo chgrp wireshark /usr/bin/dumpcap
sudo chmod 754 /usr/bin/dumpcap
sudo setcap 'CAP_NET_RAW+eip CAP_NET_ADMIN+eip' /usr/bin/dumpcap


Now add yourself to the wireshark group and log out. When you log back in you should be able to do live captures without root privileges. To add yourself to the wireshark group in a terminal, type:

adduser your-user-name wireshark

The Wireshark documentation for this is here (scroll down a bit).

Tuesday, 1 November 2011

A New Computer -- Video

My son is fascinated with videos. I dream that one day he'll get fascinated by making them, not just watching them. So I've been trying to learn about making videos. Here's what I had to reinstall on my new computer.

First, playing video (and audio, for that matter) has worked out of the box much better with 11.04 than with previous versions of Ubuntu. I play my Guatemalan radio station and CBC audio and video without having to fool around with any setup.

To make videos, I loaded up OpenShot. 

sudo apt-get install openshot

That didn't install ffmpeg, which has been my main fallback tool. It seems to be the tool that does everything, although as a command line tool, I find I usually just cut and paste an example command line from the Internet. It's not that I'm afraid of the Linux command line. It's that I don't know anything about video. So:

sudo apt-get install ffmpeg

That seems to be all that was needed.

Thursday, 27 October 2011

A New Computer -- Backups

I'd love to find a new backup solution, but the reality is I have Bacula working reasonably consistently right now, and it's the easiest thing to get set up quickly. So I:
  1. Installed bacula-client and bacula-traymonitor packages (sudo apt-get install bacula-client bacula-traymonitor)
  2. Copied /etc/bacula/bacula-fd.conf and /etc/bacula/tray-monitor.conf from the old laptop
  3. Changed the host name in both the above files
  4. Added my new laptop to /etc/bacula/bacula-dir.conf on the bacula director host by copying the job definition of the old laptop and renaming it

Wednesday, 19 October 2011

New Computer -- Fixing the Too-Sensitive Touchpad

My new laptop had a way-too-sensitive touchpad. So much so that I installed Touchpad Indicator so I could turn it off. Interestingly, I couldn't use its "turn off touchpad when mouse plugged in" feature, because it seemed to always think the mouse was plugged in.

That led me to realize that I also didn't have the touchpad tab in the mouse control panel. Googling, I found that this was a common problem with ALPS touchpads, like the one I had.

The fix is here: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/550625/comments/492. An updated driver that allows you to get at the touchpad control in the mouse control panel. Download the .deb file, then double-click it and wait a bit for the Software Centre to run. Click install, enter your password, wait, then restart, and you'll have the touchpad tab in the mouse control panel. On the touchpad tab, you can turn off mouse clicks when typing, and suddenly typing isn't a pain.

I have to resist the urge to rant a bit. I bought an Ubuntu-certified laptop. This is the sort of pissing around fixing that I was hoping to avoid. Sigh!

Friday, 14 October 2011

A New Computer -- Printing

Setting up my multi-function printer on Ubuntu has always been interesting. When I first got my printer, it was so new I had to download and build hplip, the printing subsystem.

It looks like installation is a lot easier now, but to get started you still have to go into a terminal and type:

hp-setup

That starts a GUI that easily discovered my printer on the network. Unfortunately, when I tried to install the driver, it failed with "The download of the digital signature file failed." That sucks. But wait! The server that holds the drivers is actually run by the Linux Foundation, and it was off the air because of the security breach almost a month ago.


Finally, about a week and a half later, hp-setup worked. It now brings up a GUI window and walks you through a few steps: You have to tell it whether you printer is USB, parallel or network-connected. It's not much closer to being, "It just works."

A New Computer -- Touchpad Too Sensitive

The touchpad on the last two laptops I've had have been way too sensitive. There should be a better solution, but for now I'm installing the touchpad indicator:

sudo add-apt-repository ppa:atareao/atareao
sudo apt-get update
sudo apt-get install touchpad-indicator


Update: I found that the clicking on the trackpad indicator icon didn't work reliably until I rebooted.

Sunday, 2 October 2011

A New Computer -- Installing VirtualBox

I installed VirtualBox from the Ubuntu Software Centre on my new computer. I had already copied over my VM -- it came with all the other files when I copied everything under /home.

When I figured out how to run VirtualBox under Unity (it's under Accessories), it came up and knew about all the VMs I had on the old machine. When I started my Windows VM, it complained that it couldn't find "/usr/share/virtualbox/VBoxGuestAdditions.iso". Sure enough, the iso wasn't anywhere on the new machine.

However, for my purposes I didn't need the iso. I just unloaded the iso from the virtual CD device for the virtual machine, and tried restarting. It worked.

I would need the guest additions iso sometime, so, with the virtual machine running, I went to the Devices-> Install Guest Additions menu. It asked me if I wanted to download the file from the Internet, and I said "yes".

Saturday, 1 October 2011

A New Computer

The backlight died on my Lenovo x300 a couple of weeks ago, so I bought a Dell Vostro with Ubuntu pre-installed. Here's how I got from one to the other:

The Dell website said I was getting Ubuntu 11.04, but out of the box the computer had 10.10 on it. My first try upgrading to 11.04 failed. When it tried to reboot, it said the device for / wasn't ready. Fortunately, I somehow got to the old grub screen that let me choose which image to boot, and at the bottom there was an option to return the box to factory state.

I tried that, and it worked. I had about 10 minutes of the spinning "wait" cursor before it started doing something, but by being patient I got the box back to factory state.

So I went through the process of updating 10.10, reboot, then upgrade to 11.04 again. This time I saved the sudoers file. I was asked whether to keep the old one or use the new one as part of the installation.

I'm going to force myself to use Unity for a while. That's causing me some grief, but I'm already finding so of the tricks that make Unity more productive (try right-clicking the "Applications" or "Files & Folders" icons in the Launcher bar).

To get my old files over from the old computer, I connected a 1 TB USB drive to the old laptop, shut down Evolution, virtual machines, and any other applications that might be updating files while I copied, and did:

sudo cp -a /home /media/wd1tbb/home


I have a lot of software installed on the old machine. I found excellent instructions here about how to move Ubuntu from one machine to another, preserving your environment and installed software as much as possible. The instructions are for when both machines are running exactly the same version of Ubuntu.

I was moving from 10.04 to 11.04, so I didn't meet the criteria. I generated the list of installed packages anyway, and took a look at the list using a text editor. The vast majority of the packages are what I'd call supporting or system packages. So I think I'll skip that step.

But wait. The Ubuntu Software Centre has a better idea of what's an application package. I'll have to look into where it gets its list.

Any, back to copying my file. I did:

sudo cp -aiv /media/wd1tbb/home/reid /home


Then I used judgement to decide whether to overwrite or not.

Argh! For some reason, the new computer has the original user with uid=1001, not uid=1000 like every other Ubuntu I've installed. I had to run commands like this to fix up the files I copied over:

sudo find /home -gid 1000 -uid 1000 -exec chown -h 1001:1001 \{} \;

Then, probably because I've upgraded versions of Evolution, just copying the files across wasn't enough. I had to go back to the old machine and make an Evolution backup, copy it to the new machine, and set up Evolution from the backup. This was made more interesting because the Evolution setup wizard would show the text in each window for only a few seconds, then it would disappear. By fiddling and trying a few times I was able to get Evolution going. (A lot of work considering I may well switch back to Thunderbird soon.)

That's the basics. I think I'll post this now, and add new posts for all the other work I'll have to do (like lower the sensitivity of the touch pad).

Monday, 23 May 2011

Making DVDs

My son's class at school raised and released some salmon this spring, and he had a project to produce a video about it. I offered to edit the raw video together. That spun into a project where I ended up putting together four short videos. Then I put them all on one DVD with a menu. Of course, it wasn't easy. It turned into another episode of all my spare time for two weeks being spent trying to do something useful with a computer.

First I had to find the right tools for Ubuntu (10.04 in my case). It turns out that Kino, the video editor I had used before, is no longer under active development. It looks like everyone is using OpenShot now. It's in the Ubuntu repository, but I found there were sufficient new features with the more recent version that I followed the instructions to get it from their PPA repository.

I found OpenShot to be quite intuitive. There's also pretty good documentation. I think I observed a few random crashes, so it's worthwhile to remember to save your work frequently. There is an autosave feature as well, but you have to find it and turn it on. It isn't on by default.

OpenShot will take your completed video project and turn it into a DVD image ready to burn. That's very slick. My earlier attempts at producing DVDs led to a lot of command line fiddling, and I found it very easy to burn DVDs that didn't actually work. OpenShot made it easy.

The next part of my challenge was to put four videos on the DVD and stick a menu on the front. I found documentation here and here and elsewhere on how to do it (the colour scheme is a killer). However, it turns out that making DVD menus is very picky and error prone, at least for me. I never got anything working consistently.

Finally I found DVD Styler. Again, it's in the Ubuntu repository so it's easy to install. It has a GUI and lets you set up a menu, including automatically doing the typical "Play all or episode selection" scenario if you have multiple videos.

There were a couple of tricks I discovered along the way:

  • Some of the original videos were shot in HD. OpenShot can't deal with HD. I had to use ffmpeg to convert the format to ordinary MPEG-2 video ("ffmpeg -i input.mp4 -target ntsc-dvd -y output.mpg" if you're making a DVD for North America)
  • OpenShot by default makes a DVD. You don't want that when you're planning to use DVD Styler to make a menu. I had to go back and re-export my videos from OpenShot as "mpeg2" videos
  • DVD Styler sets up the DVD menu buttons to use "auto" navigation. That didn't work on my cheap DVD player. I had to go into the properties window for each menu button, and under "focus", change the target of each button to the explicit value I needed (this description will make sense when you look at the properties window for the buttons)
DVD Styler lets you simply preview the menu, create an ISO file, or go straight to burning the DVD. I created the ISO so I could test it with video players (I used VLC and mplayer). Using the players didn't expose the menu button problem I mention in the second bullet above, but otherwise was a worthwhile step.

I didn't try to do anything but the default menu background in DVD Styler. If you've done it, please comment here with your experience.

Unfortunately, I can't post the final product. Since it was done at school, they're very careful not to release anything publicly when they don't have all the parents' permission. Makes sense, of course.

Monday, 25 April 2011

Rhythmbox Wouldn't Rip to .m4a

I had a problem yesterday where Rhythmbox wouldn't rip a CD to .m4a format. I went to the Preferences window to set the format, and it wouldn't appear in the drop-down. Curiously, if I clicked the Add button it would show the existing formats, and .m4a was in that list.

After much flailing, I discovered that you need to have both gstreamer0.10-plugins-bad and gstreamer0.10-plugins-bad-multiverse installed. I had removed the multiverse one a few weeks ago when I thought I was cleaning up after a previous round of flailing to get something around music working.

Sunday, 13 March 2011

Connecting to DFS Shares with Ubuntu

See an important update here. The information that follows is still relevant to mount.cifs.

With my current client, when I'm working at home, I have to connect to a CIFS share that uses Microsoft's DFS through their Cisco AnyConnect VPN. It seemed like the mount would work, but I couldn't see any of the files or folders below the share. (This is with Ubuntu 10.04 Lucid Lynx.)

Fortunately, some other consultants working on the same project had the same problem, and they found a work-around. The work-around was to connect to the underlying server and folder, rather than through the DFS root.

As my position with this client has evolved, I've needed to get to other folders on their file server, and I've occasionally had problems because I didn't know the underlying server and folder I needed to get to. So I continued to work on the problem. I think I've found the solution.

I already had the keyutils package installed. You'll need it:

sudo apt-get install keyutils

Then I added the following two lines to /etc/request-key.conf:

create cifs.spnego * * /usr/sbin/cifs.upcall %k %d
create      dns_resolver * * /usr/sbin/cifs.upcall %k

Now I can connect to the DFS root if I use a mount command in a Terminal window.


sudo mount -t cifs --verbose -o user=my_domain/my_user_id //my_server/my_share /mnt


It still doesn't work if I try to connect to the share with Nautilus. 

(A quick check of a VM of 11.04 alpha 2 that I had lying around shows the above two lines are already in /etc/request-key.conf.)

I haven't been using the fix for a long time, yet, so I don't know if it's the complete solution. I've noticed so far that sometimes Nautilus times out and doesn't get the file and folder list from the share. When I refresh the view in Nautilus it works fine.

One of the key hints to find the solution was this text in my dmesg log:

CIFS VFS: cifs_compose_mount_options: Failed to resolve server part of...

Note that it turned out to have nothing to do with the VPN. Also, it leaves open the mystery as to why the other consultants, who were using Windows Vista, I think, also had to use the same work-around.


Sunday, 19 December 2010

Managing Music on an SD Card for Nintendo DS

I wanted to manage music on an SD card, as that's the way a Nintendo DS gets its music. I wanted my son to have his music on his DS so he didn't have to keep track of and charge an MP3 player and a DS.

First, Rhythmbox on Ubuntu 10.04 wouldn't recognize the SD card. Fortunately, I'd stumbled across the solution to that a few weeks ago: put a file called ".is_audio_player" in the root of the SD card.

However, it still wouldn't copy m4a files over. The DS only plays m4a files, not mp3. I discovered that you can actually put content in the .is_audio_player file to control the behaviour of Rhythmbox. It was still hard to figure out what to put in, but finally I looked up what Rhythmbox uses to manage an iPod, and put this in the .is_audio_player file:

folder_depth=99
output_formats=audio/mpeg,audio/aac,audio/x-wav,audio/x-aiff

Worked a charm after that.

P.S. My son's doing some serious scratch with the Police on his DS right now.

Tuesday, 12 October 2010

Google Chrome, Ubuntu, and Cisco AnyConnect

I need to use Cisco's AnyConnect VPN client. It's worked quite well with FireFox on Ubuntu, although I had to forgo the upgrade to 9.10 because the VPN client wouldn't work with the kernels that came with 9.10. (That wasn't the only reason I didn't go to 9.10, so I wasn't really bothered by it.)

I've been using Google Chrome for the last few weeks instead of FireFox. It is noticeably faster on my Lenovo x300. Going back to FireFox seems excruciatingly slow. I decided to try Chrome with the Cisco VPN client. It's not officially supported, but both FireFox and Chrome are supposed to support standards, so what could be the problem?

It worked on my Lenovo with Ubuntu 10.04, but when I tried it on my netbook with Ubuntu Netbook Remix 10.04, it didn't work. It would get to the point where the client is supposed to actually start, and then nothing would happen.

I finally noticed that on the Lenovo, I had the IcedTea plugin installed, whereas on the netbook I was trying to do exactly what was supported by Cisco (Sun Java and some fiddling to get the plugin working). So I installed IcedTea on the netbook, and it worked just fine.

To install IcedTea, start System-> Adminstration-> Synaptic Package Manager, enter your password, then put "icedtea" in the "Search" field. Right click on "icedtea6-plugin", select "Mark for installation" and then click on the "Apply" button. Or, if you like the Terminal, type "sudo apt-get install icedtea6-plugin" in a terminal.

(Update for Ubuntu 11.04: the package to install is called "icedtea-plugin" now. No version number.)

It's always fun when you try to do something exactly by the book and it doesn't work, and then you do it the way you think should work, and it does.

Unfortunately, Exchange 2010 Outlook Web Access doesn't support Chrome, so I'm forced to use the crippled "Lite" interface. So I'll probably end up using FireFox anyway.

Wednesday, 7 July 2010

Scanning with Ubuntu 10.04

I have an HP CM1312nfi MFP multi-function colour printer, fax and scanner. xsane worked fine in 9.04. The first time I tried to scan after upgrading to Ubuntu 10.04 it didn't work anymore. (Breaking it may have been something I did, rather than the upgrade itself.)

First xsane told me that it couldn't find any devices. I reinstalled all the hplip and xsane packages, and that got me a message that xsane couldn't open the device -- giving a name that was obvious that it knew about my scanner.

I found a message in /var/log/syslog that xsane couldn't find the file "/usr/share/hplip/scan/plugins/bb_soapht.so". So I ran:
sudo hp-plugin
and answered the question about license. Then xsane (and the new Simple Scan) worked.

Sunday, 31 January 2010

Ubuntu Netbook Remix Desktop Disappears

I have a netbook running Ubuntu Netbook Remix (UNR) 9.04. I switched it to the regular Ubuntu desktop just to try. Before I switched back, I rebooted (the battery ran all the way down). Apparently, this is known to be a bad thing. When you restart, all you get is a blank desktop -- no panels at the top and bottom to allow you to get at any commands.

The fix is described in Launchpad here, but I'm going to summarize it because it's a little spread out in the comments to the bug.
  1. Right click on the desktop and select "Create Folder..."
  2. Double click on the folder you just created
  3. Navigate to "/usr/bin/desktop-switcher" and run it
  4. Switch back to the UNR desktop
  5. Now navigate to your home directory
  6. Show hidden files (View-> Show Hidden Files, or Ctrl-h)
  7. Delete the .gconf, .gconfd, and .config folders
  8. Log out and log back in
This should fix the problem. Now, with respect to the classical desktop, don't do that :-)

Monday, 25 January 2010

Ubuntu Support Saturday in Vancouver

The ever-fantastic Ubuntu Vancouver Local Committee is organizing a Support Saturday. Come on down and learn about the world's most popular free operating system. If you already use Ubuntu, get some help to make your experience even better.

The details:

Saturday January 30th, 2010 11am - 2pm
Vancouver Community College
1155 East Broadway (Broadway Campus)
Building B, Room G219

Click here for the poster.

Here's the best door to use:


View Larger Map

Saturday, 28 November 2009

Ubuntu Local Committee Install and Tweak

The ever-fantastic Ubuntu Vancouver Local Committee is organizing a Support Saturday. Come on down and learn about the world's most popular free operating system. If you already use Ubuntu, get some help to make your experience even better.

The details:

Saturday Dec 5th, 2009 11am - 2pm
Vancouver Community College
1155 East Broadway (Broadway Campus)
Building B, Room 219G

The poster is at: http://is.gd/560zM (a pdf).