• 0 Posts
  • 12 Comments
Joined 2 years ago
cake
Cake day: February 10th, 2024

help-circle
  • RISC-V is designed to be an extensible instruction set, where the base is very minimal and reduced but a plethora of extensions exist. The ISA can be small for academic and microcontroller uses, large (more than a hundred extensions) for server uses, or anything in between.

    Despite the name, a powerful RISC-V server can arguably not be considered “RISC”, though that term doesn’t have a single agreed-upon meaning and some design characteristics strongly associated with RISC still apply such as limiting memory access to dedicated load/store instructions only rather than allowing computation instructions to operate on memory.

    Also, not everything is CPU instructions. Acceleration for media codecs, for example, normally means off-loading those tasks to the GPU rather than the CPU. Even if the CPU and GPU are both part of the same SoC, that doesn’t touch the CPU instruction set.


  • The common issues with RISC-V laptops, or rather any laptops made with SoCs that weren’t designed to be laptop-first, include things like sleep not putting the system in a low enough power state (battery will run out if you leave it folded without turning it off), underwhelming GPU, higher power draw when idle, and lower peak performance for intermittent load. If none of those are a dealbreaker, the newest DeepComputing Framework board (on K3) can arguably be considered a viable daily driver RISC-V laptop option, though I wouldn’t want to use it as one.

    Nvidia, AMD, and Intel are the big names for GPUs and they all have products that integrate a GPU into the same SoC as the CPU, but none of them would be likely to license out their GPU IP to other SoC vendors in modern times. Same goes for the in-house GPU designs for Apple/Qualcomm/Samsung. ARM does license out its Mali GPU IP, and that’s often the go-to option for SoC vendors that don’t have their own in-house GPU, but RISC-V systems can’t use that. So RISC-V systems’ GPU options effectively amount to either:

    1. Use separate processors for your CPU and GPU. Desktop/server can just slot in a video card. Laptops in the 15-inch or larger space often solder a GeForce or Radeon chip to the board. Smaller 13-inch laptops normally don’t do this because of cooling and battery life concerns.
    2. License the integrated GPU from Imagination. That seems to be the only notable GPU offering available to license on non-ARM. Users don’t seem very fond of Imagination GPUs but they’re better than nothing.
    3. Pray that one of the companies with an established GPU portfolio decides to not only enter the RISC-V space but also makes a RISC-V processor that can be used in laptops. I think that’s unlikely and they’ll probably focus on server only.

  • zarenki@lemmy.mltoLinux@lemmy.mlLinux and RISC-V by 2030
    link
    fedilink
    arrow-up
    20
    arrow-down
    1
    ·
    2 months ago

    In the first place, consider why you even want to switch to RISC-V. If it’s because of an enthusiasm for open-source and hearing the ISA described as open, know that any performant hardware you’ll get likely won’t be as open as you expect. The SoC won’t be open-source, the CPU cores in it won’t be open-source, the firmware and bootloader might be an open-source u-boot fork but there’s a good chance it’s proprietary. Even the actual implemented ISA won’t be open since major core designers add custom instructions that aren’t part of the RISC-V spec.

    Distros like Ubuntu and Fedora seem slated to treat RISC-V as a main architecture that has close to the same number of packages and the same update schedule as x86/ARM by the end of next year, if not sooner. Just like is also the case for ARM, proprietary software like games can run with a nontrivial performance overhead, and other binary software distributed through other channels outside the distro repos (like docker containers, third-party apt/yum repos, or appimage) is often only distributed for x86 even for things that are open-source and can be compiled for other arches without issue.

    The software situation can be either a major annoyance or completely seamless depending on how closely you stick to just the distro repos.

    Hardware vendors will probably have stuff comparable enough to recent Intel/AMD for desktop in about a year from now. Likely not better, but within the same realm at least. Within another couple years after that you’ll almost definitely see more than one of the established major SoC vendors (like Qualcomm, Nvidia, AMD, or Samsung) release something RISC-V in the desktop, server, or mobile space, which is sure to be competitive with x86 and ARM hardware in that space.

    Laptops might not see anything good. An alternate ISA can be viable on servers and mobile (both being Linux-first ecosystems), and desktop can easily inherit from stuff made for server, but laptop has unique hardware needs and the market isn’t there for vendors to bother investing too much R&D on laptop chips that can’t run Windows nor Mac. RISC-V laptops do exist but they’re basically taking chips designed for SBC/edge and throwing them in a laptop shell, with the result naturally being awful at power draw since it was never meant to be a good laptop chip, and the iGPU situation is a mess too. That’s unlikely to change in the next few years.


  • When compatible hardware is available, it’s expected that having packages built for RVA23 will have a big impact on performance. You can already see a big part of that with the vector (V) extension: running programs built without it is akin to using x86 programs without SSE or AVX. RVA23 is the first RVA profile that considers V mandatory rather than optional.

    You might see a similar performance impact if you target something like RVA22+V instead of RVA23, but as far as I know the only hardware systems that’d benefit from that are the Spacemit ones (OPi RV2, BPI-F3, Jupiter) while that’d still leave behind VisionFive 2, Pioneer, P550/Megrez, and even an upcoming processor UltraRISC announced recently. The profiles aren’t exactly intended to be used for those kinds of fine-tuned combinations and it’s possible some of the other RVA23 extensions (Zvbb, Zicond, etc.) might have a substantial impact too.

    Hardware vendors want to showcase their system having the best performance it can, so I expect Ubuntu’s aim is to have RVA23 builds ready before RVA23 hardware so that they’ll be the distro of choice for future hardware, even if that means abandoning all existing RISC-V users. imo it would’ve been better to maintain separate builds for RV64GC and RVA23 but I guess they just don’t care enough about existing RISC-V users to maintain two builds.


  • zarenki@lemmy.mltoLinux@lemmy.mlFan of Flatpaks ...or Not?
    link
    fedilink
    English
    arrow-up
    8
    ·
    10 months ago

    The parent comment mentions working on security for a paid OS, so looking at the perspective of something like the users of RHEL and SUSE: supply chain “paranoia” absolutely does matter a lot to enterprise users, many of which are bound by contract to specific security standards (especially when governments are involved). I noted that concerns at that level are rather meaningless to home users.

    On a personal system, people generally do whatever they need to in order to get the software they want. Those things I listed are very common options for installing software outside of your distro’s repos, and all of them offer less inherent vetting than Flathub while also tampering with your system more substantially. Though most of them at least use system libraries.

    they added “bash scripts you find online”, which are only a problem if you don’t look them over or cannot understand them

    I would honestly expect that the vast majority of people who see installation steps including curl [...] | sh (so common that even reputable projects like cargo/rust recommend it) simply run the command as-is without checking the downloaded script, and likewise do the same even if it’s sudo sh. That can still be more or less fine if you trust the vendor/host, its SSL certificate, and your ability to type/copy the domain without error. Even if you look at the script, that might not get you far if it happens to be a self-extracting one unless you also check its payload.


  • zarenki@lemmy.mltoLinux@lemmy.mlFan of Flatpaks ...or Not?
    link
    fedilink
    arrow-up
    18
    arrow-down
    1
    ·
    10 months ago

    A few reasons security people can have to hesitate on Flatpak:

    • In comparison to sticking with strictly vetted repos from the big distros like Debian, RHEL, etc., using Flathub and other sources means normalizing installing software that isn’t so strongly vetted. Flathub does at least have a review process but it’s by necessity fairly lax.
    • Bundling libraries with an application means you can still be vulnerable to an exploit in some library, even if your OS vendor has already rolled out the fix, because of using Flatpak software that still loads the vulnerable version. The freedesktop runtimes at least help limit the scope of this issue but don’t eliminate it.
    • The sandboxing isn’t as secure as many users might expect, which can further encourage installing untrusted software.

    By a typical home user’s perspective this probably seems like nothing; in terms of security you’re still usually better off with Flatpak than installing random AUR packages, adding random PPA repos, using AppImage programs, installing a bunch of Steam games, blindly building an unfamiliar project you cloned from github, or running bash scripts you find online. But in many contexts none of that is acceptable.


  • The command you’re looking for is btrfs send. See man btrfs-send.

    I know of at least one tool, btrbk, which automates both automatic periodic snapshots and incremental sync, but here’s an example manual process so you can know the basic idea. Run all this in a root shell or sudo.

    As initial setup:

    • Create a btrfs filesystem on the sender drive and another on the receiver drive. No need to link them or sync anything yet, although the receiver’s filesystem does need to be large enough to actually accept your syncs.
    • Use btrfs subvolume create /mnt/mybtrfs/stuff on the sender, substituting the actual mount point of your btrfs filesystem and the name you want to use for a subvolume under it.
    • Put all the data you care about inside that subvolume. You can mount the filesystem with a mount option like -o subvol=stuff if you want to treat the subvolume as its own separate mount from its parent.
    • Make a snapshot of that subvolume. Name it whatever you want, but something simple and consistent is probably best. Something like mkdir /mnt/mybtrfs/snapshots; btrfs subvolume snapshot /mnt/mybtrfs/stuff /mnt/mybtrfs/snapshots/stuff-20250511.
    • If the receiver is a separate computer, make sure it’s booted up and running an SSH server. If you’re sending to another drive on the same system, make sure it’s connected and mounted.
    • Send/copy the entire contents of the snapshot with a command like btrfs send /mnt/mybtrfs/snapshots/stuff-20250511 | btrfs receive /mnt/backup. You can run btrfs receive through SSH if the receiver is a separate system.

    For incremental syncs after that:

    • Make another separate snapshot and make sure not to delete or erase the previous one: btrfs subvolume snapshot /mnt/mybtrfs/stuff /mnt/mybtrfs/snapshots/stuff-20250518.
    • Use another send command, this time using the -p option to specify a subvolume of the last successful sync to make it incremental. btrfs send -p /mnt/mybtrfs/snapshots/stuff-20250511 /mnt/mybtrfs/snapshots/stuff-20250518 | btrfs receive /mnt/backup.

    If you want to script a process like this, make sure the receiver stores the name of the latest synced snapshot somewhere only after the receive completes successfully, so that you aren’t trying to do incremental syncs based on a parent that didn’t finish syncing.


  • zarenki@lemmy.mltoLinux@lemmy.mlThis looks cool but can it game?
    link
    fedilink
    English
    arrow-up
    4
    ·
    edit-2
    1 year ago

    “Dynamically compiled” and dynamic linking are very different things, and in turn dynamic linking is completely different from system calls and inter-process communication. I’m no emulation expert but I’m pretty sure you can’t just swap out a dynamically linked library for a different architecture’s build for it at link time and expect the ABI to somehow work out, unless you only do this with a small few manually vetted libraries where you can clean up the ABI. Calling into drivers or communicating with other processes that run as the native architecture is generally fine, at least.

    I don’t know how much Asahi makes use of the capability (if at all), but Apple’s M series processors add special architecture extensions that makes x86 emulation be able to perform much better than on any other ARM system.

    I wouldn’t deny that you can get a lot of things playable enough, but this is very much not hardware you get for the purpose of gaming: getting a CPU and motherboard combo that costs $1440 (64-core 2.2GHz) or $2350 (128-core 2.6GHz) that performs substantially worse at most games than a $300 Ryzen CPU+motherboard combo (and has GPU compatibility quirks to boot) will be very disappointing if that’s what you want it for. Though the same could to a lesser extent be said even about x86 workstations that prioritize core count like Xeon/Epyc/Threadripper. For compiling code, running automated tests, and other highly threaded workloads, this hardware is quite a treat.


  • With one of these Altra CPUs (Q64-22), I can compile the Linux kernel (defconfig aarch64 with modules on GCC 15.1) in 3m8s with -j64. Really great for compiling, and much lower power draw than any x86 system with a comparable core count. Idles at 68W full system power, pulls 130W when all cores are under full load. Pulling out some of my 4 RAM sticks can drive that down a lot more than you’d expect for just RAM. lm_sensors claims the “CPU Power” is 16W and 56W in those two situations.

    Should be awful for gaming. It’s possible to run x86 things with emulation, sure, but performance (especially single-thread) suffers a lot. I run a few containers where the performance hit really doesn’t matter through qemu.

    Ampere has a weird PCIe bug that results in either outright incompatibility or a video output filled with strange artifacts/distortion for the vast majority of GPUs, with the known good selection that aren’t bugged being only a few select Nvidia ones. I don’t happen to have any of those Nvidia cards but this workstation includes one. Other non-GPU PCIe things like NICs, NVMe, and SAS storage controllers work great, with tons of PCIe lanes.


  • Depends on what you consider self-hosted. Web applications I use over LAN include Home Assistant, NextRSS, Syncthing, cockpit-machines (VM host), and media stuff (Jellyfin, Kavita, etc). Without web UI, I also run servers for NFS, SMB, and Joplin sync. Nothing but a Wireguard VPN is public-facing; I generally only use it for SSH and file transfer but can access anything else through it.

    I’ve had NextCloud running for a year or two but honestly don’t see much point and will probably uninstall it.

    I’ve been planning to someday also try out Immich (photo sync), Radicale (calendar), ntfy.sh, paperless-ngx, ArchiveBox (web archive), Tube Archivist (YouTube archive), and Frigate NVR.


  • The 6-month release cycle makes the most sense to me on desktop. Except during the times I choose to tinker with it at my own whim, I want my OS to stay out of my way and not feel like something I have to maintain and keep up with, so rolling (Arch, Tumbleweed) is too often. Wanting to use modern hardware and the current version of my DE makes a 2-year update cycle (Debian, Rocky) feel too slow.

    That leaves Ubuntu, Fedora, and derivatives of both. I hate Snap and Ubuntu has been pushing it more and more in recent years, plus having packages that more closely resemble their upstream project is nice, so I use Fedora. I also like the way Fedora has rolling kernel updates but fixed release for most userspace, like the best of both worlds.

    I use Debian stable on my home server. Slower update cycle makes a lot more sense there than on desktop.

    For work and other purposes, I sometimes touch Ubuntu, RHEL, Arch, Fedora Atomic, and others, but I generally only use each when I need to.


  • If the only problem is that you can’t use dynamic linking (or otherwise make relinking possible), you still can legally use LGPL libraries. As long as you license the project using that library as GPL or LGPL as well.

    However, those platforms tend to be a problem for GPL in other ways. GPL has long been known to conflict with Apple’s App Store and similar services, for example, because the GPL forbids imposing extra limits that restrict user freedom and those stores have a terms of service that does exactly that.