Linux - Reddit – Telegram
Linux - Reddit
778 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
The performance benefits of Not protecting against Zombieload, Spectre, Meltdown.

With the news about MDS (Zombieload) I've seen a few paranoid posts and sensational headlines about intel CPU's with HT. [Looking at you Wired.](https://www.wired.com/story/intel-mds-attack-speculative-execution-buffer/)

​

From the reading I've done about these exploits they all share a few traits - they are all pretty difficult to pull off, they are all patched, and all of the patches reduce performance by some percentage.

​

For a critical system these things should of course be patched i.e., my ESXi server that runs my network with pfSense gets all security patches.

​

However, for a home user running linux as a desktop for work or play - I have a feeling that patching these things is pretty pointless in terms of security. Security is always a compromise with practicality, and most home users (even \[probably most\] advanced users) do use known insecure things (that Android phone) and mitigate (maybe) those known vulnerabilities with network segregation or something along those lines.

And lets be real, people do this for good reason - it's practical and you are almost certainly not a focused target. There are no governments trying to Stuxnet the WD Raptors in your home Plex server.

​

So my thought is, the fixes for these vulnerabilities might even be an actively bad idea for your average home user. Each one reduces performance by a little bit and protects you from an attack that isn't coming.

​

Not applying these updates is pretty easy - just don't update the BIOS, or modify the BIOS so that theese microcode updates aren't applied.

Then on the OS level you either disable or rollback your version of linux's microcode update package such as *intel-microcode*

​

The same process could re-enable TSX-NI on some CPU's - which doesn't work in some specific cases, but some users might have a use for it and be able to accept it's instabilities.

​

So my question is - how much performance could be re-gained by not protecting against these threats that almost certainly aren't worth thinking about to a home user?

https://redd.it/bozjem
@r_linux
Invoke Sudo but specify user and password???

I'm working on pushing out a linux executable and have it run silently.

In terminal I just have to type sudo ./nameoffile and then enter the password.

Can I put all of this in one command?

Like $ su admin | sudo ./name of file | passwordforadmin

https://redd.it/bp2s90
@r_linux
PacketFence Network Access Control v9.0: new GUI, VPN support and Let's Encrypt integration
https://packetfence.org/news/2019/packetfence-v90-released.html

https://redd.it/bp34ex
@r_linux
Which distro do you think is the Flagship of the various Desktop Environments and Window Managers?

We all know that some distro makers have developed their own desktop environment, like Mint making Cinnamon, Elementary with Pantheon or Solus making Budgie, so it's understandable that their distro is meant to be the flagship of that desktop.

But what about the others? A lot of people say that OpenSUSE is the one of KDE Plasma, but with the introduction of KDE Neon disrupts that idea, or despite being stated a spart of the GNU project, GNOME is pretty relevant on Fedora, being that Red Hat has a lot of influence on the project, and also on the [Getting GNOME page Fedora is on the top on the list](https://www.gnome.org/getting-gnome/), plus the fact that Fedora Workstation by default ships with a pretty much vanilla instance of it.

But what do you thing for the others? XFCE, Mate, i3, Openbox, etc.

https://redd.it/bp1wwm
@r_linux
Comprehensive Kernel 5.1.2 Tuning Analysis

## Intro
I was having difficulty finding information on the performance of the vanilla kernel vs the [`linux-zen`](https://www.archlinux.org/packages/extra/x86_64/linux-zen/) kernel, and how much CPU exploit mitigations (e.g. Spectre) affected performace. In particular I wanted information about general system performance and gaming performance in desktop computers. So I did some testing of my own and I wanted to share the results.

### TL;DR
There is a measurable benefit to both disabling CPU exploit mitigations and using the `linux-zen` kernel, but it's not worth disabling CPU exploit mitigations.

**Disabling** CPU exploit mitigations, compared to the vanilla kernel, using `linux-zen` nets around a +6% CPU/system performance improvement and less than +1% gaming performance (FPS) improvement.

**Without disabling** CPU exploit mitigations, compared to the vanilla kernel, using `linux-zen` nets a +1-2% CPU/system performance improvement and less than +1% gaming performance (FPS) improvement.

## Testing Methodology
I used the [Phoronix Test Suite](https://www.phoronix-test-suite.com/). The two tests I used were `system/gimp` and `pts/unigine-valley`. To disable exploit mitigations I used the Linux boot cmdline option `mitigations=off` which was added in [this commit](https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v4.19.43&id=8cb932aca5d6728661a24eaecead9a34329903ff). To verify the state of CPU exploit mitigations, I used the latest version (as of today, May 15) of [spectre-meltdown-checker](https://github.com/speed47/spectre-meltdown-checker) from GitHub.

### Hardware and versions
I'm using an Intel 4960K overclocked to 4.4 GHz at 1.3 V with a Noctua NH-D15. I'm using the `cpuidle.governor=teo` Linux boot cmdline option, which was added in the new 5.1 kernel. The graphics card is (unfortunately) an MSI NVIDIA 980 Ti that is not manually overclocked, though its factory clock is 1139 MHz while the reference 980 Ti clock is 1000 MHz. Using [Green with Envy](https://gitlab.com/leinardi/gwe) as a flatpak and running a video game reports that the card runs at around 1300 MHz.

The `nvidia` driver version is 418.74. `mesa` is 19.0.4-1. The `intel-ucode` version is 20190514-1. Both kernels were released today May 15, version 5.1.2.

## Terminology
Vanilla Kernel: The default kernel that comes with Arch Linux.

`linux-zen`: The linux-zen kernel that is essentially the [Liquorix kernel](https://liquorix.net/) but without the MuQSS CPU scheduler.

mitigations on: The tests were ran without any kernel parameters modifying mitigations, after spectre-meltdown-checker verified all

mitigations were in place.

mitigations off: The tests were ran with mitigations off, after spectre-meltdown-checker verified most mitigations were NOT in place.

## Results
### system/gimp (lower is better, measured in seconds)
#### resize
Vanilla Kernel mitigations on: 10.44

Vanilla Kernel mitigations off: 10.21

`linux-zen` mitigations on: 10.39

`linux-zen` mitigations off: 10.16

#### rotate
Vanilla Kernel mitigations on: 11.88

Vanilla Kernel mitigations off: 11.45

`linux-zen` mitigations on: 11.66

`linux-zen` mitigations off: 11.26

#### auto-levels
Vanilla Kernel mitigations on: 12.70

Vanilla Kernel mitigations off: 12.27

`linux-zen` mitigations on: 12.51

`linux-zen` mitigations off: 12.10

#### unsharp-mask
Vanilla Kernel mitigations on: 14.47

Vanilla Kernel mitigations off: 13.82

`linux-zen` mitigations on: 14.21

`linux-zen` mitigations off: 13.63

### Unigine Heaven (higher is better, measured in FPS)
Vanilla Kernel mitigations on: 37.71

Vanilla Kernel mitigations off: 37.86

`linux-zen` mitigations on: 37.94

`linux-zen` mitigations off: 37.98

###### Edit: spacing and formatting

https://redd.it/bp5qnu
@r_linux
Issues installing NVIDIA drivers

Hi all,

I am new to Linux and using Linux Mint currently. I am trying to install drivers for my NVIDIA MX150 gpu and when I run the command "sudo sh NVIDIA-Linux-x86\_64-430.14.run" it starts the install but then says

ERROR: You appear to be running an X server; please exit X before

installing. For further details, please see the section INSTALLING

THE NVIDIA DRIVER in the README available on the Linux driver

download page at [www.nvidia.com](https://www.nvidia.com).

I looked around a bit on how to exit the X server, but when I do it just logs me out of my computer and when I log back in and try running it I get the same issue. I am probably missing something stupidly simple but any help would be much appreciated!

How do I successfully install the driver?

https://redd.it/bp71o0
@r_linux
This media is not supported in your browser
VIEW IN TELEGRAM
Recommendation: Goodvibes is an online radio player with a well-thought UI and tray icon implementation
https://redd.it/bp8twv
@r_linux
Linux maintainers appreciation post! These are the latest commits to the kernel before 5.1.12 - these guys do some amazing work
https://redd.it/bp9igz
@r_linux
My 11 year old son wrote a game in BASH Shell on Linux.

Hi! I'm teaching my son to code. He's 11, so none of that scratch stuff -- we're working in C on Linux. I taught him to write shell noscripts in BASH to make his life easier, and I told him, go write something, anything you want, and I'll get you some chips and ice cream. This is what he came up with. He's getting pretty good, that crafty sod :)

#!/bin/bash

#Strings and variables
ranoppo=$((`od -An -N2 -i /dev/random | tr -d " "` % 6 + 1))
oppohealth=$((`od -An -N2 -i /dev/random | tr -d " "` % 10 + 20))
playerhealth=$((`od -An -N2 -i /dev/random | tr -d " "` % 10 + 10))
oppodam=$((`od -An -N2 -i /dev/random | tr -d " "` % 5 + 1))
potion_used=0

#Start
echo -n "What is your name? "
read n
echo -n "Your opponent is ... "

#Picking opponent
if [ $ranoppo -eq 1 ]; then
echo "an Orc!"
echo "It does $oppodam damage."
fi

if [ $ranoppo -eq 2 ]; then
echo "a Stick monster!"
echo "It does $oppodam damage."
fi

if [ $ranoppo -eq 3 ]; then
echo "a Giant slug!"
echo "It does $oppodam damage."
fi

if [ $ranoppo -eq 4 ]; then
echo "a Zombie!"
echo "It does $oppodam damage."
fi

if [ $ranoppo -eq 5 ]; then
echo "a Fighting bear!"
echo "It does $oppodam damage."
fi

#The program loop begins
while [ $playerhealth -gt 1 ]; do
playerdam=$((`od -An -N2 -i /dev/random | tr -d " "` % 6 + 1))
oppodam=$((`od -An -N2 -i /dev/random | tr -d " "` % 5 + 1))
echo
echo
echo "Your health is $playerhealth."
echo "Your opponent's health is $oppohealth."
echo
echo "Do you want to //attack// your opponent?"
echo "Or use Health //potion// ?"
echo -n "Choice: "
read movement

if [ $potion_used -lt 1 ]; then
if [ ${movement,,} == "potion" ]; then
echo
echo "You drink the Health potion and gain 20 health!"
playerhealth=$((playerhealth + 20))
potion_used=1
fi
else
echo "Oh no, you're out of potions!"
fi

if [ ${movement,,} == "attack" ]; then
echo
echo "You attack your opponent."
echo "The opponent attacks back!"
oppohealth=$((oppohealth-playerdam))
fi

echo
echo "The opponent attacks!"
playerhealth=$((playerhealth - oppodam))

if [ $oppohealth -lt 1 ]; then
echo
echo
echo "==============================="
echo "| You defeated your opponent! |"
echo "|-----------------------------|"
echo "| You win! |"
echo "==============================="
echo
exit
fi

done

echo
echo
echo "=================================="
echo "| Oh no! You have 0 health left! |"
echo "|--------------------------------|"
echo "| Game over! |"
echo "=================================="
echo

BTW, I am keeping a diary of how I teach my son Linux and Computer Programming. You might want to check it out at [helloneo.ca](https://helloneo.ca). We're going to be doing great things together... great things!

https://redd.it/bpa0fk
@r_linux
New Kernels with Patches for MDS, The Latest Side-Channel Vulnerability In Intel CPUs, are now available. Greg Kroah-Hartman stressed that all users of Intel CPUs made since 2011 MUST upgrade.
https://linuxreviews.org/intel-mds-patches

https://redd.it/bp9zs9
@r_linux