27 December 2013

539. Laptop not suspending on closing lid in Debian Jessie/Gnome 3.8.4 -- need to use systemd

Edit: I suspect that there are solutions out there that don't require systemd. It just happened that this was the path of least resistance, at least for my laptop which has a fairly simple set up. Not sure my work cluster would be so straight-forward...

Original post:
Closing the laptop lid doesn't have any effect. dmesg returns
[95643.717984] systemd-logind[2731]: Lid closed.
[95643.718173] systemd-logind[2731]: Suspending...
[95648.722146] systemd-logind[2731]: Delay lock is active but inhibitor timeout is reached.
[95648.735369] systemd-logind[2731]: Failed to send delayed message: Launch helper exited with unknown return code 1
(also, why are we suddenly requiring systemd? I thought debian was going to be free from that...that...abomination...but I suppose this will be fixed before jessie goes stable in a couple of years)

Anyway, the issue seems to be that systemd hasn't got PID 1:
Working suspend/resume requires systemd to be PID 1 [1]. Boot with init=/bin/systemd for that.
And in my case I had
init=/sbin/bootchartd
in my GRUB_CMDLINE_LINUX_DEFAULT which I changed to
init=/bin/bootchartd
. Note that my full line is
GRUB_CMDLINE_LINUX_DEFAULT="quiet drm_kms_helper.poll=N init=/bin/systemd initcall_debug printk.time=y resume=UUID=8adf424c-c375-4035-8d5d-181489b4461b resume_offset=7182336"
where the resume commands are related to this post about hibernation using a swap file, and the drm_kms_helper.poll is related to this issue.

Anyway, rebooting gives
ps aux|grep systemd
root         1  0.1  0.1  46104  4668 ?        Ss   07:31   0:00 /bin/systemd
root       202  0.0  0.4 144868 18416 ?        Ss   07:31   0:00 /lib/systemd/systemd-journald
root       221  0.0  0.0  38500  2292 ?        Ss   07:31   0:00 /lib/systemd/systemd-udevd
root       877  0.0  0.0  37024  1760 ?        Ss   07:31   0:00 /lib/systemd/systemd-logind
message+   887  0.1  0.0  29148  2520 ?        Ss   07:31   0:00 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation

Closing (and opening) the lid gives

dmesg|grep PM
[..]
[  444.637761] PM: Syncing filesystems ... done.
[  444.668607] PM: Preparing system for mem sleep
[  444.784170] PM: Entering mem sleep
[  445.232203] PM: suspend of devices complete after 447.606 msecs
[  445.232862] PM: late suspend of devices complete after 0.650 msecs
[  445.277535] PM: noirq suspend of devices complete after 44.667 msecs
[  445.360219] PM: Saving platform NVS memory
[..]
[  445.509662] PM: noirq resume of devices complete after 100.525 msecs
[  445.510133] PM: early resume of devices complete after 0.295 msecs
[  447.065176] PM: resume of devices complete after 1555.037 msecs
[  447.151847] PM: Finishing wakeup.

i.e. it works.

So I'm now using systemd, I suppose. However, I have yet to explore whether I can still use my precious /etc/network/interfaces file. At least my network interfaces haven't been renamed using the systemd nomeclature which annoyed me so much back when I used Arch, and my /etc/udev/rules.d/70-persistent-net.rules are still respected.

25 December 2013

538. Briefly: Sort folders before files in nautilus 3.8

I'm running debian jessie (current testing) on my laptop and after having held off upgrading for a while since I had to take it to a conference and didn't want to risk ending up with a broken system, I finally took the leap. I notice that there are a lot of references to systemd in dmesg, but haven't had a look at what it actually means -- are we past init and fully switched to systemd now? Or how do I go about modifying my network configuration if I can't use /etc/network/interfaces?

Anyway, one annoying little thing is that in Nautilus the folder content by default is arranged in alphabetical order, regardless of whether it's a file or a directory. The old behaviour was to arrange folders in alphabetical order, then files.

Here's how to get it back to 'normal' behaviour:
 
The new behaviour
Click on the 'Files' menu on the top desktop bar, select preferences:
Check 'Sort folders before files' to get back the normal behaviour
Check sort folders before files to make Nautilus behave well again

18 December 2013

537. Building ECCE 7.0 on CentOS 6.4

Following a report that there were issues building ECCE 7 on Centos 6.4 I decided to investigate.

1. Download 
Download the centos 6.4 iso: At ftp://mirror.stanford.edu/pub/mirrors/centos/6.4/isos/x86_64/ I downloaded ftp://mirror.stanford.edu/pub/mirrors/centos/6.4/isos/x86_64/CentOS-6.4-x86_64-minimal.iso

wget ftp://mirror.stanford.edu/pub/mirrors/centos/6.4/isos/x86_64/CentOS-6.4-x86_64-minimal.iso

2. Install centos in virtualbox
Not much to say other than that I gave the VM 12 gb disk and 1024 mb ram.
During installation I selected Install or Upgrade an existing system (option 1).  I went with all the defaults during installation.

3. Basic setup
Following the installation I rebooted.

First I activated eth by editing /etc/sysconfig/network-scripts/ifcfg-eth0 and changing onboot from no to yes. I rebooted and installed Gnome

Then install X and gnome.
yum groupinstall -y 'X Window System'
yum groupinstall -y 'Desktop'
useradd verahill
passwd verahill

Edit /etc/inittab and change
id:3:initdefault:
to
id:5:initdefault:

Reboot.

Install openGL libraries. The way to do that depends on what graphics chip your have, e.g. libgl1-nvidia-glx for nvidia. In my virtualbox example I didn't have to do anything.  

4. ECCE
Launch gnome-terminal
Become root and install packages, then exit:
su
yum install vim csh gcc gcc-c++ gcc-gfortran java-1.7.0-openjdk-devel python-devel ant gtk2-devel libjpeg-turbo-devel libtool ImageMagick libXt-devel xterm mesa-libGLU-devel kernel-devel perl-Digest-Perl-MD5 perl-Digest-MD5
yum install 
exit
mkdir ~/tmp
cd ~/tmp
Download ecce from http://ecce.pnl.gov/using/download.shtml into ~/tmp
tar xvf ecce-v7.0-src.tar.bz2
cd ecce-v7.0/
export ECCE_HOME=`pwd`
cd build/
./build_ecce
./build_ecce
./build_ecce
./build_ecce
./build_ecce
./build_ecce
./build_ecce

Everything builds just fine.

You can then install the ecce_install.v7.0.csh file created in the parent directory by following e.g. this post: http://verahill.blogspot.com.au/2013/08/487-version-70-of-ecce-out-now.html