Toshiba Radius 12

A late 2015 netbook, comes in several configurations, including one with a 4k screen. This page focuses on model P20W-C-103 which appears to be identical to P20W-C-106, except for a HD instead of 4k screen. Reviews (link) praise the laptop for best-in-class performance, but poor ergonomics and battery. Out-of-the-box it comes installed with Windows 10.

Installation
(Write the necessary steps to get Gentoo onto this system. Try to document any special step that each user will need to reproduce on their system. Includes getting special drivers or firmware from a manufacturer website, etc.)

Paritioning
Out of the box, the system comes with five (?someone confirm - I wiped mine already) partitions and a GPT record. 1. UEFI Boot Partition 2. Windows 10 System Image 3. ? 4. Backup? 5. Backup?

The partition parameters (i.e. sector alignment) seem to work fine, so you may want to simply delete the ones you're not using, rather than creating a brand new partition table.

Use gdisk and delete all the partitions except the first, the UEFI boot record.

Firmware
Wireless adapter requires iwlwifi-7265D-xx.ucode. If following the Gentoo Handbook, do not skip the step describing installation of firmware, or you may find yourself without network access.

Kernel
(Show what options are necessary in the kernel in order to get all device components functional for this hardware platform.)

UEFI support
Short version: don't use EFI; switch it off in the BIOS menu (hold F2 on boot), under 'advanced'. Also, switch off 'secure boot'.

Long version: The system supports it, but poorly. With BIOS v1.05, it appears to be impossible to boot from a USB device using EFI. This creates a chicken and egg problem, as in order to install an EFI-enabled bootloader, you need the installation media to boot in EFI mode (otherwise the kernel can't access the EFI bios at run-time, which you need to be able to direct the EFI firmware where the new bootloader image is). You can work around this by overwriting the image in your EFI partition (if you didn't re-partition your disk, see section above) EFI/Boot/bootx64.img with the image created by your bootloader.

For example, using grub, (link to the grub UEFI wiki here), the following creates an image under EFI/grub/grub.img:

Copy this over to /boot/efi/EFI/Boot/bootx64.img. Then set the boot mode to EFI in the BIOS. The system will then be fooled into using the GRUB bootloader image instead of the existing Windows one, and you can then boot from the harddisk in EFI mode. After rebooting, you can run grub2-install again as above; this time it will be able to direct the EFI firmware to the correct boot image.

It appears that changing BIOS settings can reset the EFI firmware variables, reverting the effects of the abvoe procedure.

Emerge
(Optional section. If the platform requires any user space packages or kernel patches, mention them here).

Configuration
(Explain any additional configuration or special customization for this hardware platform. Could be anything from BIOS settings to assigning proper media key functionality.)

Power Management
You can use to see your power consumption.

To enable the recommendations from by default, create the following  rules file:

Thermals
The ACPI thermal system kicks-in the fans automatically when under load, and the temperature usually peaks at around 86C. The laptop can become uncomfortably hot.

You can use (add link) to prevent this from happening. The documentation is somewhat unhelpful so here is an explanation of how it works: There are three concepts: sensors, cooling devices ( s), and triggers. Sensors are use to read temperature; cooling devices to lower it; finally triggers are temperature limits, which are poorly named, as they can take effect long before they are reached - forecasts the rate of change in the temperature and may start applying cooling methods long before you get to the trigger temperature. In addition to all this, as stated above, the kernel has it's own cooling mechanism which will kick in regardless of whether is running or not.

To configure for the Radius 12 laptop, first remove the file  that comes out-of-the-box. It is useless and will be ignored on this laptop. Replace it with the following:

Also you need to modify the order of the lines in the following file to match what is shown here (note the position of the 'p-state' entry, compared to what is in the default file):

Once this is done, restart thermald:

The above configuration adds a trigger at 77 degrees, which will tell the p-state driver to control the CPU frequency in order to keep the temperature from reaching that level. Note that, in addition to what is in the file, already has in place two more triggers at 96 and 98 degrees; you can see these by inspecting the logs with journalctl -b -u thermald. Also note, if you want to create your own rules, the 'type' tags in the configuration file correspond to existing values under /sys/class/thermal/**/type.

Sensors
The laptop has a number of sensors:
 * inclination, for detecting orientation of the display.
 * light sensor - somebody using windows please confirm this, not certain.

The inclination sensor can be enabled using the generic IIO drivers in the kernel. You can then use iio-sensors-proxy in gnome > 3.18 to rotate the screen automatically.

Install it by creating a custom ebuild. (provide link to custom ebuild guide).

Known Issues with rotation

 * Rotation only works at 0 and 180 degrees (tested on Kernel 4.4.11). This is due to a kernel bug in the Intel display driver.
 * Due to what appears to be a kernel bug (tested on 4.4.11), sensors only start working after a resume from suspend.

Troubleshooting
(Optional section.)

(Troubleshoot issues in this section. Separate issues by best describing the error with a new section name. Remove this section and subsections if no issues are known.)

Issue 1
When X happens, Y is how you fix it.

External resources
(Optional section.)


 * (Link to external resources (outside the Wiki) using bullet points in this section. It is common for the information in this section to full sentences that are links.)