Monday, July 3, 2017

GPD Pocker: Touchscreen rotation with wayland

The GPD pocket has a "Goodix Capacitive TouchScreen", which just like the display is rotated by default. The reddit thread suggests to fix this with xinput, which can be made permanent by adding a xorg config file. However this doesn't work if you are using Wayland instead of Xorg.

To fix the touchscreen orientation in wayland:
Save this to /etc/udev/rules.d/99-goodix-touch.rules:
ACTION=="add|change", KERNEL=="event[0-9]*", ATTRS{name}=="Goodix Capacitive TouchScreen", ENV{LIBINPUT_CALIBRATION_MATRIX}="0 1 0 -1 0 1"

For me reloading udev rules and triggering udev didn't activate this. But after restarting it did work.

Tuesday, June 27, 2017

Bluetooth on the GPD Pocked with Linux

I finally got bluetooth working on my GPD Pocket.

This is with Fedora 26 and the rawhide kernel, but it probably works with many other kernels.

/sys/kernel/debug/usb/devices tells me the bt chip is a Broadcom Corp BCM2045A0

I thought this would need special firmware etc, but that's not the case or the firmware is already available on Fedora.

The issue here is the weird USB id: 0000:0000

To get it working:
# modprobe btusb
# echo "0000 0000" > /sys/bus/usb/drivers/btusb/new_id

To make this permanent (On Fedora 26):
Save this to /etc/rc.d/rc.local:
#!/bin/bash
modprobe btusb
echo "0000 0000" > /sys/bus/usb/drivers/btusb/new_id

exit 0
 

And then:
# chmod 755 /etc/rc.d/rc.local
# systemctl enable rc-local
 

Saturday, June 24, 2017

Follow-up on Fedora 26 on the GPD Pocket

To follow up on my previous post about the GPD Pocket:

Turns out that there in fact is a bluetooth controller in the GPD pocket as pointed out to me on Facebook. But I didn't get it to work yet. It probably requires a proprietary firmware. The device shows up as Broadcom Corp BCM2045A0 in the output of sudo lspci -v.

Sound does work with the default 4.11.0 Fedora kernel. But it does not work with the 4.12.0 rawhide kernel.

I now also got encryption working. The issue was that the grub config had rd.luks.uuid=luks-None. I replaced None by the right UUID (got it from cryptsetup luksUUID /dev/mmcblk0p3). I also did the same in /etc/crypttab. Nonte that after fixing /etc/default/grub and /etc/crypttab you need to regenerate your initrd and grub config.

Thursday, June 22, 2017

First days with Fedora 26 on the GPD Pocket


A few days ago I received the 'GPD Pocket' which I ordered from Indiegogo. It was delivered with Windows 10 and the Indiegogo page said that they will create a Ubuntu image for it.

But Ubuntu is not my distro of choice these days. And the Ubuntu image is also not ready yet. So I decided to install Fedora 26 beta on it.

Booting from a USB stick didn't work initially so I bought a micro-HDMI to HDMI converter. This did result in a working combination together with my Dell monitor. However a part of the converter is blocking the USB-C charging port, so you might want to buy a 0.2m converter cable instead so you can still charge your device while the monitor is connected.

I also tried a USB-C hub with a mini-display port connector, but that isn't working yet. This is the "Hyper Drive N21C". Note that you have to put the USB-C power cable in to have it even show up in lsusb.

I disabled "Fastboot" option in the BIOS. Because it is more likely to work without that feature.

To get in the BIOS hit ESC. To select a non-default boot option hit F7.

Installation didn't work the first time. It failed to mount the encrypted partition. So I retried w/o disk encryption. I did wipe the whole disk, I didn't want to dual boot. I'm planning on reinstalling with disk encryption after getting most stuff to work.

To get wifi to work I used a USB wifi dongle with good Linux support.
I also used a powered USB hub to be able to connect enough devices. There is some info online about Linux on the 'GPD Win', which has a similar wifi chip. But putting the txt file in /lib/firmware/brcm didn't work for me. Maybe I did something wrong or the chip is slightly different.

The GPD Pocket doesn't have bluetooth, so you have to use a USB keyboard and mouse if you want an external one. It also doens't have a camera, so you also need a USB webcam if you want to do video conferencing etc.

My GPD Pocket shipped with a US power adapter and a converter which work fine. The battery also seems fine, but there is no battery indicator. I now have to guesstimate the battery time I have left.

If I boot Linux 4.12 (RedHat rawhide) with i915.modeset=0 then the GPD only detects the external display. Without that option it detects both displays (internal and HDMI) but the internal display stays blank, which makes it difficult to login to GNOME as the blank display has the login prompt.

To get the internal screen to work I added video=efifb to the kernel options in  /etc/default/grub and ran
grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg

The display stays blank after show boot messages and then switching to GNOME/GDM. But when I press the power button once I then see the familiair login prompt. Screen resolution is great and the touchscreen works.

The speaker(s) and volume keys did work for a bit but then stopped functioning. A cold boot doesn't fix it. The headphone jack also doesn't seem to work.

Brightness keys work, but brightness doesn't change. I only see the setting change.

Sunday, June 7, 2015

On my MacBook Pro Retina 13" with Fedora 22 I received notifications about system errors.

This is the error which triggered the alert:

mce: [Hardware Error]: Machine check events logged

The common advice on the interwebs was to run mcelog, but that didn't show anything.
It turned out that the reason for that is that in Fedora runs it as a daemon and sends the output to syslog.

With journalctl /usr/sbin/mcelog I could see all the errors.

An example event:
apr 05 21:41:32 localhost.localdomain mcelog[891]: MCE 1
apr 05 21:41:32 localhost.localdomain mcelog[891]: CPU 2 THERMAL EVENT TSC 21059c66c67
apr 05 21:41:32 localhost.localdomain mcelog[891]: TIME 1428262844 Sun Apr  5 21:40:44 2015
apr 05 21:41:32 localhost.localdomain mcelog[891]: Processor 2 heated above trip temperature. Throttling enabled.
apr 05 21:41:32 localhost.localdomain mcelog[891]: Please check your system cooling. Performance will be impacted
apr 05 21:41:32 localhost.localdomain mcelog[891]: STATUS 88000bc3 MCGSTATUS 0
apr 05 21:41:32 localhost.localdomain mcelog[891]: MCGCAP c07 APICID 1 SOCKETID 0
apr 05 21:41:32 localhost.localdomain mcelog[891]: CPUID Vendor Intel Family 6 Model 69
apr 05 21:41:32 localhost.localdomain mcelog[891]: Hardware event. This is not a software error.


This happened when all CPU cores were on 100%.

Sunday, January 13, 2013

How to fix your locale settings for Mosh

Mosh is a great tool. It does require a UTF-8 environment.

The "locale" command will show your local locale settings:
$ locale
LANG=en_US.UTF-8
LANGUAGE=en_US:en
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=


On Debian based systems like Ubuntu the LANG environment variable will be sent in the SSH session. (This is the SendEnv setting in /etc/ssh/ssh_config)

But for iSSH on the iPhone this won't do. This will pick the environment as defined in /etc/default/locale. To set the locale put the following line in /etc/default/locale and run sudo update-locale.
LANG="en_US.UTF-8"

For further troubleshooting:
1. Check your 'local' environment
2. Check if your SSH sends an environment variable
3. Check the contents of /etc/default/locale on the server

Wednesday, January 9, 2013

Solaris 11 as guest on KVM

To install Solaris 11 as a guest on KVM the following steps are needed.

I will use Ubuntu 12.10 (Quantal) with KVM (qemu-kvm package) and Virtal Machine Manager (virt-manager package). Ubuntu uses a 3.5 Linux kernel.

I will use the sol-11_1-text-x86.iso to install Solaris.

Create a new VM with:
OS Type: Solaris
Version: OpenSolaris
You will have to click "Show all OS options" before Solaris is available in the list. The list doesn't contain Solaris 11 yet, that's why I chose OpenSolaris.

After installing you will need to install slim_install to get a graphical environment:
pfexec pkg install slim_install
pfexec svcadm enable gdm
pfexec init 5

Now you need to remove the Tablet device which is used to keep the pointer of the host and the guest in sync, otherwise your mouse won't work.

Now you should be able to power-on your machine and use GNOME.

Have fun with SMF, ZFS and all other Solaris features!