doc:appunti:hardware:mini_pc_with_das
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
doc:appunti:hardware:mini_pc_with_das [2024/03/15 09:43] – niccolo | doc:appunti:hardware:mini_pc_with_das [2024/10/04 10:42] (current) – [Installing Debian GNU/Linux] niccolo | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Mini PC T9Plus with D4-300 TerraMaster DAS ====== | ====== Mini PC T9Plus with D4-300 TerraMaster DAS ====== | ||
+ | |||
+ | In March 2024 I decided to assemble an **home server** to be run **24h, 7/7**, the system is intended to replace an old Dell PowerEdge T110, which served my house for the past 14 years without any issue. The main reason for the switch is power consumption and the fear of old hardware wear. | ||
+ | |||
+ | I discovered that a new generation of **Mini PCs** based on the **Intel Alder Lake N95** processor outperform the old **Intel Xeon @ 3.0 GHz**. The [[https:// | ||
+ | |||
+ | My home server is acting also as a domestic firewall (running Debian GNU/Linux), so I opted for a dual LAN Mini-PC. Obviously the only problem is the storage: the embedded SDD disk is not sufficient for my media library, so I opted for an esternal USB Direct Attached Storage. The choice was a **D4-300 TerraMaster DAS** which will host **two 4 Tb 3.5 inches drives** (leaving two empty slots). | ||
+ | |||
+ | ^ Mini PC T9Plus | ||
+ | ^ CPU | Intel(R) N95, 4 Cores | | ||
+ | ^ RAM | 16 Gb | | ||
+ | ^ HDD | NS512GSSD330 512 Gb Solid State Disk | | ||
+ | ^ Ethernet | ||
+ | ^ WiFi | Realtek RTL8852BE PCIe 802.11ax | ||
+ | ^ Video | Intel Alder Lake-N UHD Graphics | ||
+ | |||
+ | ^ D4-300 TerraMaster DAS ^^ | ||
+ | ^ Disk Slot Number | ||
+ | ^ Compatible Disk Types | 3.5" SATA HDD\\ 2.5" SATA HDD\\ 2.5" SATA SSD | | ||
+ | ^ USB | USB3.1 Type-C gen1 x 1 | | ||
===== Installing Debian GNU/Linux ===== | ===== Installing Debian GNU/Linux ===== | ||
- | It seems that Linux **kernel 6.1.0** (as shipped with Debian 12 Bookworm) still does not support the WiFi adapter **RTL8852BE**. | + | It seems that Linux **kernel 6.1.0** (as shipped with Debian 12 Bookworm) still does not support the WiFi adapter **RTL8852BE**, see this page **[[rtl8852be_on_debian_12]]**. |
+ | |||
+ | These are the USB and PCI peripherals: | ||
+ | |||
+ | < | ||
+ | Bus 001 Device 008: ID 1a86:7523 QinHeng Electronics CH340 serial converter | ||
+ | Bus 001 Device 006: ID 0573:1573 Zoran Co. Personal Media Division (Nogatech) USB Audio and HID | ||
+ | Bus 001 Device 005: ID 174c:2074 ASMedia Technology Inc. ASM1074 High-Speed hub | ||
+ | Bus 001 Device 002: ID 0bda:b85b Realtek Semiconductor Corp. Bluetooth Radio | ||
+ | Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | 00:00.0 Host bridge: Intel Corporation Device 4618 | ||
+ | 00:02.0 VGA compatible controller: Intel Corporation Alder Lake-N [UHD Graphics] | ||
+ | 00:14.0 USB controller: Intel Corporation Alder Lake-N PCH USB 3.2 xHCI Host Controller | ||
+ | 00:14.2 RAM memory: Intel Corporation Alder Lake-N PCH Shared SRAM | ||
+ | 00:16.0 Communication controller: Intel Corporation Alder Lake-N PCH HECI Controller | ||
+ | 00:17.0 SATA controller: Intel Corporation Alder Lake-N SATA AHCI Controller | ||
+ | 00:1c.0 PCI bridge: Intel Corporation Device 54bb | ||
+ | 00:1d.0 PCI bridge: Intel Corporation Alder Lake-N PCI Express Root Port | ||
+ | 00:1d.3 PCI bridge: Intel Corporation Alder Lake-N PCI Express Root Port | ||
+ | 00:1f.0 ISA bridge: Intel Corporation Device 5482 | ||
+ | 00:1f.3 Audio device: Intel Corporation Alder Lake-N PCH High Definition Audio Controller | ||
+ | 00:1f.4 SMBus: Intel Corporation Alder Lake-N SMBus | ||
+ | 00:1f.5 Serial bus controller: Intel Corporation Alder Lake-N SPI (flash) Controller | ||
+ | 01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. | ||
+ | RTL8111/ | ||
+ | 02:00.0 Network controller: Realtek Semiconductor Co., Ltd. | ||
+ | RTL8852BE PCIe 802.11ax Wireless Network Controller | ||
+ | 03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. | ||
+ | RTL8111/ | ||
+ | </ | ||
==== The RGB rainbow LEDs ==== | ==== The RGB rainbow LEDs ==== | ||
Line 11: | Line 62: | ||
You can program the LEDs with several visual effects, brigthness and speed by sending some specific commands to the USB serial adapter exposed to the operating system. The manufacturer provides a Windows program to configure the LEDs, but several users on the internet reported that the program (named **LedControl.exe**) is detected as a malware by several antivirus software. I never run MS-Windows on this PC because I booted and installed Debian GNU/Linux since the very first boot, so I cannot give any insight on it. | You can program the LEDs with several visual effects, brigthness and speed by sending some specific commands to the USB serial adapter exposed to the operating system. The manufacturer provides a Windows program to configure the LEDs, but several users on the internet reported that the program (named **LedControl.exe**) is detected as a malware by several antivirus software. I never run MS-Windows on this PC because I booted and installed Debian GNU/Linux since the very first boot, so I cannot give any insight on it. | ||
- | Fortunately enough, someone [[https:// | + | Fortunately enough, someone [[https:// |
+ | In Debian GNU/Linux 12 it is possibile to run the script at bootstrap; just add a Systemd unit creating the file **/ | ||
+ | |||
+ | < | ||
+ | # / | ||
+ | [Service] | ||
+ | Type=oneshot | ||
+ | RemainAfterExit=yes | ||
+ | ExecStart=/ | ||
+ | [Install] | ||
+ | WantedBy=multi-user.target | ||
+ | </ | ||
+ | |||
+ | Run and enable the service issuing the command: | ||
+ | |||
+ | < | ||
+ | systemctl daemon-reload | ||
+ | systemctl enable t9plus-leds.service --now | ||
+ | </ | ||
+ | |||
+ | ===== Always on ===== | ||
+ | |||
+ | Press **Del** at bootstrap time to enter the BIOS settings, go to the **Boot** page and set **State After G3** => **S0 State**. | ||
+ | |||
+ | The ACPI power states are: | ||
+ | |||
+ | * S0: Normal Powered-On state (system working) | ||
+ | * S1: Standby | ||
+ | * S3: Suspend to Ram | ||
+ | * S4: Suspend to Disk | ||
+ | * S5: Shutdown state (soft off: some devices are still powered-on) | ||
+ | * G3: Mechanical off state | ||
+ | |||
+ | ===== USB Fast Boot problem ===== | ||
+ | |||
+ | {{ .: | ||
+ | Sometimes (randomly, about 50% of the time) the **reboot** command does not work. The shutdown process seems to proceed well and the PC seems to begin the reboot process, but the video signal does not switch-on and the host remains frozen. The power LED remains on. | ||
+ | |||
+ | The wake-on-lan (which is working well in normal power-off condition) does not reboot the PC when it freezes in that way. | ||
+ | |||
+ | It seems that **the reboot problem is tied to the USB attached storage**. If I remove the TerraMaster DAS and allow the Mini PC to boot with just the GNU/Linux operating system from the SSD, the reboot seems 100% reliable. | ||
+ | |||
+ | May be I found a workaround for the problem: in the BIOS settings I set the **Boot** => **Fast Boot** to **Enabled**, | ||
+ | |||
+ | The problem with this workaround is that **you cannot longer enter into the BIOS setup program**, because the USB keyboard is not initialized at boot and **you cannot press the Delete key**. | ||
+ | |||
+ | If the system starts normally, it is simple to enter the BIOS setup from a Linux command propt; just issue the command: | ||
+ | |||
+ | < | ||
+ | systemctl reboot --firmware-setup | ||
+ | </ | ||
+ | |||
+ | It seems that - by chance - I was able to **entered the BIOS setup even when Fast Boot was enabled**; it was a mix of keeping the Delete key pressed on the keyboard while long-pressing the power button for about 4 seconds, or by repeatedly pushing the power button 4 or 5 times. But I was not able to replicate this behaviour in a consistend manner. | ||
===== The D4-300 USB attacched storage ===== | ===== The D4-300 USB attacched storage ===== | ||
Line 41: | Line 144: | ||
... | ... | ||
</ | </ | ||
+ | |||
+ | ===== USB instability ===== | ||
+ | |||
+ | It turned out that **the USB bus is not reliable enough**, maybe due **power issues**. Simply inserting a USB storage key caused **read errors** on the USB attached storage and a consequent **kernel panic**. | ||
+ | |||
+ | ===== USB Direct Attached Storage ===== | ||
==== Performance ==== | ==== Performance ==== | ||
+ | |||
+ | I installed two hard disks on the Terramaster DAS: | ||
+ | |||
+ | * Western Digital 3.5" 4Tb WD Red NAS 256 Mb, 5400 rpm, SATA 6Gb/s - **WDC WD40EFZX-68AWUN0** | ||
+ | * Seagate IronWolf 3.5" 4Tb 64 Mb cache, 5900 rpm, SATA 6Gb/s - **ST4000VN008-2DR166** | ||
+ | |||
+ | I made some tests on read performances on the USB attached device using **hdparm**. Here are the average results, which are similar on both my RAID disks (a bare 1% more performance on the Western Digital): | ||
+ | |||
+ | < | ||
+ | hdparm -t /dev/sdb | ||
+ | /dev/sdb: | ||
+ | | ||
+ | </ | ||
==== Power management ==== | ==== Power management ==== | ||
- | ===== Web References ===== | + | ==== Monitoring SMART with Nagios/ |
+ | Unfortunately the **check_ide_smart** Nagios plugin provided by the Debian 12 package **monitoring-plugins-basic 2.3.3-5+deb12u2**, | ||
+ | |||
+ | We compiled the plugin binary from the sources (using the master branch [[https:// | ||
+ | |||
+ | <code bash> | ||
+ | check_scsi_smart -d /dev/sdb | ||
+ | OK: prdfail 0, advisory 0, critical 0, warning 0, logs 0 | 1_read_error_rate=0;;;; | ||
+ | </ | ||
+ | |||
+ | To integrate the SMART checks for all the devices into a single Nagios check and to have a more terse output, we created the following script **check_scsi_smart_all**: | ||
+ | |||
+ | <code bash> | ||
+ | #!/bin/sh | ||
+ | if [ " | ||
+ | echo " | ||
+ | exit 1 | ||
+ | fi | ||
+ | OUTPUT='' | ||
+ | STATE=0 | ||
+ | for DEV in $@; do | ||
+ | OUT=" | ||
+ | RET=$? | ||
+ | if [ $RET -gt $STATE ]; then | ||
+ | STATE=$RET | ||
+ | fi | ||
+ | if [ " | ||
+ | # Get only the short status, e.g. " | ||
+ | OUT=" | ||
+ | else | ||
+ | # Get the summary, e.g. "OK: prdfail 0, advisory 0, critical 0, warning 0, logs 1 " | ||
+ | OUT=" | ||
+ | fi | ||
+ | test -n " | ||
+ | OUTPUT=" | ||
+ | done | ||
+ | |||
+ | OUTPUT=" | ||
+ | case $STATE in | ||
+ | 0) | ||
+ | OUTPUT=" | ||
+ | ;; | ||
+ | 1) | ||
+ | OUTPUT=" | ||
+ | ;; | ||
+ | 2) | ||
+ | OUTPUT=" | ||
+ | ;; | ||
+ | *) | ||
+ | OUTPUT=" | ||
+ | ;; | ||
+ | esac | ||
+ | echo " | ||
+ | exit $STATE | ||
+ | </ | ||
+ | |||
+ | Finally we defined the NRPE Nagios check with a line into **/ | ||
+ | |||
+ | < | ||
+ | command[check_scsi_smart]=/ | ||
+ | </ | ||
+ | |||
+ | |||
+ | ===== ACPI errors ===== | ||
+ | |||
+ | During bootstrap several error messages appears on the console (and are logged in syslog): | ||
+ | |||
+ | < | ||
+ | ACPI BIOS Error (bug): Could not resolve symbol [\_SB.PC00.TXHC.RHUB.SS01], | ||
+ | ACPI BIOS Error (bug): Could not resolve symbol [\_SB.UBTC.RUCC], | ||
+ | ACPI BIOS Error (bug): Could not resolve symbol [\_SB.PC00.LPCB.ITE8.GETT], | ||
+ | ... | ||
+ | </ | ||
+ | |||
+ | This is caused by the BIOS missing the " | ||
+ | |||
+ | < | ||
+ | GRUB_CMDLINE_LINUX=" | ||
+ | </ | ||
+ | |||
+ | Do an '' | ||
+ | |||
+ | ===== Web References ===== | ||
* **[[https:// | * **[[https:// | ||
* **[[https:// | * **[[https:// | ||
+ | * **[[t9plus_mini_pc_rgb_led_control]]** | ||
* **[[https:// | * **[[https:// | ||
* **[[https:// | * **[[https:// | ||
* **[[https:// | * **[[https:// | ||
+ | * **[[https:// | ||
doc/appunti/hardware/mini_pc_with_das.1710492191.txt.gz · Last modified: by niccolo