02 November 2014

600. gdm/gnome breakage in debian jessie October/November 2014

I did a dist-upgrade last night and encountered this on my next boot:
During the dist-upgrade I got a message about the nvidia driver version not being compatible with my system -- small surprise as I have an onboard intel chip and no external graphics card (it's a lenovo thinkpad SL410).

Installing kdm let me at least boot into a DM. I still couldn't launch gnome from kdm, it giving the same error message as in the photo.
Digging a bit deeper and looking at what happened before/during a crash:
journalctl
Nov 02 10:46:30 niobium kdm[1317]: Stopping K Display Manager: kdm...done. Nov 02 10:46:30 niobium systemd[1]: gdm.service: control process exited, code=exited status=1 Nov 02 10:46:30 niobium systemd[1]: Failed to start GNOME Display Manager. Nov 02 10:46:30 niobium systemd[1]: Dependency failed for X11 Display Manager. Nov 02 10:46:30 niobium systemd[1]: Unit gdm.service entered failed state. Nov 02 10:46:30 niobium kdm[1350]: Starting K Display Manager: kdm. Nov 02 10:46:30 niobium sudo[1311]: pam_unix(sudo:session): session closed for user root Nov 02 10:46:30 niobium console-kit-daemon[1707]: (process:1372): GLib-CRITICAL **: g_slice_set_config: assertion 'sys_page_size == 0' failed Nov 02 10:46:30 niobium console-kit-daemon[1707]: (process:1373): GLib-CRITICAL **: g_slice_set_config: assertion 'sys_page_size == 0' failed Nov 02 10:46:30 niobium console-kit-daemon[1707]: (process:1374): GLib-CRITICAL **: g_slice_set_config: assertion 'sys_page_size == 0' failed Nov 02 10:46:30 niobium kdm_greet[1378]: Cannot load /usr/share/kde4/apps/kdm/faces/.default.face: No such file or directory Nov 02 10:46:31 niobium systemd[1]: gdm.service: control process exited, code=exited status=1 Nov 02 10:46:31 niobium systemd[1]: Failed to start GNOME Display Manager. Nov 02 10:46:31 niobium systemd[1]: Dependency failed for X11 Display Manager. Nov 02 10:46:31 niobium systemd[1]: Unit gdm.service entered failed state. Nov 02 10:46:32 niobium console-kit-daemon[1707]: (process:1398): GLib-CRITICAL **: g_slice_set_config: assertion 'sys_page_size == 0' failed Nov 02 10:46:32 niobium console-kit-daemon[1707]: (process:1399): GLib-CRITICAL **: g_slice_set_config: assertion 'sys_page_size == 0' failed Nov 02 10:46:32 niobium console-kit-daemon[1707]: (process:1400): GLib-CRITICAL **: g_slice_set_config: assertion 'sys_page_size == 0' failed Nov 02 10:46:32 niobium systemd[1]: gdm.service: control process exited, code=exited status=1 Nov 02 10:46:32 niobium systemd[1]: Failed to start GNOME Display Manager. Nov 02 10:46:32 niobium systemd[1]: Dependency failed for X11 Display Manager. Nov 02 10:46:32 niobium systemd[1]: Unit gdm.service entered failed state. Nov 02 10:46:33 niobium systemd[1]: gdm.service: control process exited, code=exited status=1 Nov 02 10:46:33 niobium systemd[1]: Failed to start GNOME Display Manager. Nov 02 10:46:33 niobium systemd[1]: Dependency failed for X11 Display Manager. Nov 02 10:46:33 niobium systemd[1]: Unit gdm.service entered failed state. Nov 02 10:46:35 niobium systemd[1]: gdm.service start request repeated too quickly, refusing to start. Nov 02 10:46:35 niobium systemd[1]: Failed to start GNOME Display Manager. Nov 02 10:46:35 niobium systemd[1]: Dependency failed for X11 Display Manager. Nov 02 10:46:35 niobium systemd[1]: Unit gdm.service entered failed sta
GDM shouldn't be involved at all as I was using kdm.
systemctl -l status gdm.service
● gdm.service - GNOME Display Manager Loaded: loaded (/lib/systemd/system/gdm.service; enabled) Drop-In: /run/systemd/generator/gdm3.service.d └─50-gdm3-$x-display-manager.conf Active: failed (Result: start-limit) since Sun 2014-11-02 10:46:35 AEDT; 14min ago Process: 1405 ExecStartPre=/bin/sh -c [ "$(cat /etc/X11/default-display-manager 2>/dev/null)" = "/usr/sbin/gdm3" ] (code=exited, status=1/FAILURE) Nov 02 10:46:35 niobium systemd[1]: gdm.service start request repeated too quickly, refusing to start. Nov 02 10:46:35 niobium systemd[1]: Failed to start GNOME Display Manager. Nov 02 10:46:35 niobium systemd[1]: Unit gdm.service entered failed state.


The solution:
Either way, I now had enough keywords to start googling, and came across http://forums.debian.net/viewtopic.php?f=10&t=118305

Basically,
sudo apt-get purge nvidia-*
sudo apt-get purge libnvidia-ml1:i386 nvidia-smi:i386
sudo apt-get install glx-alternative-mesa
sudo apt-get --reinstall install gdm3

Launching gnome (standard) from kdm gave me prompts to set up the configuration for an installed extension (I miss the frippery extensions...). Not sure whether the breakage was related to the extension.
 Either way, everything is working properly now.

28 October 2014

599. Briefly: Suddenly bankid doesn't work/wont be recognised.

The system: firefox 31, nspluginwrapper 1.4.4, debian wheezy, amd64

I've used bankid with Swedish banks in the past. Right now I'm running into trouble though. When clicking on the login button on the bank website I'm taken to this page:
Starting firefox (v31, but the symlink is called firefox25) from the terminal to catch the error messages I get
(firefox25:5555): GLib-GObject-WARNING **: /tmp/buildd/glib2.0-2.33.12+really2.32.4/./gobject/gsignal.c:3397: signal name `load_complete' is invalid for instance `0x2b81340fc1f0' Gtk-Message: Failed to load module "atk-bridge" *** NSPlugin Viewer *** ERROR: NP_Initialize() get args: Message argument mismatch *** NSPlugin Viewer *** ERROR: rpc_end_sync called when not in sync! *** NSPlugin Wrapper *** ERROR: NP_Initialize() wait for reply: Connection closed Gtk-Message: Failed to load module "atk-bridge" *** NSPlugin Viewer *** ERROR: NP_Initialize() get args: Message argument mismatch *** NSPlugin Viewer *** ERROR: rpc_end_sync called when not in sync! *** NSPlugin Wrapper *** ERROR: NP_Initialize() wait for reply: Connection closed Gtk-Message: Failed to load module "atk-bridge" *** NSPlugin Viewer *** ERROR: NP_Initialize() get args: Message argument mismatch *** NSPlugin Viewer *** ERROR: rpc_end_sync called when not in sync! *** NSPlugin Wrapper *** ERROR: NP_Initialize() wait for reply: Connection closed Gtk-Message: Failed to load module "atk-bridge" *** NSPlugin Viewer *** ERROR: NP_Initialize() get args: Message argument mismatch *** NSPlugin Viewer *** ERROR: rpc_end_sync called when not in sync! *** NSPlugin Wrapper *** ERROR: NP_Initialize() wait for reply: Connection closed Gtk-Message: Failed to load module "atk-bridge" *** NSPlugin Viewer *** ERROR: NP_Initialize() get args: Message argument mismatch *** NSPlugin Viewer *** ERROR: rpc_end_sync called when not in sync! *** NSPlugin Wrapper *** ERROR: NP_Initialize() wait for reply: Connection closed Gtk-Message: Failed to load module "atk-bridge" *** NSPlugin Viewer *** ERROR: NP_Initialize() get args: Message argument mismatch *** NSPlugin Viewer *** ERROR: rpc_end_sync called when not in sync! *** NSPlugin Wrapper *** ERROR: NP_Initialize() wait for reply: Connection closed Gtk-Message: Failed to load module "atk-bridge" *** NSPlugin Viewer *** ERROR: NP_Initialize() get args: Message argument mismatch *** NSPlugin Viewer *** ERROR: rpc_end_sync called when not in sync! *** NSPlugin Wrapper *** ERROR: NP_Initialize() wait for reply: Connection closed (firefox25:5555): GLib-GObject-WARNING **: /tmp/buildd/glib2.0-2.33.12+really2.32.4/./gobject/gsignal.c:3397: signal name `load_complete' is invalid for instance `0x2b812a4f52e0'

The solution was to do
/usr/lib/nspluginwrapper/x86_64/linux/npconfig  -a -v -u
Auto-update plugins from /usr/lib/mozilla/plugins Looking for plugins in /usr/lib/mozilla/plugins Auto-update plugins from /home/me/.mozilla/plugins Looking for plugins in /home/me/.mozilla/plugins Update plugin /home/me/.mozilla/plugins/npwrapper.libplugins.so nspluginwrapper ident mismatch, reinstalling plugin Install plugin /usr/local/lib/personal/libplugins.so into /home/me/.mozilla/plugins/npwrapper.libplugins.so

as described by the nspluginwrapper maintainer (David) in a reply on http://www.geeklab.info/2011/11/reconfigure-nspluginwrapper/

24 October 2014

598. Move /var, /tmp, /opt to separate partitions

1. First create the partitions on a disk. In my case I created partitions on a different disk from the root partition.

2. Figure out the uuids:
ls /dev/disk/by-uuid -lah
lrwxrwxrwx 1 root root 10 Oct 22 14:02 28b59809-7dfb-4ce4-a4da-6f118171ea07 -> ../../sdb2 lrwxrwxrwx 1 root root 9 Oct 22 14:45 52f07f83-3a72-457c-b25f-7aa4f3e76461 -> ../../sdc lrwxrwxrwx 1 root root 10 Oct 7 14:42 8a5ca4ae-9963-47ea-99c3-2335c7dc8118 -> ../../sda6 lrwxrwxrwx 1 root root 10 Oct 7 14:42 9243ff6b-9834-4fa3-a93f-10a350f85687 -> ../../sda1 lrwxrwxrwx 1 root root 10 Oct 22 14:02 9f785dde-1d3a-4063-90e7-054f3d031e05 -> ../../sdb3 lrwxrwxrwx 1 root root 10 Oct 22 14:02 eacf2cad-d462-45b2-afeb-2c5ddf5669b8 -> ../../sdb4 lrwxrwxrwx 1 root root 10 Oct 7 14:42 f25a484c-e8e2-4ead-808b-96dd5e915020 -> ../../sda5 lrwxrwxrwx 1 root root 10 Oct 22 14:02 f4280c34-04d6-4def-963a-507e68dd483d -> ../../sdb1
I know that I'm looking for sbd2 (label: tmp), sdb3 (label: opt) and sdb4 (label: var). We'll use these uuids later for our /etc/fstab

3. Move /opt, as it's the easiest (should be reasonably static).

sudo udisks --mount /dev/sdb3
Mounted /org/freedesktop/UDisks/devices/sdb3 at /media/opt
sudo cp -ax /opt/* /media/opt

Edit /etc/fstab:
 
UUID=9f785dde-1d3a-4063-90e7-054f3d031e05 /opt ext4 defaults,user_xattr 0 2

Move the old /opt and mount the new one:
sudo mv /opt /opt.old
sudo mount /opt

And you should be good to go. Check with df -h:
[..] /dev/sdb3 72G 28G 41G 41% /opt

4. Move /var and /tmp

You can use init 1 according to http://unix.stackexchange.com/questions/131311/moving-var-home-to-separate-partition. Note that doing so will kill your graphical session and stop or restart most of the services i.e. close open documents before your continue. You'll then get dumped into a vty.

Open a terminal and type
 
init 1

which dumps you into a root terminal. Then, as root, do
 
mkdir /media/var
mount /dev/sdb4 /media/var
cp -ax /var/* /media/var
mkdir /media/tmp
mount /dev/sdb2 /media/tmp
cp -ax /tmp/* /media/tmp
mv /tmp /tmp.old
mv /var /var.old
mkdir /tmp
chmod 777 /tmp
mkdir /var
umount /media/var
umount /media/tmp

Changing the permissions for /tmp is important -- if they aren't generous enough it can cause all sorts of issues. In my case it was manifested by me being unable to log onto a GUI (e.g. gnome) from GDM3 -- I would get booted back to the login screen.

Edit /etc/fstab and add:
UUID=28b59809-7dfb-4ce4-a4da-6f118171ea07 /tmp ext4 defaults,user_xattr 0 2 UUID=eacf2cad-d462-45b2-afeb-2c5ddf5669b8 /var ext4 defaults,user_xattr 0 2
Note: I don't know what the best values for the attributes are. I just took what I used for /home, which is probably not optimal. You may want to do your own research into this. Then do

mount /tmp
mount /var
init 2

Once you've established that all is well you can delete /var.old and /tmp.old.
df -h shows
Filesystem Size Used Avail Use% Mounted on rootfs 92G 32G 56G 37% / udev 10M 0 10M 0% /dev tmpfs 798M 1.1M 797M 1% /run /dev/disk/by-uuid/9243ff6b-9834-4fa3-a93f-10a350f85687 92G 32G 56G 37% / tmpfs 5.0M 0 5.0M 0% /run/lock tmpfs 4.6G 88K 4.6G 1% /run/shm /dev/sda6 734G 555G 142G 80% /home /dev/sdb3 72G 28G 41G 41% /opt /dev/sdb2 72G 53M 69G 1% /tmp /dev/sdb4 48G 8.8G 37G 20% /var