Saturday, October 29, 2011

Reinstalled Ubuntu 11.10 Oneiric 3rd time

It was killing me for the AO722 as I have to do extra things each time.

First, the wired vs wireless conflict.  Since the 2nd time, it wasn't a fresh install and the USB OS starts to be "intelligent".  So much so that I can't even boot without an Ethernet cable connected.  All the known methods do not work.  Actually it can't even run on the USB drive, but can re-install itself on the hard drive.

For the resolution, recall that you need to blacklist atl1c in /etc/modprobe.d/blacklist.conf.  Then you need to
#rmmod atl1c
#update-initramfs -u

Without update, the kernel will always load the atl1c it remembered. 

Then disable the beep by alsamixer.  Find the conexant sound card by F5.  Actually muting the beep doesn't even work.  You have to turn the beep volume down to zero.

The 1st reinstall, it was because of Unity / Compiz.  The system menu bar disappeared and unity won't come out.  I can't launch anything.  I spent a few times more than the time taken to reinstall.  It wasn't that I mess up the settings.  I didn't even do anything.  I'm certain that many things that go wrong may lead to the self disabling of unity.  It may not even be hardware or desktop GUI related.

It was because all users are affected, while settings to unity and compiz are individualized.  Sometimes a crippled unity2D may work.  But you don't really want to keep that for long.  You can always launch something via terminal - ctrl-alt-t, or bring up an independent terminal session - ctrl-alt-F1.

The 2nd reinstall was due to messing up Grub, the boot loader.  All I wanted to do was to set the delay to 2 or 3 second before I can determine which OS to boot.  Basically you have nothing to do that.  All the docs are confusing as the new install will be Grub2, while if you have an old install, you will have Grub legacy.  The recommended startup manager don't work for Grub 2.  There is the Grub-customizer that can do it but it wasn't in a trusted repository.

I could have triggered a downgrade to Grub1, or I did that accidentally, or I never have Grub1.  I tried to reinstall Grub2, but probably on the wrong partition as root.  I have at least 7 partitions.  3 comes with windows. 1 linux swap.  1 for the OS.  1 for users.  1 unused, to grow at demand.  Once that was the crippled OS with users file for temporary backup.  I ended up with the Grub> prompt at boot.  It is easier to reinstall than looking up the command documentary.

Even with Grub working, there was a lot of blank screens in between the so called splash screens - giving some feedback for the users that the OS is loading.  It takes oneiric 30 secs to get to the login screen (only a few more seconds for Windows 7).  There is 5 sec of blank screen after the bios screen, and after the Grub screen, the rest of time will be mostly blank, until the brief splash screen at the end.  That would be really bad.  My wife thinks it was dead.

When I accidentally have grub legacy installed, there is always a text message telling you that it's booting.

The grub-customizer can add you own image to replace the blank screen.  But without animations you would think that the machine is hanged.

Its really a good idea to make a separate partition for the users, so you just overwrite the OS without copying the user files around.

First, don't encrypt your home directories or any partition containing them.  Because all the user config files will be encrypted.  You can't even reconfigure for them as the superuser.

The idea is simple.  Install gparted to resize, create the partitions.  You need one for root, the OS, and one for /home, which contains all the users.  You have to run Ubuntu on the USB for example, as the partitions must be unmounted in order to modify them.  You cannot unmount the OS, root partition.  You just need to mount the new partition using disk utilities and copy over the old user files to the user partition.

If you are keeping the current OS, you need to remove all the old user files on /home, and make empty dummy user directory in it.  You have to modify /etc/fstab and add the user partition to be mounted at /home.  When you reboot everything will be the same as before, except the users will be on a different partition.

When you reinstall the OS, it's simpler.  The live USB Ubuntu have all the options if you choose the custom option.  You will be asked which partition for root and which one for /home etc.

Sometimes the old users will not be recognized or have errors.  Sometimes it's due to file ownership.  If all else fails, rename the user directory.  Delete the user.  Add the same user.  Copy over the user files to the same place.  Without a separate partition, you or the installer may accidentally erase everything.  And for a clean install, you want to erase the old configurations on the OS.

There is something wrong over at Ubuntu.  It looks very nice and good for a fresh install.  All the geeky things are hidden or not even bundled.  You may win some but if anything happens, nobody will be able to help.  You don't throw the 1% existing users under the bus go get a few new recruits.  The forums are not working.  You have ubuntu forums and then ask ubuntu.  Most of info are outdated.

Whenever you make a decision, you should consider the CIA interrogation manual, classified or unclassified.  One main technique is confusion.  Ubuntu is good at it now.  You will pay whatever price for constant confusion to go away - buy a powerful notebook and pay up for the windows anti-virus scams, or buy a more expensive apple.

And then there is the physical abuse that don't register.  In the ubuntu forums you can't search for more than once every few sec.  In ask ubuntu many proxy servers or potential servers are banned.

And then there is the non-violence abuse.  Posting a link to point to somewhere else is both abuse and confusion.  May be really 1% should be using Ubuntu, but if there is no increase for long, there will not be a Ubuntu.  On the other hand, throwing everything old under the bus will be a disaster.  But if you don't develop something cool, there won't be developers left. 

So, when in doubt of where to go, what to do next, consult the CIA manual.

Tuesday, October 25, 2011

Disable AC adaptor beep in portables in Ubuntu 11.10

This is the answer to the million dollar question: disable the AC adapter / power cord beep in Acer Aspire One AO722 netbook in Ubuntu 11.10.

It is easy in Windows and perhaps earlier versions of Ubuntu.

In U11.10, you need the command line.  First bring up the terminal, e.g., use ctrl-alt-t.

Then use the utility
#alsamixer

For portables there are no separate system speakers for the system beep, therefore the desktop methods won't work.  For some portables, there are two devices, one for the digital HDMI and one for the analog speaker and headphones.  You have to pick the correct one for the volume settings.

For the AO722, use F6 to pick the conexant sound card, rather than the first HDMI sound card.

Then use the arrow keys to get to the beep column.  Type m to toggle the muting status.

The heart attack beep will be off when the power cord is attached or removed.  But the beep is not altogether muted.  The beep volume seemed to be coupled to the master volume or the alert volume.  

Friday, October 21, 2011

Installing Ubuntu 11.10 on Acer netbook AO722

Update: Ubuntu 14.04

Yeah, it has been a while. I didn't know when the wifi stopped working. But the kernel has long solved the Qualcomm (ethernet driver) vs Broadcom (wifi driver) conflict. I think Ubuntu even used and loaded a different driver. You don't need to do anything, just to undo the changes like I made. There's no need for blacklisting. You must not blacklist those drivers listed below. Delete the preferred driver version if you did that, not that it may matter. You don't need to do net boot first, just boot normally into harddisk or usb. I didn't change driver nor it's version because I think they use another one now.

Other than using the method to silence the annoying the speaker, you can also blacklist the speaker instead.

I tried the different video drivers again via system settings, software updates. All are about the same. 1080 HD on youtube is watchable. 1080 HD on local drive is watchable, but sound will be lost after a sec or two because sync cannot be maintained. FHD video seems to be in slow motion but watchable. But for lower bitrate 1080p videos, it could play normally except for wrong lip sync, such as animated movies. There's no suspend issues. It's a pity that the screen is better than the cheap acer chromebooks but they are much faster and play HD without a flinch.

 Update: wifi problems in 12.04

Firstly, the new broadcom wifi driver doesn't work.  You need to remove and reinstall the old version.


#sudo apt-get remove bcmwl-kernel-source
#sudo apt-get install bcmwl-kernel-source=5.100.82.38+bdcom-0ubuntu6
 
Then you need to stop the auto update:

#gksu gedit /etc/apt/preferences.d/bcmwl-kernel-source
 
and paste in the following lines to the file:
 
Package: bcmwl-kernel-source
Pin: version 5.100.82.38+bdcom*
Pin-Priority: 1001 


Now for the AO722, you need to resolve the driver conflict with the Ethernet controller.  This method disable the Ethernet wired connection!

#gksu gedit /etc/modprobe.d/blacklist.conf

and add the following lines at the end of the file:

#ethernet
atl1c
#incompatible wireles, just in case
bcma
brcmsmac
#video, for an unrelated problem
fglrx

Then you update the kernel before reboot.

#update-initramfs -u

If for any reason you need the Ethernet again, comment out atl1c in the above file, update kernel and reboot.

End of update
_____________________________________________________________________

The AO722 came with full Windows 7 64-bit, clumsy IE, loaded with advertising demos.  It would be a great performance upgrade to switch to Ubuntu.

But you won't be able to watch Netflix.  And because of open source video driver or flash plug-in, 720p HD on youtube will be stuttering. 

I suggest to install via a USB flash drive.  It will also be the "recovery disk" when all else fails.  The alternative is to boot up Windows and install something to read the Linux disk formats.

For a fail safe install, plug in the Ethernet cable to your wireless router.  At least get a cable ready.  The wired driver has conflicts with the wireless Broadcom driver!

When installation is completed, the OS will suggest proprietary wireless and video drivers to install, as opposed to the bundled open source drive.  Don't.

The proprietary video driver will freeze after suspend.  It will not wake up.  So don't do it.  The default drivers are OK.  But either the driver or the flash plug-in isn't good enough.  You cannot not play 720p HD on youtube smoothly.  Playing local files or over the local network is OK, but I haven't tried HD and other codecs.

Other than that, the screen flickers a little during boot.

If the wireless driver works, connect automatically and ask you the encryption password, savour it.  Once it is working, it will not work again once you reboot it.  It will then be conflicting with the Ethernet driver.

There is no other way out but to disable the Ethernet driver.  Add the line:

blacklist atl1c

in the file /etc/modprobe.d/blacklist.conf.  Then run:
#update-initramfs -u

And remember to sudo.  If you don't update, rebooting do not update for you.  You can check with lsmod.

You can check by lsmod first.  If you see atl1c and wl in the output, you are most likely using the conflicting drivers.  They are the latest drivers.

A common fix is to change the boot order to network before the system disk drive.  This will give time for the Ethernet driver to settle before the wireless one.  But if you switch user after boot, the same thing will occur because the networking settings are per user.

If your wireless doesn't work, or you play around with the drivers until it doesn't work, it's expected.  You look around the blacklist files and you will understand.

The descriptions at Broadcom are good, but some instructions do not make sense.  On top of the network drivers' conflict, your wireless probably will fail changing from 11.04 to 11.10, not because of the AO722.

First check what you have by
#lshw -C network
You can see the Broadcom BM4313 hardware, and at the driver entry, wl.  If you see anything else, you need to reinstall the drivers.

Then you need to see if the kernel driver is compatible:
#lsmod

You should see wl in the list.  Typically, the driver will be selected for you during OS install, and will be affected by the old configurations.  Typically you have to remove the bcma driver and blacklist it as above:
#rmmod bcma

The other older drivers are already blacklisted.

If there are troubles and you need to reinstall the drivers, you should install synaptic package manager first.  You can search in the Ubuntu software center.  You can also find the drivers in the Ubuntu software center.  The problem is that after I installed it, it worked, and then I can't find the driver again in the center.  Also it don't show the version numbers.

In the package manager, you search for Broadcom or bcm.  What you need are two drivers:
bcmwl-kernel-source
broadcom-STA-source

You need to reboot and may need to reinstall them to get the right drivers.

Broadcom just updated their Linux wireless driver page.  But I think the drivers at Ubuntu depository are almost update.  But if you compile the updated Broadcom drivers on you own, you may solve the network interface conflicts.

But why you want this netbook?  It fits in the glove box of my vintage.  It don't cost that much if you shake it too much into disintegration.  It's a fully functional computer with full 64 bit OS.  At 11.6", the screen resolution of 13xx by 7xx is "bigger" than an old 17" desktop monitor.  So it looks really nice if you care to sit close to it, like in the car.  And you should be pleasant to read books too, and hold it like an open book if you sort out the center of gravity.  It's exactly the size of a letter paper.  It's so sexy that chicks finger me.  Not exactly.  They finger the screen as if it is an iPad, tablet, iPhone, or just point of sale check out machine.

 UPDATES: upgrading kernel is a big hassle as usual.  The non-compatible wireless driver came back which didn't work.  I have to bring back the ethernet driver and the cable.  Reinstall the working driver, and then blacklist the ethernet driver.  Also, tried if the propriety driver works for new kernel.  No.  Reinstall.

So my new blacklist comes to:
#wireless
bcma
brcmsmac
#ethernet
atl1c
#video, just in case
fglrx

Remember to update before reboot.

For the correct driver to install, you can just search for them in Ubuntu software center
For video:  xserver-xorg-video-radeon
For wireless:  bcmwl-kernel-source

Via lsmod, the drivers are radeon, wl.  You also have to remove the other wrong drivers first.  The order is totally important.

Sunday, October 16, 2011

Ubuntu 11.10 upgrade - almost a nightmare

The other day a prompt popped-up, saying that Ubntu 11.10 is ready.   I just pressed the button for the upgrade, thinking it was as simple as the software updates every few days.  I never had any problems since the last Ubuntu upgrade.

It happened that whatever problems others have, I also have them, and then some.

Maybe because of my non-standard (sophisicated I would say) setup, like all the partial encryptions, encrypted swap space, etc, reboot failed.  I started the recovery mode.  I got in, but what do I do?!

I tried to look at the boot log, no clue.  And before that, the boot loader complained that all my NTFS (Windows) drives have fatal errors.  That was real scary.

I tried to remove the last application that appeared at the boot log out of desperation.  Then the first error message came out - that the software package manager wasn't in a proper state.  I ran the suggested command and it was fixed.  My computer manager to crash the software package manger at half the upgrade.

But that was fixed after wasting a lot of clueless time, swapping between the recovery mode, and normal mode a few times, and using the desktop to search for answers on the web.

Now the NTFS drives.  Who haven't got one or two partitions?  It's not safe to get rid of Windows altogether.  I still can't see the ink levels on my printer.

It happened that they took out the fix NTFS utility from the system bundle.  The system cannot find the programs to check and fix the NTFS drives, causing a fatal error.  It is a valid philosophy, but stupid.

NTFS support is still there.  You can mount the drive and read the data as before.  Just that you cannot fix the hard disk errors.  For that you have to download the newer optional NTFS package.  But actually it is there and installed.  But for some reason they call it another name, being new and different.  You can also "fix" the disk errors from other utilities like the Disk Utilities.

I think the reason for the change is that the fix disk utilities is not as good as the Windows one.  I fixed it on Ubuntu.  But when I check it on Windows, it still got plenty of errors.

The proper solution is to edit the /etc/fstab file.  For the NTFS disks, change the last 1 to 0, telling the system not to try checking and fixing them, using a package that didn't exist.

This is fixed after booting and fixing all the drives in Ubuntu and Linux, which is a waste of time.  Like testing and fixing memory first, you should check and fix all your drives first, in Windows for NTFS, and others in Ubuntu, before you do major upgrade.

And of course you should backup your home directory first.

After successful booting, of course the default desktop environment is the new unity interface.  The saving grace is that it's compatible with the classic Ubuntu gnome desktop, once again.  The ridiculous fact is that 11.04 was not compatible with the earlier gnome desktop.

After I played around a bit, and maybe after some coding errors, unity disappeared.  Everything seemed to be working.  But I don't have the Unity to launch anything, and no system bar at the top.  All I got is the bar for the "file explorer".

It happened that the desktop or whatever is called Compiz, and Unity is a plug-in.  Somehow Unity is disappeared and you are left with a useless desktop, unless you have some application links on the desktop.

To reset to the default state of Compiz and Unity you need to do the following:

#gconftool-2 --recursive-unset /apps/compiz-1
#unity --reset

The tricky bit is that you can't start a terminal or anything.  In recovery mode you also have to login as a normal user as the desktop settings is user specific.  You can also try alt-ctrl-F1 that sort of thing to get a terminal to launch the commands.

Alt-ctrl-F1 gets you to the raw linux mode, without any GUI.  It's like the recovery mode but with everything else normal, except the GUI.  Alt-ctrl-t is the default  hot key for bringing up a terminal.

Finally, after the hens and eggs problems, it worked.  And now I can move to the new Unity because it beats Windows 7.

But I'm afraid there are problems at Ubuntu.  Wrong philosophy?  Many heads in all directions?  Heading for the wrong path?  These will be next.

ps It is recommended to install the Compiz settings manager but I advice against it until you sort out all your other troubles.  It sets many other things so you can't go back to default even after you completely removes Compiz and reinstall.