Thursday, July 27, 2017

Slackware 14.2

Slackware 14.2 was released two days ago and, although I'm running an updated -current version, I want to use this milestone to do a complete new, fresh and clean installation. But with some customisation of course. This first post is only to organise the installation and system configuration.

There are two major tuning I want to do. First is installing multilib capabilities, which I need mainly to run Skype and Wine, and second to change KDE 4.x with Plasma 5. I'm using the Plasma 5 packages made by AlienBob for a wile and I could say that it works pretty ok. There are still some small details still laying around but the performance is most than acceptable and I like the new look of Plasma 5

Another change I want to do this time is to move Slackware to Unicode UTF-8. This is not something that I really need, but I just want to try it.

There are a couple of thinks to which I want to set special care. One is a problem I have already with the Suspend to Ram feature. I have not spent so much time in this, but now is time to solve it. Second is the HDMI port sound. Now I have to change manually the sound device output to the HDMI port, otherwise, the sound still remains flowing by the computer speakers. I guess I need to recheck this because Slackware 14.2 adds Pulseaudio, and I guess that could change a bit the sound cards configuration.

[Update] I had to change my laptop and now I have one with a Kaby Lake Intel processor (Asus UX330U). This detail did a big difference in Slackware, the current kernel version used in Slackware64 14.2 and -current (4.4.x) are not compatible with this microarchitecture. Although the computer was able to boot, Xorg failed, showing the error message "(EE) no screens found (EE)". The problem was discussed in the Slackware forum, where I was suggested to upgrade the kernel to one above 4.5. After building the 4.8.10 version, the problem was solved. I have added a new item in the list below considering this additional step in the Slackware 14.2 setting up.

Details for the step by step process, problems solving and comments are in another posts:

- Booting the Slackware installer from a USB drive in UEFI mode.
- Packages selection and extra software.
Keyboard configuration.
Internationalisation.
- Kernel upgrade.
Elilo configuration.
- Fine tuning.
- Adding Plasma 5.
- Adding Mutilib.
- Setting Hidpi.
- Sound configuration.
- Installing Wine and MS Office 2010. (What is the devil doing here!??)

Thursday, December 01, 2016

Asus UX330UAK - 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:                 142
Model name:            Intel(R) Core(TM) i7-7500U CPU @ 2.70GHz
Stepping:              9
CPU MHz:               719.866
CPU max MHz:           3500.0000
CPU min MHz:           400.0000
BogoMIPS:              5800.00
Virtualization:        VT-x
L1d cache:             32K
L1i cache:             32K
L2 cache:              256K
L3 cache:              4096K
Flags:                 fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca pu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcmi1 avx2 smep bmi2 erms invpcid mpx rdseed adx smap clflushopt xsaveopt xsavec xg

--------

# lspci 
00:00.0 Host bridge: Intel Corporation Device 5904 (rev 02)
00:02.0 VGA compatible controller: Intel Corporation Device 5916 (rev 02)
00:04.0 Signal processing controller: Intel Corporation Device 1903 (rev 02)
00:14.0 USB controller: Intel Corporation Device 9d2f (rev 21)
00:14.2 Signal processing controller: Intel Corporation Device 9d31 (rev 21)
00:15.0 Signal processing controller: Intel Corporation Device 9d60 (rev 21)
00:15.1 Signal processing controller: Intel Corporation Device 9d61 (rev 21)
00:16.0 Communication controller: Intel Corporation Device 9d3a (rev 21)
00:17.0 SATA controller: Intel Corporation Device 9d03 (rev 21)
00:1c.0 PCI bridge: Intel Corporation Device 9d10 (rev f1)
00:1c.6 PCI bridge: Intel Corporation Device 9d16 (rev f1)
00:1f.0 ISA bridge: Intel Corporation Device 9d58 (rev 21)
00:1f.2 Memory controller: Intel Corporation Device 9d21 (rev 21)
00:1f.3 Audio device: Intel Corporation Device 9d71 (rev 21)
00:1f.4 SMBus: Intel Corporation Device 9d23 (rev 21)
02:00.0 Network controller: Intel Corporation Wireless 8260 (rev 3a)

-------

# lsusb
us 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 8087:0a2b Intel Corp.
Bus 001 Device 002: ID 0bda:58d1 Realtek Semiconductor Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

-------

# lsblk 
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:0    0 238.5G  0 disk
├─sda4   8:4    0 172.2G  0 part /home
├─sda2   8:2    0    16G  0 part [SWAP]
├─sda3   8:3    0    50G  0 part /
└─sda1   8:1    0   250M  0 part /boot/efi

-------

# free
              total        used        free      shared  buff/cache   available
Mem:       16292976     1189296    10928604      579460     4175076    13969620
Swap:      16777212           0    16777212

-------
# hdparm -i /dev/sda

/dev/sda:

 Model=SanDisk SD8SNAT256G1002, FwRev=Z2317002, SerialNo=163432426328
 Config={ }
 RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=0
 BuffType=unknown, BuffSize=unknown, MaxMultSect=1, MultSect=off
 (maybe): 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 pio1 pio2 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-4,5,6,7

 * signifies the current active mode



Saturday, November 26, 2016

Kernel upgrade

As I mention in another post, Kaby Lake processors are not supported by the kernel version currently used in Slackware 14.2 and -current (4.4.x). So, in order to use Slackware in a system using this architecture, it is need to upgrade the kernel to someone above 4.5. In this case I used the version 4.8.10, the last stable available in that moment.
In general the upgrading was done by following the procedure explained in Aliens Bob's wiki. In simple, it is as follow:

- Configure the EFI boot loader to show two options, one with the old kernel and other with the new one. This is a bit different at what is explained in the Alien's wiki, because he uses lilo instead of elilo (it is an old post), but the situation is almost the same, even easier. I did this before compiling because I wanted to be sure that the configuration and both booting options were working properly (I loaded the same kernel in both option).

- Download the Kernel sources.
$ wget https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.8.10.tar.xz

- Check the source authenticity.
# wget https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.8.10.tar.sign
# gpg --keyserver wwwkeys.pgp.net --recv-keys 38DBBDC86092693E
# gpg2 --verify linux-4.8.10.tar.sign

- Extract the source to a local directory.
# tar -Jxvf linux-4.8.10.tar.xz

- Download an initial .config file from a Slackware mirror.
$ wget http://mirrors.slackware.com/slackware/slackware64-current/testing/source/linux-4.6-configs/config-generic-4.6.x64

- Configure the Kernel compilation.
# make oldconfig
# make menuconfig

- Make and Install.
# make bzImage modules
# make modules_install

- Add the new Kernel to elilo.
# cp arch/x86/boot/bzImage /boot/efi/EFI/Slackware/vmlinuz-custom-4.8.10
And edit to image=vmlinuz-custom-4.8.10 the second boot option in elilo.conf.

- Reboot.

Wednesday, July 27, 2016

Setting Hidpi

I did not set the DPI in Xorg. I just change in KDE the font DPI to 166 pp. This setting works fine for almost everything inside KDE but the xterm is not affected and the font looks tiny. In Window Maker everything looks small as well, but I don't know if it is possible to change that.

Another point to improve is the font size in the tty consoles, now it is very small. I know how to do it but I still have to.

Just to remember, the screen resolution is 3200 x 1800 @ 276 ppi.

Fine tuning

There was several acctions I had to take in order to configure the system better.

- I forgot to set the network during the installation, and I like to use a differnt hostname than the default. To run the network configuration program run the command:

# netconfig


- I changed the kernel from Huge to generic, I did it by following this procedure stated in SlackDocs. The only one difference was the configuration of lilo, in my case, I'm ussing elilo, so the procedure is a bit different.
I copyed the Slackware bootloader folder in EFI partition (/boot/efi/EFI/Slackware) and I renamed as Slackware-generic (/boot/efi/EFI/Slackware-generic), then I copyed the files /boot/vmlinuz-generic-4.4.14 and the RAM disk /boot/initrd.gz which were created previously into the Slackware-generic folder. Then, it is needed to modify the elilo configuration file to:

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

chooser=simple
delay=1
timeout=1
default=Slackware-generic
#
image=vmlinuz-generic-4.4.14
    initrd=initrd.gz
    label=Slackware-generic
    root=/dev/sda3
  append="resume=/dev/sda2"
    read-only

This configuration includes the line that enables hibernation ("resume=/dev/sda2").

To finish I added the Slackware-generic boatloader to the UEFI boot configuration using the computer's firmware menu


- In Windowmaker, I used nm-applet to connect to a wifi network. The application loads in the system tray, so first it is needed to install and load wmsystemtray.


- I set the network time protocol script to run at starting the computer.

# chmod 755 /etc/rc.d/rc.ntpd

and I used the confuguration file:

# /etc/ntp.conf

driftfile /etc/ntp/drift
logfile /var/log/ntp.log

server 0.nl.pool.ntp.org
server 1.nl.pool.ntp.org
server 2.nl.pool.ntp.org
server 3.nl.pool.ntp.org

server 127.127.1.0
fudge 127.127.1.0 stratum 10

restrict default nomodify nopeer notrap
restrict 127.0.0.1 mask 255.0.0.0

Keyboard layout

My current laptop uses a German keyboard (QWERTZ), also I use to use another US-international, so I have to configure the system to use both.

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 ñ.

Linux console:
To change the default keyboard layout, create the file:
# /etc/rc.d/rc.keymap

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

Xorg
This settings will affect all the Xorg application, thats include KDE and Window Maker. Just create the following config file.

# /etc/X11/xorg.conf.d/90-keyboard-layout.conf

Section "InputClass"
Identifier "keyboard-all"
MatchIsKeyboard "on"
MatchDevicePath "/dev/input/event*"
Driver "evdev"
Option "XkbLayout" "de"
Option "XkbVariant" "legacy"
Option "XkbOptions" "terminate:ctrl_alt_bksp"
EndSection

KDE
Normaly KDE will use the keymap defined by Xorg, but in the case you want to set it again in KDE, just choose the German variant German (legacy) as keyboard layout in the Input devices section of the System Settings.

There still a problem prowling around. It is the special keys, most of them works ok with the exception of the airplane mode and the increase and decrease brightness. They doesn't work, I think they are not visible in linux, but I have to check this.

Also I have to try what happens with the second keyboard, I have not tried yet.

Tuesday, July 19, 2016

Internationalization

Normally I use to handle files in Spanish, English a few in Dutch and nowadays others in German. The traditional en_US locale have worked nicely since I started with Slackware. Additional to the classic issue of the decimal separation symbol ('.' instead of ','), which can be  solved easily in KDE,  I have had some problems with the file names from an external disk formatted in NTFS wish I use to use in Windows as well. Probably the problem will nor be solved changing the codeset in the Linux system (perhaps configuring better the mounting parameters of the disk) but at least I would like to try and at the same time give more consistency to the system.

Localization

Mora than changing the language I'm interested in set Slackware to UTF-8 codeset.
To modify globally the locale variables it is needed to edit the file /etc/profile.d/lang.sh and change the values of the variables set there. I will use:

export LANG=en_GB.UTF-8

This codeset already considers LC_COLLATE=C. Although it is should not be necessary set it, by default it set in the script and I did not comment it.

To configure the locale for only a user, the same sentence have to be added to the file ~/.profile

During the installation process is also possible to set the console to use unicode, there is an option during the lilo configuration that allows this. This is not the case when you use elilo.

The only problem with using en_GB is, of course, the currency. So I also set the variable LC_MONETARY with an euro locale:

export LC_MONETARY=nl_NL.UTF-8

I'm not sure about the metrics.

In KDE it is abailable the translation to British English and other common languages without installing any KDEi package (I did not install anyone).


___
Source: http://docs.slackware.com/slackware:localization

Monday, July 18, 2016

Adding Plasma 5

I did not install any KDE package during the Slackware installation. Then, I have installed the Alien's Plasma 5 framework. The instructions are very clear and everything worked nice. After that,  I have not installed any package from KDE4 and Plasma 5 is working perfect. Although the README says that there are some KDE4 packages essential to the proper functioning of Plasma 5, I have not had any problem that suggest me to install one of them. But still I will i,nstall some optional packages:

- Amarok
- Calligra


All the magic is here: http://alien.slackbook.org/blog/kde-5_16-06-for-slackware-current/


Saturday, July 16, 2016

Packages selection and extra software

I like the set of application included in Slackware, but still I like to add and replace some. From the included packages, I don't use to install xfce, because I prefer Plasma or Window Maker. Also I use to replace Tetex with TeX Live. This time I also want to replace Plasma 4 with the alien's Plasma 5 packages.

Do not install:
- xfce
- Tetex
- KDE
- KDEi

There are several extra applications I use which I have to install (and its dependencies):
- TeX Live
- Aspell es de nl (/extra)
- Java (/extra)
- Google Chrome (/extra)
- wmCalClock (SBo)
- wmpower (SBo)
- wmsystemtry (SBo)
- Unrar (SBo)
- emelFM2 (SBo)

- Plasma 5 (Alien)
- Kile (SBo)
- Calligra (Slackware 14.2)
- Amarok (Slackware 14.2)
- Megasync (SBo)
- Mendeley (SBo)
- ImageJ (SBo)
- Xmind (SBo)
- Inkscape (SBo)

- Easytag (SBo)
- VLC (SBo)
- Octave (SBo)
- qTox (SBo)
- SciDAVis

- Multilib
- Brother-DCP755_64
- Skype (SBo)
- Adobe Reader (SBo)
- Wine (alien)
- Winetricks (SBo)
- MS Office 2010

Booting the Slackware installer from a USB drive in UEFI mode

I found difficulties to boot the Slackware installer from a USB drive  in UEFI mode. I works perfect in Legacy mode (BIOS), but I'm curious about how to do it in UEFI. These are a couple of options to do it.

1. Using the script usbimg2disk.sh located in usb-and-pxe-installers directory. There are two options to use it, but the second is which I found more useful, that is, to create a complete installation USB drive which is editable. To do this, I find better to download the Slackware file tree instead of an iso image.

#  ./usbimg2disk.sh -f -s ../../slackware64-14.2 -o /dev/sdx

The -f option is used to format the drive before copying the files, this is optional.

2. Copying directly the iso image into the USBdrive. This can be done directly by using:
# dd if=./slackware.iso of=/dev/sdx

In both cases, when you boot the computer, you should call the EFI bootloader (pressing Esc in my case) and select the correct option. A Grub menu will be loaded from which you can load the Slackware installing system.

The last option should work, but I don't like it because I prefer to have a writable installation media which allows me to add and remove packages. Also I would like, in the short future, to maintain and update the installer with the fresher -current version.

Of course there are another ways to do it but, for me, these worked well.

Note:
To clear the GPT and the MBR partition table of a drive you can use gdisk:
# gdisk /dev/sdbx

go to expert menu by presing the key x
Use zap (z) to destroy the GPT data structure. In the same process the application will ask you if you want to blank the MBR, I use to do it in order to erase any boot option.

Although the preceding process cleans the booting information from the drive, some debris could remain, in particular if you previously wrote directly the iso DVD image into the drive using dd. To clean that you also should apply wipefs to the drive:

# wipefs -a /dev/sdbx