Temporary workaround for SIGSEGV problem of gnome-shell of debian sid.

After upgrading on debian sid, I found gnome-shell was always killed by SIGSEGV. This SIGSEGV was emerged from libcogl9.However I couldn't purge libcogl9 on debian sid ,because libcogl9 and many other packages depended to libcogl9 are released to repository of debian sid.There are no easy options to purge libcogl9.

According to a report (Bug#666889: Problem with this transition, leading to gnome-shell segfault on login), I downgraded to libclutter-1.0-0-1.8.4-1 which came from testing repository and also purged libcogl9.After that, gnome-shell of sid is successfuly worked again.

I memorized how-to below,

Step 1. Add testing(wheezy) repository to /etc/apt/sources.list,shown as below,

...snip...
deb http://ftp.debian.or.jp/debian/ wheezy main contrib non-free
deb-src http://ftp.debian.or.jp/debian/ wheezy main contrib non-free

Step 2. Set priority of testing(wheezy) lower than sid.

$ cat /etc/apt/preferences.d/testing
Package: *
Pin: release wheezy
Pin-Priority: 150
$ cat /etc/apt/preferences.d/unstable
Package: *
Pin: relase unstable
Pin-Priority: 500

Step 3. Get repository information of testing(wheezy),

env LANG=C sudo aptitude update

Step 4. Purge libcogl9 like this,

$ env LANG=C sudo aptitude purge libcogl9
...snip...
Accept this solution? [Y/n/q/?] e 
...After visual menu was invoked,choose 'Downgrade libclutter-1.0-0 to XXXX 
(unstable) to XXX(testing)' and choose 'Remove libcogl9'. After '.' key pressed,
confirm summary about downgrading of packages. After press 'g' twice,removing
and downgrade procedures are started.

Step 5. Try to restart gdm3 and login. Check gnome-shell works properly.

$ sudo /etc/init.d/gdm3 restart
...Login to your account....

Step 6. If gnome-shell works fine, put additionary pin settings preventing from accidentialy installing libcogl9.

$ cat /etc/apt/preferences.d/experimental
Package: libcogl9
Pin: release experimental
Pin-Priority: -100

Package: *
Pin: release experimental
Pin-Priority: 150
$ cat /etc/apt/preferences.d/unstable
Package: libcogl9
Pin: release unstable
Pin-Priority: -100

Package: *
Pin: release unstable
Pin-Priority: 500

Simpler workaround for missing input devices on X of debian experimental

I reported a workaround of missing input devices on X of debian experimental
(About missing input devices of xserver under debian sid/experimental. - nozzy123nozzyの日記)
However, I found a bug report (#670156 - xserver-xorg-core: input devices no longer detected - Debian Bug report logs) and tried this,

sudo aptitude install sysvinit/sid
sudo aptitude install initscripts/sid

After this,a problem about missing input devices on X was totaly disappeared.And also another problem about missing alsa devices by pulseaudio was disappeared.

Last, I simply hold version of sysvinit and initscripts prevented from accidentialy upgrading from debian experimental.

sudo aptitude hold sysvinit initscripts

Simple workaround for stucking http method of aptitude.

I memtioned before (Peek pipes of /usr/lib/apt/mothods/http. - nozzy123nozzyの日記), http method of aptitude is weird stucking while execution of update/upgrade.

This problem was already reported in another bug report (#669322 - aptitude: "Method http has died unexpectedly" with zh_CN.utf8 locale - Debian Bug report logs), so I memorize here simple workaround.

env LANG=C sudo aptitude update
env LANG=C sudo aptitude upgrade

That's all. Http metod works and also aptitude works fine.

Peek pipes of /usr/lib/apt/mothods/http.

I also met bug of aptitude reported as '#670479 - [aptitude] 'aptitude update' stucks at communication with /usr/lib/apt/methods/http - Debian Bug report logs '.
I felt an interest with internal communication with /usr/lib/apt/methods/http, so I tried to peek pipes. I memorize how-to here,

Step 1. Make another http file in other than /usr/lib/apt/methods,

$ pwd
/home/myname/prog/debug-apt/
$ cat > http
#!/bin/sh
PATH=/bin:/usr/bin
logdir=/home/myname/prog/debug-apt
tee $logdir/input.log | /usr/lib/apt/methods/http 2> $logdir/err.log | tee $logdir/output.log
$ chmod 755 ./http
$ ./http
100 Capabilities
Version: 1.2
Pipeline: true
Send-Config: true


$

Step 2. Invoke aptitude using http method stored in my home directory,

sudo aptitude -o Dir::Bin::methods=/home/myname/prog/debug-apt update

(If you might meet #670479 bug, pressing Ctrl+C is needed to come back from hanging up aptitude.)

Step 3. Examine logs using 'less input.log'

Referencing to sources of coreuitls, tee comand disables always input/output buffers.This is useful for peeking pipes without any side-effects.

According to examination of log, #670479 bug might cause some memory leaking in aptitude, it is becuase logs are filled with meaningless strings of hex code.

About missing input devices of xserver under debian sid/experimental.

Recently I upgraded my debian box using 'apt-get -t experimental full-upgrade'.However,I found xserver couldn't recognize any move of mouse and any input keyboard,so I couldn't do any thing after reboot my debian box.

I rebooted with rescue mode,and put 'exit 0;' into top of /etc/init.d/gdm3 script to prevent from invoking GDM. After reboot, I logged into my debian box with text console.

To safely do try and errors, I put lines to $HOME/.xsessionrc

xterm -geometry +500+400 &
(sleep 60;ps -auxww | fgrep X | fgrep -v fgrep | awk '{print $2}' | xargs kill ) &

This caused safely to stop xserver after 60 seconds,if xserver couldn't recive any action from input devices. After then, I did try and errors using startx command.

I checked /var/log/Xorg.0.log and several times invoked X, I realized evdev_drv.so missed keyboard/mouse devices of my PC. So I added additional configrations regarding to input devices of my PC into /etc/X11/xorg.conf like below,

# disable hotplugging feature of evdev.
Section "ServerFlags"
    Option "AutoAddDevices" "False"
EndSection
# stick to Keyboad0/mouse0 to corekeyboard/corepointer.
Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0"
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
EndSection
# Explicitly define input devices of my debian box.
# (I'm still using old type ps-mouse) 
Section "InputDevice"
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol" "auto"
    Option         "Device" "/dev/psaux"
    Option         "Emulate3Buttons" "no"
    Option         "ZAxisMapping" "4 5"
    Option         "CorePointer"
EndSection
Section "InputDevice"
    Identifier     "Keyboard0"
    Driver         "kbd"
    Option         "XKbdmodel" "pc105"
    Option         "XKbdlayout" "us"
    Option         "CoreKeyboard"
    Option         "XkdOptions" "terminate:ctrl-alt-bksp"
EndSection

And also I installed kbd_drv.so and mouse_drv.so like below,

sudo apt-get install xserver-xorg-input-kbd xserver-xorg-input-mouse

Next I invoked startx , then keyboad and mouse were properly worked!

I removed $HOME/.xsessionrc, and 'exit 0;' line from /etc/init.d/gdm3.

Reboot my PC again, GDM3 was porperly worked.

See also:
This problem was already reported by someone as #669949 - sysvinit: Break X11: no more mouse and keyboard - Debian Bug report logs.

Peek data in DBus

I wonderd to see what data flow in DBus,related to gnome applications . I memorize here how to watch the data.
To do this,simply use dbus-monitor like this,

dbus-monitor --session --monitor

And it shows the data like this,

...snip...
method call sender=:1.7 -> dest=:1.2 serial=379 path=/org/gnome/SessionManager; interface=org.gnome.SessionManager; member=IsInhibited
   uint32 8
method return sender=:1.2 -> dest=:1.7 reply_serial=379
   boolean false
method call sender=:1.7 -> dest=:1.2 serial=380 path=/org/gnome/SessionManager; interface=org.gnome.SessionManager; member=IsInhibited
   uint32 8
method return sender=:1.2 -> dest=:1.7 reply_serial=380
   boolean false
method call sender=:1.49 -> dest=org.freedesktop.Notifications serial=416 path=/org/freedesktop/Notifications; interface=org.freedesktop.Notifications; member=GetServerInformation
method return sender=:1.19 -> dest=:1.49 reply_serial=416
   string "gnome-shell"
   string "GNOME"
   string "3.2.1"
   string "1.2"
method call sender=:1.49 -> dest=org.freedesktop.Notifications serial=417 path=/org/freedesktop/Notifications; interface=org.freedesktop.Notifications; member=Notify
   string "Banshee"
   uint32 1
   string "audio-x-generic"
   string "Foo Bar (Foo Bar)"
   string "<i>by</i> foo"
...snip...