<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Udev on Wimpy's World</title><link>https://blog.wimpys.world/tags/udev/</link><description>Recent content in Udev on Wimpy's World</description><generator>Hugo -- gohugo.io</generator><language>en-gb</language><managingEditor>martin@wimpress.com (Martin Wimpress)</managingEditor><webMaster>martin@wimpress.com (Martin Wimpress)</webMaster><lastBuildDate>Fri, 28 Apr 2023 16:00:00 +0100</lastBuildDate><atom:link href="https://blog.wimpys.world/tags/udev/rss.xml" rel="self" type="application/rss+xml"/><item><title>Flash Stadia Controller Bluetooth Firmware on Linux</title><link>https://blog.wimpys.world/posts/flash-stadia-controller-bluetooth-firmware-on-linux/</link><pubDate>Fri, 28 Apr 2023 16:00:00 +0100</pubDate><author>martin@wimpress.com (Martin Wimpress)</author><guid>https://wimpysworld.com/posts/flash-stadia-controller-bluetooth-firmware-on-linux/</guid><description>&lt;p&gt;I was a &lt;a href="https://stadia.google.com/gg/"&gt;Google Stadia&lt;/a&gt; &amp;ldquo;founder&amp;rdquo; and when it was shut down on January 18, 2023 I was left with 3 perfectly usable Stadia Controllers; provided I could connect them using a USB-C cable. I quite like the Stadia Controller, the form factor is similar to the PlayStation DualShock but with an Xbox style button layout.&lt;/p&gt;
&lt;p class="text-center"&gt;
&lt;img src="./stadia-controller.webp" class="img-fluid" alt="Stadia Controller"/&gt;
&lt;br /&gt;
&lt;em&gt;Stadia Controller&lt;/em&gt;
&lt;/p&gt;
&lt;p&gt;While using it via USB-C is great for PC, wireless connectivity would provide more options. Thankfully &lt;a href="https://stadia.google.com/controller"&gt;Google released Bluetooth firmware for the Stadia Controller&lt;/a&gt; which disables Stadia&amp;rsquo;s proprietary Wi-Fi connectivity and enables Bluetooth® Low Energy (BLE). You can then use it like a standard wireless Bluetooth controller with other hardware and also still plug your Stadia Controller into a device with a USB-C cable.&lt;/p&gt;
&lt;h2 id="compatibility-"&gt;Compatibility 🧩&lt;/h2&gt;
&lt;p&gt;The &lt;a href="https://support.google.com/stadia?p=controllerconnect#devicelist"&gt;Stadia Controller Device Compatibility List&lt;/a&gt; says&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&amp;ldquo;Testing of Bluetooth mode was focused on the devices and systems listed below, but may not work with all hardware configurations.&amp;rdquo;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;ul&gt;
&lt;li&gt;Windows 10 and 11 + Steam&lt;/li&gt;
&lt;li&gt;MacOS® 13 + Steam&lt;/li&gt;
&lt;li&gt;ChromeOS&lt;/li&gt;
&lt;li&gt;Android&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Most importantly, it says &lt;em&gt;&lt;strong&gt;&amp;ldquo;computers must have a Bluetooth Low Energy adapter in order to communicate with the Stadia Controller in Bluetooth mode and that hardware compatibility will vary.&amp;rdquo;&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;
&lt;h2 id="flash-stadia-controller-bluetooth-firmware-using-ubuntu-2204-"&gt;Flash Stadia Controller Bluetooth Firmware using Ubuntu 22.04 🐧&lt;/h2&gt;
&lt;p&gt;Here&amp;rsquo;s how I flashed that firmware on all 3 of my controllers using Linux; well Ubuntu 22.04 to be precise. The system requirements for the Bluetooth Firmware tool is stated to be Chrome 108 or newer. No problem! But, I was unable to get the controllers to show up in Chrome until some &lt;code&gt;udev&lt;/code&gt; rules were added. Open a terminal and run the following command from any directory:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="o"&gt;{&lt;/span&gt; cat &lt;span class="s"&gt;&amp;lt;&amp;lt;EOF
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="s"&gt;# SDP protocol
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="s"&gt;KERNEL==&amp;#34;hidraw*&amp;#34;, ATTRS{idVendor}==&amp;#34;1fc9&amp;#34;, MODE=&amp;#34;0666&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="s"&gt;ACTION==&amp;#34;add&amp;#34;, SUBSYSTEM==&amp;#34;usb&amp;#34;, ATTR{idVendor}==&amp;#34;1fc9&amp;#34;, MODE=&amp;#34;0666&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="s"&gt;ACTION==&amp;#34;add&amp;#34;, SUBSYSTEM==&amp;#34;usb&amp;#34;, ATTR{idVendor}==&amp;#34;0d28&amp;#34;, MODE=&amp;#34;0666&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="s"&gt;# Flashloader
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="s"&gt;KERNEL==&amp;#34;hidraw*&amp;#34;, ATTRS{idVendor}==&amp;#34;15a2&amp;#34;, MODE=&amp;#34;0666&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="s"&gt;# Controller
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="s"&gt;KERNEL==&amp;#34;hidraw*&amp;#34;, SUBSYSTEM==&amp;#34;hidraw&amp;#34;, ATTRS{idVendor}==&amp;#34;18d1&amp;#34;, MODE=&amp;#34;0666&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="s"&gt;SUBSYSTEMS==&amp;#34;usb&amp;#34;, ATTRS{idVendor}==&amp;#34;18d1&amp;#34;, ATTRS{idProduct}==&amp;#34;9400&amp;#34;, MODE=&amp;#34;0660&amp;#34;, TAG+=&amp;#34;uaccess&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="s"&gt;EOF&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="o"&gt;}&lt;/span&gt; &lt;span class="p"&gt;|&lt;/span&gt; sudo tee /etc/udev/rules.d/70-stadiacontroller-flash.rules
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Now run the following to reload the &lt;code&gt;udev&lt;/code&gt; rules.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;sudo udevadm control --reload-rules
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;sudo udevadm trigger
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;With that done, I restarted Google Chrome and followed the instructions on the &lt;a href="https://stadia.google.com/controller/index_en_GB.html"&gt;Stadia Controller Firmware Flashing Tool&lt;/a&gt; page. I was able to flash the firmware on all 3 of my controllers. The process is pretty straightforward but I&amp;rsquo;ve included the instructions below for reference.&lt;/p&gt;
&lt;h3 id="charge-your-controller"&gt;Charge your controller&lt;/h3&gt;
&lt;p&gt;Make sure that your controller has been charged for 30 minutes and that you&amp;rsquo;re using a USB data cable.&lt;/p&gt;
&lt;p class="text-center"&gt;
&lt;img src="./Verify_Plug_in_controller.svg" class="img-fluid" alt="Charge your controller"/&gt;
&lt;br&gt;
&lt;b&gt;Charge your controller&lt;/b&gt;
&lt;/p&gt;
&lt;h3 id="unplug-your-controller-to-power-it-off"&gt;Unplug your controller to power it off&lt;/h3&gt;
&lt;p&gt;If it turns on again, hold the Stadia button for 4 seconds to power it off&lt;/p&gt;
&lt;p class="text-center"&gt;
&lt;img src="./Unlock_Unplug.svg" class="img-fluid" alt="Unplug your controller to power it off"/&gt;
&lt;br&gt;
&lt;b&gt;Unplug your controller to power it off&lt;/b&gt;
&lt;/p&gt;
&lt;h3 id="hold-the-option-button-three-dots-while-plugging-in-your-controller"&gt;Hold the option button (three dots) while plugging in your controller&lt;/h3&gt;
&lt;p&gt;The status light should remain off. If it turns on, unplug the controller and try again&lt;/p&gt;
&lt;p class="text-center"&gt;
&lt;img src="./Unlock_Option_Plug.svg" class="img-fluid" alt="Hold the option button (three dots) while plugging in your controller"/&gt;
&lt;br&gt;
&lt;b&gt;Hold the option button (three dots) while plugging in your controller&lt;/b&gt;
&lt;/p&gt;
&lt;h3 id="press-the-option-assistant-a-and-y-buttons-at-the-same-time"&gt;Press the Option, Assistant, A, and Y buttons at the same time&lt;/h3&gt;
&lt;p&gt;There won&amp;rsquo;t be any controller feedback, proceed to the next step to confirm the controller is unlocked&lt;/p&gt;
&lt;p class="text-center"&gt;
&lt;img src="./Unlock_Four_buttons.svg" class="img-fluid" alt="Press the Option, Assistant, A, and Y buttons at the same time"/&gt;
&lt;br&gt;
&lt;b&gt;Press the Option, Assistant, A, and Y buttons at the same time&lt;/b&gt;
&lt;/p&gt;
&lt;h3 id="select-your-controller-in-the-chrome-device-list-and-click-connect"&gt;Select your controller in the Chrome device list and click &amp;ldquo;Connect&amp;rdquo;.&lt;/h3&gt;
&lt;p&gt;The text in the flashing utility says the Stadia Controller should be named &lt;strong&gt;&amp;ldquo;SP Blank RT Family&amp;rdquo;&lt;/strong&gt; or &amp;ldquo;Stadia Controller&amp;rdquo; or &amp;ldquo;USB COMPOSITE DEVICE&amp;rdquo;.&lt;/p&gt;
&lt;p class="text-center"&gt;
&lt;img src="./Chrome_dialog_Download_en-GB.svg" class="img-fluid" alt="Select your controller in the Chrome device list again and click Connect"/&gt;
&lt;br&gt;
&lt;b&gt;Select your controller in the Chrome device list again and click "Connect".&lt;/b&gt;
&lt;/p&gt;
&lt;h3 id="download-complete"&gt;Download complete&lt;/h3&gt;
&lt;p&gt;You&amp;rsquo;ve almost finished. Go to the final step to install the latest version of Bluetooth mode on your controller.&lt;/p&gt;
&lt;p class="text-center"&gt;
&lt;img src="./Download_Download_complete.svg" class="img-fluid" alt="Download complete"/&gt;
&lt;br&gt;
&lt;b&gt;Download complete&lt;/b&gt;
&lt;/p&gt;
&lt;h3 id="install-bluetooth-mode"&gt;Install Bluetooth mode&lt;/h3&gt;
&lt;p&gt;One more time - select your controller in the Chrome device list, then click &amp;ldquo;Connect&amp;rdquo;. Installation will start automatically and should only take a minute.&lt;/p&gt;
&lt;p&gt;The text in the flashing utility says the Stadia Controller should be named &lt;strong&gt;&amp;ldquo;USB COMPOSITE DEVICE&amp;rdquo;&lt;/strong&gt; or &amp;ldquo;Stadia Controller&amp;rdquo; or &amp;ldquo;SP Blank RT Family&amp;rdquo;.&lt;/p&gt;
&lt;p class="text-center"&gt;
&lt;img src="./Chrome_dialog_Install_en-GB.svg" class="img-fluid" alt="Install Bluetooth mode"/&gt;
&lt;br&gt;
&lt;b&gt;Install Bluetooth mode&lt;/b&gt;
&lt;/p&gt;
&lt;h3 id="installation-complete"&gt;Installation complete&lt;/h3&gt;
&lt;p&gt;Wait a minute or so for the firmware installation to complete.&lt;/p&gt;
&lt;p class="text-center"&gt;
&lt;img src="./Finish_Bluetooth_enabled.svg" class="img-fluid" alt="Installation complete"/&gt;
&lt;br&gt;
&lt;b&gt;Installation complete&lt;/b&gt;
&lt;/p&gt;
&lt;h2 id="pairing-stadia-controller-with-bluetooth"&gt;Pairing Stadia Controller with Bluetooth&lt;/h2&gt;
&lt;p&gt;Hold the Y and Stadia buttons for 2 seconds until the status light flashes orange. It is now in pairing mode and visible to other devices.&lt;/p&gt;
&lt;p class="text-center"&gt;
&lt;img src="./Pairing_mode.svg" class="img-fluid" alt="Pairing Stadia Controller with Bluetooth"/&gt;
&lt;br&gt;
&lt;b&gt;Pairing Stadia Controller with Bluetooth&lt;/b&gt;
&lt;/p&gt;
&lt;h2 id="hurray-up-"&gt;Hurray up! ⏳️&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;After the shutdown in January 2023, you have until December 31, 2023, to update the controller so it can use Bluetooth mode.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Fortunately, the &lt;a href="https://github.com/Scyne/stadiaRawBtFw"&gt;Stadia Controller firmware has been archived&lt;/a&gt; and an &lt;a href="https://luigimannoni.github.io/stadia-controller-flasher/"&gt;Unofficial Stadia Controller Flashing utility&lt;/a&gt; created which might prove useful after December 31, 2023.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://luigimannoni.github.io/stadia-controller-flasher/"&gt;&lt;strong&gt;Unofficial Stadia Controller Flashing utility&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Your mileage may vary using the re-implementation of the &lt;a href="https://github.com/luigimannoni/stadia-controller-flasher"&gt;Utility for flashing Stadia Controllers&lt;/a&gt;, so if you&amp;rsquo;re doing this before December 31, 2023, use the &lt;a href="https://stadia.google.com/controller/"&gt;official tool&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id="conclusion"&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;After updating my Stadia Controllers with Bluetooth firmware, I&amp;rsquo;ve successfully paired them with my Android tablet, iPhone 13 and &lt;a href="https://chimeraos.org/"&gt;ChimeraOS&lt;/a&gt;; an operating system that provides an out-of-the-box couch gaming experience 🎮️ While Stadia might be dead and gone, I&amp;rsquo;m very happy to continue to get utility out of the controllers; which turned out to be free after the reimbursement Google offered when Stadia was shut down.&lt;/p&gt;</description><summary>How to flash Stadia Controller Bluetooth mode on Linux</summary></item><item><title>HP Microserver N54L power saving and performance tuning using Debian</title><link>https://blog.wimpys.world/posts/hp-microserver-n54l-power-saving-and-performance-tuning-using-debian/</link><pubDate>Wed, 16 Dec 2015 12:00:00 +0000</pubDate><author>martin@wimpress.com (Martin Wimpress)</author><guid>https://wimpysworld.com/posts/hp-microserver-n54l-power-saving-and-performance-tuning-using-debian/</guid><description>&lt;p&gt;I&amp;rsquo;ve installed &lt;a href="http://www.openmediavault.org/"&gt;Open Media Vault&lt;/a&gt;
on a &lt;a href="http://www8.hp.com/uk/en/products/proliant-servers/product-detail.html?oid=5336624"&gt;HP ProLiant MicroServer G7 N54L&lt;/a&gt;
and use it as media server for the house. OpenMediaVault (OMV) is a
network attached storage (NAS) solution based on &lt;a href="http://www.debian.org"&gt;Debian&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I want to minimise power consumption but maximise performance. Here are
some tweaks reduce power consumption and improve network performance.&lt;/p&gt;
&lt;h1 id="power-saving"&gt;Power Saving&lt;/h1&gt;
&lt;p&gt;Install the following.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;apt-get install amd64-microcode firmware-linux firmware-linux-free &lt;span class="se"&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;firmware-linux-nonfree pciutils powertop radeontool
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;And for ACPI.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;apt-get install acpi acpid acpi-support acpi-support-base
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id="aspm-and-acpi"&gt;ASPM and ACPI&lt;/h2&gt;
&lt;p&gt;First I enabled PCIE ASPM in the BIOS and forced the kernel to use it and
ACPI via &lt;code&gt;grub&lt;/code&gt; by changing &lt;code&gt;GRUB_CMDLINE_LINUX_DEFAULT&lt;/code&gt; in &lt;code&gt;/etc/default/grub&lt;/code&gt;,
so it looks like this:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;GRUB_CMDLINE_LINUX_DEFAULT&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;quiet acpi=force pcie_aspm=force nmi_watchdog=0&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Then update &lt;code&gt;grub&lt;/code&gt; and reboot.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;update-grub
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;reboot
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id="enable-power-saving-via-udev"&gt;Enable Power Saving via udev&lt;/h2&gt;
&lt;p&gt;The following rules file &lt;code&gt;/etc/udev/rules.d/90-local-n54l.rules&lt;/code&gt; enables
power saving modes for all PCI, SCSI and USB devices and ASPM. Futher
the internal Radeon card power profile is set to low as there is rarely
a monitor connected. The file contains the following:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;SUBSYSTEM&lt;/span&gt;&lt;span class="o"&gt;==&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;module&amp;#34;&lt;/span&gt;, &lt;span class="nv"&gt;KERNEL&lt;/span&gt;&lt;span class="o"&gt;==&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;pcie_aspm&amp;#34;&lt;/span&gt;, &lt;span class="nv"&gt;ACTION&lt;/span&gt;&lt;span class="o"&gt;==&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;add&amp;#34;&lt;/span&gt;, &lt;span class="nv"&gt;TEST&lt;/span&gt;&lt;span class="o"&gt;==&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;parameters/policy&amp;#34;&lt;/span&gt;, ATTR&lt;span class="o"&gt;{&lt;/span&gt;parameters/policy&lt;span class="o"&gt;}=&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;powersave&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;SUBSYSTEM&lt;/span&gt;&lt;span class="o"&gt;==&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;i2c&amp;#34;&lt;/span&gt;, &lt;span class="nv"&gt;ACTION&lt;/span&gt;&lt;span class="o"&gt;==&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;add&amp;#34;&lt;/span&gt;, &lt;span class="nv"&gt;TEST&lt;/span&gt;&lt;span class="o"&gt;==&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;power/control&amp;#34;&lt;/span&gt;, ATTR&lt;span class="o"&gt;{&lt;/span&gt;power/control&lt;span class="o"&gt;}=&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;auto&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;SUBSYSTEM&lt;/span&gt;&lt;span class="o"&gt;==&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;pci&amp;#34;&lt;/span&gt;, &lt;span class="nv"&gt;ACTION&lt;/span&gt;&lt;span class="o"&gt;==&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;add&amp;#34;&lt;/span&gt;, &lt;span class="nv"&gt;TEST&lt;/span&gt;&lt;span class="o"&gt;==&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;power/control&amp;#34;&lt;/span&gt;, ATTR&lt;span class="o"&gt;{&lt;/span&gt;power/control&lt;span class="o"&gt;}=&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;auto&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;SUBSYSTEM&lt;/span&gt;&lt;span class="o"&gt;==&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;usb&amp;#34;&lt;/span&gt;, &lt;span class="nv"&gt;ACTION&lt;/span&gt;&lt;span class="o"&gt;==&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;add&amp;#34;&lt;/span&gt;, &lt;span class="nv"&gt;TEST&lt;/span&gt;&lt;span class="o"&gt;==&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;power/control&amp;#34;&lt;/span&gt;, ATTR&lt;span class="o"&gt;{&lt;/span&gt;power/control&lt;span class="o"&gt;}=&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;auto&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;SUBSYSTEM&lt;/span&gt;&lt;span class="o"&gt;==&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;usb&amp;#34;&lt;/span&gt;, &lt;span class="nv"&gt;ACTION&lt;/span&gt;&lt;span class="o"&gt;==&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;add&amp;#34;&lt;/span&gt;, &lt;span class="nv"&gt;TEST&lt;/span&gt;&lt;span class="o"&gt;==&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;power/autosuspend&amp;#34;&lt;/span&gt;, ATTR&lt;span class="o"&gt;{&lt;/span&gt;power/autosuspend&lt;span class="o"&gt;}=&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;2&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;SUBSYSTEM&lt;/span&gt;&lt;span class="o"&gt;==&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;scsi&amp;#34;&lt;/span&gt;, &lt;span class="nv"&gt;ACTION&lt;/span&gt;&lt;span class="o"&gt;==&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;add&amp;#34;&lt;/span&gt;, &lt;span class="nv"&gt;TEST&lt;/span&gt;&lt;span class="o"&gt;==&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;power/control&amp;#34;&lt;/span&gt;, ATTR&lt;span class="o"&gt;{&lt;/span&gt;power/control&lt;span class="o"&gt;}=&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;auto&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;SUBSYSTEM&lt;/span&gt;&lt;span class="o"&gt;==&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;spi&amp;#34;&lt;/span&gt;, &lt;span class="nv"&gt;ACTION&lt;/span&gt;&lt;span class="o"&gt;==&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;add&amp;#34;&lt;/span&gt;, &lt;span class="nv"&gt;TEST&lt;/span&gt;&lt;span class="o"&gt;==&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;power/control&amp;#34;&lt;/span&gt;, ATTR&lt;span class="o"&gt;{&lt;/span&gt;power/control&lt;span class="o"&gt;}=&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;auto&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;SUBSYSTEM&lt;/span&gt;&lt;span class="o"&gt;==&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;drm&amp;#34;&lt;/span&gt;, &lt;span class="nv"&gt;KERNEL&lt;/span&gt;&lt;span class="o"&gt;==&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;card*&amp;#34;&lt;/span&gt;, &lt;span class="nv"&gt;ACTION&lt;/span&gt;&lt;span class="o"&gt;==&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;add&amp;#34;&lt;/span&gt;, &lt;span class="nv"&gt;DRIVERS&lt;/span&gt;&lt;span class="o"&gt;==&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;radeon&amp;#34;&lt;/span&gt;, &lt;span class="nv"&gt;TEST&lt;/span&gt;&lt;span class="o"&gt;==&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;power/control&amp;#34;&lt;/span&gt;, &lt;span class="nv"&gt;TEST&lt;/span&gt;&lt;span class="o"&gt;==&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;device/power_method&amp;#34;&lt;/span&gt;, ATTR&lt;span class="o"&gt;{&lt;/span&gt;device/power_method&lt;span class="o"&gt;}=&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;profile&amp;#34;&lt;/span&gt;, ATTR&lt;span class="o"&gt;{&lt;/span&gt;device/power_profile&lt;span class="o"&gt;}=&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;low&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;SUBSYSTEM&lt;/span&gt;&lt;span class="o"&gt;==&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;scsi_host&amp;#34;&lt;/span&gt;, &lt;span class="nv"&gt;KERNEL&lt;/span&gt;&lt;span class="o"&gt;==&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;host*&amp;#34;&lt;/span&gt;, &lt;span class="nv"&gt;ACTION&lt;/span&gt;&lt;span class="o"&gt;==&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;add&amp;#34;&lt;/span&gt;, &lt;span class="nv"&gt;TEST&lt;/span&gt;&lt;span class="o"&gt;==&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;link_power_management_policy&amp;#34;&lt;/span&gt;, ATTR&lt;span class="o"&gt;{&lt;/span&gt;link_power_management_policy&lt;span class="o"&gt;}=&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;min_power&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Add this to &lt;code&gt;/erc/rc.local&lt;/code&gt;.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;1500&amp;#39;&lt;/span&gt; &amp;gt; &lt;span class="s1"&gt;&amp;#39;/proc/sys/vm/dirty_writeback_centisecs&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id="hard-disk-spindown"&gt;Hard disk spindown&lt;/h2&gt;
&lt;p&gt;Using the Open Media Vault web interface got to &lt;code&gt;Storage -&amp;gt; Physical Disks&lt;/code&gt;,
select each disk in turn and click &lt;code&gt;Edit&lt;/code&gt; then set:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Advanced Power Management:&lt;/strong&gt; Intermediate power usage with standby&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Automatic Acoustic Management:&lt;/strong&gt; Minimum performance, Minimum acoustic output&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Spindown time:&lt;/strong&gt; 20 minutes&lt;/li&gt;
&lt;/ul&gt;
&lt;h1 id="performance-tuning"&gt;Performance Tuning&lt;/h1&gt;
&lt;h2 id="network"&gt;Network&lt;/h2&gt;
&lt;p&gt;The following tweaks improve network performance ,but &lt;strong&gt;I have a
&lt;a href="http://www.hiwifi.co.uk/"&gt;HP NC360T PCI Express Dual Port Gigabit Server Adapter&lt;/a&gt;&lt;/strong&gt;
in my N54L so these settings may not be applicable to the onboard NIC.&lt;/p&gt;
&lt;p&gt;Add this to &lt;code&gt;/erc/rc.local&lt;/code&gt;.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;ethtool -G eth0 rx &lt;span class="m"&gt;4096&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;ethtool -G eth1 rx &lt;span class="m"&gt;4096&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;ethtool -G eth0 tx &lt;span class="m"&gt;4096&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;ethtool -G eth1 tx &lt;span class="m"&gt;4096&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;ifconfig eth0 txqueuelen &lt;span class="m"&gt;1000&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;ifconfig eth1 txqueuelen &lt;span class="m"&gt;1000&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Add the following to &lt;code&gt;/etc/sysctl.d/local.conf&lt;/code&gt;.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;fs.file-max &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="m"&gt;100000&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;net.core.netdev_max_backlog &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="m"&gt;50000&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;net.core.optmem_max &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="m"&gt;40960&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;net.core.rmem_default &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="m"&gt;16777216&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;net.core.rmem_max &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="m"&gt;16777216&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;net.core.wmem_default &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="m"&gt;16777216&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;net.core.wmem_max &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="m"&gt;16777216&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;net.ipv4.conf.all.accept_redirects &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;net.ipv4.conf.all.accept_source_route &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;net.ipv4.conf.all.log_martians &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;net.ipv4.conf.all.send_redirects &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;net.ipv4.ip_local_port_range &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="m"&gt;10000&lt;/span&gt; &lt;span class="m"&gt;65000&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;net.ipv4.tcp_fin_timeout &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="m"&gt;10&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;net.ipv4.tcp_max_syn_backlog &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="m"&gt;30000&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;net.ipv4.tcp_max_tw_buckets &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="m"&gt;2000000&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;net.ipv4.tcp_rfc1337 &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;net.ipv4.tcp_rmem &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="m"&gt;4096&lt;/span&gt; &lt;span class="m"&gt;87380&lt;/span&gt; &lt;span class="m"&gt;16777216&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;net.ipv4.tcp_sack&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;net.ipv4.tcp_slow_start_after_idle &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;net.ipv4.tcp_timestamps&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;net.ipv4.tcp_tw_reuse &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;net.ipv4.tcp_wmem &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="m"&gt;4096&lt;/span&gt; &lt;span class="m"&gt;65536&lt;/span&gt; &lt;span class="m"&gt;16777216&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;net.ipv4.udp_rmem_min &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="m"&gt;8192&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;net.ipv4.udp_wmem_min &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="m"&gt;8192&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;vm.swappiness &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="m"&gt;10&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id="conclusion"&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;With these settings applied &lt;code&gt;powertop&lt;/code&gt; reports everything that can be in
a power saving mode is and the room temperature is measurably cooler.
More importantly, with four 4TB drives in a RAID-5 configuration
formatted with XFS and dual bonded gigabit ethernet, I am able to backup
data to the server at a sustained rate of 105MB/s, which is 0.85 Gbit.&lt;/p&gt;
&lt;p&gt;Not too shabby for an AMD Turion II Neo N54L (2.2GHz) :slight_smile:&lt;/p&gt;
&lt;h4 id="references"&gt;References&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://www.wgdd.de/2013/08/hp-n54l-microserver-energy-efficiency.html?m=1"&gt;http://www.wgdd.de/2013/08/hp-n54l-microserver-energy-efficiency.html?m=1&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://gareth.halfacree.co.uk/2014/02/tuning-an-hp-proliant-microserver"&gt;http://gareth.halfacree.co.uk/2014/02/tuning-an-hp-proliant-microserver&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.scottalanmiller.com/linux/2011/06/20/working-with-nic-ring-buffers/"&gt;http://www.scottalanmiller.com/linux/2011/06/20/working-with-nic-ring-buffers/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://gist.github.com/dstroot/2785263"&gt;https://gist.github.com/dstroot/2785263&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description><summary>Configure HP Microserver N54L Power Saving on Debian</summary></item></channel></rss>