Showing posts with label linux. Show all posts
Showing posts with label linux. Show all posts

Sunday, July 8, 2012

Installing Kubuntu 12.04 LTS on Acer Aspire One D270

I finally bought a new netbook, an Acer Aspire One D270.
  • 10.1" display
  • Dual 1,6 GHz Intel Atom N2600 processor
  • GMA 3600 graphics chip integrated on processor
  • 320 GB hard drive
  • 1 GB RAM, extendable to 2 GB
It appears that the D270 model has many variants. I accidentally purchased a model with a 3-cell battery, as there was another model with the same designation in another shop, but with a 6-cell battery. I read the specs from the other shop, and bought the machine from the shop with the inferior machine. Oh well, can't take it back anymore. On a positive side, it's a bit lighter and smaller with the 3-cell battery. There were a few other alternatives, but this was the cheapest and I thought they were so cheap that I could buy a new one later. There's never enough netbooks lying aroung.

The nasty trade-offs with the D270 are:
  • A glossy screen (oh I hate them)
  • No Bluetooth
  • No built-in 3g
  • The small battery in this model
But it was cheap, so.

The machine came with Windows 7 Starter. It's actually the first Windows I've ever paid for myself, which is kind of shameful. Unfortunately, it's no longer possible to find a netbook/laptop without Windows (Update: Looks like they sell D270 with Linux in Germany). My EeePC 910 was quite great, with almost same performance as this one, but unfortunately they don't sell those any longer. Too bad I managed to soak it in pear juice.

It should be noted that there are no vendor-provided drivers for the GMA 3600 graphics controller in Kubuntu. (Update: Looks like Intel has published a Linux driver last month! But it's only for 32-bit Fedora...)

Some of the configuration given in this article are specific to the Aspire, but perhaps most are quite generic, especially the KDE configuration.

About KDE

I'm a long-standing KDE user and wouldn't really use anything else. The problem is that KDE has been getting worse over the years, not better. I guess it's because KDE imitates Windows a lot, and Windows has gone worse. The problems started with the redesigned KDE 4, which had all sorts of bells and whistles that still don't work some 5 years after the first version. The window manager crashes occasionally, and there are other issues, some of which I will mention later.

One of the most annoying issues is deteriorating keyboard support, some of which issues I mention later. While I initially switched to KDE because of its excellent keyboard support, it has been getting worse. Shortcuts disappear, and no one seems to care about it. I imagine there is nowadays a newer generation of developers who went to school learning to always use mouse for everything. Despite using the keyboard for writing a lot, they nevertheless seem to stick to mouse a lot. Not good.

Mounting the Cow

In any case, Kubuntu, the KDE version of Ubuntu, was my choise. Downloading the ISO image was just a minute. The trouble started with writing the image on USB memory. The instructions give a "normal way" to use "usb-creator-kde" application. The problems started while using it, as it crashed the first time I used it. Trying again, I managed to write the image to the USB drive (or actually an SD card with an adapter). However, trying to boot from it consistently failed and the system dropped to shell prompt. I first feared that it might be a display driver issue, but going through the errors gave me a hint that the USB image might have some issues. It couldn't even mount the system in read-write mode, which caused everything to fail.

The problem was that it couldn't mount a cow. More technically, I got "Can not mount /dev/loop1 on /cow". It has something to do with an overlay filesystem where there is a read-only filesystem on the bottom and a ramdisk read-write filesystem on top of it that takes any modifications. Anyhow, I didn't get the cow error consistently, so it took a bit time to figure out. Well, the installation instructions actually mentioned the issue and adviced to use UNetBootin, another application to create bootable USB disks.

The problems didn't exactly end with UNetBootin, I have no idea why. I managed to boot once, but subsequent attempts didn't work, the boot just got stuck. At this point, I gave up and went to sleep. On the next day, I went to a supermarket and bought a real USB drive instead of the SD+adapter, and tried that. Worked, excellent.

The installer allowed to repartition the 320 GB drive nicely so that it preserved the Windows 7 installation. Not sure what I could use it for, perhaps for some games or something. Not that the machine is fast enough for games. Even basic use with Windows 7 Starter is horribly slow. But I did pay for it! Installing Firefox instead of the IE made browsing much faster though.

Installing Kubuntu was a breeze initially, nothing much to say about that.

The Biggest Task: Basic Configuration

While KDE is great, it unfortunately is not great out of the box. In fact, it appears rather broken in many ways.

Using Regular Desktop

Kubuntu seems to start the "Plasma Netbook" workspace by default. It might be nice for your grandmom or your kids, but for you it isn't. To use a regular desktop, select in the Control Panel "Workspace Appearance and Behavior / Workspace Behavior / Workspace" and select "Desktop" in the Workspace Type. Click Apply and you're much happier.

Tree View in Control Panel

The KDE Control Panel originally had a tree view. In some 3.x version, it was changed to a more "iconic" view, for worse I think. It is still possible to get the tree view simply by clicking Configure in the Control Panel and selecting the Classic Tree View.

With trees or icons, the KDE Control panel is really a huge forest and it can sometimes take ages to find what you want. Sometimes the search functionality helps, sometimes you have to resort to Google to find the settings you want, sometimes it's somewhere else.

Traditional Start Menu

At some point in recent history, KDE wanted to mimick the Vista start menu, which is just as awful in KDE as it is in Windows. To replace it with a traditional start menu, right-click the panel and select Panel Options / Add Widgets. Drag and drop the Application Launcer Menu to the panel. To reposition it in the panel, click the Panel Tool Box at the right end of the panel, select the button, and move it to left. To remove the default launcher, right-click it and select Remove this Application Launcher.

While you're viewing the Panel Tool Box, also select More Settings / Auto Hide. This gives you plenty of more space in the already too small screen.

Desktops and Keyboard Navigation

One of the most important features in KDE is built-in desktop navigation. It has multiple desktops in which you can group windows. These were actually disabled after installation for some reason. To configure them in Control Panel, select Workspace Appearance and Behavior / Workspace Behavior / Virtual Desktops. Often the default is four desktops, I like to use eight. After using same configuration for 15 years, navigation has come pretty easy.

Very importantly, you can navigate between the desktops quickly from keyboard, just like you can navigate between windows with Alt+Tab and Alt+Shift+Tab. The keyboard navigation was actually the reason why I switched to it some 15 years ago from fvwm2 (don't even ask what that is).

The problem is that the proper desktop navigation keys are no longer enabled by default. In fact, because of a bug introduced in Kubuntu 11, they can't be configured from any of the settings at all! The only way to set them is to edit
.kde/share/config/kglobalshortcutsrc and set the following:
Walk Through Desktop List=Meta+Tab,none,Walk Through Desktop List 
Walk Through Desktop List (Reverse)=Meta+Ctrl+Tab,none,Walk Through Desktop List (Reverse)
("Meta" means the "Win" key.) Strangely, the issue was fixed in last October (2011), but the fix was apparently not included in Kubuntu 12.04.

Because of another bug, it's no longer possible to use Win+Shift+Tab in KDE. The keyboard combination simply doesn't work. It was quite annoying to lose that shortcut, as I used it for al-most 15 years, until it was broken in KDE 4.

To get the settings in use, you need to restart KDE by logging out and in again.

Basic Window Management

Unbelievably, KDE windows do not have a "Minimize" button by default! The only way to minimize them is to click the window menu (at the top-left corner) and select Minimize. To enable a Minimize button, you have to customize window buttons. In the Control Panel, select Workspace Appearance and Behavior / Workspace Appearance / Window Decorations, then Configure Buttons. In the dialog, you can drag&drop buttons, such as the Minimize, to the window title bar.

To be able to minimize windows from the keyboard, the shortcut is defined entirely elsewhere in the Control Panel. Select Common Appearance and Behavior / Shortcuts and Gestures / Global Keyboard Shortcuts, and then select KWin in the KDE Component. So, I have to know that this simple shortcut is part of this "KWin" thing, reall obvious. There, set the Minimize Window button to Win+- (Meta+-). While you're at it, you could also set the "Maximize Window" to Win++ or something.

Forcing Windows to Particular Desktops

Normally, when an application opens up a child window, for example a warning, it appears in the current desktop. This is not normally desirable, as it messes up the grouping of windows in desktops. For example, if you have Skype pop up chat windows automatically, you soon have them in every desktop. It becomes a problem.

You can force the windows of a particular application to always open in a fixed desktop. In Control Panel, select Workspace Appearance and Behavior / Window Behavior / Window Rules. The configuration is somewhat complex so I won't go into much details.

You can actually do really many things with the functionality, it's almost like
programming. You can control the desktop, size, positioning, and countless other parameters of windows.

And of course, KDE allows saving the "session", so that after you shutdown the computer and start up and log in again, it restores the session with all the windows. The behaviour can be configured in Control Panel in System Administration / Startup and Shutdown / Session Management. You can choose to save the session automatically when logging out, or just manually, or not at all. Restoring does not restore the applications to the same state though. For some applications, it can save some state parameters, such as the current folder and such, and even which document you were editing. How much state information is restored depends on the application.

Optimizing Performance

It isn't really meaningful to have flashy graphics effects when using a slow netbook. While the basic 2D hardware acceleration seems to work quite well with the GMA 3600 graphics adapter, some effects can be really hard on the poor GPU. In the Workspace Appearance and Behavior / Desktop Effects, disable Enable desktop effects at startup and "Various animations".

You could set the "noatime" option in /etc/fstab. Normally, Linux keeps record of the latest access time for each file and directory. You can see the access times for example with "ls -lu". That recordkeeping requires writing to disk, which takes a bit time, and with flash disks would also consume the prescious rewrite cycles. Just edit the file (with sudo) and add the "noatime" option in the options column, separated with a comma. The setting is used after the next boot.

I am sure there are tons of other optimizations you could do, so the above are just the starters.

Update: The D270 came with just 1 GB of memory, which seemed to fill up pretty fast with KDE 4 and especially when running Java stuff. I got a 2 GB comb and now it works much faster.

Remaining Issues

The remaining problems are:
  • External display (VGA or HDMI) does not work and I have found no mentions how it should work. Apparently it is possible to get it work if they sell the D270 preinstalled with Linux.
  • The keys for changing display brightness do not work. The issue is known with the Aspire One and should be solvable.
  • Kwin has crashed once or twice during a day. This issue is really annoying on my home desktop computer as it can occur several times in an hour. I hope it isn't as bad.

Wednesday, January 18, 2012

Wikipedia and Antipiracy Laws

So, if you have noticed, we've had a Wikipedia blackout. I normally use Wikipedia to look up dozens of articles daily, so I'd be pissed if their protest wasn't really valid.

As innocent they sound, the "Intellectual Property" laws are a big threat, really. They are somehow understandable, which is the reason why they exist, but at the same time, they may be a big threat to modern civilization.

You might think that they are not a problem to you, as they only prevent criminals from making crimes. You might even think that you want your intellectual properties be protected.

Their aim is to prevent illegal copying. Artists and others work so that they would get paid, and illegal copying is kind-of stealing from them. So, forbidding illegal copying is rather understandable.

So what's the fuzz about?

Let's consider the problem with DVDs. They use the "CSS" encryption mechanism to prevent unauthorized copying. Fine, excellent, evil pirates suffer, right?

Unfortunately, watching CSS-encrypted movies requires special software that holds a special decryption key. The software is usually free-of-charge, but it's only for Windows, and perhaps for Mac as well. For Linux, which I use, there is no such authorized software for watching DVDs.

Fortunately, some Norwegian guy cracked the CSS key and wrote a decryption algorithm some 10 years ago and now there's "DeCSS", an algorithm to play (and copy) any DVDs.

So, over the years I've bought some 200 DVD movies and I've always watched them with Linux and nothing else. I've never copied a DVD that I've bought, only watched them.

However, using the DeCSS algorithm for any purpose is illegal in Finland. It's been tried in court.

The fact is that, once cracked, CSS became totally obsolete forever. The laws will never have any effect on unauthorized copying. But they will continue to prevent morally right use of your property.

So, pirates who operate illegally of course use the DeCSS decryption to make one copy which they then copy to millions. But people like myself, who buy DVD movies legally, are criminals. Trying to stop a few criminals, they incriminate perhaps millions of Linux-users around the world.

So why should you care? Linux users are somewhat rare, and you're probably not one of them (except if you use any of the 60% of the web or 55% of smartphones or a TV).

Oh, but it also affects Windows users. There's free DVD watching software for Windows as well, such as VLC, which is actually quite popular as it's very good. But it's illegal, as it has to use DeCSS. The laws prevent writing and distributing any free software that you could use to watch DVDs.

Obviously, preventing the use of free software to watch legal DVDs was not the purpose of the laws. It's just a consequence.

It's a good example of a case where somewhat understandable reasons lead to absurd results. Even so, the vast majority of the Finnish parliament supported the law. And there is a lot more IP legistlation on the way.

Oh, did I mention that Finnish consumers can legally copy movies and music for their own use and to friends. We even pay a tax for that when we buy DVD-Rs. But copying by circumventing CSS is illegal.

Given the absurd criminalization and heavy anti-"piracy" lobbying to take away your rights, you should have no sympathy for the movie industry. O'hoy pirates! Go and board them!

So, to SOPA or PIPA...

I'm not personally familiar with the new legistlation initiatives in the USA. As far as I've understood, it's something similar as the recent Finnish laws that allow blocking child porn and peer-to-peer download sites. The laws already have a sad history of abuse. For example, the laws do not allow blocking websites inside Finland, but they've nevertheless done so as there's no possibility to legally challenge the decisions.

The pattern is that "reasonable requirements" can have devastating effects. The current laws are largely based on the assumption that you are responsible for your own publications. The suggested laws place the responsibility on the owners of web servers and internet providers. So, if me or you were to publish the DeCSS code here in the blog, the Blogspot would be considered the "publisher" that is responsible for our writings. To protect itself, Blogspot would need to have editorial review for everything any one of the millions of bloggers write.

This would quickly kill almost all blogs, discussion forums, and websites in the Internet. Also Youtube and such. It would kill the basic freedoms that we take for granted, and most of the Internet.

Part of the Finnish goverment already has plans to expand the blocking further. Some want to block information about drugs and weapons. Then racism of course, blasphemy, information about bombs, porn, denying the Holocaust, undemocratic thought, ... anything to protect the children, leaders, gods, and corporate owners.

Even though basic IP laws may be necessary, the recent development upholds corporate ownership rights over consumer ownership rights. They are used to buttress dentrimental monopolies and force you to pay vastly overcharged prices, even for basic necessities. They distinguish diversity and freedom, which are the life forces of the modern technological and scientific ecosystem.

So when you see the blackout screen at Wikipedia, just imagine the day when it could be blacked out by your government.

Thursday, November 10, 2011

Windows behind the background

I've had a lot of trouble with my dual screen setup with Kubuntu 11.10. It works like a dream when you set up it at first. The trouble starts when you turn off either or both of the monitors and then turn them on. KDE is "intelligent" so that it tries to switch between the single and dual display set up depending on what displays are on. Unfortunately, the result is rather uncontrolled and random.

So, this morning I arrived at work and opened my laptop first...MISTAKE! I should have turned on the external monitor instead. So, it did not just not work, but also got completely stuck. So, I restarted kdm from console screen. After that, the behavior got really odd. No windows were visible. I could see them in the task panel, but they were nowhere. Then, I switched to the 3D cube view and I could see them - behind the background!

So, apparently the background is no longer a "root image" in X, but a window itself, and it has a Z index. I was able to bring the windows forth by right-clicking them in the task bar and selecting "Advanced -> Keep Above Others". But that was rather nasty thing to do. Then occasionally, the panel itself would drop below the background image and using the machine became impossible. Even restarting the machine did not help, apparently the Z index of the background was saved in system configuration. Great.

I traced the problem to .kde/share/config/plasma-desktop-appletsrc. Apparently, the background is managed as a desktop applet (aka "desktop widget") and each has a zvalue parameter defined in the configuration.

I did not trace the issue further, just removed the file. Apparently others have met the same issue, hence this post.

Thursday, October 29, 2009

Playing in Order

I've been fighting with my E90 for a few hours to get it play the MP3s of the Lord of the Rings audio books in proper order. It's not so easy.

First, I had to set proper track and disk information in the MP3s. This was easy enough with the Amarok music player for KDE. It allows easily editing the metadata, also in a group of files. There was some hand work to edit the track numbers, which took about half an hour for the 20-disk set.

Another and a more strange problem was that my E90 orders the MP3s to play in the directory order. The directory order is a low-level technical order in which files are stored in a directory (folder), and is not necessarily the same as the alphabetical order. Apparently, in FAT, the directory order is the order in which the files are written. In Linux, however, the directory order can be about anything, depending on the file system. In the EXT3 filesystem, the order seems pretty random and is probably the order of some hash table.

Unfortunately, every copy program, such as Konqueror, scp, or the command line "cp", copies the files in the directory order, so it's not possible to trivially copy files to a phone or MP3 player in alphabetical order. One solution is to use a specially ordered copy operation from command-line.

In my case, I had the MPs of the 20 CD audio book ordered under per-disk directories, so I had to use the following somewhat complex copy command:
for dir in `ls /home/magi/data/mp3/Sormuksen\ ritarit/`; do
echo `ls -Q /home/magi/data/mp3/Sormuksen\ ritarit/$dir/*.mp3` "/media/Magi\ 2G\ u1/Sounds/Digital/Sormuksen\ ritarit/$dir/" | xargs cp -v
done
An alternative would be to first write everything to the player in any order and then use the "mv" command to move the files to a temporary directory, and then remove the original directory and rename the temporary directory as the original.

Moreover, if you have earlier written the MP3s to E90 in one order, it remembers the order even if you rewrite the files in another order. You first have to remove them from the player application, then write them again in the proper order, and only then you can play them properly.

References
Some other solutions in Linux Forum: Change the order of files in a directory.

Thursday, August 27, 2009

N900 vs iPhone

Hi, I collected a rough list of some features. The list is not exhaustive and there may be some important features in software and interoperability that are not covered. Please comment and I'll add new notes.

N900iPhone 3GS
Basic stuff
Size111x60x18mm116x62x12mm
Weight181 g133 g
Screen Size3.5 inch3.5 inch
Screen Resolution800x480320x480
Screen Colors65536 colors?262144 colors
Screen materialplastic?glass
Touchscreen techresistivecapacitive
Touchscreen fingersonetwo
Built-in keyboardyesno
Screen keyboardyesyes
Computing
ProcessorARM Cortex A8ARM Cortex A8
Processor speed600 MHz600 MHz
Graphics acceleratorPowerVR SGXPowerVR SGX
RAM256 MB256 MB
Virtual memory768 MBnone
SSD storage, internal32 GB16/32 GB
External storageup to 16 GB (MicroSD)none
Software
Operating systemLinux-basedDarwin-based
Web BrowserMozilla-basedSafari
Zoomingyes, one-fingeryes, two-finger
Adobe Flash supportFlash 9.4none
Javapossiblynone
Skypeyesno
Video formatsmp4, .avi, .wmv, .3gpmp4, m4v, mov?
Video codecsH.264, MPEG-4, Xvid, WMV, H.263H.264, MPEG-4?
Music formats.wav, .mp3, .AAC, .eAAC, .wma, .m4am4a, ...?
Open application developmentyesno
Music/software storeNokia OviiTunes, App Store
Operator locknoyes
Misc hardware
Camera5 Mpix3 Mpix
Video recordingyes, 16:9yes
Video size and rate848x480 @ 25fps640x480 @ 30fps
Microphonestereomono?
Geotaggingyesyes
GPSA-GPSA-GPS
Cell-based navigationyesyes
Accelometeryesyes
Wireless network802.11 b/g802.11 b/g
Video outyes (PAL/NTSC, WLAN/UPnP)yes
FM transmitteryesno
Headphone connector3.5 mm3.5 mm
Compassnoyes
Replaceable batteryyesno
Other
Designed in Finlandyesno
Jesus uses itnoyes