Categories
Computer

Ubuntu 13.10 notes

Reinstalling Ubuntu on my laptop, a Lenovo IdeaPad Yoga 13".

Creating a bootable USB stick:

  • On another Ubuntu machine, use "Disks" from the menu to remove old partition, create a new one, and format a 1 GB stick
  • Use unetbootin to write the latest ISO from http://www.ubuntu.com/download to the stick

For some reason the driver support for this laptop is not that great. Wifi, bluetooth, screen brightness control do not work with standard Ubuntu. Amazingly the touch-screen does work - but I don't use it much. The wifi driver is an absolute must, since the machine does not have an Ethernet port.

Wifi driver fix:

Screen brightness fix:

  • Add the acpi_backlight=vendor to your grub default command line in /etc/default/grub, i.e. GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_backlight=vendor"
  • sudo update-grub
  • blacklist the ideapad_laptop by adding "blacklist ideapad_laptop" to your /etc/modprobe.d/blacklist.conf file.
  • sudo reboot

Useful packages and random tweaks:

  • git
  • build-essential
  • synaptic
  • indicator-multiload
  • flashplugin-installer
  • Firefox plugins: Tab Mix Plus (Why isn't multi-row tabs standard on Firefox?? I NEED about 8 rows of tabs!)
  • geany (simple text editor)
  • Privacy: from the menu "Privacy" then on the second tab turn OFF "record file and application usage"
  • filelight (see where all the diskspace went!)
  • vlc
  • stellarium (star map)

External sources

NTP to keep the system clock on time

  • sudo apt-get install ntp
  • add time1.mikes.fi and time2.mikes.fi to list of servers to /etc/ntp.conf
  • sudo service ntp restart
  • check that it is working: watch -n 2 ntpq -np

Reasons to still have a Virtualbox Win-7 install:

  • PADS schematic and PCB design - but I am trying to learn Kicad now
  • Wireless USB-stick based transfer of GPS data from my Garmin devices (I think this is doable in linux, I just haven't had the time to learn)
  • QuickRoute for plotting orienteering maps/GPS-data (I'ts a .NET application, so maybe would run under mono?)
  • Mechanical CAD applications. FreeCAD is on the way to become usable for serious stuff - but not yet...
  • NI Multisim for SPICE simulations. Is there a good alternative for linux?
Categories
Computer

Added Silence

heatsinks

Some silence has been added to the desktop machine:

I had a GeForce 9800gt graphics card previously with good performance but bad power-consumption and noise. The new Nvidia GT640 card should be similar-ish in performance but much less power-hungry and completely silent.

Categories
Computer

indicator-multiload on 12.04LTS

Autostart for indicator-multiload is broken on Ubuntu 12.04LTS. The fix is to manually create a .config/autostart directory, into which indicator-multiload writes a file when the autostart checkbox is clicked.

Why hasn't things like these been fixed in the 7 months that 12.04LTS has been out?

Categories
Computer

Raspberry Pi

Out of curiosity and with a couple of different projects in mind I have been playing with a Raspberry Pi (a cheap, small, but slow linux computer) lately. Some observations:

  • It's small, but it does require quite a few bulky connectors that connect to three different sides of the board. If you wanted to enclose the board and cables in a case the connectors add a significant amount to the footprint.
  • Who came up with the idea of offsetting the two USB-connectors so they extend out of the board? This makes all the cases for the Pi have a funny shape to get the Ethernet and USB connectors flush with the side of the case.
  • It seems to run the raspbian distribution OK. But for a standard debian-desktop it's very slow. There are optimized lightweight X-environments that are supposedly faster and more responsive.
  • Since it's an ARM processor, not every package I am used to using on Ubuntu/Debian is available from the repositories.
  • The modern way to interact with a gadget nowadays is a touchscreen. But there doesn't seem to be any good consensus on what touchscreen to use with the Pi. Could we have something budget-priced with good existing drivers for both screen and touch please. Perhaps use the DSI-connector so the gadget screen won't tie up other resources (USB, HDMI, SPI, or GPIO).

Overall this means my ideas for various real-time instruments & gadgets may be better served by an Atom ITX-sized motherboard. The atom is a standard x86 architecture that runs everything a desktop or laptop will run. It's fast enough to run modern desktop environments. And it has a PCI or PCIE slot for e.g. a Mesa FPGA card. Given the cost of enclosures, (touch)screens, FPGAs, and the analog electronics I have in mind, it really will not matter much if the cost of the motherboard+cpu combo is 40 euros (Pi) or 140 euros (Atom). Someone suggested I'd have a look at BeagleBoard or BeagleBone, but right now I'm leaning towards the Atom.

Categories
Computer

Gigabit

Testing gigabit ethernet from work (top GbE, bottom 100Mbit):

Categories
Computer

Ubuntu One is very slow

Update5: Day 4 and it looks like this: laptop 18078 items (5.5Gb), desktop 17803 items (5.5Gb). I wonder why the file-count differs?

Update4: Day 3 of this experiment. Machines have been online for more than 72 hours. In total 50Mb have been uploaded from laptop today (since reboot in the morning). That might be a good sign. All the files should now be in the "cloud". But are they synced to my other machines? Laptop still shows 18800+ files, desktop now shows 17800 files. Getting close...

Update3: Here's another observation, when the laptop, which still has about 11000 un-synced files in the One-folder, boots up, ubuntuone-syncdaemon can take 1-3 minutes of 100% cpu and about 300Mb RAM. After that it settles down, but 100% cpu means the machine is slow and unresponsive for a while 🙁

Update2: Someone at canonical asked for my log-files (they are in ~/.cache/ubuntuone/log/), and I've sent them. Hope they find what is going wrong!

Update1: the sync does seem coupled to a reboot. This morning it appears about 400Mb more was synced after a reboot of the machine. I still have about 11000 files un-synced after 48 hours.

These days data wants to be distributed and in the cloud. This image shows my Ubuntu One folders on three machines. They are supposed to be in sync, but are far from that after being connected to a high-speed network for more than 24 hours 🙁

OK, so let's go buy 20Gb of space on Ubuntu One, and transfer my working-set of work/hobbies/etc files there and see how it goes. I use about three computers regularly, a new laptop at work, and a  desktop and an old laptop at home. The work machine is on the university network where bandwidth shouldn't be a problem, and I have 40Mbit broadband from welho at home. What could possibly go wrong?

Ubunutu One is very very slow. I didn't just dump all my files and pictures into the shared-folder at once, I thought I'd start with a subset which happened to be 18064 files taking up 5.5Gb. It appears that in the first 24 hours roughly 700 Mb of data was synced. Now I have rebooted the primary laptop and it has very rapidly sent out another 500 Mb - but then slowed down to a creep. Is there a bandwidth-cap? For paying users?

Does anyone use Dropbox for lots (10s of thousands) of files? Does it work? Fast?

Categories
Computer

Quassel notes

To keep myself "forever" logged onto IRC, I wanted to run quassel-core on my isp shell-account, and quassel-client on whatever computer I am using at the moment (home/work/laptop, etc).

I first downloaded the statically linked core quasselcore-static-0.7.3.bz2 and unzipped it onto the server.

To use SSL, a certificate on the server is needed, made by copy/pasting from the quassel-wiki:

openssl req -x509 -nodes -days 365 -newkey rsa:1024 -keyout ~/.config/quassel-irc.org/quasselCert.pem -out ~/.config/quassel-irc.org/quasselCert.pem

Then, my ISP doesn't have the port open that quassel uses (4242), so the connection needs to be tunneled through SSH. For testing a 'local port forwarding' tunnel can be opened like this (this is run on the client machine):

ssh -lmy_user -L 4242:localhost:4242 my.remote.server

If I understand correctly this redirects traffic trying to connect to 4242:localhost through SSH (port 22), and actually connects to 4242:my.remote.server. However it isn't convenient to always have to type in the password when opening the tunnel, so I set up SSH login without password.

Now we can go ahead and start the server, under screen, so that it stays alive when I log out of the server shell. The server-side (quasselcore) needs no further configuration through the server shell.

screen
./quasselcore-static-0.7.3
CTRL-A - d (to detach screen)
logout

Now we can connect with quassel-client, specifying 4242:localhost as the server. When doing this for the first time quassel-client will ask for some set-up data. It's possible to use an SQL server backend on the server-side, but I'm using SQLite.

Then I started googling for advice on how to automatically start and keep alive an SSH tunnel on Ubuntu. There seems to be no consensus on how this is best done, and two or three attempts I tried failed. Most seem to use autossh. Ry4an's blog suggests an upstart script (but I couln't get that to work, and it requires a special user with no password). Or should it be done with a script in /etc/network/if-up.d ? Since I only use the this SSH-tunnel with quassel-client, maybe the easiest solution is to create a launcher-script that first opens the SSH-tunnel, and then launches quassel-client (how do I kill the tunnel when quassel-client exits?). Suggestions? sshuttle?

For now quassel-core has been running OK on the server for a few hours, and everything seems to work. I'll be able to test connecting with more clients from home later... stay tuned.

Categories
Computer

New Thinkpads

Left: Thinkpad edge 11"

Right: thinkpad, analog paper version. Gift by IBM.


Categories
Computer

Filelight

After upgrading to Ubuntu 11.04 there's no kdirstat anymore (it's installable by hand I guess, but why bother...).  filelight appears to be a nice replacement:


Categories
Computer

Computer upgrade

A failed powersupply was my excuse to upgrade most of the other internals of the desktop computer too. Some notes on adding a disk to LVM, following Suji's notes from 2007 (all of these require sudo):


  • (create a primary partition, type "8E" Linux LVM, exit with "w")

  • (this will create the file-system. option "-c" which checks for bad sectors is recommended by some, but takes ages to complete) (see comments)

  • (this will create a physical volume)

  • will now list all the physical volumes and the newly created one should be visible.

  • will list the volume groups. On my machine there's one named "datadisk"

  • (this will extend the volume group with the new disk)

  • will now display info on the volume group. The new disk should show up in the list of physical volumes.

  • (this will extend the logical volume so that the new size is 100% of available space in the volume-group)

  • (this will resize the logical volume. takes a long time to complete with big disks and there is no progress bar/display)
  • finally you can check that the mounted volume group is actually re-sized to the new size and has lots of free space:

There is more info in the LVM-HOWTO.