New Kernel, Patches & Source!

Firstly, I apologise for the delay in providing these. I have recently started a new job which has left me with little spare time lately.

I have compiled the latest Fedora 19 kernel (3.10.5-201) with the WiFi and CPU patches. It is now in the repository (see this post for details). Note: The new kernel still uses v6 of the WiFi firmware so you must use the version supplied in my previous post (the one in the Fedora repository provides v7).

As promised I have uploaded the SRPM, it is in the SRPMS directory of the repository.

One thing that was brought to my attention recently was that the SD Card reader does not work. I have had a look and can not find many details on it at all.

If anyone has a patch to make it (or anything else) work please let me know and I will incorporate it into my build.

If anyone has noticed how limited my bandwidth for my repository is and would like to provide a mirror, please do, all I ask is that you link to it in the comments so other readers can find it.

Samsung SSD

Fedora 19 on Vaio Pro 13 – SSD Issues

Its no secret that the Vaio Pro comes with a very nice SSD. The 128GB version is a MZHPU128HCGM made by Samsung. From my benchmarking it is very fast with ~1100MB/s read and ~500MB/s write. But when booting into Fedora 19, it may fail to boot, or the system may lock up for short periods (especially under heavy IO). During boot it may show a stream of the following messages (if it happens while you are logged in they will be in dmesg):

01:45:25,494 ERR kernel:[  155.668632] ata1.00: exception Emask 0x0 SAct 0x3 SErr 0x0 action 0x6 frozen
01:45:25,494 ERR kernel:[  155.668640] ata1.00: failed command: READ FPDMA QUEUED
01:45:25,494 ERR kernel:[  155.668650] ata1.00: cmd 60/08:00:00:08:00/00:00:00:00:00/40 tag 0 ncq 4096 in
01:45:25,494 ERR kernel:[  155.668650]          res 40/00:01:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
01:45:25,494 ERR kernel:[  155.668655] ata1.00: status: { DRDY }
01:45:25,494 ERR kernel:[  155.668659] ata1.00: failed command: READ FPDMA QUEUED
01:45:25,494 ERR kernel:[  155.668667] ata1.00: cmd 60/08:08:80:b8:e7/00:00:0e:00:00/40 tag 1 ncq 4096 in
01:45:25,494 ERR kernel:[  155.668667]          res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
01:45:25,494 ERR kernel:[  155.668672] ata1.00: status: { DRDY }

From my previous experience with the errors on other systems I decided to try disabling Native Command Queuing (NCQ). This immediately fixed the issue.

To make the fix permanent you need to add libata.force=noncq to your GRUB2 default kernel boot parameters. As root, edit /etc/defaults/grub and add libata.force=noncq to the end of the GRUB_CMDLINE_LINUX line. The finished file should look similar to the below:

GRUB_TIMEOUT=2
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL_OUTPUT="console"
GRUB_CMDLINE_LINUX="rd.md=0 rd.lvm=0 rd.dm=0 vconsole.keymap=us $([ -x /usr/sbin/rhcrashkernel-param ] && /usr/sbin/rhcrashkernel-param || :) rd.luks=0 vconsole.font=latarcyrheb-sun16 rhgb quiet libata.force=noncq"
GRUB_DISABLE_RECOVERY="true"

Then simply update your GRUB2 menu and reboot:

# grub2-mkconfig -o /boot/efi/EFI/Boot/grub.cfg

I am very interested to know if anyone has experienced this issue on their Vaio Pro or whether there is an issue with my SSD.

CPU

Fedora 19 on Vaio Pro 13 – Intel PState Support

As I mentioned in my previous post, Fedora 19 on the Vaio Pro 13 does not have proper CPU frequency scaling support.

While investing the issue I found this post. It confirms that the issue is simply a missing model id in the pstate driver and provides instructions (and a patch) for adding the CPU model to the Ubuntu kernel.

I have compiled the newly released 3.10 kernel with both the WiFi and CPU patch included.

The new kernel rpms are available at http://rpms.nicksplace.com.au/Fedora/19/x86_64/. When I get a chance I will upload the patches and srpms to make it easier for anyone who wants to compile their own.

I have created a repository to make downloading the packages easier, simply create a file called /etc/yum.repos.d/nicksplace.repo with text below or download this file:

[nicksplace]
name=Nicksplace Packages for Fedora
baseurl=http://rpms.nicksplace.com.au/Fedora/$releasever/$basearch/
enabled=1
skip_if_unavailable=1
gpgcheck=0

Don’t forget to update the GRUB2 configuration after installing the new kernel (if you don’t your new kernel wont show up in GRUB):

# grub2-mkconfig -o /boot/efi/EFI/Boot/grub.cfg

After installing the kernel and rebooting, run the following to confirm that the pstate driver is loaded:

# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_driver

If you see the words “intel_pstate” it means the installation was successful.

Vaio Pro 13 Fedora

Sony Vaio Pro 13 vs Fedora 19

So I gave in and purchased my shiny new i5 Vaio Pro on Saturday from JB HiFi for $1184 with a bonus 1TB Sony 2.5″ USB3 HDD thrown in for free.

The first order of business is of course removing Windows 😉

Well it was more of a fight than I thought it would be (or maybe, due to the fact I usually install Linux on older laptops which tend to have better support, I was just naive).

After waiting what seemed like an age to burn the Windows 8 Recovery DVDs (all 4 of them, taking a grand total of about 2 hours on my slow USB DVD burner) it was time to remove Windows 8.

Removing Windows was painless, insert the Fedora 19 DVD and power on the Vaio using the ‘ASSIST’ button positioned above the keyboard. After disabling Secure Boot and booting the Fedora Installer, the installation proceeded without incident.

Upon rebooting however, I was greeted with a screen stating that the Vaio could not start Windows. After much googling it seemed the issue lies in the non-compliant Insyde H20 BIOS looking for the EFI bootloader in only certain locations (/EFI/Microsoft, /EFI/redhat, /EFI/Boot) and requiring it to have a certain filename. This is a problem as Fedora by default adds its booloader to /EFI/fedora/grubx64.efi.

The solution is to copy the ‘fedora’ directory to one called ‘Boot’ (so you end up with /EFI/Boot). The file grubx64.efi must then be renamed to bootx64.efi. This will require a LiveCD or the Rescue mode on the install DVD. This allowed the system to boot. Update: If you experience difficulties booting, copying the files or random error messages are printed to the screen, read this.

A quick check revealed  most hardware working correctly including the touchscreen, keyboard backlight, USB, Audio, Touchpad (with a few minor annoyances that I have yet to fix). The exception to this is of course is WiFi. (From my investigation it seems the Ubuntu kernel is compiled with support for this adapter so it *may* work out of the box or simply require the firmware instead of a full kernel compile)

The Vaio Pro 13 uses an Intel 7260 802.11ac wireless adpater which currently has some issues in Fedora. This first issue is that the iwlwifi module in the the current shipping Fedora kernel (3.9.8) does not even detect the card as it lacks the PCI ID for the Sony derivative. So to fix this I downloaded the SRPM for the kernel and added my 1 line patch to add the PCI ID.

After compiling and installing the new kernel, the GRUB2 conf file must be updated as it is now in a non-standard location. Run the following command as root:

# grub2-mkconfig -o /boot/efi/EFI/Boot/grub.cfg

Now reboot and then run dmesg, which should show that the device is detected and now requires firmware (iwlwifi-7260-6.ucode).

The second issue is that the firmware is not currently shipped by Fedora. Luckily I found an rpm here. Then its just a matter of running #modprobe -r iwlwifi and  #modprobe iwlwifi or rebooting.

dmesg now showed a segfault in iwlwifi. Determined to get WiFi working I went to koji and found the latest kernel build (3.10.0-0.rc7) and proceeded to patch and test it. This time it was successful, the firmware was loaded and NetworkManager connected to my WiFi network. The kernel rpms are avialable from here.

Another problem I have noticed but not yet fixed is the CPU frequency scaling. Using the ondemand governor the frequency is stuck at 800MHz. Changing to performance clocks it to 1.6Ghz but does not allow it to enter Turbo Mode. I will be investigating the new Intel PState driver in the future. UPDATE: I have applied a patch to enable the pstate driver in my new 3.10 Kernel. See this post for more details.

Overall it now works quite well and is a very capable Ultrabook. Let me know in the comments if you need any additional details about running Linux on it.