Saturday, October 19, 2013

One Week of Linux

So, it's been just over a week since I switched my laptop over to a dual-boot setup with Windows 8 and Linux Mint 15. (Has it really only been one week?!)




Despite spending a bit of time tinkering with the settings/configuration of this setup practically every day (well, technically, it's still within my standard 1-2 week "bedding in period") - usually to get something new working, to try out whether another workflow would be better, worrying about whether the heat-management issue is under control (*), or just fighting the updates/package managers for the nth time after they managed to corrupt themselves in a new way - I've also managed to basically get quite settled in to the new setup to the point where it's basically gotten out of my way and let me get on with some of the work that I'm really supposed to be doing (which was kindof the whole point of setting this up now instead of staking it out in Windows 8)! Speaking of Windows, I've now gone for practically an entire week without booting back into it at all.

Where to begin...

Wifi
Although when testing the Live CD, I originally ran into quite a few problems with Wifi stability and reliability, these seem to (touchwood) have ironed themselves out over recent days. Namely, it was originally frequently dropping out/timing out and sluggish, making web browsing a hit and miss game. However, things now seem to be working quite well, and it seems that any problems that have been occurring have been instead to do with the Wifi Router + ADSL modem - the pair of them have been wreaking havok for the internet connectivity of all devices around the house. Just yesterday afternoon, I was getting frequently kicked on and off, on and off the network, while other devices were frequently timing out randomly.

Perhaps the only problem I still have is that the Wifi indicator LED/switch on the keyboard doesn't actually work correctly. Wifi will be chugging away happily, but the indicator is still showing that it's disabled.


Default Screen Brightness
Although the backlight controls work well in general with the "acpi_backlight=vendor" GRUB fix described in earlier posts, it is usually set way too high at 100 on startup everytime.

After some Googling, I solved this by installing xbacklight, and adding "xbacklight -set 50" as a "Startup Application" which ensures that brightness gets set to a level which is easier on the eyes (and battery life!)


Battery Life (and Operating Temperature)
The other day, I tried operating on battery for a short period to test things out. However, to my dismay, battery life was almost half of what it was on Windows (it was listing just under 3 hours of battery time on Linux after 30 minutes, down from 4-5 after only running it for less than 10 minutes; compare that with almost 6-7 hours on Windows!).

I was also starting to get quite concerned about heat management - something that also cropped up during initial LiveCD testing, but seemed to go away after longer periods of use: initially, the top of the body beside the keyboard would also start warming up when using the LiveCD, but later on, things bedded down to the point where it would only continuously spew hot air and mid-speed fans out the side. Technically, it was reporting temperatures around the lower end of 40-50 deg C in the "idle" state (but with Firefox open), and 45-60 deg C when the processor was put under load (e.g. compiling or watching videos).

After a bit of searching, I found that apparently the "Jupiter" plugin (now officially discontinued, but resurrected via a "jolicloud-team" ppa), which offers among other things an easy way to set the power profile and/or configure whether wifi/bluetooth are enabled. In practice though, I'm not really sure whether the power settings have made much of a difference (they're now on "Peformance On Demand" now), and the wifi on/off switch is basically useless...

I also tested adding "pcie_aspm=force" (which basically tells all utility devices to go to sleep if not being actively used) on the GRUB boot-line - for a one-off runtime trial only. During that session, I didn't notice any difference in performance or temperatures, so I figured that perhaps it wouldn't really have any appreciable effect on this setup. However, the next morning, when rebooting, I got a bit of a scare when Linux failed to boot (it froze with just the cursor on a black background). After doing a hard restart did it work again, and hasn't caused any further trouble.

Also, it also seems that things are not running quite as hot as they were initially - though I should also note that I've ended up making quite a few tweaks to the way that I do things, which may have contributed to this.

A nice command I've found for keeping an eye on things is:
watch sensors
which gives me a regularly updating readout of the various temperatures across the place.


Graphics Card Issues
I should also note that it has been said in a few places that when dealing with Optimus cards, the Nvidias will tend to be always on, and on full power if the Nvidia propriety drivers are not installed to turn them off - something which apparently contributes to battery drain and heat issues.

So far, I haven't started tackling these issues yet, since I've mainly been trying to get the other things sorted and have other work I need to attend to. At the moment, it looks like the earliest I can start tackling that would be next week, though the start of next month is more likely.

In the meantime, I still need to figure out the exact procedure to take, and where to get Bumblebee + NVidia Propriety drivers from. With the nasty hacks I've put in place to get things running at all, the "Propriety Drivers"  window in Mint is currently showing absolutely nothing :(


Sound - Beats Audio
Following the instructions here http://www.reddit.com/r/linux/comments/17sov5/howto_beats_audio_hp_laptop_speakers_on/, I managed to get better sound output quality. Previously, it sounded like only two of the speakers were working,
and that the sound they produced ended up lacking bass. However, now it seems to give a more full-blooded sound (though the "rear" audio is perhaps not quite configured correctly yet, since it sounds like it's all still coming out of one speaker :/)



On a side note, I really love the squarish notification popup centered at the bottom of the screen when you use the keyboard to change the volume (a similar one shows up for brightness). For a few days after one of the updates, this mysteriously went away and changed to a small ugly thing in the top right corner - with no sound feedback - but it has magically come back today, after doing another update for unrelated stuff. Weird!


Touchpad
Perhaps the other troubling hardware-related issue is the touchpad. Or more specifically: palm strike, accidental clicks, and a jiggling cursor which will readily zip off to the side of the screen and then slowly slide around the edge.

Even with all the settings I've configured so far, I'm no closer to having these problems really nutted out yet, since I still get occasional palm-strike problems. Though, at least things are under a bit more control now than they were initially!

Things which seem to have helped:
1) Added another "Startup Application" with the command "synclient MaxTapTime=0". This disables "Tap to Click" - one of the greatest annoyances and dangerous features of all touchpads! Normally, it only causes issues when using the touchpad to move the cursor around (for long distances). But here, it's a lot worse than that as palm-strike often ends up being interpreted as taps/clicks, making things highly dangerous!

2) Installing gpointing-device-settings helped to alleviate palm-strike problems (set Palm Range to Wide, Sensitivity to LowTapping disabled, and all Speeds - Accel, Min, Max - to Low), but it only works while the session is running (i.e. it gets reset). I ended up having to install dconf-editor and set the MaxAccel -> 0, and some other setting to get it at least a bit less likely to cause trouble.


Still, things are not ideal. I still get a lot more palm-strike related cursor jiggling from time to time (especially after restart), though at least it's generally non-lethal when it does occur.


Package Management
I've been doing quite a lot of package installing over the past few days. For the first two days, updates generally seemed to work (though they were somewhat sluggish to query and download at times - including a tendency to stop on 99% for a few packages).

However, by the time it came to do the gpointing-device-settings install, it had somehow managed to screw itself over already with some "merge list" error. It took several rounds of:
sudo rm /var/lib/apt/lists/* -vf
sudo apt-get clean 
sudo apt-get update

to finally be rid of the problem (see http://askubuntu.com/questions/30072/how-do-i-fix-a-problem-with-mergelist-or-status-file-could-not-be-parsed-err) . Following that, I could start installing again, and could also clear the backlog of 240mb's worth of system updates I claimed I needed (at least Linux is upfront about the size of the downloads, what exactly they are, provides you with the option to install each one or not, and let's you ignore these for as long as you like). Among these updates was a much needed upgrade of Firefox to the latest version.


The next problem arose a few days later when trying to install the "build-essential" package - needed so that I could compile Blender (I ultimately didn't manage to compile it last night though - hence the briefly-broken build on trunk, though with the help of Sergey, I managed to have the patch I'd been working on for the Caminades team to be tested and committed successfully).

As it turns out, the default mirrors that Mint had been configured to using (notably, http://archive.ubuntu.org for the Ubuntu base, and something else I can't remember for the Mint part) appeared to be not only incomplete (i.e. missing critical packages like this), but were also very sluggish to respond (frequent timeouts when fetching updates), and riddled with GPG-key errors. As soon as I'd used the "Software Sources" tool to change these over to new mirrors (picking the ones it recommended as having the highest speed), all the previous errors went away, and I was left with a much faster package installing experience as well as being able to install the build-essential package. Yay! If only I'd known this a few days earlier!


Developing Blender


A fresh build of Blender - From earlier this evening!

So, last night I effectively developed a new feature for Blender while effectively working "blind". Apart from a few compiler errors (mainly missing includes, and two typos) it ended up worked out fine. Thanks to Sergey and Venomgfx for testing it out :)

At the same time, I ended up using (or rather, seriously trialling out) a new text editor (Sublime Text) to see whether it could be a good new "main text editor" on Linux. So far, I usually use Geany for serious coding (for the last 5 years, having found that it was the only one which came close to approximating what I liked and needed from Notepad++), and also use Vim for quick jobs. After last night, I think I'll need to give it another serious look over the course of a few more projects - there are definitely some things about it that flow a lot better than when using Geany.

However, getting the fix committed turned out to be quite a challenge. Complicating matters were 4 factors:
1) I'd ended up modifying the install_deps.sh file so that it would have my preferred config, meaning that I now had some files I needed to ignore
2) There were no graphical SVN clients I could use (or readily install - the package manager had somehow borked itself by that stage already).
3) The front-end for commandline SVN I'd previous written (DualitySVN) was not exactly working out that smoothly. Among the problems was the fact that it had been designed for SVN 1.6, whereas all modern systems use 1.7 (which boasts a new way of storing the SVN metadata, with everything now stored within a single folder at the root - a la Git). The most notable problem here was that this mean that the old tools to automatically configure a repository settings file weren't working automatically, and I had to end up scraping together this file by hand (from looking back at the source code!). The other problem was getting it successfully attached to the commandline so that I could launch it from anywhere - solved with 2 lines in a newly-created ~/.bashrc file ;)
4) Furthermore, rendering it completely useless was the fact that I hadn't properly configured up the passwords/authentication/etc. stuff, so when trying to commit, it failed spectacularly. Thus, I was forced to piece together the necessary SVN commands from the code once again, and slap together a way to commit the patch that way. All in all, a very nasty and ugly experience to have to perform.


TexMaker
One of the other key pieces of software I needed to install was TexMaker. Initially I started with the TexMaker package - a 500mb download (as it included the TexLive stuff, but apparently not one or two additional packages that were also strictly necessary. After using it for a few days, I discovered that that particular version had a number of annoying flaws (notably, not playing nice with BibTex - it would just fail but without any reasons given; constantly forgetting what my previous session was; and also lacking the hotkey to load the previous session).

Eventually I found the cause: the package was relatively old. Thus, I uninstalled it, and downloaded the new version from the software's website. The install process wasn't exactly without a hitch, since one of the the package managers had once again gotten it's knickers in a twist, and was blocking all software installs until its corrupted cache could be fixed (BLEGH! For the nth time in a week!).

Now, it functions relatively fine. However, now it uses the wrong icon set: namely, it uses the same icons as the rest of the OS, but those monochome icons become invisible in that UI! Since then, I've briefly tried patching together an alternative icon theme which combines the best of both worlds, but this has so far turned out to be far trickier than anticipated, since the default themes are quite a hodge-podge of different layouts, structures, and icon sizes :/ Any easy fixes here welcome :)


Icon Themes
Perhaps the most annoying parts of the icon theme are the fact that it dispenses with the default icons for a number of famous and well-loved icons. In particular, for: Firefox, VLC, GIMP, Geany, and Blender. The others I can live with (just!).

The way to change this is not exactly that obvious (I didn't realise that the buttons in question were clickable!). Thanks to caribriz for the help on how to do this. Namely:
Right-click Menu button > click Edit menu (Main Menu window opens)
In Left-hand column, under Applications, click Internet
In right-hand column, click on Firefox Web Browser
On right lower side of window, click Properties (Launcher Properties box opens)
In the Launcher Properties box, click on the Firefox icon on the left (Choose an icon window opens)
At the top left of window click on the "pencil" icon
in Location: type /usr/share/linuxmint/mintinstall/icons
Scroll down to "firefox.png", click it, click Open
Close Launcher Properties box and Main Menu
May need to logout/in
So far, all of these icons have proved amenable to these tweaks - all except Geany, which stubbornly refuses to accept ANY alternative icon that I've tried to give it. ARGH! 


I've also ended up theming the default "Mint Menu" button, which looked quite drab before.


Nemo
Nemo is the Nautilus replacement used in Mint/Cinnamon.  By and large it works quite nicely (at least far better than Windows/File Explorer in Windows 8!). However, I've noticed two big issues:

1) The "Paste" tool constantly flickers. It's as if there's a poorly implemented timer on 1-sec fresh intervals polling to see if there's anything on the clipboard. This looks really sloppy and disconcerting, and I suspect it's also contributing to some CPU load...

2) I've found that leaving a particular folder open ends up causing a constant 11% CPU load, which over a long time keeps the machine running quite hot. The folder in question is a git repository, with 1 PDF being regenerated from time to time (though usually not in the 30 minutes before the high cpu usage). Screenshot below:



Other Notes
As is customary for me when working with Cinnamon, I've set up 4 workspaces (instead of the default 2), made these cyclic, and set it up so that they are displayed as a grid in "Expo" (or whatever that's called). Workspaces is one of the coolest features ever IMO!

There have also been a few other tweaks I've made here and there, but these are the main things I've been tinkering with.

2 comments:

  1. I two used Linux mint for sometime and found it to be faulty whereby there were several crashes and I finally tried Linux Mint KDE which was a lot richer in quality and far fewer crashes. The interface appears to be much more refined and stable.

    ReplyDelete
  2. Lawrence D’OliveiroMarch 17, 2015 at 11:53 PM

    I did “apt-get build-dep blender” (get dependencies for (re)building the distro-provided Blender package) which got me a lot of the way towards being able to build Blender from the latest sources.

    ReplyDelete