Arch Linux: Gnome 3.10 on Wayland

Gnome 3.10 on Wayland

Gnome 3.10 on Wayland

Gnome 3.10 has initial Wayland support and hit the Arch Linux repositories lately, time to give it a try! The gnome packages are available with Wayland support, namely gnome-shell (which includes the gnome-shell-wayland binary) and mutter-wayland.

But I soon realized, that running Gnome on Wayland using Arch is not possible without some work: Firing up mutter-launch with the gnome-shell-wayland, lead to this error:

$ CLUTTER_BACKEND=wayland mutter-launch --verbose -- gnome-shell-wayland --wayland
...
(gnome-shell-wayland:18781): mutter-ERROR **: Spurious exit of X Wayland server

Gnome (or more specific, mutter, the Gnome window manager/compositor) needs a working XWayland version. XWayland is a X-Server running as a Wayland client. Its only used for non Wayland compatible clients, but is a mandatory requirement for mutter right now. The X-Server in the Arch repositories does not support this mode, hence another package is necessary. Read more »

Canon PowerShot S100 on Arch Linux

My digital camera Canon PowerShot S100 was not detected by Arch Linux automatically despite i’ve installed the required libgphoto2 package. Googling around I found a fix: It looks like GPhoto2 tries to load the wrong driver due to the ambiguous camera name (Canon released two cameras with the same name). The easiest way fixing this is disabling the old driver:

# mkdir /usr/lib/libgphoto2/2.5.2/disabled/
# mv /usr/lib/libgphoto2/2.5.2/canon* /usr/lib/libgphoto2/2.5.2/disabled/

Read more »

Arch Linux on BeagleBone Black from USB-Stick

This guide shows how to install Arch Linux using a USB-Stick. A running U-Boot installation is required, in my case this was U-Boot 2013.04 which came with the original image. Next, I created a memory stick. I followed the documentation of Arch Linux ARM, I just used a USB stick instead of a Micro SD-Card. Now, plug the USB stick into your Beagle Bone Black and press a key to get the U-Boot prompt. U-Boot has the ability to boot from a USB stick, but some custom commands are required. First you need to scan the USB bus system.

U-Boot# usb reset
(Re)start USB...
USB0: scanning bus 0 for devices... 1 USB Device(s) found
 scanning usb for storage devices... 1 Storage Device(s) found

Read more »

Linaro on Arch Linux

In order to use the Linaro ARM cross-toolchain on Arch Linux, some 32-Bit Libraries need to be available. Arch Linux supports multiarch too, just enable the packages in your /etc/pacman.conf:

[multilib]
Include = /etc/pacman.d/mirrorlist

Update your packages

pacman -Sy
:: Synchronizing package databases...
 core is up to date
 extra is up to date
 community is up to date
 multilib 104.5 KiB 148K/s 00:01 [##################################] 100%

Unlike in Debian based distribution the GNU C Library package is called lib32-glibc. Additionally needed libraries by GCC (such as libstdc++6) are included in the package lib32-gcc-libs.

pacman -S lib32-glibc lib32-gcc-libs lib32-zlib

Ubuntu: HP Smart Array Controller Status

The HP Smart Array Controller series which can be found in most HP Servers today is supported by the Linux Kernel driver hpsa. The utility hpacucli helps to communicate with the Controller. But this utility flaws native 3.x Kernel support in Ubuntu 12.04 (Precise Penguin). The command ctrl all show doesn’t show any controllers:

=> ctrl all show

Error: No controllers detected.

The command setarch helps to work around this by causing the programm to see a kernel version number beginning with 2.6:

sudo setarch x86_64 --uname-2.6 hpacucli
=> ctrl all show

Smart Array P410i in Slot 0 (Embedded) (sn: 500xxxxxx)

See also Ubuntu Bug https://bugs.launchpad.net/ubuntu/+source/linux/+bug/890768.

Flash BeagleBone Black using Linux

BeagleBone Black

BeagleBone Black

Today I received my BeagleBone Black! For 45$ you get more power and even HDMI. There is also a serial debug port now on a distinct header connected to UART0 of the CPU. The user can connect to this serial port with a TTL converter (like the FTDI-USB-Cables) and a terminal emulator. Set the baudrate of 115200 and you should be able to see U-Boot, the boot process and a login prompt in the end. Everything worked fine, except when I tried to connect using SSH it failed with an error:

$ ssh 192.168.7.2
ssh_exchange_identification: Connection closed by remote host

I could no figure out how to resolve this on the currently running firmware so I followed a tip on the mailing list to just upgrade the firmware. On linux this is normally a fairly easy process, one has just to decompress the image and pipe it to a SD-Card.

unxz --stdout BBB-eMMC-flasher-2013.04.13-DDR3-400MHz.img.xz | dd of=/dev/mmcblk0

Read more »

Database Mail issues on SQL Server 2008

On a SQL Server 2008 (SP3) Express Edition I tried sending an E-Mail using the Database Mail feature. I kept getting an error message in the Server Logs (use Management Studio and browse to Management\Server Logs in the Object Explorer on the left side) when trying to send an E-Mail:

Exception Type: Microsoft.SqlServer.Management.SqlIMail.Server.Common.BaseException
Message: The read on the database failed. Reason: Fehler beim Laden von 'Msxmlsql.dll'.
Data: System.Collections.ListDictionaryInternal
TargetSite: Microsoft.SqlServer.Management.SqlIMail.Server.Objects.QueueItem GetQueueItemFromCommand(System.Data.SqlClient.SqlCommand)
HelpLink: NULL
Source: DatabaseMailEngine

I could resolve this issue by coping the files …\Microsoft SQL Server\msxmlsql.dll and Microsoft SQL Server\Resources\1033\msxmlsql.rll to the SQL Server instance folder Microsoft SQL Server\MSQL10.[INSTANCE]\MSSQL\Binn.

Linux: Trace file system activity of a process

To trace file system activity of a process the Linux utility strace can be used. strace traces all system calls, but using the -e trace=file option gives a nice output about file system activity of a given process. This gives a similar output to the SysInternals Process Monitor which I used sometimes on Windows.

In order to use the utility for a multithreaded program (like Java) the -f parameter helps too. Using the output of strace (blue text) I could manage to find a missing file which crashed a Java program:

 [pid 5997] open("/home/sag/My Documents/BookSmartData/log-2013.04.11-00.29.57.txt", O_RDWR|O_CREAT|O_EXCL, 0666) = -1 ENOENT (No such file or directory)
 java.io.IOException: No such file or directory
 at java.io.UnixFileSystem.createFileExclusively(Native Method)
 at java.io.File.createNewFile(File.java:947)
 at com.blurb.booksmart.util.vent.Vent.writeLogFile(Vent.java:388)
 at com.blurb.booksmart.util.vent.Vent$ExceptionHandler.handle(Vent.java:369)
 at com.blurb.booksmart.util.vent.Vent$BookSmartThreadGroup$1.run(Vent.java:510)
 at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251)
 at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:727)
 at java.awt.EventQueue.access$200(EventQueue.java:103)
 at java.awt.EventQueue$3.run(EventQueue.java:688)
 at java.awt.EventQueue$3.run(EventQueue.java:686)
 at java.security.AccessController.doPrivileged(Native Method)
 at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
 at java.awt.EventQueue.dispatchEvent(EventQueue.java:697)
 at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
 at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
 at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
 at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
 at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
 at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)

Deploy ownCloud from Source using Git

ownCloud Logo

ownCloud Logo

ownCloud is a great piece of open source software. It allows you to share files easily like Dropbox or Google Drive (including fancy drag and drop upload on newer browsers), but gives you the control of your data, since you can host an instance yourself!

My goal was to test the latest ownCloud 5 snapshot from Github. I do have SSH access on destination server, so my goal was to deploy it directly using Git. Be warned: The master branch from Github can (and will) contain bugs! But you get bleeding edge and you can help testing the software.  Read more »

Cortex-M3 supervisor call (SVC) using GCC

The Cortex-M3 has a new assembler instruction SVC to call the supervisor (usually the operating system). The ARM7TDMI used to call this interrupt SWI, but since this interrupt works differently on Cortex-M3, ARM renamed the instruction to make sure people recognize the difference and implement those calls correctly. The machine opcode however is still the same (bits 0-23 are user defined, bits 24-27 are ones).

On the Cortex-M3, other interrupts can interrupt the processor during state saving of the SVC interrupt (late arrival interrupt handling). Those late arriving interrupts most certainly leave the registers corrupted after execution. Therefor we cannot read the parameters form registers r0 to r4 directly as we could on the ARM7TDMI using SWI interrupts. Fortunately, the Cortex-M3 saves all registers used in standard C procedure call specification (ABI) on the stack. So the SVC handler can get the parameters directly from the stack.

Cortex-M3 stack frame

Cortex-M3 stack frame

Read more »