Skip to content

u/luchs

In this archive from Sep 2015 to Jul 2021

0
posts
39
comments
0
media
126
score

Barring all of that, if you can tell me what the correct way of manually adding a printer with CUPS would be when the printer's URI is USB only, that would also be helpful.

It's just the URL of the CUPS web page of the printer, something like your-cups-server.local:631/printers/your_laser_printer

1 points

The printer supports AirPrint/IPP Everywhere, so there's no need for a specific driver. You might need to setup Avahi as per the wiki if automatic discovery doesn't work. (Assuming you're using the printer over the network. You might need the driver if you want to connect via USB.)

1 points

Is there a performance hit from just reading deduplicated data?

No, it's the same Copy-on-Write mechanism that enables snapshots.

I'd imagine that this would be even benefitial, since there's less stuff on the drive to read to get the same files.

Probably not a big factor on SSDs.

1 points

If it's on the same device, it could absolutely be the reason. NVMe can queue and execute multiple commands in parallel, usually there's one queue per CPU core. A trim command generally cannot be executed in parallel though, so all reads and writes from all queues need to be stopped - even those going to other partitions.

3 points

I have a similar setup and settled on the following configuration:

  • GDK_DPI_SCALE=1.4 via ~/.config/environment.d
  • Scaling in GNOME settings set to 100% (this part is a bit annoying, because GNOME regularly decides that I really want 200% there instead, mostly when replugging monitors)
  • Nothing special with xrandr (would also work with Wayland)

Disadvantage is that I didn't find a good way to scale Qt applications yet.

4 points

The Ryzen CPUs don't report their real frequencies via ACPI. You just see the default P-state configuration. With cpupower, you can switch between the three P-states, but cannot set up new frequencies. The processor handles boost and power saving states automatically.

1 points

No. You don't have ns installed, but zsh knows completions for the ns command. Shell tab completions are generally completely disconnected from the actual commands. Have a look in /usr/share/zsh/functions/Completion: you'll find lots of completion scripts for programs you don't have.

In particular, the completion you see is provided by /usr/share/zsh/functions/Completion/Unix/_hosts. I think zsh usually prints a message if the command you're trying to complete doesn't exist, but that script provides completions for multiple commands and thus this check doesn't work.

For ZSH, you can look up builtins in man zshbuiltins.

33 points

I guess you could build it on another Arch system, then copy the binaries or the package over.

nvme reset just resets the controller. It's like rebooting the disk and doesn't change any data. nvme format is the "restore to factory default" command. You'll probably want to reset the controller after running format (I think there's an option for that).

NVMe drives are pretty much the only devices where you can change the block size, I think.

2 points

You may have heard of Advanced Format disks. Instead of storing data in blocks of 512 bytes, they use larger 4096 byte blocks. This can make data storage and access more efficient. File systems usually work with larger block sizes anyways.

The NVMe specification doesn't mandate a specific block size and even allows drives to support more than one. You can find out which sizes your SSD supports using nvme id-ns (I don't have an NVMe drive at hand here to try it out), then format with nvme format -l <number from id-ns> (this destroys all data, obviously). Don't choose anything with metadata, it's currently not useful.

2 points

Okay, so the goal is to have an AUR-like git repository for a single arch package. In the following example, I'm doing this for the "st" package (like the linked repository).

Start by cloning the package from svntogit/community repository: git clone --single-branch -b packages/st https://projects.archlinux.org/svntogit/community.git If you want multiple packages, you can also remove the --single-branch option (the full repository is a 210 MiB download vs. a few kiB).

Create an empty repository for your customizations: mkdir st && git -C st init

Now enter the community clone: cd community. You'll see a "trunk" directory with the stuff you want and a "repos" repository you don't want.

Add a git remote to the new repository: git remote add st ../st

Now use the magic subtree command to push everything from the "trunk" directory to your repository: git subtree push -P trunk st packages/st ("trunk" is the directory to extract, "st" is the remote to push to and "packages/st" is the name of the remote branch)

Switch to the st repository: cd ../st. The master branch is still empty, but there's now a "packages/st" branch as well. Reset the master branch there: git reset --hard packages/st. Now add your changes and commit them.

To fetch upstream changes, go to the "community" repository and do a git pull. Repeat the subtree command, the go back to the "st" repository and do git merge packages/st.


Hope this helps! It's rather advanced gitting I guess ;)

2 points

It's easy for AUR PKGBUILDs: just clone the repository, commit your changes and merge upstream updates.

For repository packages, the same is possible with git subtree: Have a look at my st package here. The svntogit repository already provides a git branch for each repository, but it exports the SVN directory structure directly. With the subtree command in the linked README, you can remove everything but the trunk directory.

I can post more detailed instructions later if anyone is interested.

3 points

CoW is actually only bad when small parts of a file get rewritten, because it will likely write more than necessary and fragment the file.

As most applications just overwrite the whole file on each save, CoW is often actually beneficial for performance and prevents fragmentation when files grow. Especially on SSDs, overwriting is costly and it's a lot better to write to free space.

Defragmentation on SSDs is mainly useful to reduce metadata size as random access is fast in any case. It probably shouldn't matter to much though.

I personally use btrfs subvolumes and snapshots for backup. I use snapper which creates snapshots periodically and transfer them manually to an external drive with btrfs send/receive.

2 points

This is an article about some Windows service which handles both defragmentation and TRIM. An SSD doesn't care about fragmentation at all. It doesn't have a concept of files or file fragments. All it does is handle read and write requests to blocks (usually 512 B or 4 kiB), as well as TRIM which says “these blocks are unused”.

2 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.