Showing posts with label suspend. Show all posts
Showing posts with label suspend. Show all posts

Thursday, May 12, 2011

Thoughts on Ubuntu 11.04 and Unity

After waiting for a few weeks until the commotion died down somewhat, I thought I would have a look at the latest version of Ubuntu, version 11.04, codenamed Natty Narwhal. A major feature of this release is the new desktop environment/interface, known as Unity. This has created a lot of controversy on the internet, which initially made me hesitant to upgrade. Lots of people have complained that it removes a lot of functionality, that things are not where they once were, and so on. I thought that rather than just stick with the old version stubbornly, or switch to the KDE environment, I would actually install it and use it for a week or two, before passing judgement.

First of all, I used my laptop as a guinea pig. There is nothing of importance on it that isn’t backed up elsewhere, so if everything got hosed it would not be too much of a drama to do a clean install. Bringing up the update manager, I clicked the “Upgrade Now” button that has been teasing me for the last few weeks. The upgrade process started, and I left it to its own devices to scan the system, download, install and configure the latest versions of everything.

Much to my pleasure, when it was finished and after rebooting, the system actually started and loaded up the shiny new Unity desktop. All the effects were running, and this is machine had a fairly old ATI card and runs the open-source radeon drivers. It’s a bit of a departure from previous versions of Ubuntu, so I can see the concern other users have. A bit of experimental clicking around brought up my first problem - how do I launch more than one instance of a program, such as the terminal window? Clicking the terminal button on the side pane (which was there because it was configured as a button on the task bar on the previous install, along with Chrome) again just brought the existing terminal window to focus.

What?

That’s not going to be much use, I thought - so a consultation of the Google was called for. Turns out, giving the icon a click with the middle mouse button is the secret to opening additional instances.

I recommend searching around for some Unity guides or tutorials  - a good selection is at this site to get an idea on how to use it. Some sort of guide or walkthrough should have been included with the default install - a link on the desktop or something, as this is a pretty big step. There’s a bit of a learning curve, but I think it has a lot of promise. Another little gem I found out was the use of the Windows key (or Super key) - a quick press brings up the dash where you can type in a program’s name, similar to the functionality in Windows 7; a longer press bring up the launcher, holding it down longer puts numbers on the icons that you can then use as shortcut keys to launch the programs.

Also check out this page of things to do/tweak after installing.

After one afternoon’s usage, I get the feeling that it’s not a massive backward step as people are saying, but a different way of doing things. It’s like the step from Windows XP to Vista or Windows 7 - things are in different places now, there’s some adjustment required, but after using the new features it’s difficult going back to the old way.

After mucking about with the laptop for a bit, I thought I would do a trial install on my main system. Still not willing to risk the main install, I grabbed an old hard drive, put that in my system and unplugged my existing drives. I then started the install process from CD, from scratch.

One of the concerns I had was that Unity is a part of Compiz - the desktop effects package that does not run on the open-source nouveau drivers for Nvidia cards. I have been running those on my desktop since they allowed the suspend functionality to work - the binary nvidia drivers did not do that. So this was going to be the big test - if suspend didn’t work on the new version, I would probably give the upgrade a miss or try KDE perhaps.

After quite a while of downloading updates and various components during the install (the default mirror must have had a really slow connection), the install completed and I rebooted. First impression - the loading screen actually worked properly. The nvidia drivers might finally be playing nice! Login screen came up, followed by the desktop. Going to the nvidia-settings program confirmed that the binary drivers are in use, so it was time to see if suspend worked or not. Clicking the suspend option in the main menu, the system actually powered down. No blank screen with blinking cursor in the corner, like in previous versions. I was impressed. I’d be even more impressed if the system came back up again. Hitting the power switch, the drive span back up, up came the password prompt to unlock the system. Entering the password brought the desktop back up, with a minor bit of graphical glitchiness on the side pane, but once I moved the mouse over it, it all came good. Success!

One thing I noticed was the behaviour of the launcher with a multi-monitor configuration. the way I have my screens set up, the second screen is off to the left of the main screen. So if I move the mouse to the left edge of the main screen, to bring up the launcher, if I move any further left onto the second screen, the launcher disappears again. Might have to look into that, whether I can move it to the right edge or something.

So far, that is my experience with 11.04. Further discoveries, from a longer period of use, will be posted in the future.

Friday, January 7, 2011

Switched back to nouveau graphics driver - suspend now works!

As part of the process of building the separate MythTV box (as seen in my last few posts), I no longer needed the VDPAU acceleration for TV playback on my main PC. I also wanted to see if the suspend and hibernate functionality worked with the open source nvidia drivers (nouveau), as opposed to the proprietary binary ones. Booting the system with an Ubuntu live CD, which uses the nouveau drivers by default, let me suspend the computer and resume correctly - something it did not do with nvidia's binary drivers.

So under System -> Administration -> Additional Drivers, I disabled the proprietary drivers, which re-installed the nouveau driver. Rebooting, the screen came back up, but only one of them (I have two), and at the wrong resolution. The cause of this was a fix I had applied earlier to make the boot screen look right with the Nvidia drivers, as described at the end of this earlier post. Once I removed the extra text from the grub boot command, everything worked fine. Suspend and hibernate both worked, although I found hibernate to be a little pointless - it took about the same length of time as a normal boot.

The only downside was the compiz desktop effects no longer worked, although I believe if you use a more current version of the nouveau drivers it may do so. 3D performance is nowhere near what the binary drivers provide either, but that isn't so much of an issue since I dual boot with windows. Games can be played there.

Thursday, November 11, 2010

Getting Ubuntu installed on a laptop

I had managed to score for free from work an old laptop that was past its use-by date, for business use at least. It's an LG S1 Express Dual, with a Core Duo (not Core 2) processor. Previously, to extend its life a little longer I had installed 2GB of memory in it and a faster hard drive - that made a remarkable difference.

Being from around 2006, it had come with Windows XP pre-installed. I wanted to try a newer operating system than that, so initially I put Windows 7 on it. Now for people saying Linux is hard to get driver support for, Windows 7 was an ordeal in itself. First of all, LG have basically stopped making laptops. Drivers for it were not available on their site for windows 7. Some Vista drivers were available, so I had some of those installed. The graphics chip in this machine is an ATI Mobility Radeon X1400. Going to ATI/AMD's site to find a current driver just sends you to a page saying that it's the laptop maker's responsibility - they don't support it any longer.

Even things like network drivers were unable to be found easily. I remember having to scrounge around looking for whatever I could find, on obscure and slightly dodgy driver sites. In the end, Most of it worked. The on-screen display didn't work, some of the special functions didn't work, and got no joy from the included remote control.

One other setback was the BIOS not recognising hard drives over 137GB/128GiB in size. A bit of a setback, since I'd like to make use of all of the 160GB drive that was installed in it. First up, I tried dual booting with Linux, using the space at the end of the drive that BIOS and Windows couldn't see, but was no problem for Linux. Ubuntu booted fine, but Windows would refuse to boot, until I shrank the partitions down to fit under the 137GB limit.

Finally, I decided to just run a complete install of Ubuntu. Taking advantage of the release of version 10.10, I put in the 32-bit install disc (the Core Duo T2400 does not support 64-bit OSes) and nearly everything seemed to work pretty well. Especially networking, which did not work under Win 7.

A bit of tweaking was needed though. Sound wouldn't work. A little digging through the forums revealed the module for the sound card wasn't installed, and the following had to be added to the end of the file /etc/modprobe.d/alsa-base.conf:

options snd-hda-intel model=lg

This loaded the correct module at boot time, and sound now works.

One other problem I had was with the suspend functionality. While the system would go into suspend mode correctly, upon resuming the wired networking would refuse to work. I haven't tested wireless, as I do not have a wireless router yet. A little research revealed it was due to this bug, and that by manually unloading and reloading the network module, it would come back to life again. The commands to do that are:

sudo modprobe -r et131x
sudo modprobe et131x


Thanks to the user P4Man at ubuntuforums.org, a short script has been created, as detailed in this post:

Create a script named /etc/pm/sleep.d/11ethernet, with the following contents:

#!/bin/bash
case $1 in
suspend)
rmmod et131x
;;
resume)
modprobe et131x
;;
esac


Changing the “et131x” value to whatever the network module is. That is what the module is on this LG laptop.
Save file and make it executable:

sudo chmod 755 /etc/pm/sleep.d/11ethernet

Now, when the laptop goes into suspend mode, the network module gets unloaded, and upon waking up, the module gets reloaded. Networking works!

Boot up time is nice and quick with 10.10 as well - quicker than windows 7 which itself was no slouch. A far cry from its original state, with a slow old hard drive, Windows XP and a bajillion little programs that started on boot. All in all, it's a nice machine. Now I just have to buy a battery for it that works...