Sunday, May 29, 2016


By default, Slackware restarts from hibernation following the standard booting, loosing the state previously saved in the swap partition. To solve this, I edited the boot loader configuration, which in my case is ELILO. This is the result.

# /boot/efi/EFI/Slackware/elilo.conf

# The prompt line tells ELILO to display a prompt for you to choose a kernel.

# tells ELILO to wait 5 seconds for you to respond. (This value is specified in 
# tenths of a second.) If you don't respond, it boots the image specified by the 
# default line.

# Sets the default stanza to load (the name is sets by 'label=').

# chooser specify kernel chooser to use: 'simple' or 'textmenu'.

# delay specifies the number of tenths of a second the boot loader should wait 
# before automatically booting a locked command line, a command line pre-stored 
# by "lilo -R", or the default 'image=' or 'other='.

# Stanzas
label = Slackware
root = /dev/sda3

The magic here is done by the line append="resume=/dev/sda2", now ELILO knows that it have to start Slackware from the swap partition.


Keyboard layout

My notebook has a German keyboard and I need to write in Spanish frequently. The default German layout (no death keys) works fine but it doesn't allow to write the ñ letter. The legacy version uses death keys and allows to write the lovely ñ.

Just choose the German variant German (legacy) as keyboard layout in the Input devices section of the System Settings. This solves the problem on the ~80% of the cases

To configure the same layout in Xorg, I create the following config file.

# /etc/X11/xorg.conf.d/52-keyboard.conf

Section "InputClass"
    Identifier "evdev keyboard catchall"
    MatchIsKeyboard "on"
    MatchDevicePath "/dev/input/event*"
    Driver "evdev"
    Option "XkbLayout" "de"
    Option "XkbVariant" "legacy"

Now the legacy variant is also used by default in other windows managers (I use to use Window Maker sometimes). Now the problem is solved for the ~90% of the cases.

Linux console:
To change the default keyboard layout, create the file:

# /etc/rc.d/rc.keymap

# Load the keyboard map.  More maps are in /usr/share/kbd/keymaps.
if [ -x /usr/bin/loadkeys ]; then

Now every thing is configured correctly.

Synaptics touchpad configuration in Xorg

I wanted to customize the configuration of the Synaptics' driver because the click buttons were swapped and I wanted to disable it while typing.

This is the Xorg configuration file I wrote:

# /etc/X11/xorg.conf.d/50-synaptics.conf
Section "InputClass"
Identifier "touchpad"
Driver "synaptics"
MatchDevicePath "/dev/input/event*"
MatchIsTouchpad "on"
 Option "TapButton1" "1"
 Option "TapButton2" "3"
 Option "TapButton3" "2"
 Option "VertEdgeScroll" "on"
 Option "VertTwoFingerScroll" "on"
 Option "HorizEdgeScroll" "on"
 Option "HorizTwoFingerScroll" "on"
 Option "EmulateTwoFingerMinZ" "40"
 Option "EmulateTwoFingerMinW" "8"
 Option "PalmDetect" "1"
 Option "PalmMinWidth" "10"
 Option "PalmMinZ" "100"

The touchpad is not really disabled while typing. Instead, it is sensitive to recognize the palm when I touch it accidentally, avoiding to do a click.

Saturday, March 26, 2016

Office 2010 in Wine + winetricks

It is possible to run Office 2010 (Professional Plus, x86) in Linux using Wine (1.8 Staging, 64 bits, -compat32). Its performance is good enough but it needs some tweaks. I followed the following procedure to install it and make it functional.

1. Create a new WINEPREFIX:
$ WINEARCH=win32 WINEPREFIX=~/.wine/Office2010_32  winecfg

2. Change the screen dpi in order to improve the fonts and GUI visualization:
$ WINEPREFIX=~/.wine/Office2010_32 winecfg 
Graphics > Screen resolution: 180 dpi > OK

3. Mount the Office 2010 ISO file:
# mkdir -p /run/media/userx/dvd
# mount -t iso9660 -o loop ./officeproplus2010uk32.iso /run/media/userx/dvd

4. Run the installer:
 $ WINEPREFIX=~/.wine/Office2010_32 wine /run/media/userx/dvd/setup.exe

5. Register and play.
This is another story.

In case of problems or errors, try with:
6. Configure the DLL:
$ WINEPREFIX=~/.wine/Office2010_32 winecfg
gdiplus (native)
msxml6 (native)
riched20 (native)
> OK

7. Install MS XML Core Service 6.0 sp1 (solves the problem of saving files):
$ WINEPREFIX=~/.wine/Office2010_32 winetricks 
Install and app > Cancel > Install a Windows DLL or Co/ mponent > OK > (check) msxml6 > OK
[I need to check the DLL configuration]

8. Create the folder ~/.wine/Office2010_32/drive_c/users/userx/Recent :
This avoids the creation of multiple .lnk files when you work in Office. The files will be created anyway, but inside the mentioned directory not in the office file's folder.
$ mkdir -/.wine/Office2010_32/drive_c/users/userx/Recent

I couldn't make work the uninstaller program, first I tried with the wine uninstaller program, but I got an error after launching the Office uninstall application.
$ WINEPREFIX=~/.wine/Office2010_32 wine uninstaller

So, I uninstalled Office 2010 by brute force. 
1. Delete the wineprefix where it is installed:
$ rm -rf ~/.wine/Office2010_32

2. Remove the menu and desktop entries:
$ rm -f ~/.config/menus/applications-merged/wine-Programs-Microsoft\ Office*
$ rm -rf ~/.local/share/applications/wine/Programs/Microsoft\ Office/
$ rm -f ~/.local/share/desktop-directories/wine-Programs-Microsoft\ Office*

3. Remove the Office applications icons:
Do it by hand looking in the folder: ~/.local/share/icons/

4. Remove the extensions .desktop definitions (remove from "Open With ..."):
Do it by hand looking in the folder: ~/.local/share/applications/

Wednesday, January 27, 2016

MB865: Hard Reset

  • Press both Volume keys, and then hold Power.
  • Wait for Boot Mode to load and use Volume Down to scroll.
  • Select Android Recovery and press Volume Up when in this mode.
  • When the logo shows up, press both Volume keys until the menu appears.
  • Select Factory Reset using Volume buttons and move further with Power.
  • Choose Yes and confirm it with the same Power button.
  • After all files all deleted, press Power to choose Reboot System Now.

  • Saturday, January 23, 2016

    Sound in Slackware64 current (14.2)

    After installing Slackware64-current (2015.12.29) I did not have sound neither in the speakers nor in the headphones. So I checked how ALSA had detected the soundcards:

    $ cat /proc/asound/cards
    0 [HDMI ]: HDA-Intel - HDA Intel HDMI
                   HDA Intel HDMI at 0xb211c000 irq 50
    1 [PCH  ]: HDA-Intel - HDA Intel PCH
                   HDA Intel PCH at 0xb2118000 irq 47

    So, ALSA configured the HDMI card as first device and it used it as default. Connecting the HDMI port to a TV the sound flew from the TV speakers. The problem was solved by switching the name of both cards in the file /etc/modprobe.d/snd-hda-intel.conf

    options snd-hda-intel model=auto

    alias char-major-116 snd

    alias snd-card-0 snd-hda-intel
    alias snd-card-1 snd-hda-intel

    options snd-hda-intel id=PCH index=0

    options snd-hda-intel id=HDMI index=1

    After rebooting, the sound started to work properly in the speakers and headphones. Auto-mute mode worked fine as well. 

    $ cat /proc/asound/cards
    0 [PCH   ]: HDA-Intel - HDA Intel PCH
                    HDA Intel PCH at 0xb2118000 irq 47 
    1 [HDMI ]: HDA-Intel - HDA Intel HDMI
                    HDA Intel HDMI at 0xb211c000 irq 50

    In the other hand, connecting the HDMI port did not change the sound output. In other words, although there was video in the TV, the sound came out from the computer's speakers or headphones.  
    The solution of this problem is not trivial. Some people try to solve it changing the default card every time they use a different card. Although it seem that it is possible to build a script to overwrite the setting (defined in /etc/asound.conf) i found this solution too dirty. Instead, I followed the idea of cloning the sound from one card to the another, so, always in both cards (PCH and HDMI) will sound the same audio and will be possible to just mute the computer's speakers when it will be connected to a TV.

    After a couple of hours looking for a solution and a lot of try and error, I found a good reference to follow. Finally, The solution consisted in configure ALSA to create a virtual device which route the audio to both devices. Also, the configuration solves the error that occurs when multiple applications try to access to the virtual card at the same time. The configuration is made in /etc/asound.conf :

    # /etc/asound.conf
    pcm.PCH {
            type hw
            card 0
            device 0 }
    ctl.PCH {
            type hw
            card 0
            device 0 }        

    pcm.HDMI {
            type hw
            card 1
            device 7 }     

    ctl.HDMI {
            type hw
            card 1
            device 7 }        

    pcm.PCHDmixed {
       type dmix
       ipc_key 1024
       ipc_key_add_uid false
       ipc_perm 0666
       slave {
           pcm "PCH"
           period_time 0
           period_size 2048
           channels 2
        bindings {
           0 0
           1 1

    pcm.HDMIDmixed {
       type dmix
       ipc_key 2048
       ipc_key_add_uid false
       ipc_perm 0666
       slave {
           pcm "HDMI"
           period_time 0
           period_size 2048
           channels 2
        bindings {
           0 0
           1 1

    pcm.both {
        type route;
        slave.pcm {
            type multi;
            slaves.a.pcm "HDMIDmixed";
            slaves.b.pcm "PCHDmixed";
            slaves.a.channels 2;
            slaves.b.channels 2;
            bindings.0.slave a;
            bindings.1.slave a;
            bindings.2.slave b;
            bindings.3.slave b;
        ttable.0.0 1;
        ttable.1.1 1;
        ttable.0.2 1; 
        ttable.1.3 1; 

    pcm.!default {
            type  plug
            slave.pcm "both"}
    ctl.!default {
            type  hw
            card PCH}

    The sections pcm.PCHDmixed  and pcm.HDMIDmixed are needed to face the problem with concurrent sound from different applications. The section pcm.both defines a new PCM consisting of 4 channels, two from the PCH card and two from the HDMI card. PCM is a stereo card and, I guess, HDMI is it as well (at least the TV is it). The magic is finally done by routing the audio channels to the correct speakers (physical channels). This is done by the ttable sentence. It took me a bit long to understand the logic behind but finally I understood the syntax as follow: gain

    Here, the speakers are coded as: 0 = front left; 1 = front right; 2 = rear left; 3 = rear right;  4 = center; 5 = subwoofer. Meanwhile, channel is the number of the binding connected to an audio channel. Finally, gain is a factor applied to modify the loudness of the channel (0.5 -> 50%).

    In between I found that ALSA stores it last parameters in the file /var/lib/alsa/asound.state (there is a link in /etc/) which is written when the computer shutdown. There is a method to temporarily remove it in this link.

    I did a fast check connecting a TV and it works fine. But, I think, it still need to be tested with details.

    Update: Skype reported that there is not mic available. It is needed to configure a capture channel with dmix. 

    Tuesday, December 15, 2015

    Asus UX305LA: Hardware

    # lscpu
    Architecture:          x86_64
    CPU op-mode(s):        32-bit, 64-bit
    Byte Order:            Little Endian
    CPU(s):                4
    On-line CPU(s) list:   0-3
    Thread(s) per core:    2
    Core(s) per socket:    2
    Socket(s):             1
    Vendor ID:             GenuineIntel
    CPU family:            6
    Model:                 61
    Model name:            Intel(R) Core(TM) i7-5500U CPU @ 2.40GHz
    Stepping:              4
    CPU MHz:               799.968
    CPU max MHz:           3000.0000
    CPU min MHz:           500.0000
    BogoMIPS:              4789.33
    Virtualization:        VT-x
    L1d cache:             32K
    L1i cache:             32K
    L2 cache:              256K
    L3 cache:              4096K

    # lspci 
    00:00.0 Host bridge: Intel Corporation Broadwell-U Host Bridge -OPI (rev 09)
    00:02.0 VGA compatible controller: Intel Corporation Broadwell-U Integrated Graphics (rev 09)
    00:03.0 Audio device: Intel Corporation Broadwell-U Audio Controller (rev 09)
    00:04.0 Signal processing controller: Intel Corporation Broadwell-U Camarillo Device (rev 09)
    00:14.0 USB controller: Intel Corporation Wildcat Point-LP USB xHCI Controller (rev 03)
    00:16.0 Communication controller: Intel Corporation Wildcat Point-LP MEI Controller #1 (rev 03)
    00:1b.0 Audio device: Intel Corporation Wildcat Point-LP High Definition Audio Controller (rev 03)
    00:1c.0 PCI bridge: Intel Corporation Wildcat Point-LP PCI Express Root Port #1 (rev e3)
    00:1c.3 PCI bridge: Intel Corporation Wildcat Point-LP PCI Express Root Port #4 (rev e3)
    00:1f.0 ISA bridge: Intel Corporation Wildcat Point-LP LPC Controller (rev 03)
    00:1f.2 SATA controller: Intel Corporation Wildcat Point-LP SATA Controller [AHCI Mode] (rev 03)
    00:1f.3 SMBus: Intel Corporation Wildcat Point-LP SMBus Controller (rev 03)
    00:1f.6 Signal processing controller: Intel Corporation Wildcat Point-LP Thermal Management Controller (rev 03)
    02:00.0 Network controller: Intel Corporation Wireless 7265 (rev 59)

    # lsusb
    Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
    Bus 001 Device 004: ID 064e:9700 Suyin Corp. Asus Integrated Webcam
    Bus 001 Device 003: ID 8087:0a2a Intel Corp. 
    Bus 001 Device 002: ID 045e:07a5 Microsoft Corp. Wireless Receiver 1461C
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

    # lsblk 
    sda      8:0    0 238.5G  0 disk 
    |-sda1   8:1    0   100M  0 part /boot/efi
    |-sda2   8:2    0     8G  0 part [SWAP]
    |-sda3   8:3    0    20G  0 part /
    `-sda4   8:4    0 210.4G  0 part /home

    # free
                  total        used        free      shared  buff/cache   available
    Mem:        8059700      482956     6882264      234844      694480     7278928
    Swap:       8388604           0     8388604

    # hdparm -i /dev/sda 


     Model=Micron_M600_MTFDDAV256MBF, FwRev=MA01, SerialNo=15130F491CAF
     Config={ Fixed DTR>10Mbs }
     RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=0
     BuffType=unknown, BuffSize=unknown, MaxMultSect=16, MultSect=off
     CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=500118192
     IORDY=on/off, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120}
     PIO modes:  pio0 pio3 pio4 
     DMA modes:  mdma0 mdma1 mdma2 
     UDMA modes: udma0 udma1 udma2 udma3 udma4 udma5 *udma6 
     AdvancedPM=yes: unknown setting WriteCache=enabled
     Drive conforms to: unknown:  ATA/ATAPI-3,4,5,6,7

     * signifies the current active mode

    Sunday, June 23, 2013

    Installing Slackware 14 from a USB drive

    The following notes collect important tips to consider in the installation of Slackware 14.

    Before any modification in my computer I use to load a USB drive with Slax, in case something goes wrong I can use it to fix problems or to find help on Internet.
    1. Download Slax
    2. Install it in a USB drive (this erase all data in it).
      1. Extract Slax inside it.
      2. Run the script for make it bootable.
    3. Boot one time to try it and to verify all works fine.
    Downloading Slackware by torrent.
    I like download the DVD ISO by using torrent, you can find it in the Slackware official site (~2,3GiB).

    Installing the complete distribution in the USB drive and do it bootable
    1. To mount Slackware iso image, it should be done by root user: # mount -t iso9660 -o loop /.../slackware-14.0-iso/slackware-14.0-install-dvd.iso /media/dvd
    2. Go to /../usb-and-pxe-installers folder: $ cd /media/dvd/usb-and-pxe-installers/
    3. Type $ sh -h to getting help.
    4. With the pendrive unmounted run this command as root: $ sh -f -s /media/dvd/ -o /dev/sdc where -s /media/dvd/ is the folder were Slackware tree is mounted, and /dev/sdc the path to the pendrive. -f is the parameter to format the pendrive. Note that pendrive shouldn't be mounted before run this script, if you do it, unplug it and plug it again but without mounting it.
    Booting from the USB drive
    If the computer doesn't boot automatically from the USB drive, you will have to find the correct configuration inside the BIOS setup. Usually you have to change the order of the devices that can boot the system, put the USB drive in the first place. In some systems the USB drive have to be plugged to appears in the devices list.

    Kernel selection
    After the Slackware installer boots it will ask you for witch kind of kernel should it use. You have two options: huge.s and hugesmp.s, the first should be used in computer with single processor while the second in multiprocessors computers. I have chose hugesmp.s.

    Preparing the hard drive
    This time I have change the partitions in the hard drive, I have created one for the / folder (20GiB, ext4), another for swap (2GiB, linux swap), a third for the /home folder (80GiB, ext4) and the rest available space in a fourth partition for a testing area (ext4).

    Installing Slackware
    I use to avoid the installation of games and FAQs, then I chose the complete installation without prompting.

    A good practice is to mount the /home folder in a different partition. This helps when you do an update of the operating system conserving users files and configurations.

    Sunday, October 07, 2012

    Configuring Slackware 14

    Lilo Configuration
    By default Lilo gives two options of OS to start, Windows and Linux, and wait a minute to run automatically the first option. I just have Slackware in my PC so it is unnecessary that Lilo asks and wait.

    To change the default Lilo behavior you have to change /etc/lilo.conf, this is what I have changed.

    1. No waiting until systems starts. Comment prompt line
    # Wait until the timeout to boot (if commented out, boot the
    # first entry immediately):

    2. No Windows option. Comment or delete the Windows section at the end of the config file:
    #other = /dev/sdb1
    #label = Windows
    #table = /dev/sdb

    3. Use the command compact to skip memtest and start the system quickly.

    To apply any modification to the boot loader it is necessary to run the command lilo.
    # lilo

    Configuring the system to multi user with session manager
    Most of the time I use KDE, so I prefer start KDM it when the system goes up. To do that you have to change the default runlevel configuration in file /etc/initab to the option 4:
    # 4 = X11 with KDM/GDM/XDM (session managers)
    # Default runlevel. (Do not set to 0 or 6)

    After booting in runlevel 4 the computer showed an error with the sound card and didn't play any sound. This is because in runlevel 4 users don't belong the audio group, so you have to add your user to it.

    # usermod -aG audio user_name

    This problem can affect other resources, as scanners, printers, etc the solution should be adding the user to the appropriate group.

    Network manager configuration
    In this distribution KDE gets its own network manager, if you want to use it just changes permissions of rc.networkmanager:
    # chmod 755 /etc/rc.d/rc.networkmanager

    In case you prefer wicd, you have to install it from /extra/wicd folder in the Slackware installation DVD and change permission to /etc/rc.d/rc.wicd to 755 after installation.