Wednesday, July 11, 2012

Weird clicking noise in Chrome

For anyone who is experiencing sound issues in Chrome, there is a workaround. I use the browser a lot and it's been making my Ubuntu experience very irritating lately. Videos have been impossible to listen too and even using Gmail has been irritating with a background 'static heartbeat' that runs continually.

It doesn't affect Firefox, so that's an option, but if you depend on Chrome like me... here's the fix:

1. Go to chrome://plugins/
2. Expand the Details (click plus sign on right side)
3. Disable the Pepperflash plugin

It looks like the issue is documented as a chromium issue in a number of places e.g. here and here.


Thursday, July 5, 2012

What's wrong with Wubi/Ubuntu

It speaks volumes that the most popular post on this blog is Missing the root.disk. It has nearly double the hits to the next most popular post (that also relates to Wubi boot problems).

What does this mean: to be missing the root.disk? 
Well it's the catastrophic failure of Wubi, the damage and possible destruction of the virtual disk, in other words, the entire Ubuntu operating system and data. There really can't be much worse of a failure.

What is the cause?
It could be the forced shutdown of the computer, for example, due to a system freeze. In some cases, users reported a crash. In other cases, they reported nothing more than running available updates. It's not conclusive what the main cause is.

Why do people force shutdown?
There are probably many reasons this happens... like any bug that causes a system freeze. E.g. on my 12.04 Ubuntu install when I come back from suspend the screen sometimes remains black (mouse still visible). This isn't a freeze but there is no obvious way to shutdown or restart and no apparent fix/workaround. It would be totally understandable that some people might force shutdown if that happened to them. Especially coming from a Windows background where there is no alternative to REISUB. In fact, on my test Windows 8 install it freezes frequently and - as far as I know - that's my only option to reset.

So usability bugs like that could also be behind the corruption.
PS For this particular bug, I generally Ctrl+Alt+F1 and restart the lightdm desktop service (but it still kills all open apps). 

Why does a forced shutdown corrupt the ext4 and/or ntfs file system?
This is perhaps the more relevant question. Maybe the journalling built into ext4 leads to corruption (speed over stability?). But this is pure speculation - and I thought Wubi installs were supposed to automatically sync all changes, precisely to avoid this problem.
And why would  this affect the root.disk, a fixed-size file on NTFS...why does Wubi even update anything that could lead to this fixed file becoming corrupt? This seems like a major flaw.

How unstable is Wubi?
It's not possible to answer this without understanding how many people use Wubi and how many of those experience corruption of the root.disk. The fact is that I have never lost a root.disk to corruption in multiple years of testing Wubi, and over a year of continual use of Wubi (running the development releases)... so while I can't definitively say what is going on, I don't believe it's that unstable.
Regardless, the fact is, it shouldn't happen to anyone, and clearly it happens to many.

Why do people use Wubi?
I get that Wubi is a great way to try out Ubuntu without partitioning. It runs extremely close to a normal dual boot, that it showcases Ubuntu for those that are understandably nervous about partitioning. That makes sense. But why do they people keep on using it? Probably because it works too well. There isn't a whole lot of understanding about why it's not a great idea to do all your university coursework on a Wubi install and not bother to back it up. There also isn't any notification or warning when you install Wubi from here that there could be problems ahead or even an explanation of how Wubi is different unless you follow the links. In short, there's no reason for a user to switch to a partitioned install (usually until a major failure and the resulting investigation).

What do I think about Wubi?
I think it's pretty amazing to try out Ubuntu, but that it's poorly supported: I don't believe there is a credible maintenance and testing infrastructure for Wubi. If there were then you would see some effort to resolve these sorts of issues. And from experience I can assure you that getting even well-understood, major Wubi issues resolved (even when the fix is known), can be like pushing a rope.
Having said that, 12.04 is probably the most stable Wubi release ever - there's a huge drop in support requests. So it's working better than ever before and it seems to be popular and part of Canonical's strategy to spread Ubuntu.

Wubi maintenance
I touched on the fact that I don't believe there is a credible maintenance plan in place for Wubi. My impression is that, in general, Canonical's resources are stretched too thin. There are many important, unresolved issues with Ubuntu at any point in time, and Wubi's issues are obviously not high on that list. I've been using 12.04 since it's release and I've found a number of usability bugs that make it a frustrating experience. On top of that, the seemingly small Ubuntu developer team are always fully occupied, working hard to produce these relentless 6 month releases, which I believe is far too frequent. All that time spent on a development release for zero production users is time taken away from millions of real production users. This doesn't make any sense to me whatsoever. It should be the other way around. Because of this endless cycle of less than perfect releases and not fixing existing problems they are slowly going to whittle away at the support base and scare off newcomers. So... in short I believe the Wubi maintenance issues are minor compared to the general maintenance issues.

Wednesday, June 20, 2012

Edubuntu - it burns!!!

Lately I've decided to use Edubuntu... But there have been some pain points, none more-so than the boot splash screen. You know, that white Edubuntu spash screen that modern laptops on full brightness just about shatter your retina as it boots? If all you know is the soothing Ubuntu purple screen (haha) then consider yourself fortunate.

So what can you do... surely you can just change it? Yeah, go to software center and search on boot and/or splash and/or eye's burning and ... nothing. But surely you know the boot process thing is called "Plymouth"? Oh yeah, okay try that... nothing!

No, you have to search on plymouth-theme. That will trick Software Center's advanced heuristic irritation algorithm to show you what you want!? (Why on earth would a search on plymouth not produce results that plymouth-theme produces?)

So, there it finally is - the Solar Theme I love. It's darker blues will soothe my eyes and not excite the senses (like that rude purple). Install it... bing, bang, boom, done!!! Ah, no, that's not the way it's done. It still comes up all whitey-brighty.

Well, duh, I didn't tell it to use Solar as default. How would it know!!! (Stupid me). What you obviously have to do is go to a terminal and run:
sudo update-alternatives --config default.plymouth
And select the number that matches the Solar Theme. Enjoy.

Please someone post a comment and tell me what I missed - there must be an easier way!!!

Thursday, May 31, 2012

Wubi usage/opinion survey

Things have been a little quiet on the Wubi support front, since the 12.04 release (which resolved a lot of the usability bugs in Wubi.) So while twiddling my thumbs, I decided to find out how Wubi is perceived in the community.

Clearly there are many vocal 'anti-Wubi' voices, but how - I wondered - does the general community receive this product? I created a survey via surveymonkey.com and advertised it in The Community Cafe section on ubuntuforums.org. The idea was to target more seasoned Ubuntu community members.

Q. What sorts of users responded to the survey
77% of the respondents stated that they used Ubuntu more than Windows.
65% had experience with Wubi, either running it currently (9%) or having run it in the past (56%) 


Q. How many users responded
43 users completed the survey


Q. What was the opinion of Wubi
The following chart shows the opinion the respondents had of Wubi. e.g. 30% neither liked nor disliked Wubi.
The following chart shows the average opinion rating, broken down by category of user (on the chart a value of 1 = "Hate it", 2 = "Dislike it", 3 = "Neither Like nor Dislike it", 4 = "Like it"  and 5 = "Love it".)
The first column is the average for all respondents (3.28), and the rest are broken down by whether the respondent has ever used Wubi (or is currently using it). It shows that the opinion of Wubi is higher amongst those who have used Wubi (perhaps not surprisingly).



Q. Who would recommend Wubi
The following graph shows who would recommend Wubi to others to try out Ubuntu. The graph is broken down by category of user (first column is all respondents.) Again, not surprisingly, those who had used Wubi were more likely to recommend it.  Users who had no experience with Wubi were extremely reluctant to recommend it.


Conclusion
I was a little surprised to see the results. I expected to see more negativity to Wubi amongst non-Wubi users. But it should be noted that even though the average opinion rating wasn't bad in this category (2.47) only 7% would recommend Wubi to a new user to 'Try out Ubuntu'.

Contrast that with the average opinion rating of those that have used Wubi (3.54) or those that currently use Wubi (4.75) and you see a recommendation of 67% and 100% respectively. So these users clearly feel there is some value for introducing Ubuntu to newcomers.

Appendix
Here is a list of the questions on the survey. Questions with an asterix were mandatory.

  1. *Do you run Ubuntu installed with Wubi? (Yes/No)
  2.  If you answer No to Q1, have you ever installed Ubuntu using Wubi (Yes/No)
  3.  If you used or are using Wubi, how long have you used it? (<1 day /<1week /<1month /<3months /<1year />1year)
  4. Have you upgraded releases using Wubi? (Yes/Yes but it failed/No)
  5. *Do you use Ubuntu more or less than Windows? (Less/Same/More)
  6. *Do you ever force shutdown (power off) your computer if it hangs? (Never/ Sometimes/Frequently)
  7.  If you are currently using Wubi, are you planning to move to a normal dual boot in the future, or stay with Wubi? (Reinstall/Migrate/Stay with Wubi/Not sure)
  8. *Would you recommend Wubi to others to try out Ubuntu? (Yes/No)
  9. *What's your overall opinion of Wubi (1-Hate it/2-Dislike it/3-Neither like nor dislike it/4-Like it/5-Love it)

Tuesday, May 29, 2012

Wubi Kubuntu not working in 12.04

You cannot install 12.04 Kubuntu when running wubi.exe standalone at this time. The addresses of the ISOs are incorrect so it will fail.

Cause
I'm not entirely sure but perhaps this has something to do with Canonical no longer supporting Kubuntu. Whatever the reason, the ISOs are now hosted on http://cdimages.ubuntu.com/kubuntu/releases/12.04/release/ instead of http://releases.ubuntu.com/releases/kubuntu/ (as it was in prior releases). Unfortunately this wasn't picked up in testing as Wubi uses a different download site while in development. It's only after release that this switches over.

Fix?
I've submitted a bug patch that may or may not be accepted as an SRU (stable release update) - if you read a previous post you'll know that these are now possible for wubi.exe whereas they weren't previously. But in the meantime you'll have to use a workaround to try Kubuntu

Workaround
Download the Kubuntu Desktop CD ISO manually from here and save it in the same folder as wubi.exe before running.

Friday, May 11, 2012

How to run the development release with Wubi

Prepare for breakage
This goes without saying, but I like to say it anyway. If you choose to follow these instructions, and you lose your installation/data or worse - you're on your own. That said, I've been running the development release on Wubi since 11.10 and with a few precautions you should be okay. 
Note: Since the 32-bit non-pae kernel will not be supported in 12.10, I advise not following these instructions if you are using the 32-bit non-pae kernel.

Backup and restore
Even though I am aware that things could go awry, it's still irritating to lose the install. So I keep a fully synched backup of the root.disk. After running updates (which you'll probably get used to doing every time you boot), once you've rebooted and confirmed things are stable, you can resynch your backup. 

Here's how to do it:
  1. Make a copy of your root.disk using the Wubi resize script 
  2. Keep it synchronized by rerunning the script, but supplying the --resume option (which will copy only files that have been modified/added and delete ones that have been removed).
  3. Make the new.disk bootable (so you can confirm it works without booting to Windows to rename the disks). You do this by adding the following lines to /etc/grub.d/40_custom (changing the bits in red to match your own settings):
menuentry 'Ubuntu - backup new.disk' --class ubuntu --class gnu-linux --class gnu --class os {
        set gfxpayload=$linux_gfx_mode
        insmod part_msdos
        insmod ntfs
        set root='(hd0,msdos3)'
        search --no-floppy --fs-uuid --set=root 18B4B7BBB4B799A8
        loopback loop1 /ubuntu/disks/new.disk
        set root=(loop1)
        linux   /vmlinuz root=UUID=18B4B7BBB4B799A8 loop=/ubuntu/disks/new.disk ro   quiet splash vt.handoff=7
        initrd  /initrd.img
}

Then you'll see "Ubuntu - backup new.disk" at the bottom of the grub menu when you boot. If you don't see the grub menu, hold down the Shift key after selecting Ubuntu.

Upgrading to Quantal
Since there is no Wubi.exe version for Quantal available at this early stage of development, the only way to get it is to install 12.04 Precise Pangolin, and then modify your sources.list. (Note, once the Alpha1 is released you may be able to install normally and in this case you should not use this method).
sudo sed -i 's/precise/quantal/g' /etc/apt/sources.list
sudo apt-get update && sudo apt-get dist-upgrade 

Partial upgrades
Always review the results before running dist-upgrades. In particular, look at what is being removed. It's fairly common for the packages to be out of synch at times during the development release, and if you're not careful you might uninstall critical bits. My rule of thumb is, if anything is being deleted look for a newer version of it being installed. If there is no corresponding entry, then wait a few days. Sometimes you'll find the packages are no longer listed as being removed. In other cases, they're still there and it's probably safe to proceed. If you notice a lot of packages being deleted, run away.

Where to go for help
Please review the Sticky threads in the Ubuntu+1 forum on ubuntuforums.org. If you have any questions or problems, look there to see if someone else has a solution or post your own questions. 

Tuesday, April 17, 2012

How to upgrade a Wubi install

Yes it's that time again. A new Ubuntu release is around the corner, and that means that many people will be upgrading. If you have a Wubi install and look for advice, you'll probably be sternly warned that "Wubi wasn't intended for long term use... blah blah yawn". That's all great, but you're using Wubi and want to upgrade, and the reality is many people will do it anyway.

Upgrades fail

Shocking, but true. Ubuntu upgrades do fail. Frequently. Many people swear by fresh installs. Personally, I've upgraded to every release since 9.10 and with Wubi testing since 8.04. And 9 times out of 10 they worked okay (for me). The upgrade to 10.04 was probably the worst as you had to Ctrl-C at some point during a loop etc.

But nonetheless, every install is different and many fail (Wubi and normal both). So what to do?

Backup

This is a no-brainer. It's so easy to write it and read it and agree with it. But the way that the Update Manager suddenly jumps up "A new release is available. Do you want to upgrade?" - it seems so easy to just click that button. Even without reading the release notes (which may help you but not in all cases).
So... DON'T DO IT. Not until you've got a disaster recovery plan in place (the work-speak way of saying you have a backup and know how to restore it).

You should probably already have all your important data backed up, stored on the /host or other normal partition (or synched to Ubuntu One). Because data on the virtual disk is at a higher risk of being lost.

Full Wubi backups

On Wubi, it's really simple to do make a fully bootable backup. If you installed on your C: 'drive', then boot Windows, and copy the entire C:\ubuntu\disks folder. It's going to be big, so make sure you have enough free space, or copy it to an external drive if you need to. If things go wrong during the upgrade, you just have to copy it back and you have a full Ubuntu restore.

Preparation for upgrade

Make sure you have enough free space on the root.disk. Many people underestimate how much space is needed (and apparently the Ubuntu upgrade process also underestimates it, or has in the past). Personally I would make sure there's 5GB free, maybe 3GB minimum (that's sucking it out of my thumb, but the message is don't try it with the bare minimum).  Note, you can also resize the root.disk if you need to. At the same time, process all updates to the current release before hand.
To check free space, run df -h from the terminal (Ctrl+Alt+T). You're looking for the amount of free space on /dev/loop0 (that's the 'loop-mounted' root.disk)

Browse the forums

Take the time to see how bad the upgrade is. Other people will be doing it and posting the results (if they are bad). Get a feel for what the problems are.

Alternate CD upgrade

I strongly recommend using the Alternate CD to upgrade. Why? Because when the new release comes, every man and his dog starts to upgrade, and the servers struggle. So a 1 hour download suddenly becomes 3 hours or longer. Or times out. And you're up at 2am watching it (because at some point you're going to have to click that darn "OK" button for some meaningless prompt, or else you'll have to do it when you wake up).

Whereas, if you download the Alternate CD ISO, using a bittorrent client, it will likely take 30 minutes. Then you upgrade offline (maybe not recommended by Canonical, because this stops you downloading the latest packages) and you've just saved yourself a couple of hours. 

There's no rush

It's not going to hurt you to wait a month to upgrade. At that point, it should be very clear what problems there are if any, and there may even be fixes. Also the servers will be quieter, so doing an online upgrade gets you the latest packages. You can still run the Alternate upgrade, but let it download the latest packages online (still quicker than downloading all the new packages).

Caveats

Normally by this time in the development cycle, I've run a few Wubi upgrades. So I'm usually speaking from a position of knowledge that the upgrade can work. This time, I've been unable to test due to one of my computers dying, and a bunch of other time consuming things. Maybe I'll get the time to do this still (9 days to go as at the time of writing, in which case I'll add a comment to indicate that).




Update: I ran two upgrades, 10.04 to 12.04 and 11.10 to 12.04. I ran both online (not with the alternate CD - it helps having a 50Mbps connection and minimal server traffic). I confirmed that 2 GB is too little space - it downloads about 1800 packages and 'unpacks' them - and this uses a lot of space (that is mostly freed up at the end). So be warned - the upgrade tool does not stop you running out of space.
The 11.10 upgrade was on a real, in use installation, and worked flawlessly. The 10.04 was on a brand new, bare-bones 10.04.4 install with updates applied, and gave a number of errors and some weirdness (empty message box with 2 unknown buttons) - but succeeded as well.

Summary
1. Backup (always prepare for the worst)
2. Minimum 3 GB free space (preferably more)
3. 1800 packages to download so consider using the Alternate CD to speed things up

Another update: if you have a custom graphics driver, or use ppas, then it seems to be recommended to remove these before upgrading, and then reinstall following the upgrade.