If your laptop’s CPU is running very hot and you’ve tried to undervolt it, you’ve probably discovered there’s no easy way to do so—especially on laptops whose BIOS doesn’t expose those controls. I ran into the same issue with my Ryzen 7 5800H, despite numerous attempts, I couldn’t undervolt because the firmware simply wouldn’t allow it. While it may seem drastic, disabling Turbo Boost is one workaround—and you might be surprised how little real-world performance you lose by turning it off.
NOTE: I want disclaimer that this work is not complete mine. Most of the work here is comming from: https://dhwaneetbhatt.com/blog/run-docker-without-docker-desktop-on-macos
$ brew doctor
$ brew updateThis is a brief guide on how to install Archlinux as a WSL2 distribution and how to set up CUDA afterwards.
As of late, Window's WSL2 offers GPU passthrough from WSL2/Linux to Windows for NVidia graphics cards which allows to run (and develop) CUDA-based applications on the WSL2/Linux-side with almost native performance. Unfortunately, the official guides for the CUDA setup for WSL2/Linux are predominantly Ubuntu-specific. Here's to you, Arch!
- Make sure that your Windows meets the dependencies and that your WSL2 is set up. See these instructions.
Archlinux is not among the default distributions available for WSL2. We'll install it from a tarball instead, a functionality offered natively by the WSL.
| KEYMAPOPTS="us us" | |
| HOSTNAMEOPTS="-n alpine" | |
| INTERFACESOPTS="auto lo | |
| iface lo inet loopback | |
| auto eth0 | |
| iface eth0 inet dhcp | |
| hostname alpine | |
| " | |
| TIMEZONEOPTS="-z UTC" |
| #Requires -RunAsAdministrator | |
| # Unlock-PowerCfg - v22.05.11 | |
| # Disable "Connected Standby" | |
| Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Power' -Name 'CSEnabled' -Value 0 -Force | |
| # Get Power Settings entries and add/set 'Attributes' to 2 to unhide | |
| $PowerCfg = (Get-ChildItem 'HKLM:\SYSTEM\CurrentControlSet\Control\Power\PowerSettings' -Recurse).Name -notmatch '\bDefaultPowerSchemeValues|(\\[0-9]|\b255)$' | |
| foreach ($item in $PowerCfg) { Set-ItemProperty -Path $item.Replace('HKEY_LOCAL_MACHINE','HKLM:') -Name 'Attributes' -Value 2 -Force } |
This document was created back in 2020 and might not be actual nowadays. It is not supported anymore, so use thise information at your own risk.
- Download WSL2 Kernel
- run
wsl --set-default-version 2in windows command line, so that all future WSL machine will use WSL2.
| deb http://archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse | |
| deb-src http://archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse | |
| deb http://archive.ubuntu.com/ubuntu/ focal-updates main restricted universe multiverse | |
| deb-src http://archive.ubuntu.com/ubuntu/ focal-updates main restricted universe multiverse | |
| deb http://archive.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse | |
| deb-src http://archive.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse | |
| deb http://archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse |
Configure environment variable
export DATABASE_URL=postgres://postgres@localhost/dbname?sslmode=disable Run in CLI
go run main.go -page 1| # I want to sync the local clock but don't have access to any NTP server. | |
| # Website https://time.is tells me the time difference of my system clock and I can manually adjust the local clock. | |
| # But then I recall that a HTTP response often contains a date header with current time in GMT timezone. | |
| # I'll use it to set the system clock with the precision of 1 or 2 seconds. | |
| # When I need more accurate time, I can use `datetime` (or `utc_datetime`) from `http://worldtimeapi.org/api/ip.txt` | |
| # time from worldtimeapi.org has millisecond precision, you can use it to compare with your system time: | |
| date -uIns && time curl -s http://worldtimeapi.org/api/ip.txt | sed -n 's/^utc_datetime://p' | |
| date -Ins && time curl -s http://worldtimeapi.org/api/ip.txt | sed -n 's/^datetime://p' |