Comparing Wayland and X11 Display Server Protocols in Full-screen Applications
Hey everyone! I am a recent computer science graduate who has a passion for Linux so I wanted to do something for my dissertation that would benefit the community. My undergraduate dissertation was on comparing X11 and Wayland display server protocols in full-screen applications. As you may know if you e.g. play games on Linux, the X11 compositor imposes a performance penalty on the game as it introduces [unnecessary steps](https://wayland.freedesktop.org/architecture.html) in the graphics stack. You can usually increase video game performance by disabling compositing. KDE’s compositor, Kwin, has an interesting solution to this issue – automatically disabling compositing when playing full-screen games. [This article](https://blog.martin-graesslin.com/blog/2015/12/gaming-on-linux-move-to-next-generation/), while a bit dated, explains why X11’s graphics stack is inefficient and how Wayland improves on this in more detail.
My dissertation focused on providing benchmarks and doing research on whether Wayland can be an improvement over X11. I wanted to test if Wayland has benefits for the average user (even though IMO Wayland provides most benefits to developers, it makes implementing and maintaining features easier, which helps the average user as well). To fully understand why there is a need for a new display server protocol, we need to look at issues with X11, which [this article](https://www.phoronix.com/scan.php?page=article&item=x_wayland_situation&num=1) covers in detail.
**NOTE: I am going to refer to window managers and compositing window managers as compositors in this post.**
The test was running a very unfinished version of my game on the compositors mentioned below. The game was made with SDL2, it counted the number of frames per second, repeated the test 5 times and averaged the results (the specific game release used for this test can be found [here](https://github.com/SerCoach1/DauntingDungeon/releases/tag/v0.1)).
​
**X11 compositors benchmarked:** i3, KWin and Mutter.
**Wayland compositors benchmarked:** Sway, Weston, Mutter and my own attempt at a compositor, [Wayward](https://github.com/SerCoach1/Wayward), which was a failure to say the least.
**Compositor versions used:**
• i3: 4.16.1-1
• KWin: 5.15.4-1
• Mutter:3.32.1-1
• Sway: 1.0-8
• Weston: 5.0.90
​
I tried to compare similar X11 and Wayland compositors (i3 vs Sway, Both X11 versions of Mutter). The details of how I launched the compositors and everything else can be found in my dissertation [here](https://sercoach1.github.io/).
Finally, **the results**: [https://imgur.com/a/LtqmTGW](https://imgur.com/a/LtqmTGW)
​
All tested Wayland compositors have achieved a slightly better frame rate than the X11 ones. This can be attributed to the simplified graphics stack in Wayland. This is because the compositor is the display server: it allows for more efficient rendering and therefore better performance. According to the tests done in this project, that increase can be from 5 to 10 FPS. In addition to that, rendering was also improved by eliminating screen tearing.
While Wayland outperformed X11, it is still a new protocol that lacks some of the functionality of X11. The results achieved in this dissertation may not be conclusive enough to declare Wayland as superior to X11, but they do show that Wayland is a promising project and, if it keeps evolving at its current rate, this new display server protocol might just overtake the almost three-decade-old protocol used in Linux currently.
The main issue I encountered during the project was outdated and/or insufficient documentation for [Wlroots](https://github.com/swaywm/wlroots). I struggled with understanding how to write a compositor even after reading through Wlroot’s header files and Wayland documentation. That might also be due to Wlroots being updated over time and therefore [other sources](https://drewdevault.com/2018/02/17/Writing-a-Wayland-compositor-1.html) used for the project b
Hey everyone! I am a recent computer science graduate who has a passion for Linux so I wanted to do something for my dissertation that would benefit the community. My undergraduate dissertation was on comparing X11 and Wayland display server protocols in full-screen applications. As you may know if you e.g. play games on Linux, the X11 compositor imposes a performance penalty on the game as it introduces [unnecessary steps](https://wayland.freedesktop.org/architecture.html) in the graphics stack. You can usually increase video game performance by disabling compositing. KDE’s compositor, Kwin, has an interesting solution to this issue – automatically disabling compositing when playing full-screen games. [This article](https://blog.martin-graesslin.com/blog/2015/12/gaming-on-linux-move-to-next-generation/), while a bit dated, explains why X11’s graphics stack is inefficient and how Wayland improves on this in more detail.
My dissertation focused on providing benchmarks and doing research on whether Wayland can be an improvement over X11. I wanted to test if Wayland has benefits for the average user (even though IMO Wayland provides most benefits to developers, it makes implementing and maintaining features easier, which helps the average user as well). To fully understand why there is a need for a new display server protocol, we need to look at issues with X11, which [this article](https://www.phoronix.com/scan.php?page=article&item=x_wayland_situation&num=1) covers in detail.
**NOTE: I am going to refer to window managers and compositing window managers as compositors in this post.**
The test was running a very unfinished version of my game on the compositors mentioned below. The game was made with SDL2, it counted the number of frames per second, repeated the test 5 times and averaged the results (the specific game release used for this test can be found [here](https://github.com/SerCoach1/DauntingDungeon/releases/tag/v0.1)).
​
**X11 compositors benchmarked:** i3, KWin and Mutter.
**Wayland compositors benchmarked:** Sway, Weston, Mutter and my own attempt at a compositor, [Wayward](https://github.com/SerCoach1/Wayward), which was a failure to say the least.
**Compositor versions used:**
• i3: 4.16.1-1
• KWin: 5.15.4-1
• Mutter:3.32.1-1
• Sway: 1.0-8
• Weston: 5.0.90
​
I tried to compare similar X11 and Wayland compositors (i3 vs Sway, Both X11 versions of Mutter). The details of how I launched the compositors and everything else can be found in my dissertation [here](https://sercoach1.github.io/).
Finally, **the results**: [https://imgur.com/a/LtqmTGW](https://imgur.com/a/LtqmTGW)
​
All tested Wayland compositors have achieved a slightly better frame rate than the X11 ones. This can be attributed to the simplified graphics stack in Wayland. This is because the compositor is the display server: it allows for more efficient rendering and therefore better performance. According to the tests done in this project, that increase can be from 5 to 10 FPS. In addition to that, rendering was also improved by eliminating screen tearing.
While Wayland outperformed X11, it is still a new protocol that lacks some of the functionality of X11. The results achieved in this dissertation may not be conclusive enough to declare Wayland as superior to X11, but they do show that Wayland is a promising project and, if it keeps evolving at its current rate, this new display server protocol might just overtake the almost three-decade-old protocol used in Linux currently.
The main issue I encountered during the project was outdated and/or insufficient documentation for [Wlroots](https://github.com/swaywm/wlroots). I struggled with understanding how to write a compositor even after reading through Wlroot’s header files and Wayland documentation. That might also be due to Wlroots being updated over time and therefore [other sources](https://drewdevault.com/2018/02/17/Writing-a-Wayland-compositor-1.html) used for the project b
Martin's Blog
Gaming on Linux: Move to next generation?
In this blog post I want to outline some thoughts on how the gaming experience can be improved on Linux. Situation on X11 On X11 the big problem for gaming is the Compositor. Games need access to t…
eing of limited use.
​
I would like to thank Daniel Nesbitt for supervising this project and providing his invaluable Linux expertise. Also I would like to thank Adam Gąsior for teaching me how to use cmake, clang and helping with other Linux related issues. Finally, I’d like to mention /u/malano22 for helping me write this post.
If I have made any mistakes please let me know as I am by no means an expert on this topic, just a passionate student trying to contribute to the open source community.
​
Lastly, links summary: [my dissertation](https://sercoach1.github.io/), [the finished game](https://github.com/SerCoach1/DauntingDungeon), [my unfinished Wayland compositor](https://github.com/SerCoach1/Wayward)
​
Tl;dr: Wayland fast, X11 slower.
https://redd.it/ca60wg
@r_linux
​
I would like to thank Daniel Nesbitt for supervising this project and providing his invaluable Linux expertise. Also I would like to thank Adam Gąsior for teaching me how to use cmake, clang and helping with other Linux related issues. Finally, I’d like to mention /u/malano22 for helping me write this post.
If I have made any mistakes please let me know as I am by no means an expert on this topic, just a passionate student trying to contribute to the open source community.
​
Lastly, links summary: [my dissertation](https://sercoach1.github.io/), [the finished game](https://github.com/SerCoach1/DauntingDungeon), [my unfinished Wayland compositor](https://github.com/SerCoach1/Wayward)
​
Tl;dr: Wayland fast, X11 slower.
https://redd.it/ca60wg
@r_linux
TIL that Python's pip is not curated, and anybody can publish code (malicious or otherwise).
Is this common knowledge? I've been using Python for *years*, trusting pip the same way I do apt or other package managers. I didn't realize this was uncurated in such a way. I feel kind of dumb tbh.
Anybody else have similar experience?
https://redd.it/ca6o4p
@r_linux
Is this common knowledge? I've been using Python for *years*, trusting pip the same way I do apt or other package managers. I didn't realize this was uncurated in such a way. I feel kind of dumb tbh.
Anybody else have similar experience?
https://redd.it/ca6o4p
@r_linux
reddit
r/linux - TIL that Python's pip is not curated, and anybody can publish code (malicious or otherwise).
0 votes and 14 comments so far on Reddit
Linux infomagic december 1999 update
[linux disc opened up](https://imgur.com/gallery/yanyaxO)
I opened up one of the disc sets from my previous post and have pictures to share with the community. I did some research and noticed I still cannot find these anywhere online. These are the december 1999 release and they are a 6 disc set. Still cannot believe I found them, and i have about 38 more sets completely unopened and fac sealed.
If anyone is interested in a copy pm me!
https://redd.it/ca64a1
@r_linux
[linux disc opened up](https://imgur.com/gallery/yanyaxO)
I opened up one of the disc sets from my previous post and have pictures to share with the community. I did some research and noticed I still cannot find these anywhere online. These are the december 1999 release and they are a 6 disc set. Still cannot believe I found them, and i have about 38 more sets completely unopened and fac sealed.
If anyone is interested in a copy pm me!
https://redd.it/ca64a1
@r_linux
Imgur
Linux informagic
Post with 1 votes and 9 views. Shared by sadisticblazer. Linux informagic
Bash function 'FuzzyMatch()'.
A few days ago I posted in this [thread](https://www.reddit.com/r/commandline/comments/c7gkfe/is_there_a_command_palette_for_the_unix_terminal/esf84jc?utm_source=share&utm_medium=web2x) and then started to think that I didn't have any 'fuzzy' things in my toolbox.
I looked into the subject and found it quite complicated, there was no practical way to implement real 'fuzzy search' in 'bash'. But I like 'my things' as simple and distro independent as possible. Could I cut some (lots of) corners and write a simplified 'fuzzy search' function?
Well I did and this is the [result](https://i.imgur.com/d4KBCZK.png). As you can see it seems to be pretty fast, 0.25 mS per word (with a 7 characters KeyWord), and it seems to rate matches reasonably well.
I even wrote a new version of 'l', the search command noscript mentioned in this [post](https://www.reddit.com/r/commandline/comments/c7gkfe/is_there_a_command_palette_for_the_unix_terminal/esf84jc?utm_source=share&utm_medium=web2x), 'lf' (local fuzzy), using 'FuzzyMatch()'. [Here is a comparison of the two noscripts](https://i.imgur.com/2bmewfj.png).
Here is the function:
FuzzyMatch() { # $1: String, $2: KeyWord. Exit: 0: Always. Returns match rating: 0 .. 1000. Example: 'FuzzyMatch "ClassifyTextFiles" "txt"'.
if [ -z "$1" ] || [ -z "$2" ] || [ ${#2} -gt ${#1} ] # Notes: Case insensitive, $1's length should be >= $2's length, Vowel characters are 25% less relevant.
then
echo 0;return 0
fi
local S="${1,,}";local K="${2,,}" # Convert to lower-case.
if [ "$S" == "$K" ]
then
echo 1000;return 0
fi
local V="aeiouáéíóúäëïöü";local IV # IV: Is_vowel (boolean).
local FMV=0;local MV=0 # FMV: Full match value; MV: Match value.
local I=0;local C;local R=""
while [ $I -lt ${#K} ]
do
C="${K:${I}:1}"
if [ "$V" != "${V/${C}/}" ]
then
let "FMV = $FMV + 75"
IV=true
else
let "FMV = $FMV + 100"
IV=false
fi
if [ "$S" != "${S#*${C}}" ]
then
S="${S#*${C}}"
if [ -z "$R" ]
then
let "R = ${#1} - ${#S} - 1" # R: Number of irrelevant $1's leading characters.
fi
if $IV
then
let "MV = $MV + 75"
else
let "MV = $MV + 100"
fi
fi
let I++
done
if [ -n "$R" ]
then # If there have been matches.
let "R = ${#1} - $R - ${#S}" # R: Nr of relevant characters: For "0123456789", "25": "2345" (number is 4 - of 10).
let "FMV = $FMV + 100 - (${R}00 / ${#1})" # No change if Nr_relevant_chars -eq Chars_in_string, FMV increases otherwise (+0..100).
fi
let "MV = ${MV}000 / $FMV"
echo $MV;return 0
}
I'd like some feedback. Please use the function and let me know what you think. Can you see a way to improve it? Do you have access to 'fuzzy search' libraries (python)? Could you, please, conduct a test similar to [this](https://i.imgur.com/d4KBCZK.png) using '/usr/share/dict/words' and KeyWord "applgec"? How long does it take per word? Which are the top 10 matched words?
Thank you in advance.
https://redd.it/ca70ay
@r_linux
A few days ago I posted in this [thread](https://www.reddit.com/r/commandline/comments/c7gkfe/is_there_a_command_palette_for_the_unix_terminal/esf84jc?utm_source=share&utm_medium=web2x) and then started to think that I didn't have any 'fuzzy' things in my toolbox.
I looked into the subject and found it quite complicated, there was no practical way to implement real 'fuzzy search' in 'bash'. But I like 'my things' as simple and distro independent as possible. Could I cut some (lots of) corners and write a simplified 'fuzzy search' function?
Well I did and this is the [result](https://i.imgur.com/d4KBCZK.png). As you can see it seems to be pretty fast, 0.25 mS per word (with a 7 characters KeyWord), and it seems to rate matches reasonably well.
I even wrote a new version of 'l', the search command noscript mentioned in this [post](https://www.reddit.com/r/commandline/comments/c7gkfe/is_there_a_command_palette_for_the_unix_terminal/esf84jc?utm_source=share&utm_medium=web2x), 'lf' (local fuzzy), using 'FuzzyMatch()'. [Here is a comparison of the two noscripts](https://i.imgur.com/2bmewfj.png).
Here is the function:
FuzzyMatch() { # $1: String, $2: KeyWord. Exit: 0: Always. Returns match rating: 0 .. 1000. Example: 'FuzzyMatch "ClassifyTextFiles" "txt"'.
if [ -z "$1" ] || [ -z "$2" ] || [ ${#2} -gt ${#1} ] # Notes: Case insensitive, $1's length should be >= $2's length, Vowel characters are 25% less relevant.
then
echo 0;return 0
fi
local S="${1,,}";local K="${2,,}" # Convert to lower-case.
if [ "$S" == "$K" ]
then
echo 1000;return 0
fi
local V="aeiouáéíóúäëïöü";local IV # IV: Is_vowel (boolean).
local FMV=0;local MV=0 # FMV: Full match value; MV: Match value.
local I=0;local C;local R=""
while [ $I -lt ${#K} ]
do
C="${K:${I}:1}"
if [ "$V" != "${V/${C}/}" ]
then
let "FMV = $FMV + 75"
IV=true
else
let "FMV = $FMV + 100"
IV=false
fi
if [ "$S" != "${S#*${C}}" ]
then
S="${S#*${C}}"
if [ -z "$R" ]
then
let "R = ${#1} - ${#S} - 1" # R: Number of irrelevant $1's leading characters.
fi
if $IV
then
let "MV = $MV + 75"
else
let "MV = $MV + 100"
fi
fi
let I++
done
if [ -n "$R" ]
then # If there have been matches.
let "R = ${#1} - $R - ${#S}" # R: Nr of relevant characters: For "0123456789", "25": "2345" (number is 4 - of 10).
let "FMV = $FMV + 100 - (${R}00 / ${#1})" # No change if Nr_relevant_chars -eq Chars_in_string, FMV increases otherwise (+0..100).
fi
let "MV = ${MV}000 / $FMV"
echo $MV;return 0
}
I'd like some feedback. Please use the function and let me know what you think. Can you see a way to improve it? Do you have access to 'fuzzy search' libraries (python)? Could you, please, conduct a test similar to [this](https://i.imgur.com/d4KBCZK.png) using '/usr/share/dict/words' and KeyWord "applgec"? How long does it take per word? Which are the top 10 matched words?
Thank you in advance.
https://redd.it/ca70ay
@r_linux
reddit
Is there a command palette for the unix terminal?
Posted in r/commandline by u/sorisos • 33 points and 24 comments
The death watch for the X Window System (aka X11) has probably started
https://utcc.utoronto.ca/%7Ecks/space/blog/unix/XDeathwatchStarts
https://redd.it/ca8wuk
@r_linux
https://utcc.utoronto.ca/%7Ecks/space/blog/unix/XDeathwatchStarts
https://redd.it/ca8wuk
@r_linux
reddit
r/linux - The death watch for the X Window System (aka X11) has probably started
0 votes and 5 comments so far on Reddit
Glimpse: Fork of the GNU Image Manipulation Program
https://github.com/glimpse-editor/Glimpse
https://redd.it/ca9qre
@r_linux
https://github.com/glimpse-editor/Glimpse
https://redd.it/ca9qre
@r_linux
GitHub
GitHub - glimpse-editor/Glimpse: Fork of the GNU Image Manipulation Program 2.10.18
Fork of the GNU Image Manipulation Program 2.10.18 - GitHub - glimpse-editor/Glimpse: Fork of the GNU Image Manipulation Program 2.10.18
Ubuntu-Maker Canonical’s GitHub Account Gets Hacked (added 11 empty repos)
https://thehackernews.com/2019/07/canonical-ubuntu-github-hacked.html
https://redd.it/ca8t36
@r_linux
https://thehackernews.com/2019/07/canonical-ubuntu-github-hacked.html
https://redd.it/ca8t36
@r_linux
AMD Radeon RX 5700 / RX 5700XT Linux Gaming Benchmarks Review
https://www.phoronix.com/scan.php?page=article&item=radeon-5700-linuxgl&num=1
https://redd.it/cadr4s
@r_linux
https://www.phoronix.com/scan.php?page=article&item=radeon-5700-linuxgl&num=1
https://redd.it/cadr4s
@r_linux
Phoronix
AMD Radeon RX 5700 / RX 5700XT Linux Gaming Benchmarks Review - Phoronix
Phoronix is the leading technology website for Linux hardware reviews, open-source news, Linux benchmarks, open-source benchmarks, and computer hardware tests.
PSA: I reduced my boot time from ~30 seconds to ~3 seconds by editing a single file (Linux Mint 19.1)
https://www.reddit.com/r/linux4noobs/comments/cafpd5/psa_i_reduced_my_boot_time_from_30_seconds_to_3/
https://redd.it/cafqao
@r_linux
https://www.reddit.com/r/linux4noobs/comments/cafpd5/psa_i_reduced_my_boot_time_from_30_seconds_to_3/
https://redd.it/cafqao
@r_linux
reddit
r/linux4noobs - PSA: I reduced my boot time from ~30 seconds to ~3 seconds by editing a single file (Linux Mint 19.1)
144 votes and 24 comments so far on Reddit
Linux Experiences/Rants or Education/Certifications thread - July 08, 2019
Welcome to r/linux rants and experiences! This megathread is also to hear opinions from anyone just starting out with Linux or those that have used Linux (GNU or otherwise) for a long time.
Let us know what's annoying you, whats making you happy, or something that you want to get out to r/linux but didn't make the cut into a full post of it's own.
For those looking for certifications please use this megathread to ask about how to get certified whether it's for the business world or for your own satisfaction. Be sure to check out r/linuxadmin for more discussion in the SysAdmin world!
_Please keep questions in r/linuxquestions, r/linux4noobs, or the Wednesday automod thread._
https://redd.it/cagdg8
@r_linux
Welcome to r/linux rants and experiences! This megathread is also to hear opinions from anyone just starting out with Linux or those that have used Linux (GNU or otherwise) for a long time.
Let us know what's annoying you, whats making you happy, or something that you want to get out to r/linux but didn't make the cut into a full post of it's own.
For those looking for certifications please use this megathread to ask about how to get certified whether it's for the business world or for your own satisfaction. Be sure to check out r/linuxadmin for more discussion in the SysAdmin world!
_Please keep questions in r/linuxquestions, r/linux4noobs, or the Wednesday automod thread._
https://redd.it/cagdg8
@r_linux
reddit
r/linux - Linux Experiences/Rants or Education/Certifications thread - July 08, 2019
0 votes and 0 comments so far on Reddit
Contribute to the Gnu/Linux Project?
Hello,
First of all im sorry if this post is against the rules but i haven't found a rule that would forbid this post.
Since this is not really a support request and rather meant as a discussion im posting this here and not on /r/linuxquestions.
But enough talk about about that stuff.
So since im soon a real employee(done with my apprenticeship) i was wondering what projects you could donate to thank them for their awesome work and to support them.
So i would like to discuss a bit and maybe learn about awesome projects that i haven't heard of.
https://redd.it/ca70fj
@r_linux
Hello,
First of all im sorry if this post is against the rules but i haven't found a rule that would forbid this post.
Since this is not really a support request and rather meant as a discussion im posting this here and not on /r/linuxquestions.
But enough talk about about that stuff.
So since im soon a real employee(done with my apprenticeship) i was wondering what projects you could donate to thank them for their awesome work and to support them.
So i would like to discuss a bit and maybe learn about awesome projects that i haven't heard of.
https://redd.it/ca70fj
@r_linux
reddit
r/linux - Contribute to the Gnu/Linux Project?
3 votes and 3 comments so far on Reddit
DDG gives you a cheat sheet for any chmod configuration, good for noobs like me.
https://redd.it/cahhs9
@r_linux
https://redd.it/cahhs9
@r_linux