maggioni.xyz/_site/feed.xml

139 lines
13 KiB
XML
Raw Normal View History

2016-07-07 19:05:01 +00:00
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>Ramblings of an archer archer</title>
<description>Things which an Arch Linux user that also owns an recurve bow can write.
</description>
<link>http://praticamentetilde.github.io/</link>
<atom:link href="http://praticamentetilde.github.io/feed.xml" rel="self" type="application/rss+xml"/>
2016-07-12 18:22:49 +00:00
<pubDate>Tue, 12 Jul 2016 20:21:14 +0200</pubDate>
<lastBuildDate>Tue, 12 Jul 2016 20:21:14 +0200</lastBuildDate>
2016-07-07 19:05:01 +00:00
<generator>Jekyll v3.1.6</generator>
2016-07-12 18:22:49 +00:00
<item>
<title>Installing Gentoo on a Lenovo ThinkPad X60s</title>
<description>&lt;p&gt;My only laptop is a &lt;a href=&quot;http://www.thinkwiki.org/wiki/Category:X60s&quot;&gt;IBM/Lenovo ThinkPad X60s&lt;/a&gt;, a top line “ultrabook” from 2006 that features:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;An Intel Core Duo L2400 dual core 32 bit CPU, clocked at 1.66 Ghz;&lt;/li&gt;
&lt;li&gt;2GB of RAM;&lt;/li&gt;
&lt;li&gt;60GB of SATA1 hard drive;&lt;/li&gt;
&lt;li&gt;Wifi, Bluetooth, trackpoint mouse only, 56k modem, and a decent set of I/0 ports (including a CardBus slot!).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src=&quot;https://dl.dropboxusercontent.com/content_link/JzTZf5zYyBkpLDDOz1vtSMvPga8OIM1SBjID6G6R7jMplbaidXTSWjwqClip3RaL/file&quot; alt=&quot;Think1&quot; /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://dl.dropboxusercontent.com/content_link/t6IewbrmvdhYQBREpdr5r9F61SUFSK0uEZMA30LcLOE5Th6CTd5mdXBH8Ju2CFa8/file&quot; alt=&quot;Think2&quot; /&gt;&lt;/p&gt;
&lt;p&gt;This machine had an installation on Arch Linux, and I was using it for school stuff. It runned smoothly KDE5, Atom (great editor, Im using it to write this article), and it was usable even with Phpstorm. Pretty impressive for such an old thing, right?&lt;/p&gt;
&lt;p&gt;Since now I dont need this laptop every day I decided to give a try at Gentoo, another rolling relase, DIY install distro. This was both a test of my skills, my patience and the performances of the machine. For those of you that dont know, Gentoo hasnt binary packages: imagine using Arch with just a developer mantained AUR.&lt;/p&gt;
&lt;p&gt;I followed the &lt;a href=&quot;https://wiki.gentoo.org/wiki/Handbook:Main_Page&quot;&gt;installation guide&lt;/a&gt; without any problem until I had to emerge and install 309 packets from my &lt;code class=&quot;highlighter-rouge&quot;&gt;@world&lt;/code&gt; set: it took 15 hours! The compilation of &lt;code class=&quot;highlighter-rouge&quot;&gt;cmake&lt;/code&gt; crashed because of memory starvation, and so I had to use a spare USB stick as swap (the root file system wasnt resizable as it was JFS). After some research and a couple of seconds in &lt;code class=&quot;highlighter-rouge&quot;&gt;top&lt;/code&gt; I discovered that &lt;a href=&quot;https://en.wikipedia.org/wiki/Physical_Address_Extension&quot;&gt;PAE&lt;/a&gt; was not implemented in the install disk kernel. TIP: if you want to use a nicer install enviroment, use the Arch ISO. With gentoo, the initialisation of the file system is made with a &lt;a href=&quot;https://wiki.gentoo.org/wiki/Stage_tarball#Stage_3&quot;&gt;stage 3 tarball&lt;/a&gt; and not by tools like &lt;a href=&quot;https://wiki.archlinux.org/index.php/beginners&#39;_guide#Install_the_base_packages&quot;&gt;pacstrap&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I had another problem with &lt;code class=&quot;highlighter-rouge&quot;&gt;make menuconfig&lt;/code&gt;, the tool used to specify what features add or remove in your compiled from source Linux kernel. The ncurses menu showed me 64bit options, even if the install disk and the CPU were both 32 bit. If you have this issue too, you can set the &lt;code class=&quot;highlighter-rouge&quot;&gt;ARCH&lt;/code&gt; variable by your own:&lt;/p&gt;
&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;c&quot;&gt;# make ARCH=i386 menuconfig&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;# make ARCH=i386&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;# make ARCH=i386 install&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;
&lt;p&gt;At the end, I made it! I only have a base install, but i can show you &lt;code class=&quot;highlighter-rouge&quot;&gt;screenfetch&lt;/code&gt;:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://dl.dropboxusercontent.com/content_link/IPYdz4IcrWSE7MkHCcT3om38HrmEJCHMTifZa2apowHsiV7mlfMCUJ0ciYzk4Izz/file&quot; alt=&quot;Screenfetch&quot; /&gt;&lt;/p&gt;
&lt;p&gt;Ive not installed Gentoo in dual boot because I didnt figured out how to switch my bluetooth dongle in HID mode yet, so I cant select the OS with &lt;code class=&quot;highlighter-rouge&quot;&gt;rEFInd&lt;/code&gt;. Hope this rambling was, if not useful, at least entertaining!&lt;/p&gt;
</description>
<pubDate>Tue, 12 Jul 2016 13:00:00 +0200</pubDate>
<link>http://praticamentetilde.github.io/linux/2016/07/12/installing-gentoo-on-a-thinkpad-x60s.html</link>
<guid isPermaLink="true">http://praticamentetilde.github.io/linux/2016/07/12/installing-gentoo-on-a-thinkpad-x60s.html</guid>
<category>linux</category>
</item>
2016-07-07 19:05:01 +00:00
<item>
<title>Get a Bluetooth keyboard work with Arch Linux</title>
<description>&lt;p&gt;Ive recently got a Rapoo E6100. This is a minimal and space saving Bluetooth 3.0 keyboard. If you pair it with Windows 10, it will remain paired after reboot, giving the possibility to use it since the login screen. After installing the Bluetooth stack on my Arch via the &lt;code class=&quot;highlighter-rouge&quot;&gt;bluez&lt;/code&gt; and &lt;code class=&quot;highlighter-rouge&quot;&gt;bluez-utils&lt;/code&gt; packages I thought the pairing process would be as simple as Windows if I used the KDE GUI menus for Bluetooth management. Thats not true. The keyboard, once paired, will reconnect automatically just after &lt;code class=&quot;highlighter-rouge&quot;&gt;plasmashell&lt;/code&gt; loaded, leaving me without keyboard during the SDDM login screen and, of course, during a non-graphical session.&lt;/p&gt;
&lt;p&gt;As usual, ive searched help in the ArchWiki, founding &lt;a href=&quot;https://wiki.archlinux.org/index.php/Bluetooth_keyboard&quot;&gt;this&lt;/a&gt; article. With that, ive succesfully reconnected my Bluetooth keyboard using the &lt;code class=&quot;highlighter-rouge&quot;&gt;bluetoothctl&lt;/code&gt; utility. The next step was configuring the service for auto connection during boot. Ive created the &lt;code class=&quot;highlighter-rouge&quot;&gt;btkbd.conf&lt;/code&gt; and the &lt;code class=&quot;highlighter-rouge&quot;&gt;btkbd.service&lt;/code&gt; files, enabling the last one with systemd. Lets give a look to the service file:&lt;/p&gt;
&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;table style=&quot;border-spacing: 0&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class=&quot;gutter gl&quot; style=&quot;text-align: right&quot;&gt;&lt;pre class=&quot;lineno&quot;&gt;1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19&lt;/pre&gt;&lt;/td&gt;&lt;td class=&quot;code&quot;&gt;&lt;pre&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;Unit]
&lt;span class=&quot;nv&quot;&gt;Description&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;systemd Unit to automatically start a Bluetooth keyboard
&lt;span class=&quot;nv&quot;&gt;Documentation&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;https://wiki.archlinux.org/index.php/Bluetooth_Keyboard
&lt;span class=&quot;nv&quot;&gt;Requires&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;dbus-org.bluez.service
&lt;span class=&quot;nv&quot;&gt;After&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;dbus-org.bluez.service
&lt;span class=&quot;nv&quot;&gt;ConditionPathExists&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;/etc/btkbd.conf
&lt;span class=&quot;nv&quot;&gt;ConditionPathExists&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;/usr/bin/hcitool
&lt;span class=&quot;nv&quot;&gt;ConditionPathExists&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;/usr/bin/hciconfig
&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;Service]
&lt;span class=&quot;nv&quot;&gt;Type&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;oneshot
&lt;span class=&quot;nv&quot;&gt;EnvironmentFile&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;/etc/btkbd.conf
&lt;span class=&quot;nv&quot;&gt;ExecStart&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;/usr/bin/hciconfig &lt;span class=&quot;k&quot;&gt;${&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;HCIDEVICE&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;}&lt;/span&gt; up
&lt;span class=&quot;c&quot;&gt;# ignore errors on connect, spurious problems with bt?&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;# so start next command with -&lt;/span&gt;
&lt;span class=&quot;nv&quot;&gt;ExecStart&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;-/usr/bin/hcitool cc &lt;span class=&quot;k&quot;&gt;${&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;BTKBDMAC&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;Install]
&lt;span class=&quot;nv&quot;&gt;WantedBy&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;multi-user.target&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;
&lt;p&gt;Line 13 enables the Bluetooth dongle, and line 16 connects it to the keyboard we gave the mac address in &lt;code class=&quot;highlighter-rouge&quot;&gt;/etc/btkbd.conf&lt;/code&gt;. This should work flawlessly, right? Of course it doesnt. The service starts before the &lt;code class=&quot;highlighter-rouge&quot;&gt;dbus-org.bluez.service&lt;/code&gt; is loaded and fails. However, if the service is started manually after login the Bluetooth keyboard works. After hours of trying figuring out what was wrong Ive almost asked for a return on Amazon! The last attempt I made was with sddm disabled and involved built from scratch service:&lt;/p&gt;
&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;table style=&quot;border-spacing: 0&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class=&quot;gutter gl&quot; style=&quot;text-align: right&quot;&gt;&lt;pre class=&quot;lineno&quot;&gt;1
2
3
4
5
6
7
8
9
10&lt;/pre&gt;&lt;/td&gt;&lt;td class=&quot;code&quot;&gt;&lt;pre&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;Unit]
&lt;span class=&quot;nv&quot;&gt;Description&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;systemd Unit to automatically start a Bluetooth keyboard
&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;Service]
&lt;span class=&quot;nv&quot;&gt;Type&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;oneshot
&lt;span class=&quot;nv&quot;&gt;ExecStart&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;/bin/hciconfig hci0 up
&lt;span class=&quot;nv&quot;&gt;ExecStart&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;/bin/hcitool cc 00:11:22:33:44:55
&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;Install]
&lt;span class=&quot;nv&quot;&gt;WantedBy&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;bluetooth.target&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;
&lt;p&gt;This incredibly worked. I think the problem was that &lt;code class=&quot;highlighter-rouge&quot;&gt;multi-user.target&lt;/code&gt; that needs to be reached earlier than &lt;code class=&quot;highlighter-rouge&quot;&gt;bluetooth.target&lt;/code&gt;. I got rid of all the tidiness of the ArchWiki solution just to be sure that was not the problem, but I think you can use all of that just correcting &lt;code class=&quot;highlighter-rouge&quot;&gt;WantedBy=&lt;/code&gt;. Currently I havent an ArchWiki account nor a forum one, but as soon as Ill register Ill correct the article.&lt;/p&gt;
&lt;p&gt;Let me know in the comments if this solution is well made or if its just a bodge.
Last thing: I discovered that my Bluetooth dongle is CSR 8510 A10 based so expect some ramblings about &lt;a href=&quot;http://www.0xf8.org/2014/02/the-crux-of-finding-a-hid-proxy-capable-usb-bluetooth-adapter/&quot;&gt;hid proxy&lt;/a&gt;.&lt;/p&gt;
</description>
<pubDate>Thu, 07 Jul 2016 14:49:18 +0200</pubDate>
<link>http://praticamentetilde.github.io/linux/2016/07/07/get-a-bluetooth-keyboard-work-with-arch.html</link>
<guid isPermaLink="true">http://praticamentetilde.github.io/linux/2016/07/07/get-a-bluetooth-keyboard-work-with-arch.html</guid>
<category>linux</category>
</item>
</channel>
</rss>