Linux - Reddit – Telegram
Linux - Reddit
774 subscribers
4.19K photos
207 videos
39.9K links
Stay up-to-date with everything Linux!
Content directly fetched from the subreddit just for you.

Powered by : @r_channels
Download Telegram
Best distro for gaming and a program to undervolt CPU

Hello, I'd like to know the best options for gaming tiple A games and fps. I'd like to have a GUI, I'm a programmer, but would like to use the terminal as less as possible.

I also need a program to undervolt because without undervolting, my CPU throttles and I can't play anything

https://redd.it/1kkwmyy
@r_linux
Microsoft Surface 3

Morning all,

I have a Surface 3 with the following specs,

Intel(R) Atom(TM) x7-Z8700 CPU @ 1.60GHz 1.60 GHz

Installed RAM 4.00 GB

64-bit operating system, x64-based processor

I know this is very underpowered. I am running Ubuntu with the Surface Kernel; everything works well, including the touch, battery, etc. But using Chromeium, Opera, or Firefox, YouTube locks up constantly. I will have to force the Surface to power off by holding the power button and restarting it, and the cycle continues. I was thinking about flashing it with Fedora. Has anyone gotten better results with that or Alpine Linux?

https://redd.it/1kkxsxd
@r_linux
Good gift for a sysadmin in a developing country

i hope i am not violating the sub's rules, apologies if i am. what would be a good gift for a poor sysadmin in a developing country. i am thinking a) Hacky Pi b) usb with Kali c) iodd st400 d) usb with 100 linux distros or 1tb sata ssd with 100 usb distros

i am thinking of all of these, not just one of them. are these any good or do you have alternative suggestions? and for d) which is better the usb or the ssd? keep it simple as i am NOT a sys admin so i know very little about what would be good or what the tech even is.

https://redd.it/1kkxsf6
@r_linux
Why is there no traction for ReactOS?

I know ReactOS is in it's alpha, and most ppl online attribute this to low traction and small interest in a Windows XP clone.

When reading online I came across two posts (both posted around the same time frame). Both discussed ReactOS, but in the first post on r/FOSS, ppl told him that ReactOS sucks, NT is in itself an unsafe architecture, and downvoted him.

The other was on this sub where ppl said ReactOS has very little traction and that more devs need to focus on ReactOS, as in cases where legacy XP apps may not run well in Wine, or where just installing Linux is not feasible, ReactOS can serve as a drop-in replacement (once it actually gets stable) for Windows XP.

So I must ask, why exactly does ReactOS have such low traction and is it/will it even be a really viable Windows alternative?

https://redd.it/1kl0d9z
@r_linux
Running .EXEs (and more!) like native binaries

There's this really cool feature in the kernel I recently learned about called binfmt\_misc.

What it allows to do is to define any file format to be executable with a specific interpreter (interpreter here meaning any prefix command).

# File magic

Now, there are actually two ways determine the file format. First one is widely known as file extensions, and I'm sure you know about how they look and function.

There, however, exists a second, more fool-proof method of storing format info, and that is baking it directly into the file. This is known as "magic" (or file signatures): bytes at the beginning of the file, describing file format (and sometimes additional metadata) to the program and not the user, designed to remain unaltered and unseen. This is why you normally can't play a png inside an mp3 player, even after changing the file extension. And this example is why, when possible, file magic should be preferred to file extension.

# Doing it

The commands below should be executed with root (obviously)

First, we mount binfmt_misc file system:

mount binfmt_misc -t binfmt_misc /proc/sys/fs/binfmt_misc

Then, we ask binfmt_misc to register EXEs to be run with wine:

echo ':DOSWin:M::MZ::/usr/bin/wine:' > /proc/sys/fs/binfmt_misc/register

Let's walk through the string:
- The command starts with :, they also serve as separators
- The first field is the identifier, it is what you see when you want to list/remove the entries of binfmt, you can choose any name you want.
- The second field is recognition type, M for Magic or E for extension. Here we choose magic because we can.
- The third field (empty here) is the offset, only used when recognition type is magic. If for some reason magic is not right at the beginning, this can be used to offset the byte from which it is read.
- The fourth field is magic (despite the name, it is also used for file extension if recognition type is set as such). For Win/DOS .exe it is just `MZ`.
- The fifth field (empty here) is mask, only used when recognition type is M. It is used if there are holes with unknown/changing data in the magic.
- Next field is path to the interpreter we run our file with. Here, path to wine is used.
- Last field is used for various flags, which are generally not needed. See linked page for more info.

# The result

The .exe files now can be run like any other linux binary. You need to allow their execution (the usual chmod +x), after which they can be launched with dot-slash. You can even strip the file format if you want (since the recognition is done through magic).

The execution is, of course, still is being done through wine - there is no escaping that (unless some project can transpile them into genuine ELF, in which case this method would be unnecessary to begin with). This is more of a syntactic sugar, paired with additional security by being able to restrict which exes can be run with classical permission system.

This is just a set-and-forget nice thingy to surprize your friends with, and make using things like wine just a little more convenient.

# Afterword

You can also do this for .py files, for example, to run them with python even without the shebang, however then you will have to rely on file extension since binary-wise these are just plain text files. You could even do stupid things like having an image viewer "execute" a png, however trying to execute arbitrary files that are not designed to be executable is a great way to get a trojan on your system, so please don't. I hope you learned something.

https://redd.it/1kl27of
@r_linux
What is the simplest writing program for Linux

I don't want libre office it is too much like word.

When I click add page number it should number clean down all the pages not skip every other page from the opposite side I selected no one wants that. No one wants the header to repeat when I didn't ask it to repeat. And I don't want a billion options I don't need them.

https://redd.it/1kl8lun
@r_linux
What's the right distro for me?

Hi guys I have a windows 11 razer blade 15, ik its probably really unfavorable for people to choose this kind of computer to run Linux. But I've embarked on a journey of switching to Linux Mint and its been a disaster. The resolution is off the mousepad doesn't work. And a whole lot of other Issues that I haven't begun to unpack. What distro is good for a computer such as mine? Has anyone had any better luck with other distros?

https://redd.it/1klaqpl
@r_linux
Is HDMI 2.0 high refresh rate well supported ?

Hello, are HDMI 2.0 monitors with high refresh rates well supported under Linux ?

The monitor only has HDMI 2.0, and no DP port, so I want to make sure that a 100Hz monitor will be using 100Hz and not 60Hz.

My CPU is an AMD with integrated 780M graphics that supports up to HDMI 2.1, and I am targeting Linux Mint.

Thanks a lot in advance.

https://redd.it/1klbtsg
@r_linux
Linux full text search

Postgres has full text search feature(https://www.postgresql.org/docs/current/textsearch-controls.html) using Term Search Vector.

Are there any open source alternatives for Full text search ? My total data size is 45 to 50MB(Its structured data with each record as JSON and not document),total around 30,000 records with just 2 tables max.

Having postgres looks overkill.

https://redd.it/1klgn6u
@r_linux
I Just Installed Ubuntu 24.04 LTS
https://redd.it/1klvwqo
@r_linux
Solving issues with battery time and hybrid mode on MUX Switch laptops (Lenovo Legion 16AHP9 - Ryzen 8845S+RTX4070)

Ok, so most likely you've bought a brand new gaming laptop (in my case its Lenovo Legion Slim 5 16 Gen 9 16AHP9 Ryzen 8845S+RTX4070 165HZ Screen) with MUX Switch on the board and enjoyed its battery time on Windows 11, but decided that you want to go further and use your fav distro (in my case its Fedora) and be the happiest geek person on this planet. But, unfortunately, reality is different - 1.5-2h battery life, always spinning fans, in other words - hybrid mode simply do not work as expected.
And this is something we are gonna to fix.

First things, you need to install Nvidia proprietary drivers (I didn't test nvidia-open drivers so cannot say anything about whether this approach will work or not). And while doing that we need to make sure that we have SIGNED drivers in order to use Secure Boot (of course, you can always disable it, but my suggestion is to do not disable that - this can prevent you from running something you might not want to be on your laptop). Here is a really decent guide how to do this on Fedora (for other distros search for official guide):

https://www.reddit.com/r/Fedora/comments/18bj1kt/fedora\_nvidia\_secure\_boot/?rdt=61206

This guide is written for Fedora 39, but I use these steps everytime I do clean install of Fedora since 40 (and 42 current version is no exception). So follow these steps without any rush and then reboot. If for some reason you still see "Nvidia kenrel module is missing" or something like that on loading screen perform full update via Software application (in my case for some reason after enrolling key and building and installing kmod-nvidia module wasn't loading, but after I applied "Secure Boot dbx Configuration Update" and rebooted - Nvidia driver loaded. Btw, this update still in Updates tab in Sotware application, I guess its sort of, well, "normal" behavior. My guess that it is caused by my dual-boot setup, not sure tbh). Anyway, if you still have some problems with Nvidia drivers, then here is a nice manual how rebuild and reinstall kmod-nvidia module and sign it if you already have installed Nvidia drivers (which for some reason not loading):

https://discussion.fedoraproject.org/t/nvidia-kernel-module-missing-falling-back-to-nouveau-in-fedora39/99171/7

Also, if you like me using LUKS2 encryption - you may want to remove "rhgb quiet" from /etc/default/grub and perform:

sudo grub2-mkconfig -o /etc/grub2.cfg
sudo grub2-mkconfig -o /etc/grub2-efi.cfg

Its a common and known bug that decryption screen causes issues from time to time with Hybrid/Nvidia graphics (so easier to just disable it - yes, you will have "matrix effect" each boot, but this will bring stability).

Ok, so we did pre-requisites and you have installed latest Nvidia drivers, nothing stopping you from booting into your system and have your "decent battery time". The fix itself now. The main problem actually not the exact distro (and even not a driver itself, doesn't matter which driver you have - nvidia-proprietary, nvidia-open or even nouveau), but MUX Switch implementation. Because it have only 2 modes - Hybrid and Discrete graphics (so its Dynamic and Discrete Graphics in BIOS right on its homescreen). And some vendors implement MUX switch, well, sort of generic way (and that allows applications like EnvyControl to switch graphics without issues or like i.e. on Razer Blade 14 2023 - you don't have any issues at all) ... but its not the case, at least if we speak about Legion 2024 AMD line-up :) Lenovo devs made certain hacks to be able to switch to iGPU on Windows via Lenovo Vantage, but its not a complete MUX switch to Integrated GPU (just software limiting of Nvidia GPU while you are in hybrid mode and that's it). So this means in order to achieve similar battery life