Linux

47940 readers
1354 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
1376
 
 

TabbyML is a self-hosted code assistant. I have been unsuccessful at running it using my Nvidia GPU. There's two ways I've tried to deploy this.

As a docker container

Following the docs, it states I run the following docker run command. Below is what I run, modified to use the correct port:

docker run -it --gpus all \
  -p 11029:8080 -v $HOME/.tabby:/data \
  tabbyml/tabby serve --model StarCoder-1B --device cuda

Then I get the following error:

docker: Error response from daemon: could not select device driver "" with capabilities: [[gpu]].

So this would appear that I don't have the "nvidia-container-toolkit" installed on my machine. So I go ahead and enable this in nixos:

hardware.nvidia-container-toolkit.enable = true;

To validate that this works, I should be able to run nvidia-smi from within a container. I can run this from the host without issue:

$ nvidia-smi
Wed Jun  5 08:14:50 2024
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 550.78                 Driver Version: 550.78         CUDA Version: 12.4     |
|-----------------------------------------+------------------------+----------------------+
...and so on

But if test this from a container, as the nvidia docs suggest as follows, I unable to access it from within the container.

$ sudo docker run --rm --runtime=nvidia --gpus all ubuntu nvidia-smi
docker: Error response from daemon: unknown or invalid runtime name: nvidia.

Okay, so I go and read the instructions further. Install instructions state that after installation, I need to configure the runtime like so:

$ sudo nvidia-ctk runtime configure --runtime=docker
sudo: nvidia-ctk: command not found

Ah nuts. That's a bug in nixos. I made a PR for this here: https://github.com/NixOS/nixpkgs/pull/317199 Still awaiting results from this. I don't know if this is a bug that will be backported to 24.05. Regardless, I wouldn't expect this ad-hoc configuration when I enable the nvidia-container-toolkit option in NixOS. Anyway, this option could still work but with some more time. If you have advice doing this let me know.

FOUND Docker method solution

So looking closer at people with the error message "no such runtime nvidia" I found this thread. It specifies that what nvidia-ctk is supposed to do is add a "runtime" that points to the nvidia-container-runtime executable. So I tried manually adding that my nixos configuration by using the virtualisation.docker.daemon.settings options. I was having trouble getting that working, because I needed to find the exact path to the nvidia-container-runtime executable. If you know Nix, you know that it isn't just in /usr/bin/.

But that's still not a satisfying solution anyway...I shouldn't have to this. I went in deeper and looked at module for nvidia-container-toolkit. This module calls a script called cdi-generate.nix. It outputs the results of nvidia-ctk to a file called nvidia-container-toolkit.json.

Let's go look for that file...can't find it. I do more searching...anyway, I found the solution.

The nvidia-container-toolkit is a new option in NixOS 24.05. It explicitly states in the release notes that it is supposed to replace the now deprecated virtualisation.{docker, podman}.enableNvidia options. Well, when you go look at the module that defines docker.enableNvidia you see it there at the bottom! This file actually defines the nvidia runtime!

And yes, it works. Using the now "deprecated" option is the one that actually works. I guess this is another bug to file to NixOS.

This seems to work so far, but I don't know why the solution using a NixOS module doesn't work either.

As a NixOS module

Let's just do it the full NixOS module way (which is what I tried first). That should be easy. Let's enable the feature and set some options:

services.tabby = {
    enable = true;
    port = 11029;
    acceleration = "cuda";
  };
  networking.firewall.allowedTCPPorts = [ 11029 ];

It appears to be working! VSCodium extension sees the server and prompts for a authentication token. I add the token. I type some code and set for a manual trigger...then tabby dies. Let''s look at the systemd logs.

tabby[76786]: 📄 Version 0.11.1
tabby[76786]: 🚀 Listening at 0.0.0.0:11029
tabby[76786]:   JWT secret is not set
tabby[76786]:   Tabby server will generate a one-time (non-persisted) JWT secret for the current process.
tabby[76786]:   Please set the TABBY_WEBSERVER_JWT_TOKEN_SECRET environment variable for production usage.
systemd[1]: tabby.service: Main process exited, code=exited, status=1/FAILURE
systemd[1]: tabby.service: Failed with result 'exit-code'.
systemd[1]: tabby.service: Consumed 2.285s CPU time, received 121.0K IP traffic, sent 1.6M IP traffic

That's it. It's not very descriptive about what happened. I've had success running it this way using the "cpu" option for acceleration (no GPU) but that's too slow to be useful.

GPU specs

I am running a Nvidia RTX 2060 and using the proprietary drivers version 550.

Thanks for the read, if you have any input on what to do next let me know what I can try. Ideally, I'd like to have both options work, since I think the docker implementation may have the same problem as the NixOS module option.

1377
117
submitted 4 months ago* (last edited 4 months ago) by boredsquirrel to c/linux@lemmy.ml
 
 

Hi, I want to do an "awesome things" list with BTRFS tools

Help me gather them?

Update: see here

General

BTRFS CLI Interface

btrfs-progs

official userpace utilities

BTRFS Assistant

Tool for doing many BTRFS actions graphically

It requires snapper and offers a GUI for it.

butter-manager

Tool for managing snapshots, balancing filesystems and upgrading the system safetly.

Backups & Snapshots

btrbk

Backup utility using BTRFS

Snapper

General system snapshot utility with BTRFS support, used in OpenSUSE Tumbleweed by default. There are also plugins for Fedoras dnf and for Arch pacman.

Timeshift

System restore tool for Linux. Creates filesystem snapshots using rsync+hardlinks, or BTRFS snapshots. Supports scheduled snapshots, multiple backup levels, and exclude filters. Snapshots can be restored while system is running or from Live CD/USB.

Currently maintained by LinuxMint, even though they dont use BTRFS by default, it works better there.

libtuikit / transactional-update

Used in OpenSUSE microOS and the Desktop variants.

provides an application and library to update a Linux operating system in a transactional way, i.e. the update will be performed in the background while the system continues running as it is. Only if the update was the successful as a whole the system will boot into the new snapshot.

Available as a library for other distros.

Yet Another BTRFS Snapshotter

Alternatives don't supports customized of snapshot location, (e.g. Arch recommended layout). Adhering to such layouts, and rolling back using them, sometime involve non-obvious workarounds. The motivation for yabsnap was to create a simpler, hackable and customizable snapshot system.

btrfs-autosnap

There are 2 separate projects with that name

grub-btrfs

Set BTRFS snapshots as boot options

[btrfs-sxbackup])https://github.com/masc3d/btrfs-sxbackup)

Incremental btrfs snapshot backups with push/pull support via SSH

Small CLI tools

btrfsd - tiny Btrfs maintenance daemon

Btrfsd is a lightweight daemon that takes care of all Btrfs filesystems on a Linux system.

It can:

  • Check for detected errors and broadcast a warning if any were found, or optionally send an email
  • Perform scrub periodically if the system is not on battery
  • Optionally schedule balancing operations as well

dupreremove

Tools for deduplicating file systems

compsize

Takes a list of files on a btrfs filesystem and measures used compression types and effective compression ratio

Used in flatpak-dedup-checker

btdu

sampling disk usage profiler for btrfs For multiple reasons, classic disk usage analyzers such as ncdu cannot provide an accurate depiction of actual disk usage. (btrfs compression in particular is challenging to classic analyzers, and special tools must be used to query compressed usage.)

btrfs-list

Helps listing directories

btrfs-fuse

A read-only btrfs implementation using FUSE (Filesystem in Userspace). Although btrfs is already in mainline Linux kernel, there are still use-cases for such read-only btrfs implementation:

btrfs debugger

The btrfs debugger (pronounced "buttered").

btrd is a REPL debugger that helps inspect mounted btrfs filesystems. btrd is particularly useful in exploring on-disk structures and has full knowledge of all on-disk types.

ntfs2btrfs

a tool which does in-place conversion of Microsoft's NTFS filesystem to the open-source filesystem Btrfs, much as btrfs-convert does for ext2. The original image is saved as a reflink copy at image/ntfs.img, and if you want to keep the conversion you can delete this to free up space.

Consists of a Windows and a Linux executable. Does not work on the primary drive.

WinBTRFS

filesystem driver for Windows

Partition managers with support

  • KDE-Partitionamanger
  • GNOME-Disks
  • blivet-gui (Fedora Anaconda setup)
  • gparted ?

Data recovery

When having deleted or corrupted data on a BTRFS partition, these tools can help:

Testdisk?

  • photorec?

Scalpel?

R-Linux

Freeware, not FOSS? Not related to R and "R-Studio" is also not related to RStudio

BTRFS bindings

These allow you to do BTRFS actions in many programming languages

1378
 
 

I found these: Scalpel - but no longer maintaned. PhotoRec - but I don't know how well it works with Btrfs.

Maybe you have something better.

1379
 
 

Current prerelease is 1.2.5

1.2.4 is the first to introduce experimental Wayland support. Especially on KDE Plasma there are supposed to be some issues.

Lets test!

Why?

Regular RDP/VNC programs are hard to use in real scenarios, as they rely on IP addresses. RustDesk is easier as it uses a Rendezvouz server that can also be selfhostet or reimplemented.

1380
1381
1382
41
submitted 4 months ago* (last edited 4 months ago) by governorkeagan@lemdro.id to c/linux@lemmy.ml
 
 

TL;DR: Is there really a performance benefit to a gaming distro over a regular distro? Or is it more of a “this is the least work” to get setup?

——

I run EndeavourOS on my desktop and haven’t had any issues with performance. I just like playing with new things and learning from the experience.

I’ve seen loads of people recommending Bazzite as a gaming distro for various reasons. It’s gotten to the point that I installed it on a second SSD to do my own testing but I’d still like to see others perspective.

From my research, there doesn’t seem to be that much performance to be gained (generally speaking). I’ll be testing this on my own hardware but is this generally true?

I think a big draw (especially for new users) would be that these distros would require very minimal work to get up and running into a game.

I think the TL;DR at the top best describes my question. I’ve just been thinking about this and haven’t been sure how to express it in a clear manner for others to understand. Also, this video got me thinking more.

EDIT:

Glad to see that I’m not alone in my thinking. Biggest benefit of a “gaming distro” is the convenience of having everything setup and there is no real performance difference.

1383
 
 

So here's my situation:

I'm on Fedora 40 on a laptop and I've recently decided to add a Hibernate option to my own logout/powermenu script that I use. The script executes systemctl hibernate but there's a problem. It didn't seem to work. When I ran the above command in terminal, I got an error stating that there's not enough suitable swap space for that. Turns out that I'm using swap-to-zram hence why Hibernate doesn't work.

So, I decided to ask ChatGPT and it recommended creating a swapfile. I can do that no problem.

The thing is, if I'm using swap-to-zram, I concluded it is likely that if I'm making use of that swap-to-zram all the time, I will probably need a larger swapfile for the hibernation.

So I asked our AI overlords if there's a risk in that. It said there isn't any real risk, other than increased drive wear-and-tear and potential performance issues.

Dear Linux users of Lemmy, are there any issues or concerns I should be aware of before attempting something like this (running multiple types of swap simultaneously, excess swapfile space, etc.)? Thank you.

Edit: Not sure how relevant it is, seeing as I'm not asking about swap partitions, but I'll mention using BTRFS, just in case. And no, I don't know anything about it, I just know it has cool features I'm yet to start learning about.

1384
 
 

I just finished setting up my Wireguard VPN "server". In this post I want to spread some information, I could've found useful but which didn't come up in most of the Wireguard tutorials.

If you aren't interested in VPN or self hosting, this post is not for you. If you haven't gotten around yet to try it out, I can only recommend doing it. Feels great being able to "phone home" from all over the world.

Alright, tricks and tips:

tcpdump

Wireguard will definitely not work first try. As Wireguard is a silent protocol, you won't see too many error messages. Dropped packets are how you know that something's off. tcpdump is a great command line tool, that, despite it's name, can also dump the precious UDP Wireguard packets. The tool will make you see how far your wireguard connection gets before the packets are dropped. Great for running on "server" and on clients.

ping

A classic tool. Helped me debugging some issues with DNS and Maximum Transfer Unit (MTU) size.

AllowedIPs

In a classic server-client situation, your clients should have AllowedIPs set to 0.0.0.0/0, ::/0 in their repecive configuration file. I found this pretty counterintuitive, but that seemingly is how it works.

IP Forwarding in sysctl

This one was by far the nastiest one to find out. Mainly because I'm not a linux or Debian expert. You need to tell sysctl to forward IP traffic, which ususally tutorials around the web will tell you to do like this: sysctl -w net.ipv4.ip_forward=1; sysctl -w net.ipv6.conf.all.forwarding=1. What I foolishly assumed, that this write operation was permanent. It's not. You need to edit /etc/sysctl.conf for making it permanent. Else, after a reboot you won't be able to connect to the internet. This took me a good amount of reconfigurations from scratch before I eventually found out these vars will reset on boot.

--

Maybe this helps some of you fellow Lemmings. If I stumble across further tips and tricks, I might update this post in the future. For now though, I think I'm done with my setup (philosophical question: are you ever done with setting up things?).

1385
 
 

I'm over tinkering with my OS. So I'm looking for a distro that "just works" out of the box for my laptop. Also I want to test an "easy" distro I can install for my grandpa.
I don't care for immutability, declarative config, being fully FOSS or having the newest stuff. I don't want snaps, or a software center that relies on them. So no Ubuntu.

What I do want (ideally out of the box):
Important:

  • as few annoying visible bugs and crashes as possible (looking at you, Ubuntu)
  • Wayland support
  • good package selection, so no independent fringe distro
  • fluid YouTube videos, streaming, pre-installed codecs

Less important:

  • ideally with Gnome
  • encrypting the hard drive from within the GUI installer
  • nice font rendering (used to be a problem, but I guess not anymore)
  • installing Steam with a button press
  • pre-installed sane-airprint and sane-airscan (automatic setup of my networked printer-scanner-combo)

You get the idea. The usual stuff (low-end gaming, browsing, streaming, printing, scanning) should just work. I don't have any hardware that poses a problem.
From what I've read, Mint doesn't yet support Wayland and doesn't ship with video codecs anymore. (Or am I wrong?)
What are the other options? Is Zorin king of the block now? Is Manjaro good now?

Thanks for any and all input.

1386
 
 

Title. Basically, a lower panel that shows the latest news, etc (fetched from a rss link or a sequence of rss links) while scrolling left (ala CNN). Why? I'm trying to make a "smart clock" of sorts that shows a live stream, a real time clock and -also- the latest news -- all crumbled together in a single screen.

I'm using a orange pi zero 3 w/ Dietpi installed. And due to the expected "crazyness" of this idea, I had to resort to you guys.

Thanks in advance.

1387
1388
 
 

I found the talk really interesting, especially how CentOS-Stream means SIGs can fork the hell out of it.

The Hyperscale SIG highly modifies it, by backporting tons of packages, shipping modern Kernel, systemd and more.

They also ship btrfs-kmod to use BTRFS like an out-of-tree driver on regular RHEL/CentOS.

They enable livepatching for the Kernel.

And a lot more!

PS: if you are looking for the official LTS Linux kernel, built for Fedora, CentOS & RHEL, check out this COPR

1389
 
 

I want to start learning android dev and I understand that I'll need the android sdk and cli tools. I want to try it in a kvm because even though it is open source, I would like to keep it separate from my main system. Which distro and vm settings do you suggest I use? Any other tips or your experience with android development on linux would be helpful as well.

1390
1391
 
 

I'd like to install linux mint xfce 21.3 and xubuntu 24.04 alongside the already present debian 12.5, but I don't know if I have to create the partitions before installing or if I'm guided to create the partitions while installing.

On debian 12.5 there are 3 partitions already: /boot/efi, /boot and nvme0 without a mount point, which I encrypted. I used lsblk to get this information.

Incidentally I ask: in the encrypted partition I reserved 50% of space for my home directory, created LV (logical volumes) for /var (9.2GiB) and /tmp (2 GiB) as well. Can I edit the size of these LV?

The other question is, am I installing too many distros on the same computer? CPU is an Intel Core i7-7500U CPU @ 2.70GHz

1392
102
submitted 4 months ago* (last edited 4 months ago) by VitabytesDev@feddit.nl to c/linux@lemmy.ml
 
 

For me it was:

Windows (for many years) -> Ubuntu (for a year) -> Arch Linux (for half a year) -> Void Linux (literally 2 days) -> Artix Linux with runit (a month) -> Gentoo Linux (another month) -> Debian (finally, I don't plan on changing it).

Also, when trying to switch from Gentoo to Debian, I fucked up all my data with no backup.

What was your journey?

EDIT: Added Windows

1393
29
submitted 4 months ago* (last edited 4 months ago) by iggames@lemmy.world to c/linux@lemmy.ml
 
 

I have KDE set to Turn Off Screen after 5 minutes and to Sleep after 10 minutes of inactivity. This works when I first turn on the machine, but eventually stops working after a few hours of general use (mostly Firefox, VS Code, and some Steam games). Sometimes the screen isn't turning off at all, other times the screen turns off but the machine never goes to sleep. (Explicitly telling it to go to sleep from the main menu always works.)

EDIT: Seems like browser tabs or Steam are the likely culprits. I would often leave Steam running in the background, and KDE is suspending more reliably for me now after I close it. Possibly this steam-for-linux GitHub issue.

I figure there's either some sort of issue with KDE power management, or one (or more) applications are preventing it from sleeping. How do I troubleshoot this further?

systemd-inhibit just lists PowerDevil, which seems to be KDE's power management service:

$ systemd-inhibit --list --mode=block
WHO        UID  USER    PID  COMM            WHAT                                                                       WHY                      MODE 
PowerDevil 1000 iggames 4115 org_kde_powerde handle-power-key:handle-suspend-key:handle-hibernate-key:handle-lid-switch KDE handles power events block

1 inhibitors listed.

One time, I clicked KDE's Power Management notification icon, and it showed me an app that was preventing sleep (a game that had not exited properly). Most of the time, however, it doesn't list anything.

Is there a way to see what apps are causing "activity" that would prevent PowerDevil from suspending the machine? What should I try next?

System details:

Operating System: Fedora Linux 40
KDE Plasma Version: 6.0.5
KDE Frameworks Version: 6.2.0
Qt Version: 6.7.1
Kernel Version: 6.8.11-300.fc40.x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 12 × 12th Gen Intel® Core™ i5-12400
Memory: 31.1 GiB of RAM
Graphics Processor: AMD Radeon RX 6600
Manufacturer: Gigabyte Technology Co., Ltd.
Product Name: B660M DS3H DDR4
1394
1395
 
 

publication croisée depuis : https://lemmy.world/post/16156662

To be completely open, this is not a question about XCP-ng vs Proxmox. I'm open to doing everything in the cli, comparing two platforms is not my intention here.

I'm very interested in the security benefits one has over the other though. AFAIK Xen has a dedicated for security? I'd like to think that both are reasonably secure by default, but I do not get many hits for "KVM hardening", for example, only OS-level hardening advice.

Do both protect equally against attacks that try to escape the VM? Is there anything in terms of security that one has and the other doesn't?

I know this is not the usual kind of question that is asked on this sub, any help is greatly appreciated!

1396
30
submitted 4 months ago* (last edited 4 months ago) by lawrence@lemmy.world to c/linux@lemmy.ml
 
 

cross-posted from: https://lemmy.world/post/16149785

Cross-posting here for more opinions.

Gentlemen, just for context, I usually use Linux. I have been a user of Debian, Ubuntu, and Fedora for a few years.

Recently, I acquired a decent graphics card (GeForce RTX 4070) and decided to uninstall my Windows and install Linux.

I saw that Pop!_OS already has an image with everything pre-configured for Nvidia. Is this pre-configuration worth it, are the games more stable on this distribution, or is it the same as manually installing Nvidia's proprietary drivers on Manjaro?

1397
 
 

What is openSUSE.Asia Summit?

The openSUSE Project is excited to announce that openSUSE.Asia Summit 2024 will be held in Tokyo, Japan. The openSUSE.Asia Summit is an annual conference for users and contributors of openSUSE and FLOSS enthusiasts. The former summits received major participation from Indonesia, China, Taiwan, Japan, South Korea, and India.

Since the first openSUSE.Asia Summit was held in Beijing in 2014, the summits have been great opportunities for the online community to gather in person, know each other, and share knowledge and experiences about openSUSE including applications running on it. However, COVID-19 made it difficult for 3 years. One of our goals of this year’s summit is to provide a place for communication. Please note that we will not accept talks by video call this year.

The summit dates

The summit will be held on Nov. 2 and 3. An excursion for speakers is expected on Nov. 4, which will be announced later.

You might be interested in Open Source Summit Japan and Open Compliance Summit, held by the Linux Foundation near the venue just before our summit.

Cross-Distro Track

We are going to co-host the Cross-Distro Track by the collaboration with Cross Distro Developers Camp (XDDC). XDDC is a wider developer community of FLOSS OS distribution including openSUSE, Debian and Ubuntu and works together to resolve common issues especially related to Japanese. This year, we are considering inviting speakers and participants from other distribution communities, which will undoubtedly contribute to making the event even more exciting. Furthermore, it will be a great chance to let them know how openSUSE and its community are.

Venue

Azabudai Hills

The openSUSE.Asia Summit 2024 is going to be held in SHIFT Inc., located in Azabudai Hills, Minato-ku, Tokyo, Japan. SHIFT Inc. is a company that supports to create sellable products and services and to grow the business of its customers. It offers integrated IT solutions and consulting services, including development, testing, UI/UX, and security, with its outstanding knowledge in software quality assurance.

Azabudai Hills is a large-scale urban redevelopment project completed in November 2023. This area, which combines offices, residential units, retail outlets, and cultural facilities, is also a newly prominent tourist attraction. It is, of course, easy to access from Tokyo/Haneda airport and anywhere in the capital area by public transportation.

Tokyo and Japan

Tokyo food & scenery

Tokyo is the capital of Japan. Its infrastructure and global connectivity will help attendees travel to the summit. There are direct flights from major cities in Asia Pacific as well as Europe and North America to either Tokyo/Haneda or Tokyo/Narita.

Tokyo is also a popular place for sightseeing with its unique culture, food, etc. Especially, characters from video games, anime, and comics, which are now common globally, attract tourists to Japan. In Tokyo, you can easily find character shops and get items related to works you love.

The number of tourists from abroad has recovered last year to the same level as before COVID-19. Due to the currency exchange rate, it will be a great chance to enjoy your trip to Japan while saving your money.

However, if there is any possibility of attending the summit, you should book your hotel right away with a cancelable plan. Some of our recommended hotels start accepting reservations from 5 months ago, which is June 1. Because Nov. 4 is a public holiday in Japan, rooms in budget hotels become sold out soon, or you will need to pay for your hotel at an inappropriately expensive rate, which might not be covered by the Travel Support Program.

Please also check the following web sites for tourism information in Tokyo and Japan:

Call for speakers

We will start to call for speakers in June. Please read another post for the call for speakers on news.opensuse.org, published in a couple of days.

Wrapping Up

The openSUSE.Asia Summit is a great opportunity for the openSUSE community to meet together. The attendees will be able to enjoy their stay in Tokyo during the summit.

We are looking forward to seeing you this November in Tokyo.

Have a lot of fun!

More Information about openSUSE:

Official

Fediverse

1398
 
 

In this article, I aim to take a different approach. We will begin by defining a laptop according to my understanding. The I will share my personal history and journey to this point, as well as my current situation with my home and work laptops. Using this perspective, we will explore the current dysfunctionality of the standby function in modern laptops, followed by a discussion of why this feature still has relevance and right to exist. Finally, we will draw conclusions on what we can learn and take away from this.

1399
1400
view more: ‹ prev next ›