{"id":1131,"date":"2021-05-05T02:53:58","date_gmt":"2021-05-04T23:53:58","guid":{"rendered":"https:\/\/handheld.computer\/?page_id=1131"},"modified":"2021-06-20T01:54:46","modified_gmt":"2021-06-19T22:54:46","slug":"gentoo-on-one-netbook-a1","status":"publish","type":"page","link":"https:\/\/handheld.computer\/?page_id=1131","title":{"rendered":"Gentoo on a One-Netbook A1"},"content":{"rendered":"<h1>Introduction<\/h1>\n<p>This manual is intended to help user to configure Gentoo distribution of the GNU\/Linux operating system for One-Netbook A1 handheld computer. It&#8217;s supposed that user is skilled enough to install bare system from stage, compile kernel from source code, apply patches, etc.<\/p>\n<p><a href=\"\/wp-content\/uploads\/2021\/05\/Muliple-OS.jpg\" data-rel=\"lightbox-gallery-XVLMdmRa\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img decoding=\"async\" src=\"\/wp-content\/uploads\/2021\/05\/Muliple-OS.jpg\" alt=\"\" \/><\/a><\/p>\n<p>Despite the fact that the manufacturer claims Linux support on <a href=\"https:\/\/www.1netbook.com\/one-netbook-a1\/\">the product description page<\/a>, to my knowledge there is no Linux distribution, which actually supports the device out of the box. Therefore I hope that this manual will be useful for some A1 owners.<\/p>\n<p>This article and all information and products in it are provided on an &quot;as is&quot; basis, without warranty of any kind, either express or implied. <strong>Your use of this article is at your own risk.<\/strong><\/p>\n<h1>Content<\/h1>\n<ul>\n<li><a href=\"#hw-info\">Hardware info<\/a><\/li>\n<li><a href=\"#support-summary\">Linux support summary<\/a><\/li>\n<li><a href=\"#kernel\">Kernel<\/a><\/li>\n<li><a href=\"#input\">Input<\/a><\/li>\n<li><a href=\"#video\">Video<\/a><\/li>\n<li><a href=\"#sound\">Sound<\/a><\/li>\n<li><a href=\"#accelerometer\">Accelerometer<\/a><\/li>\n<li><a href=\"#net\">Networking<\/a><\/li>\n<li><a href=\"#acpi\">ACPI<\/a><\/li>\n<li><a href=\"#cpufreq\">CPU frequency scaling<\/a><\/li>\n<li><a href=\"#suspend\">Suspending<\/a><\/li>\n<li><a href=\"#microsd\">Media card reader<\/a><\/li>\n<li><a href=\"#issues\">Known issues<\/a><\/li>\n<li><a href=\"#benchmark\">Benchmarks<\/a><\/li>\n<li><a href=\"#history\">History of changes<\/a><\/li>\n<\/ul>\n<h1 id=\"hw-info\">Hardware info<\/h1>\n<p>Brief hardware description from the manufacturer: <a href=\"https:\/\/www.1netbook.com\/one-netbook-a1\/\">One-Netbook A1 | One-Netbook<\/a>.<\/p>\n<table>\n<thead>\n<tr>\n<th>Type<\/th>\n<th>Name<\/th>\n<th>\n<div style=\"width:490px\">Technical info<\/div>\n<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>CPU<\/td>\n<td>Intel\u00ae Core\u2122 m3-8100Y  (Amber Lake)<\/td>\n<td>Base frequency: 1,1 GHz; Max frequency: 3.4 GHz; 2 cores, 4 threads; TDP: 5W; Features: x86-64, SSE4.2, AVX2, AES, IVT; L2 cache: 4MB. <a href=\"#ref\">[1]<\/a>, <a href=\"#ref\">[2]<\/a>, <a href=\"#ref\">[3]<\/a><\/td>\n<\/tr>\n<tr>\n<td>RAM<\/td>\n<td>SK Hynix?<\/td>\n<td>8GB single channel, LPDDR4; Bus clock: 1600 Mhz<\/td>\n<\/tr>\n<tr>\n<td>Video<\/td>\n<td>Intel UHD Graphics 615 (Amber Lake)<\/td>\n<td>EU: 24, Clock speed: 300-900 Mhz; GFLOPS: 345.6; OpenGL support: 4.6; Multimedia codecs <a href=\"#ref\">[4]<\/a> : MPEG-2, MPEG-4, AVC, VC-1, WMV9, HEVC, HEVC 10-bit, VP9, VP9 10-bit, JPEG. Device id: 8086:591c (rev 02); <a href=\"#ref\">[5]<\/a>, <a href=\"#ref\">[6]<\/a>, <a href=\"#ref\">[7]<\/a>, <a href=\"#ref\">[8]<\/a><\/td>\n<\/tr>\n<tr>\n<td>Storage device<\/td>\n<td>One-Netbook PCI-E 256G M.2 NVME SSD<\/td>\n<td>Capacity: 256GB; Seq. R\/W speed: 866\/810 MB\/s;<\/td>\n<\/tr>\n<tr>\n<td>Audio<\/td>\n<td>Realtek Semiconductor Co. ALC269VC<\/td>\n<td>4 channels, 24-bit I\/O; DAC max sample rate: 192kHz; EAX 1.0 &amp; 2.0, Direct Sound 3D, A3D; Device id: 8086:9d71 <a href=\"#ref\">[9]<\/a><\/td>\n<\/tr>\n<tr>\n<td>Ethernet<\/td>\n<td>Realtek Semiconductor Co. RTL8111\/8168\/8411<\/td>\n<td>Speed: 10\/100\/1000 MB\/s; Device id: 10ec:8168 (rev 15); <a href=\"#ref\">[10]<\/a><\/td>\n<\/tr>\n<tr>\n<td>WiFi &amp; Bluetooth<\/td>\n<td>Intel\u00ae Dual Band Wireless-AC 7265<\/td>\n<td>Bands: 2.4GHz, 5GHz; Protocols: 802.11ac; Max speed: 867 Mbps; Bluetooth Version 4.2; PCI Device id: 8086:095a (rev 59); USB Device id: 8087:0a2a; <a href=\"#ref\">[11]<\/a><\/td>\n<\/tr>\n<tr>\n<td>Card reader<\/td>\n<td>Alcor Micro Corp. Multi Flash Reader<\/td>\n<td>Device id: 058f:6366;<\/td>\n<\/tr>\n<tr>\n<td>Accelerometer<\/td>\n<td>Bosch BMC150<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>Optical pointer<\/td>\n<td>HAILUCK CO.,LTD USB KEYBOARD Mouse<\/td>\n<td>Device id: 258a:0021<\/td>\n<\/tr>\n<tr>\n<td>Digitizer<\/td>\n<td>Goodix GXTP7386<\/td>\n<td>Device id: 27c6:0113, compatible with Microsoft Surface Pen<\/td>\n<\/tr>\n<tr>\n<td>Fingerprint reader<\/td>\n<td>Focaltech FTE3600<\/td>\n<td>Connected via SPI bus<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2 id=\"ref\">References<\/h2>\n<ol>\n<li><a href=\"https:\/\/ark.intel.com\/content\/www\/us\/en\/ark\/products\/185282\/intel-core-m3-8100y-processor-4m-cache-up-to-3-40-ghz.html\">Intel\u00ae Core\u2122 m3-8100Y Processor Product Specifications<\/a><\/li>\n<li><a href=\"https:\/\/en.wikichip.org\/wiki\/intel\/core_m\/m3-8100y\">Core M3-8100Y &#8211; Intel &#8211; WikiChip<\/a><\/li>\n<li><a href=\"https:\/\/www.notebookcheck.net\/Intel-Core-m3-8100Y-SoC.320374.0.html\">Intel Core m3-8100Y SoC &#8211; NotebookCheck.net Tech<\/a><\/li>\n<li><a href=\"https:\/\/software.intel.com\/content\/www\/us\/en\/develop\/articles\/encode-and-decode-capabilities-for-7th-generation-intel-core-processors-and-newer.html\">Encode and Decode Capabilities for 7th Generation Intel\u00ae Core\u2122 Processors and Newer<\/a><\/li>\n<li><a href=\"https:\/\/en.wikipedia.org\/wiki\/Intel_Graphics_Technology#Kaby_Lake_Refresh_\/_Amber_Lake_\/_Coffee_Lake_\/_Coffee_Lake_Refresh_\/_Whiskey_Lake_\/_Comet_Lake\">Intel Graphics Technology &#8211; Wikipedia<\/a><\/li>\n<li><a href=\"https:\/\/en.wikipedia.org\/wiki\/List_of_Intel_graphics_processing_units#Ninth_generation\">List of Intel graphics processing units &#8211; Wikipedia<\/a><\/li>\n<li><a href=\"https:\/\/en.wikichip.org\/wiki\/intel\/microarchitectures\/goldmont_plus\">Amber Lake &#8211; Microarchitectures &#8211; Intel &#8211; WikiChip<\/a><\/li>\n<li><a href=\"https:\/\/www.techpowerup.com\/gpu-specs\/uhd-graphics-615.c3370\">Intel UHD Graphics 615 Specs | TechPowerUp GPU Database<\/a><\/li>\n<li><a href=\"https:\/\/vminko.org\/storage\/a1\/specs\/alc269.pdf\">ALC269 HIGH DEFINITION AUDIO CODEC WITHE MBEDDED CLASS-D SPEAKER AMPLIFIER DATASHEET<\/a><\/li>\n<li><a href=\"https:\/\/vminko.org\/storage\/a1\/specs\/r8168.pdf\">RTL8168 INTEGRATED GIGABIT ETHERNET CONTROLLER FOR PCI EXPRESS APPLICATIONS DATASHEET<\/a><\/li>\n<li><a href=\"https:\/\/ark.intel.com\/content\/www\/us\/en\/ark\/products\/83635\/intel-dual-band-wireless-ac-7265.html\">Intel\u00ae Dual Band Wireless-AC 7265 Product Specifications<\/a><\/li>\n<\/ol>\n<h2>Logs<\/h2>\n<ul>\n<li><a href=\"http:\/\/vminko.org\/storage\/a1\/logs\/dmesg.txt\">dmesg<\/a><\/li>\n<li><a href=\"http:\/\/vminko.org\/storage\/a1\/logs\/lspci.txt\">lspci -v<\/a><\/li>\n<li><a href=\"http:\/\/vminko.org\/storage\/a1\/logs\/lsusb.txt\">lsusb -v<\/a><\/li>\n<li><a href=\"http:\/\/vminko.org\/storage\/a1\/logs\/smartctl.txt\">smartctl -a \/dev\/sda<\/a><\/li>\n<li><a href=\"http:\/\/vminko.org\/storage\/a1\/logs\/cpuinfo.txt\">cat \/proc\/cpuinfo<\/a><\/li>\n<li><a href=\"https:\/\/vminko.org\/storage\/a1\/logs\/glxinfo.txt\">glxinfo<\/a><\/li>\n<li><a href=\"https:\/\/vminko.org\/storage\/a1\/logs\/vainfo.txt\">vainfo<\/a><\/li>\n<\/ul>\n<h1 id=\"support-summary\">Linux support summary<\/h1>\n<table>\n<thead>\n<tr>\n<th>Subsystem<\/th>\n<th>Feature<\/th>\n<th style=\"text-align: center;\">Status<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><em>Input<\/em><\/td>\n<td>Keyboard<\/td>\n<td style=\"text-align: center;\">Works perfectly<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td>Optical pointer<\/td>\n<td style=\"text-align: center;\">Works perfectly<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td>Touchscreen<\/td>\n<td style=\"text-align: center;\">Works perfectly<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td>Digitizer<\/td>\n<td style=\"text-align: center;\">Works perfectly<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td>Digitizer pen buttons<\/td>\n<td style=\"text-align: center;\">Works perfectly<\/td>\n<\/tr>\n<tr>\n<td><em>Video<\/em><\/td>\n<td>Integrated display<\/td>\n<td style=\"text-align: center;\">Works perfectly<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td>2D graphics<\/td>\n<td style=\"text-align: center;\">Works perfectly<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td>3D acceleration<\/td>\n<td style=\"text-align: center;\">Works perfectly<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td>Video decoding acceleration<\/td>\n<td style=\"text-align: center;\">Works perfectly<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td>HDMI output<\/td>\n<td style=\"text-align: center;\"><strong>Minor issues<\/strong><\/td>\n<\/tr>\n<tr>\n<td><em>Audio<\/em><\/td>\n<td>Internal speaker<\/td>\n<td style=\"text-align: center;\">Works perfectly<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td>Microphone<\/td>\n<td style=\"text-align: center;\">Works perfectly<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td>Audio out jack<\/td>\n<td style=\"text-align: center;\">Works perfectly<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td>Headphones mute speaker<\/td>\n<td style=\"text-align: center;\">Works perfectly<\/td>\n<\/tr>\n<tr>\n<td><em>Networking<\/em><\/td>\n<td>Ethernet<\/td>\n<td style=\"text-align: center;\">Works perfectly<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td>WiFi<\/td>\n<td style=\"text-align: center;\">Works perfectly<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td>BlueTooth<\/td>\n<td style=\"text-align: center;\"><strong>Untested<\/strong><\/td>\n<\/tr>\n<tr>\n<td><em>ACPI<\/em><\/td>\n<td>Lid button<\/td>\n<td style=\"text-align: center;\">Works perfectly<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td>Power button<\/td>\n<td style=\"text-align: center;\">Works perfectly<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td>Brightness control<\/td>\n<td style=\"text-align: center;\">Works perfectly<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td>AC and battery<\/td>\n<td style=\"text-align: center;\">Works perfectly<\/td>\n<\/tr>\n<tr>\n<td><em>Power management<\/em><\/td>\n<td>Suspend to RAM<\/td>\n<td style=\"text-align: center;\">Works perfectly<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td>Suspend to disk<\/td>\n<td style=\"text-align: center;\">Works perfectly<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td>CPU frequency scaling<\/td>\n<td style=\"text-align: center;\">Works perfectly<\/td>\n<\/tr>\n<tr>\n<td><em>Other<\/em><\/td>\n<td>microSD card reader<\/td>\n<td style=\"text-align: center;\">Works perfectly<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td>Fingerprint reader<\/td>\n<td style=\"text-align: center;\"><strong>Not supported<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h1 id=\"kernel\">Kernel<\/h1>\n<p>The kernel config for version 5.10.27 is available <a href=\"https:\/\/vminko.org\/storage\/a1\/configs\/usr\/src\/linux\/config-5.10.27\">here<\/a>. Few notes regarding the kernel config:<\/p>\n<ul>\n<li>It&#8217;s optimized for One-Netbook A1. Most options not required by this device are turned off. The total number of enabled options is 1092, the size of the compiles binary image is just 8.9M. You may need to enable additional options like filesystems or drivers for peripheral devices. <\/li>\n<li>This config produces monolith kernel, which does not require any modules, firmwares or even a command line. But prior building this kernel you need install the firmware files, which are provided by these two packages:\n<ul>\n<li><code>sys-kernel\/linux-firmware<\/code>. In order to install only the firmware files which are relevant for One-Netbok A1, enable these two USE flags: <code>redistributable savedconfig<\/code> and save <a href=\"https:\/\/vminko.org\/storage\/a1\/configs\/etc\/portage\/savedconfig\/sys-kernel\/linux-firmware\/linux-firmware.conf\">this<\/a> file as <code>\/etc\/portage\/savedconfig\/sys-kernel\/linux-firmware\/linux-firmware.conf<\/code><\/li>\n<li><code>net-wireless\/wireless-regdb<\/code><\/li>\n<\/ul>\n<\/li>\n<li>Mitigation of <a href=\"https:\/\/wiki.gentoo.org\/wiki\/Project:Security\/Vulnerabilities\/Meltdown_and_Spectre\">Spectre and Meltdown<\/a> vulnerabilities is disabled (<code>CONFIG_PAGE_TABLE_ISOLATION<\/code>). Consider for yourself what is more important for you: performance of security.<\/li>\n<li>This config assumes that nvme0n1p7 is the root partition and nvme0n1p6 is the swap partition. If your partition layout is different, you will need to edit these parameters:\n<ul>\n<li><code>CONFIG_CMDLINE=&quot;root=\/dev\/nvme0n1p7 fbcon=rotate:3 i915.lvds_downclock=1 i915.i915_enable_fbc=1 i915.i915_enable_rc6=1 i915.enable_psr=1 quiet&quot;<\/code><\/li>\n<li><code>CONFIG_PM_STD_PARTITION=&quot;\/dev\/nvme0n1p6&quot;<\/code><\/li>\n<\/ul>\n<\/li>\n<li>The latest upstream kernel does not support the Goodix digitizer properly. In order to make the digitizer and the stylus work as expected, you need to apply two patches: [<a href=\"https:\/\/vminko.org\/storage\/a1\/patches\/commit-530201a\">1<\/a>], [<a href=\"https:\/\/vminko.org\/storage\/a1\/patches\/commit-b7ee3d7\">2<\/a>]. See this discussion for details: <a href=\"https:\/\/www.spinics.net\/lists\/linux-input\/msg72861.html\">UPD: hid-multitouch: goodix: hovering works as touch<\/a>.<\/li>\n<\/ul>\n<p>In case the following error occurs during the kernel compilation: <code>drivers\/hid\/hid-multitouch.c:2293:4: error:\u2018I2C_DEVICE_ID_GOODIX_0113\u2019 undeclared here (not in a function);<\/code>, add the following line to the file <code>drivers\/hid\/hid-ids.h<\/code>:<\/p>\n<pre><code>#define I2C_DEVICE_ID_GOODIX_0113       0x0113<\/code><\/pre>\n<h2>Booting the kernel<\/h2>\n<p>Since the described kernel does not require a command line, you can boot it directly from the EFI firmware. You no longer need to install and configure a bootloader.<\/p>\n<pre><code>mount \/dev\/nvme0n1p1 \/mnt\/boot\ncp arch\/x86_64\/boot\/bzImage \/mnt\/boot\/EFI\/Boot\/bootx64.efi\numount \/mnt\/boot\nefibootmgr -c -d \/dev\/nvme0n1 -p1 -L 'Gentoo' -l '\\EFI\\Boot\\bootx64.efi'<\/code><\/pre>\n<p>After that you can make Gentoo the default boot option via editing BIOS setting <code>Boot -&gt; Boot Option Priorities<\/code>.<\/p>\n<h1 id=\"input\">Input<\/h1>\n<p>There are various xorg input device drivers. libinput is one of them, and it&#8217;s the default driver in Gentoo. This driver works fine with A1.<\/p>\n<p>In order to use this driver, set the <code>INPUT_DEVICES<\/code> variable to &#8216;libinput&#8217;, see <a href=\"https:\/\/vminko.org\/storage\/a1\/configs\/etc\/portage\/make.conf\">make.conf<\/a> as example.<\/p>\n<h2>Keyboard<\/h2>\n<p>Down below you can see xorg.conf.d file for the keyboard.<\/p>\n<p><a href=\"https:\/\/vminko.org\/storage\/a1\/configs\/etc\/X11\/xorg.conf.d\/10keyboard.conf\">10keyboard.conf<\/a><\/p>\n<pre><code>    Section \"InputClass\"\n        Identifier          \"keyboard-all\"\n        Driver              \"libinput\"\n        Option              \"XkbRules\"                  \"evdev\"\n        Option              \"XkbModel\"                  \"pc105\"\n        Option              \"XkbLayout\"                 \"us,ru\"\n        Option              \"XkbVariant\"                \",winkeys\"\n        Option              \"XkbOptions\"                \"grp:alt_shift_toggle,terminate:ctrl_alt_bksp\"\n        MatchIsKeyboard     \"on\"\n        MatchDevicePath     \"\/dev\/input\/event*\"\n    EndSection<\/code><\/pre>\n<p><strong>Volume<\/strong> and <strong>Brightness<\/strong> up\/down keys by default generate correct key symbols:<\/p>\n<ul>\n<li>XF86AudioRaiseVolume and XF86AudioLowerVolume;<\/li>\n<li>XF86MonBrightnessUp and XF86MonBrightnessDown;<\/li>\n<\/ul>\n<p>One special keysymbol is added for the <strong>Power<\/strong> button &#8211; XF86Launch0. The button itself does not generate any keycode. It&#8217;s handled by <a href=\"#acpi\">ACPI<\/a> subsystem, which generates proper key code for XF86Launch0. The <a href=\"https:\/\/vminko.org\/storage\/a1\/configs\/home\/user\/.Xmodmap\">.Xmodmap<\/a> binds the special key code to XF86Launch0.<\/p>\n<p>All we need to do is to assign proper actions to the symnames. The <a href=\"https:\/\/vminko.org\/storage\/a1\/configs\/home\/user\/.config\/openbox\/rc.xml\">rc.xml<\/a> is an example of such bindings. This configuration file has some additional key binding, which you may find interesting:<\/p>\n<ul>\n<li><strong>Alt+d<\/strong>&#8211; Toggles DPMS state of connected displays via xset.  See <a href=\"https:\/\/vminko.org\/storage\/a1\/configs\/usr\/local\/bin\/dpms.sh\">dpms.sh<\/a> for details.<\/li>\n<li>\n<p><strong>Power<\/strong> shows an information dialog (<a href=\"https:\/\/vminko.org\/storage\/a1\/configs\/usr\/local\/bin\/tray.sh\">tray.sh<\/a>), which contains current time and date, battery status and level, brightness, CPU frequencies and governors, etc.<\/p>\n<pre><code>        03.05 Monday 20:24\n\nMPD Stopped\nBattery: Charging, 87%, 63:42:51 until charged\nBrightness: 100\nTemp: CPU 54|52\u00b0C, SSD 24\u00b0C, WiFi 38\u00b0C\nFreq: 2.72GHz|2.70GHz, performance\nRAM: 87% free\nNetwork: eth0 wlan0, wireless is on<\/code><\/pre>\n<\/li>\n<\/ul>\n<p>The <em>fan switch<\/em> is 100% hardware and does not generate a scancode, ACPI or udev event.<br \/>\nThe keyboard backlit is also 100% hardware and does not require any software configurations.<\/p>\n<h2>Touchscreen<\/h2>\n<p>Down below you can see xorg.conf.d file for the touchscreen.<\/p>\n<p><a href=\"https:\/\/vminko.org\/storage\/a1\/configs\/etc\/X11\/xorg.conf.d\/21touchscreen.conf\">21touchscreen.conf<\/a><\/p>\n<pre><code>    Section \"InputClass\"\n      Identifier    \"Goodix Touchscreen\"\n      MatchProduct  \"GXTP7386:00 27C6:0113\"\n      Option        \"TransformationMatrix\"        \"0 -1 1 1 0 0 0 0 1\"\n    EndSection<\/code><\/pre>\n<p>If you want to change the touchscreen orientation automatically, see the <a href=\"#accelerometer\">Accelerometer<\/a> section.<\/p>\n<h2>Digitizer &amp; Stylus<\/h2>\n<p>The digitizer GXTP7386 does not work out of the box with the kernel version 5.10.27. The default hid-multitouch driver processes hovering as touch. In order to make the digitizer work as expected, you need to apply two patches mentioned in the <a href=\"#kernel\">Kernel<\/a> section. Thanks to Dmitry Mastykin, who provided these patches. These patches fix the hovering issue and make pen buttons work as right and middle mouse buttons.<\/p>\n<p>Down below you can see xorg.conf.d file for the digitizer.<\/p>\n<p><a href=\"https:\/\/vminko.org\/storage\/a1\/configs\/etc\/X11\/xorg.conf.d\/22pen.conf\">22pen.conf<\/a><\/p>\n<pre><code>    Section \"InputClass\"\n      Identifier    \"Stylus\"\n      MatchProduct  \"GXTP7386:00 27C6:0113 Stylus Pen (0)\"\n      Option        \"TransformationMatrix\"        \"0 -1 1 1 0 0 0 0 1\"\n    EndSection<\/code><\/pre>\n<p>Pressure sensitivity also works fine as demonstrated on the screenshot below.<br \/>\n<a href=\"\/wp-content\/uploads\/2021\/05\/05.05.2021-004708-140408655.png\" data-rel=\"lightbox-gallery-XVLMdmRa\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img decoding=\"async\" src=\"\/wp-content\/uploads\/2021\/05\/05.05.2021-004708-140408655-e1620165401751.png\" alt=\"\" \/><\/a><\/p>\n<h2 id=\"virtkbd\">Virtual keyboard<\/h2>\n<p>I case you want to use a virtual keyboard, consider <em>matchbox-keyboard<\/em>.<\/p>\n<p>The custom ebuild with the lastest version of the program is available here: <a href=\"https:\/\/vminko.org\/storage\/a1\/configs\/usr\/local\/portage\/x11-misc\/matchbox-keyboard\/matchbox-keyboard-999999.ebuild\">matchbox-keyboard-999999.ebuild<\/a>.<br \/>\nI use a custom keyboard layout. which is displayed on the screenshot below. The layout config file is here: <a href=\"https:\/\/vminko.org\/storage\/a1\/configs\/usr\/share\/matchbox-keyboard\/keyboard.xml\">keyboard.xml<\/a>.<br \/>\nThis keyboard works best with special settings of windows manager. In case you use <em>OpenBox<\/em> I recommend the following settings:<\/p>\n<pre><code>&lt;applications&gt;\n  &lt;application class=&quot;matchbox-keyboard&quot;&gt;\n    &lt;decor&gt;yes&lt;\/decor&gt;\n    &lt;layer&gt;above&lt;\/layer&gt;\n    &lt;position&gt;\n      &lt;x&gt;center&lt;\/x&gt;\n      &lt;y&gt;-0%&lt;\/y&gt;\n    &lt;\/position&gt;\n    &lt;size&gt;\n      &lt;height&gt;30%&lt;\/height&gt;\n      &lt;width&gt;100%&lt;\/width&gt;\n    &lt;\/size&gt;\n    &lt;skip_pager&gt;no&lt;\/skip_pager&gt;\n    &lt;skip_taskbar&gt;no&lt;\/skip_taskbar&gt;\n  &lt;\/application&gt;\n&lt;\/applications&gt;<\/code><\/pre>\n<p>A desktop panel is very useful when the hardware keyboard is hidded. For example, it can be used to toggle the virtual keyboard. It looks like the device does not include a sensor to detect that the device is converted into tablet mode (please let me know if I&#8217;m wrong). Therefore I configured the autorotation script to launch the desktop panel (I prefer <em>lxpanel<\/em>) when the device is rotated. See the <a href=\"#accelerometer\">Accelerometer<\/a> section for details.<\/p>\n<p><a href=\"https:\/\/vminko.org\/storage\/a1\/configs\/home\/user\/.config\/lxpanel\/default\/panels\/panel\">Here<\/a> is my config file for lxpanel. And here is the script I use to toggle the virtual keyboard: <a href=\"https:\/\/vminko.org\/storage\/a1\/configs\/usr\/local\/bin\/toggle_keyboard.sh\">toggle_keyboard.sh<\/a>.<\/p>\n<p><a href=\"\/wp-content\/uploads\/2021\/05\/23.05.2021-165903-704307105.png\" data-rel=\"lightbox-gallery-XVLMdmRa\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img decoding=\"async\" src=\"\/wp-content\/uploads\/2021\/05\/23.05.2021-165903-704307105-e1621778787627.png\" alt=\"\" \/><\/a><\/p>\n<h1 id=\"video\">Video<\/h1>\n<h2>Kernel<\/h2>\n<p>The native orientation of the integrated display is portrait. Therefore the framebuffer console needs to be rotated. In order to configure correct orientation, add &#8216;fbcon=rotate:3&#8217; to the kernel command line:<\/p>\n<pre><code>    CONFIG_CMDLINE=\"root=\/dev\/nvme0n1p7 fbcon=rotate:3 i915.lvds_downclock=1 i915.i915_enable_fbc=1 i915.i915_enable_rc6=1 i915.enable_psr=1 quiet\"<\/code><\/pre>\n<p>The following options improve power saving: <code>i915.lvds_downclock=1 i915.i915_enable_fbc=1 i915.i915_enable_rc6=1 i915.enable_psr=1<\/code>.<\/p>\n<h2>X11 configuration<\/h2>\n<p>The <code>VIDEO_CARDS<\/code> variable should be set to &#8216;intel i965&#8217;. The global <code>USE<\/code> should include &#8216;dri&#8217;, see <a href=\"https:\/\/vminko.org\/storage\/a1\/configs\/etc\/portage\/make.conf\">make.conf<\/a> as example.<\/p>\n<p>The modesetting driver (which is built into xorg-server) works fine, therefore it&#8217;s safe to get rid of the old xf86-video-intel driver.  Down below you can see xorg.conf.d files for the UHD graphics.<\/p>\n<p><a href=\"https:\/\/vminko.org\/storage\/a1\/configs\/etc\/X11\/xorg.conf.d\/30device.conf\">30device.conf<\/a><\/p>\n<pre><code>    Section \"Device\"\n      Identifier    \"Intel Graphics\"\n      Driver        \"modesetting\"\n      Option        \"AccelMethod\"            \"glamor\"\n      Option        \"DRI\"                    \"3\"\n    EndSection<\/code><\/pre>\n<p><a href=\"https:\/\/vminko.org\/storage\/a1\/configs\/etc\/X11\/xorg.conf.d\/40monitor.conf\">40monitor.conf<\/a><\/p>\n<pre><code>    Section \"Monitor\"\n      Identifier    \"eDP-1\"\n      Option        \"Rotate\"                 \"left\"\n      Option        \"Primary\"                \"true\"\n    EndSection\n\n    Section \"Monitor\"\n      Identifier    \"HDMI-1\"\n      Option        \"Disable\"                \"true\"\n    EndSection\n\n    Section \"Monitor\"\n      Identifier    \"DP-1\"\n      Option        \"Disable\"                \"true\"\n    EndSection<\/code><\/pre>\n<h2>DPI &amp; scaling<\/h2>\n<p>It&#8217;s very easy to set correct DPI for the built-in display. Just add the following line to your <a href=\"https:\/\/vminko.org\/storage\/a1\/configs\/home\/user\/.Xdefaults\"><code>~\/.Xdefaults<\/code><\/a>:<\/p>\n<pre><code>    Xft.dpi: 144<\/code><\/pre>\n<p>However, this option will affect all displays connected to the device. If you you external display, you may want to set different DPI.<br \/>\nOne way to solve this issue is to use <code>xrandr<\/code> with the <code>--scale<\/code> option, for example:<\/p>\n<pre><code>    xrandr --output eDP1 --scale 0.75x0.75<\/code><\/pre>\n<p>However, this will make the image a bit blurry. Please let me know if there is a way to set different DPI without blurring the image.<\/p>\n<p>Here is a nice wrapup of the current X Server capabilities of handling mixed DPI: <a href=\"http:\/\/wok.oblomov.eu\/tecnologia\/mixed-dpi-x11\/\">Mixed DPI and the X Window System<\/a>.<\/p>\n<h2>Backlight<\/h2>\n<p><code>xbacklight currently<\/code> does not work with the modesetting driver <a href=\"https:\/\/gitlab.freedesktop.org\/xorg\/xserver\/-\/issues\/47\">issue #47<\/a>. The project <a href=\"https:\/\/gitlab.com\/wavexx\/acpilight\">acpilight<\/a> provides a xbacklight drop in replacement which addresses the issue. In Gentoo this tool is provided by <code>sys-power\/acpilight<\/code>.<\/p>\n<p>Normally, users are prohibited to alter files in the sys filesystem. It&#8217;s advisable (and recommended) to setup an &quot;udev&quot; rule to allow users in the &quot;video&quot; group to set the display brightness. To do so, place a file in <a href=\"https:\/\/vminko.org\/storage\/a1\/configs\/etc\/udev\/rules.d\/90-backlight.rules\">\/etc\/udev\/rules.d\/90-backlight.rules<\/a> containing:<\/p>\n<pre><code>    SUBSYSTEM==\"backlight\", ACTION==\"add\", \\\n      RUN+=\"\/bin\/chgrp video \/sys\/class\/backlight\/%k\/brightness\", \\\n      RUN+=\"\/bin\/chmod g+w \/sys\/class\/backlight\/%k\/brightness\"<\/code><\/pre>\n<p>to setup the relevant permissions at boot time. These rules are very conservative: only the display brightness can be controlled, and nothing else. Do not set suid permissions on xbacklight.<\/p>\n<h2>HDMI output<\/h2>\n<p>HDMI output is supported by intel driver. You can use <a href=\"https:\/\/vminko.org\/storage\/a1\/configs\/usr\/local\/bin\/video-out.sh\">video-out.sh<\/a> utility to toggle the HDMI output (via xrandr).  The utility installs the external screen to the right of built-in screen. See the source code of <code>video-out.sh<\/code> for details.<\/p>\n<h2>3D acceleration<\/h2>\n<p>There are two available drivers: xf86-video-intel (obsolete driver) and the modesetting driver built into xorg-server (recommended).<br \/>\nThe first one is significantly faster. glxgears shows approximately 5000 FPS using xf86-video-intel vs 3800 FPS using the modesetting driver.<br \/>\nHowever, xf86-video-intel is not recommeded by Gentoo commutiny, because this driver is obsolete and is no longer maintained by Intel. If you decide to use xf86-video-intel, you will need to update the X11 output name in xorg configuration files and the scripts like <a href=\"https:\/\/vminko.org\/storage\/a1\/configs\/usr\/local\/bin\/video-out.sh\">video-out.sh<\/a>. xf86-video-intel provides eDP1, DP1, etc., while the modesetting drivers provides eDP-1, DP-1, etc. for the same outputs.<\/p>\n<p>DRI works fine with default parameters.<\/p>\n<p>The current modesetting driver from xf86-video-intel-1.20.11 with mesa-20.3.5 supports OpenGL-4.6. See <a href=\"https:\/\/vminko.org\/storage\/a1\/logs\/glxinfo.txt\">glxinfo<\/a> for details.<\/p>\n<h2>Video decoding acceleration<\/h2>\n<p>Intel UHD Graphics 615 is able to decode a wide range of multimedia codecs <a href=\"#ref\">[4]<\/a>. The config parameters below describe how to enable hardware decoding via VA-API.<\/p>\n<p>The <a href=\"https:\/\/vminko.org\/storage\/a1\/configs\/etc\/portage\/make.conf\">global<\/a> <code>USE<\/code> should include &#8216;vaapi&#8217;.<\/p>\n<p>Custom USE flags:<\/p>\n<pre><code>    x11-libs\/libva drm utils\n    media-video\/libva-utils drm vainfo\n    x11-libs\/libva-intel-media-driver set-as-default<\/code><\/pre>\n<p>Unmask the following packages:<\/p>\n<pre><code>    x11-libs\/libva ~amd64\n    x11-libs\/libva-intel-driver ~amd64\n    media-video\/libva-utils ~amd64<\/code><\/pre>\n<p>Besides libva, you need a media player, which supports VA-API. You can use &#8216;mpv&#8217;, which does the job fine (except 4k ,see detail below). In this case, add the following config parameters to your <a href=\"https:\/\/vminko.org\/storage\/a1\/configs\/home\/user\/.config\/mpv\/mpv.conf\">mpv.conf<\/a><\/p>\n<pre><code>    vo=vaapi\n    hwdec=vaapi-copy<\/code><\/pre>\n<p>You can check if hardware is configured properly by analyzing mpv output:<\/p>\n<pre><code>    Resuming playback. This behavior can be disabled with --no-resume-playback.\n     (+) Video --vid=1 (*) (h264 1920x804 24.000fps)\n     (+) Audio --aid=1 --alang=rus (*) (dts 6ch 48000Hz)\n    Using hardware decoding (vaapi-copy).                         <<<--- THIS\n    AO: [alsa] 48000Hz stereo 2ch float\n    VO: [gpu] 1920x804 nv12\n    AV: 00:00:24 \/ 02:00:38 (0%) A-V:  0.000\n    Saving state.<\/code><\/pre>\n<p>or by viewing output of <a href=\"https:\/\/vminko.org\/storage\/a1\/logs\/vainfo.txt\">vainfo<\/a>.<\/p>\n<p>See also <a href=\"https:\/\/github.com\/intel\/media-driver#components-and-features\">Components and Features<\/a> of Intel(R) Media Driver for VAAPI.<\/p>\n<p>I could not make mpv play 4k video on A1 smoothly despite the fact that hardware decoding seems to be working fine. If you want to play 4k video on A1 (using external display, for example), I recommend vlc. It plays 4k video flawlessly on A1.<\/p>\n<h1 id=\"accelerometer\">Accelerometer<\/h1>\n<p>One-Netbook A1 has a built-in accelerometer <em>Bosch BMC150<\/em>. It can be used to change screen orientation automatically. If you are interested - read this section.<\/p>\n<p>First of all, you need to install custom ebuild <a href=\"https:\/\/vminko.org\/storage\/a1\/configs\/usr\/local\/portage\/sys-apps\/iio-sensor-proxy\/iio-sensor-proxy-2.0.ebuild\">iio-sensor-proxy-2.0.ebuild<\/a>, which provides <code>iio-sensor-proxy<\/code> daemon with optional systemd dependency.<br \/>\nDownload the content of <a href=\"https:\/\/vminko.org\/storage\/a1\/configs\/usr\/local\/portage\/sys-apps\/iio-sensor-proxy\/\">iio-sensor-proxy<\/a> to <code>\/usr\/local\/portage\/sys-apps\/iio-sensor-proxy<\/code> and install the package:<\/p>\n<pre><code>    cd \/usr\/local\/portage\/sys-apps\/iio-sensor-proxy\n    ebuild iio-sensor-proxy-2.0.ebuild digest\n    emerge -av iio-sensor-proxy<\/code><\/pre>\n<p>Add iio-sensor-proxy to the default run level:<\/p>\n<pre><code>    rc-update add iio-sensor-proxy default<\/code><\/pre>\n<p>Download <a href=\"https:\/\/vminko.org\/storage\/a1\/configs\/usr\/local\/bin\/autorotate.sh\">autorotate.sh<\/a> to <code>\/usr\/local\/bin<\/code> and setup the relevant permissions:<\/p>\n<pre><code>    chmod a+x \/usr\/local\/bin\/autorotate.sh<\/code><\/pre>\n<p><code>autorotate.sh<\/code> is a small and dirty daemon written in Bash. You need to make it start when X11 session starts. If you use openbox WM, just add the following line to your <a href=\"https:\/\/vminko.org\/storage\/a1\/configs\/home\/user\/.config\/openbox\/autostart.sh\">~\/.config\/openbox\/autostart.sh<\/a>:<\/p>\n<pre><code>    \/usr\/local\/bin\/autorotate.sh &<\/code><\/pre>\n<p>That's it. Restart X11 session and your screen, touchscreen and digitizer orientation will adjust automatically with the device orientation.<\/p>\n<h1 id=\"sound\">Sound<\/h1>\n<p>Supported by <code>CONFIG_SND_HDA_INTEL<\/code>. I recommend to compile alsa-lib with all plugins (<code>ALSA_PCM_PLUGINS<\/code>, see <a href=\"https:\/\/vminko.org\/storage\/a1\/configs\/etc\/portage\/make.conf\">make.conf<\/a> as example).<\/p>\n<p>In general ALSA supports the Realtek ALC269 quite well: both internal speaker and mic work fine as well as headphones jacks. ALSA mutes the speaker when headphones jack is used.<\/p>\n<h1 id=\"net\">Networking<\/h1>\n<h2>Ethernet<\/h2>\n<p>Supported by <code>CONFIG_R8169<\/code>. Requires firmware <code>rtl_nic\/rtl8168h-2.fw<\/code>. Configured via default gentoo net config. <a href=\"https:\/\/vminko.org\/storage\/a1\/configs\/etc\/conf.d\/net\">Here<\/a> is an example of eth0 definition with static IP. See <a href=\"https:\/\/wiki.gentoo.org\/wiki\/Handbook:AMD64\/Installation\/Networking\">Gentoo Network Configuration<\/a> for details.<\/p>\n<p><code>ethtool<\/code> may be used to detect whether ethernet cable is plugged or not.<\/p>\n<h2>WiFi<\/h2>\n<p>WiFi is also supported by kernel (<code>CONFIG_IWLWIFI<\/code>). The driver requires binary firmware <code>iwlwifi-7265D-29.ucode<\/code>.<\/p>\n<p>WiFi connection can be configured via wpa_supplicant. See <a href=\"https:\/\/wiki.gentoo.org\/wiki\/Handbook:AMD64\/Networking\/Wireless\">Wireless Networking<\/a> for details.<\/p>\n<p>The iwl driver supports power management, which is enabled by default. You can check whether power management is turned on using <code>iwconfig<\/code>:<\/p>\n<pre><code>    wlan0     IEEE 802.11  ESSID:\"hs\"  \n              Mode:Managed  Frequency:5.18 GHz  Access Point: 04:F0:21:1B:63:46   \n              Bit Rate=780 Mb\/s   Tx-Power=22 dBm   \n              Retry short limit:7   RTS thr:off   Fragment thr:off\n              Power Management:on                                          <<<--- THIS\n              Link Quality=51\/70  Signal level=-59 dBm  \n              Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0\n              Tx excessive retries:0  Invalid misc:7   Missed beacon:0<\/code><\/pre>\n<p>This file provides the temperature of the WiFi chip:<\/p>\n<pre><code>    \/sys\/devices\/virtual\/thermal\/thermal_zone0\/temp<\/code><\/pre>\n<h2>rfkill<\/h2>\n<p>One-Netbook A1 does not have a hardware rfkill switch. But you can configure software button using the rfkill tool. See <a href=\"https:\/\/vminko.org\/storage\/a1\/configs\/usr\/local\/bin\/toggle_rfkill.sh\">toggle_rfkill.sh<\/a> as example. Software rfkill toggles WiFi and Bluetooth connectivity.<\/p>\n<h1 id=\"acpi\">ACPI<\/h1>\n<p>In order to handle ACPI events, you need to install the ACPI daemon and add it to the boot runlevel:<\/p>\n<pre><code>emerge -av acpid\nrc-update add acpid boot<\/code><\/pre>\n<p>All ACPI events are configured in the <a href=\"https:\/\/vminko.org\/storage\/a1\/configs\/etc\/acpi\/default.sh\">default.sh<\/a>. Here is a short description of the ACPI events handled by <code>default.sh<\/code>:<\/p>\n<ul>\n<li><em>Power<\/em> - Generates keycode 192 (XF86Launch0) via <code>acpi_fakekey<\/code>, which shows the system info window. You can uncomment one line in the script to turns the system off instead.<\/li>\n<li><em>Lid<\/em> - Suspends to RAM if the display is not turned off via locked via <a href=\"https:\/\/vminko.org\/storage\/a1\/configs\/usr\/local\/bin\/dpms.sh\">dpms.sh<\/a>. See <a href=\"https:\/\/vminko.org\/storage\/a1\/configs\/usr\/local\/bin\/lid.sh\">lid.sh<\/a> for details.<\/li>\n<li><em>AC plug in\/out<\/em> - Switches cpufreq governor to performance when AC gets connected and to powersave when AC gets disconnected.<\/li>\n<\/ul>\n<p>Besides the events handled in <a href=\"https:\/\/vminko.org\/storage\/a1\/configs\/etc\/acpi\/default.sh\">default.sh<\/a>, acpid also catches the following ones:<\/p>\n<ul>\n<li><code>video\/brightnessdown BRTDN 00000087 00000000 K<\/code><\/li>\n<li><code>video\/brightnessup BRTUP 00000086 00000000 K<\/code><\/li>\n<li><code>button\/volumedown VOLDN 00000080 00000000 K<\/code><\/li>\n<li><code>button\/volumeup VOLUP 00000080 00000000 K<\/code><\/li>\n<li><code>jack\/headphone HEADPHONE plug<\/code><\/li>\n<li><code>jack\/microphone MICROPHONE plug<\/code><\/li>\n<li><code>jack\/microphone MICROPHONE unplug<\/code><\/li>\n<li><code>jack\/headphone HEADPHONE unplug<\/code><\/li>\n<\/ul>\n<p>All multimedia keys generate scancode and are described in the <a href=\"#input\">Input<\/a> section. However, you can write a handler for the respective keyboard events. The main advantage of ACPI hot keys is that they're not dependent on WM (which handles multimedia keys) and work even in console and SDL programs.<\/p>\n<p>You can use the <code>acpi<\/code> command to monitor the AC and battery information:<\/p>\n<pre><code>    #acpi -abit\n    Battery 0: Charging, 85%, 73:00:00 until charged\n    Battery 0: design capacity 3947 mAh, last full capacity 3478 mAh = 88%\n    Adapter 0: on-line<\/code><\/pre>\n<p>ACPI does not provide any information about Fan and Cooling. It looks like the Fan can only be controlled by hardware.<\/p>\n<h1 id=\"cpufreq\">CPU frequency scaling<\/h1>\n<p>Supported by <code>CONFIG_X86_INTEL_PSTATE<\/code> The default governor can be selected via options <code>CONFIG_CPU_FREQ_DEFAULT_GOV_*<\/code>.<\/p>\n<p>Install <code>sys-power\/cpupower<\/code> packages in order to monitor or control frequency scaling:<\/p>\n<pre><code>    # cpupower frequency-info\n    analyzing CPU 0:\n      driver: intel_pstate\n      CPUs which run at the same hardware frequency: 0\n      CPUs which need to have their frequency coordinated by software: 0\n      maximum transition latency:  Cannot determine or is not supported.\n      hardware limits: 400 MHz - 3.40 GHz\n      available cpufreq governors: performance powersave\n      current policy: frequency should be within 400 MHz and 3.40 GHz.\n                      The governor \"performance\" may decide which speed to use\n                      within this range.\n      current CPU frequency: Unable to call hardware\n      current CPU frequency: 2.72 GHz (asserted by call to kernel)\n      boost state support:\n        Supported: yes\n        Active: yes<\/code><\/pre>\n<h1 id=\"suspend\">Suspending<\/h1>\n<h2>Suspend-to-RAM<\/h2>\n<p>Suspend-to-RAM (aka sleep or ACPI S3 state) is supported by <code>CONFIG_SUSPEND<\/code> and works flawlessly.<\/p>\n<h2>Suspend-to-disk<\/h2>\n<p>In order to use native Linux hibernator, you need to enable <code>CONFIG_HIBERNATION<\/code> and specify your swap partition either in <code>CONFIG_PM_STD_PARTITION<\/code> or in the <code>resume<\/code> kernel parameter.<\/p>\n<p>ACPI subsystem in A1 does not generate an event when battery capacity changes. Therefore in order to perform automatic hibernation when battery capacity goes beyond critical level, we need a daemon monitoring the battery capacity level. One simple way to implement this is to use a cron daemon with a simple script checking the battery level.<\/p>\n<p>You can use <a href=\"https:\/\/vminko.org\/storage\/a1\/configs\/usr\/local\/bin\/low_battery_handler.sh\">low_battery_handler.sh<\/a> to check the battery level and hibernate when the battery level is less than or equal to 3%.<\/p>\n<p>There are <a href=\"https:\/\/wiki.gentoo.org\/wiki\/Cron\/en\">various cron implementations<\/a> available in the Gentoo repository, which slightly differ in configuration. In case of dcron, do the following as root.<\/p>\n<pre><code>    emerge -av dcron\n    rc-update add dcron boot\n    crontab -e<\/code><\/pre>\n<p>Add the following line to opened cron configuration file:<\/p>\n<pre><code>    * * * * * \/usr\/local\/bin\/low_battery_handler.sh<\/code><\/pre>\n<p>That's it. Your A1 should now hibernate automatically on low battery.<\/p>\n<h2>Power Management Utilities<\/h2>\n<p>You can use <code>pm-utils<\/code> package (the <a href=\"https:\/\/wiki.gentoo.org\/wiki\/Suspend_and_hibernate#Suspend_to_disk_with_sys-power.2Fpm-utils\">power management utilities<\/a>) in order to run user supplied scripts on suspend and resume. Additionally, you may be interested in the following:<\/p>\n<ul>\n<li><a href=\"https:\/\/vminko.org\/storage\/a1\/configs\/usr\/local\/portage\/sys-power\/pm-utils\/files\/1.4.1-on-failure-param.patch\">1.4.1-on-failure-param.patch<\/a> - adds <code>ON_FAILURE<\/code> parameter for <a href=\"https:\/\/vminko.org\/storage\/a1\/configs\/etc\/pm\/config.d\/gentoo\">gentoo<\/a> pm-utils config, which allows to execute a command when one of the hooks fails.<\/li>\n<li><a href=\"https:\/\/vminko.org\/storage\/a1\/configs\/etc\/pm\/sleep.d\/00dpms\">00dpms<\/a> - a hook which inhibits suspend when LCD is turned off, requires <a href=\"https:\/\/vminko.org\/storage\/a1\/configs\/usr\/local\/bin\/xrun.sh\">xrun.sh<\/a>.<\/li>\n<\/ul>\n<h1 id=\"microsd\">Media card reader<\/h1>\n<p>Supported by <code>CONFIG_MMC_SDHCI_PCI<\/code>.  The <a href=\"#benchmark\">benchmarks<\/a> section contains some read\/write tests of a microSD card.<\/p>\n<h1 id=\"issues\">Known issues<\/h1>\n<ul>\n<li>Fingerprint reader is not supported.<\/li>\n<li>\n<p>The kernel shows the following error message during bootup after hibernation:<\/p>\n<pre><code>Bluetooth: hci0: unexpected event for opcode 0xfc2f<\/code><\/pre>\n<\/li>\n<\/ul>\n<h1 id=\"benchmark\">Benchmarks<\/h1>\n<p>Here are few relevant benchmarks:<\/p>\n<table>\n<thead>\n<tr>\n<th>Test conditions<\/th>\n<th style=\"text-align: right;\">Results<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Bootup (from EFI boot menu to X11 WM)<\/td>\n<td style=\"text-align: right;\">9 sec<\/td>\n<\/tr>\n<tr>\n<td>Suspend-to-disk aka hibernate (linux-5.10.27, only X11 WM, no apps running)<\/td>\n<td style=\"text-align: right;\">3 sec<\/td>\n<\/tr>\n<tr>\n<td>Resume from suspend-to-disk (from EFI boot menu, linux-5.10.27)<\/td>\n<td style=\"text-align: right;\">7 sec<\/td>\n<\/tr>\n<tr>\n<td>Suspend-to-RAM (linux-5.10.27)<\/td>\n<td style=\"text-align: right;\">2 sec<\/td>\n<\/tr>\n<tr>\n<td>Resume from suspend-to-RAM (linux-5.10.27)<\/td>\n<td style=\"text-align: right;\">3 sec<\/td>\n<\/tr>\n<tr>\n<td>SSD read speed (One-Netbook PCI-E 256G SSD, hdparm)<\/td>\n<td style=\"text-align: right;\">866 MB\/s<\/td>\n<\/tr>\n<tr>\n<td>SSD write speed (One-Netbook PCI-E 256G SSD, dd, bs=1M)<\/td>\n<td style=\"text-align: right;\">810 MB\/s<\/td>\n<\/tr>\n<tr>\n<td>MicroSD card read speed (SanDisk Ultra 128Gb, hdparm)<\/td>\n<td style=\"text-align: right;\">38 MB\/s<\/td>\n<\/tr>\n<tr>\n<td>MicroSD card write speed (SanDisk Ultra 128Gb, dd, bs=1M)<\/td>\n<td style=\"text-align: right;\">18 MB\/s<\/td>\n<\/tr>\n<tr>\n<td>WiFi download speed (with AP based on Atheros QCA988x)<\/td>\n<td style=\"text-align: right;\">306 MB\/s<\/td>\n<\/tr>\n<tr>\n<td>WiFi upload speed (with AP based on Atheros QCA988x)<\/td>\n<td style=\"text-align: right;\">95 MB\/s<\/td>\n<\/tr>\n<tr>\n<td>Quake 3 (1920x1200, high quality, xf86-video-intel-2.99.917, mesa-20.3.5)<\/td>\n<td style=\"text-align: right;\">53 fps<\/td>\n<\/tr>\n<tr>\n<td>glxgears (linux-5.10.27, xf86-video-intel-2.99.917, mesa-20.3.5)<\/td>\n<td style=\"text-align: right;\">5000 fps<\/td>\n<\/tr>\n<tr>\n<td>Idle consumption (10% brightness, no wireless)<\/td>\n<td style=\"text-align: right;\">2.6 W<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h1 id=\"history\">History of changes<\/h1>\n<p><strong>June 17 2021<\/strong><br \/>\nAdded a tip how to fix undeclared <code>I2C_DEVICE_ID_GOODIX_0113<\/code> error to <a href=\"#kernel\">Kernel<\/a> section.<\/p>\n<p><strong>May 29 2021<\/strong><br \/>\nAdded link to <a href=\"http:\/\/wok.oblomov.eu\/tecnologia\/mixed-dpi-x11\/\">Mixed DPI and the X Window System<\/a> in the <a href=\"#video\">Video<\/a> section.<\/p>\n<p><strong>May 23 2021<\/strong><br \/>\nAdded the <a href=\"#virtkbd\">Virtual keyboard<\/a> section.<br \/>\nUpdated the <a href=\"https:\/\/vminko.org\/storage\/a1\/configs\/usr\/local\/bin\/tray.sh\">tray.sh<\/a> script. It no longer generates XML for OpenBox pipemenu. Now it just generates plain text, which is supposed to be displayed in a terminal emulator.<\/p>\n<p><strong>May 06 2021<\/strong><br \/>\nAdded a note regarding 4k video playback and VLC.<br \/>\nAdded a note 3d performance and the lecagy DDX driver.<\/p>\n<p><strong>May 05 2021<\/strong><br \/>\nFirst public release.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction This manual is intended to help user to configure Gentoo distribution of the GNU\/Linux operating system for One-Netbook A1 handheld computer. It&#8217;s supposed that user is skilled enough to install bare system from stage, compile kernel from source code, apply patches, etc. Despite the fact that the manufacturer claims Linux support on the product &hellip; <a href=\"https:\/\/handheld.computer\/?page_id=1131\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Gentoo on a One-Netbook A1&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":1155,"parent":221,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"tags":[251,14,15,231],"class_list":["post-1131","page","type-page","status-publish","has-post-thumbnail","hentry","tag-a1","tag-gentoo","tag-linux","tag-one-netbook"],"post_mailing_queue_ids":[],"_links":{"self":[{"href":"https:\/\/handheld.computer\/index.php?rest_route=\/wp\/v2\/pages\/1131","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/handheld.computer\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/handheld.computer\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/handheld.computer\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/handheld.computer\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1131"}],"version-history":[{"count":33,"href":"https:\/\/handheld.computer\/index.php?rest_route=\/wp\/v2\/pages\/1131\/revisions"}],"predecessor-version":[{"id":1181,"href":"https:\/\/handheld.computer\/index.php?rest_route=\/wp\/v2\/pages\/1131\/revisions\/1181"}],"up":[{"embeddable":true,"href":"https:\/\/handheld.computer\/index.php?rest_route=\/wp\/v2\/pages\/221"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/handheld.computer\/index.php?rest_route=\/wp\/v2\/media\/1155"}],"wp:attachment":[{"href":"https:\/\/handheld.computer\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1131"}],"wp:term":[{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/handheld.computer\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1131"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}