FreeBSD Desktop – Part 3 – X11 Window System

In this article I would like to cover setting up the X11 Window System on FreeBSD.

x11

You may want to check other articles in the FreeBSD Desktop series on the FreeBSD Desktop – Global Page where you will find links to all episodes of the series along with table of contents for each episode’s contents.

I always get the impression that the X11 configuration/setup seems to be the seen as hard or weird. I will try to gather all useful information about that topic regarding the FreeBSD operating system. A lot of that is covered in the FreeBSD Handbook – 5.4. Xorg Configuration – section.

BIOS or UEFI

First things first, if You find a device that is not supported by any ‘accelerated’ driver like ‘intel‘ or ‘nvidia‘ You would use ‘vesa‘ driver (Video Electronics Standards Association) while booting in BIOS mode and You will use ‘scfb‘ driver (System Console Frame Buffer) while booting on UEFI mode. This can be checked by machdep.bootmethod sysctl(8) parameter.

% sysctl machdep.bootmethod
machdep.bootmethod: BIOS

This way You will know if you will use ‘scfb‘ driver or ‘vesa‘ driver when troubleshooting or when just running the ARM system on which ‘scfb‘ will be used.

Packages

We will install the X11 server, the XDM login manager, the XTERM terminal emulator and the Openbox window manager. We will also install the Intel graphics card driver. To achieve that type the command below.

# pkg install xorg xdm xterm openbox xf86-video-intel

Of course You will need to have network connection configured but we covered that in earlier parts.

Group

To have hardware accelerated X11 You will also need to add your regular user to the ‘video‘ group.

# pw groupmod video -m username

Login Class

Remember to also add UTF-8 as the default encoding (charset and lang parameters) in the /etc/login.conf file as show below. Also, after adding them, run the cap_mkdb /etc/login.conf command as root and relogin with your regular user.

Below are shown the lines that need to be added to the default: profile in the /etc/login.conf file.

(...)

 default:\
         :passwd_format=sha512:\
         :copyright=/etc/COPYRIGHT:\
         :welcome=/etc/motd:\
         :setenv=MAIL=/var/mail/$,BLOCKSIZE=K:\
         :path=/sbin /bin /usr/sbin /usr/bin /usr/local/sbin /usr/local/bin ~/bin:\
         :nologin=/var/run/nologin:\
         :cputime=unlimited:\
         :datasize=unlimited:\
         :stacksize=unlimited:\
         :memorylocked=64K:\
         :memoryuse=unlimited:\
         :filesize=unlimited:\
         :coredumpsize=unlimited:\
         :openfiles=unlimited:\
         :maxproc=unlimited:\
         :sbsize=unlimited:\
         :vmemoryuse=unlimited:\
         :swapuse=unlimited:\
         :pseudoterminals=unlimited:\
         :kqueues=unlimited:\
         :umtxp=unlimited:\
         :priority=0:\
         :ignoretime@:\
+        :charset=UTF-8:\
+        :lang=en_US.UTF-8:\
         :umask=022:
(...)

The diff(1) after/before modification looks like that.

# diff -u login.conf.ORG login.conf
--- login.conf.ORG      2018-05-22 07:10:09.864831000 +0200
+++ login.conf  	2017-07-07 04:47:04.643412000 +0200
@@ -46,6 +46,8 @@
        :umtxp=unlimited:\
        :priority=0:\
        :ignoretime@:\
+       :charset=UTF-8:\
+       :lang=en_US.UTF-8:\
        :umask=022:

The UTF-8 encoding – same as in the lang parameter in the /etc/login.conf file – must be added at the beginning of your ~/.xinitrc file, like that:

% grep LC_ALL ~/.xinitrc
# SET PROPER locale(1) with LC_ALL VARIABLE.
  export LC_ALL=en_US.UTF-8

Kernel Module

In 2010 Intel introduced Nehalem architecture which have integrated GPU in the CPU (and memory controller which AMD had in CPU since 2003). This means that most computers/laptops/servers (Intel has about 80% market share) will have integrated GPU which should be supported by the X11 ‘intel‘ driver and:

  • /boot/kernel/i915.ko from base system (older)
  • /boot/kernel/i915kms.ko from base system (newer)
  • /boot/modules/i915kms.ko from ‘drm-next-kmod‘ package

The ‘drm-next-kmod‘ package is available for FreeBSD 12-CURRENT development branch and upcoming FreeBSD 11.2-RELEASE (currently at BETA2 stage) about which You can read here on FreeBSD Mailing Lists on https://lists.freebsd.org/pipermail/freebsd-stable/2018-February/088406.html and https://svnweb.freebsd.org/ports?view=revision&revision=462202 accordingly.

You will probably be using the builtin KMS module which is the /boot/kernel/i915kms.ko file. You may configure loading of this module in either /boot/loader.conf (loaded at boot menu) or in the /etc/rc.conf main FreeBSD configuration file – which will load modules during the startup process. I prefer the second option as it is faster for FreeBSD system to boot while loading the kernel modules from the /etc/rc.conf file along with starting needed services then lading them one by one from /boot/loader.conf file. To keep system startup time to minimum we will have only one kernel module configured to load from the /boot/loader.conf file – the ZFS module with zfs_load=YES line.

If you found yourself with situation that KMS modules from the base system will not support your graphics card then You will have to try the ‘drm-next-kmod‘ package for latest support of Intel graphics chips, that sometimes requires running FreeBSD CURRENT version which is not a problem, you will get all the new stuff instantly as a bonus πŸ˜‰

To add the KMS (Kernel Mode Setting) Intel module loading into the /etc/rc.conf file put the line below into it.

# KERNEL MODULES
  kld_list="${kld_list} i915kms"

We can also add other useful kernel module loading such as fuse (for alien filesystems), aesni (for encryption acceleration if You CPU has these extensions) geom_eli (for the encryption itself) or coretemp (for the temperature sensor). I will cover all of these kernel module in the future series with exact explanation what are they for.

With all of them the /etc/rc.conf kld_list variables will look like that:

# grep kld_list /etc/rc.conf 
  kld_list="${kld_list} i915kms aesni geom_eli"
  kld_list="${kld_list} fuse coretemp cpuctl"

In case of need to use ‘drm-next-kmod‘ module instead of the base system one, your /etc/rc.conf file would look like that one below.

# grep kld_list /etc/rc.conf
  kld_list="${kld_list} /boot/modules/i915kms.ko aesni geom_eli"
  kld_list="${kld_list} fuse coretemp cpuctl"

If you find yourself in the situation that the ‘drm-next-kmod‘ would still not support your latest graphics card then you may try the latest version of the ‘drm-next-kmod‘. Current ‘drm-next-kmod‘ is on par with Linux 4.11 when it comes to graphics support, the latest WIP (work in progress) tree is at 4.15, so that may enable some graphics cards, anyway, here it is – https://github.com/FreeBSDDesktop/freebsd-base-graphics/tree/drm-v4.15-WIP – use at your own risk. πŸ˜‰

X11 Window System Configuration

Historically You would create entire /etc/X11/xorg.conf file which would include complete X11 Window System configuration. Recently to comply with FreeBSD hier(7) directory structure and logic this can be also configured as /usr/local/etc/X11/xorg.conf file … and even more recently You can just configure these parts of X11 server that You need without touching other parts. This ‘individual’ configuration is done in the /usr/local/etc/X11/xorg.conf.d directory with individual files for each setting, like card.conf for graphics card configuration.

As the latter method is the most modern one we will use that in this guide for the sake of future installations.

# cat /usr/local/etc/X11/xorg.conf.d/flags.conf
Section "ServerFlags"
  Option "DontZap" "off"
EndSection

The DontZap option is to enable the X11 server abort with [CTRL] + [ALT] + [BACKSPACE] shortcut. I found it useful several times when none other option worked. Only X11 server required restart. I could of course login to this laptop via SSH and kill needed processes, but I do not carry two laptops with me to be prepared for such situations πŸ˜‰

Next we will configure the keyboard with Polish layout and two additional options, terminate:ctrl_alt_bksp to allow termination of the X11 server with [CTRL] + [ALT] + [BACKSPACE] shortcut and ctrl:nocaps to ignore the Caps Lock key as I also find that useful, if you not, then do not enable that option.

# cat /usr/local/etc/X11/xorg.conf.d/keyboard.conf
Section "InputDevice"
  Identifier "Keyboard0"
  Driver "kbd"
  Option "XkbLayout" "pl"
  Option "XkbOptions" "terminate:ctrl_alt_bksp,ctrl:nocaps"
EndSection

The last one is the graphics card configuration, we will put ‘intel‘ here as our graphics is fully supported by it.

# cat /usr/local/etc/X11/xorg.conf.d/card.conf
Section "Device"
  Identifier "Card0"
  Option "DPMS"
  Driver "intel"
EndSection

We will also enable DPMS to save power when its possible.

XDM or XINIT/STARTX

You will also have to decide how You want to start your X11 Window Server, you may login in plan text console and then type xinit(1) or startx(1) to read your ~/.xinitrc configuration and daemons or You may want to use X11 Login manager such as xdm/sddm/slim with ~/.xsession configuration to load after successful login. The difference between xinit and startx is that startx command executes xinit command with arguments like -nolisten tcp to not listen for the external connections for example. Its pointless to start another layer of binary (startx) just to pass an argument to command, so we will omit startx and go directly to xinit command with suitable alias.

Which is better – some login manager or directly starting X11 with xinit? Both are good, it only depends on your preferences. For example I used text login and then typed ‘x‘ as an alias to xinit command and recently switched to xdm along with symlink of ~/.xsession which leads to the very same ~/.xinitrc file and also like it.

When I use xinit to directly start the X11 server I use an alias to xinit with these parameters:

alias x='xinit ~/.xinitrc -- -dpi 75 -nolisten tcp'

Of course I keep that alias in the ~/.zshrc file (for the ZSH shell) so everytime I login in the text console I just type ‘x‘ and X11 session starts reading contents of my ~/.xinitrc file.

While xinit run commands based on the ~/.xinitrc file the XDM login manager looks for the ~/.xsession file. As You will be loading same stuff regardless of the startup method we will create a link of ~/.xsession pointing to the ~/.xinitrc file. This way either method You choose You will always end with started X11 session.

% ln -s ~/.xinitrc ~/.xsession

% ls -l ~/.xsession
lrwxr-xr-x  1 vuk  vuk  8 2018.05.22 00:27 .xsession -> .xinitrc

One more case about the ~/.xinitrc (or ~/.xsession) file. It is interpreted as a shell script (and yes you can do if/then/else/fi and case/esac or for/while POSIX shell scripting in it) but it does not need to be executable. The last command in this file MUST NOT to be put in the background (must be without the & char at the end) because the X11 session will end.

XDM Black Theme

I prepared two nice looking themes for XDM login manager, the first one uses black background and grey/white fonts.

To configure this black XDM theme You will need to modify contents of two files as show below.

# cat /usr/local/etc/X11/xdm/Xsetup_0
xsetroot -solid black

This we will set black background on the login screen on the :0 X11 server – the default one.

# cat /usr/local/etc/X11/xdm/Xresources
xlogin.Login.greeting:
xlogin.Login.unsecureGreeting:
xlogin.Login.fail:                Fail.
xlogin.Login.changePasswdMessage: Change.
xlogin.Login.namePrompt:          Username:
xlogin.Login.passwdPrompt:        Password:
xlogin.Login.echoPasswd:          true
xlogin.Login.background:          black
xlogin.Login.foreground:          white
xlogin.Login.failColor:           #cccccc
xlogin.Login.inpColor:            black
xlogin.Login.promptColor:         #aaaaaa
xlogin.Login.face:                courier:size=13:style=Bold
xlogin.Login.failFace:            courier:size=13:style=Bold
xlogin.Login.promptFace:          courier:size=13:style=Normal
xlogin.Login.greetFace:           courier:size=13
xlogin.Login.width:               400

… and the rest of the XDM login manager configuration is kept in the Xresources file, at least the appearance part πŸ˜‰

Wonder what font will be chosen when we put ‘courier‘ in the *face options? Lets check with fc-match(1) command.

% fc-match courier  
c0419bt_.pfb: "Courier 10 Pitch" "Regular"

You have the answer, You do not always have to type whole font name in the configuration files.

Here is the screenshot of this black theme in action.

xdm.BLACK

XDM Grey Theme

If You did not liked the black XDM theme maybe the grey one will suit your taste better.

# cat /usr/local/etc/X11/xdm/Xsetup_0
xsetroot -solid gray50

We will use the gray50 predefined X11 server color for the background.

# cat /usr/local/etc/X11/xdm/Xresources
xlogin.Login.greeting:
xlogin.Login.unsecureGreeting:
xlogin.Login.fail:                Fail.
xlogin.Login.changePasswdMessage: Change.
xlogin.Login.namePrompt:          Username:
xlogin.Login.passwdPrompt:        Password:
xlogin.Login.echoPasswd:          true
xlogin.Login.background:          gray50
xlogin.Login.foreground:          white
xlogin.Login.failColor:           #dddddd
xlogin.Login.inpColor:            gray50
xlogin.Login.promptColor:         #cccccc
xlogin.Login.greetColor:          gray50
xlogin.Login.promptColor          gray50
xlogin.Login.hiColor              gray50
xlogin.Login.shdColor             gray50
xlogin.Login.face:                courier:size=13:style=Bold
xlogin.Login.failFace:            courier:size=13:style=Bold
xlogin.Login.promptFace:          courier:size=13:style=Bold
xlogin.Login.greetFace:           courier:size=13:style=Bold
xlogin.Login.frameWidth:          0
xlogin.Login.innerFramesWidth:    0
xlogin.Login.sepWidth:            0
xlogin.Login.width:               32768
xlogin.Login.height:              32768
xlogin.Login.x:                   0
xlogin.Login.y:                   0

… and knowing the XDM theming limitations we will customize to mimic the fullscreen of grey color. The only downside of that approach is that Username: and Password: fields will be placed in the top/left side of the screen.

Here is the screenshot of this grey theme in action.

xdm.GREY

Client Configuration

Last but not least, we will configure the simple ~/.xinitrc file with Openbox window manager, prestarted xterm terminal and black background for our simple session.

Here are the contents of the ~/.xinitrc file (to which ~/.xsession links of course).

% cat ~/.xinitrc
# SET PROPER locale(1) with LC_ALL VARIABLE.
  export LC_ALL=en_US.UTF-8

# PRESTARTED APPS
  xterm &
  xsetroot -solid black &

# WINDOW MANAGER
  openbox

It will not be very pretty – yet – but we will cover that later in the series.

desktop

That’s all for today’s X11 configuration, hope that was useful.

UPDATE 1 – The devd(8) Backend and AutoAddDevices Option

As user seschwar on Lobsters suggested:


“Xorg now has a devd(8) backend it can use to get informed about hotplugged devices instead of hald(8): https://lists.freebsd.org/pipermail/freebsd-x11/2017-March/018978.html That’s working fine for me, even without moused(8).”

Thank you for that information, this may be also verified by checking the X11 log /var/log/Xorg.0.log file.

# grep devd /var/log/Xorg.0.log
[ 96890.425] (II) The server relies on devd to provide the list of input devices.
        If no devices become available, reconfigure devd or disable AutoAddDevices.
[ 96890.955] (II) config/devd: probing input devices...
[ 96890.955] (II) config/devd: adding input device (null) (/dev/kbdmux)
[ 96890.956] (**) Option "config_info" "devd:kbdmux"
[ 96890.960] (II) config/devd: kbdmux is enabled, ignoring device ukbd0
[ 96890.960] (II) config/devd: kbdmux is enabled, ignoring device atkbd0
[ 96890.960] (II) config/devd: adding input device (null) (/dev/sysmouse)
[ 96890.961] (**) Option "config_info" "devd:sysmouse"
[ 96890.962] (II) config/devd: device /dev/ums0 already opened
[ 96890.962] (II) config/devd: device /dev/psm0 already opened

I will modify the original post to not confuse future readers.

UPDATE 2 – Using modesetting Driver

As user alx82 on Reddit suggested:


“If you use i915kms kernel module, you don’t need to install xf86-video-intel, the modesetting generic DDX driver that is built in the X server, will do just well. The xf86-video-intel might even cause you troubles, as you mentioned, for example my x230 was rebooting instead of suspending when I had installed the xf86-video-intel (I had installed it to solve the tearing problem with xfwm4 using the xf86-video-intel’s SNA acceleration). Now removed, my x230 suspends no problem.”

Thank you for that information.

I have tried below configuration with ‘modesetting’ driver and it works without a problem. I did not had any issues with ‘intel’ driver either but I will stick with ‘modesetting’ driver for a while see how it behaves on my machine.

# cat /usr/local/etc/X11/xorg.conf.d/card.conf
Section "Device"
  Identifier "Card0"
  Option "DPMS"
  Driver "modesetting"
EndSection
# cat /usr/local/etc/X11/xorg.conf.d/flags.conf
Section "ServerFlags"
  Option "DontZap" "off"
EndSection
# cat /usr/local/etc/X11/xorg.conf.d/keyboard.conf
Section "InputDevice"
  Identifier "Keyboard0"
  Driver "kbd"
  Option "XkbLayout" "pl"
  Option "XkbOptions" "terminate:ctrl_alt_bksp,ctrl:nocaps"
EndSection

To verify which driver You use You can check the X11 log /var/log/Xorg.0.log file.

Here is ‘intel‘ driver being used:

# grep -c intel /var/log/Xorg.0.log
98

# grep -c modeset /var/log/Xorg.0.log
8

# grep DRI /var/log/Xorg.0.log
[ 95305.483] (II) intel(0): [DRI2] Setup complete
[ 95305.483] (II) intel(0): [DRI2]   DRI driver: i965
[ 95305.483] (II) intel(0): [DRI2]   VDPAU driver: va_gl
[ 95305.484] (II) intel(0): DRI2: Enabled
[ 95305.484] (II) intel(0): DRI3: Disabled
[ 95305.549] (II) GLX: Initialized DRI2 GL provider for screen 0

Here is ‘modesetting‘ driver being used:

# grep -c intel /var/log/Xorg.0.log
0

# grep -c modeset /var/log/Xorg.0.log
80

# grep DRI /var/log/Xorg.0.log
[ 95556.446] (II) glamor: EGL version 1.4 (DRI2):
[ 95556.671] (II) modeset(0): [DRI2] Setup complete
[ 95556.671] (II) modeset(0): [DRI2]   DRI driver: i965
[ 95556.671] (II) modeset(0): [DRI2]   VDPAU driver: i965
[ 95556.714] (II) GLX: Initialized DRI2 GL provider for screen 0

UPDATE 3 – Using Dedicated video: Login Class Instead of Global One

As Lorenzo suggested in the comments below.


“If you modify /etc/login.conf, you are modifying the systemwide locale for the default login class to which all users belong (also user www for Apache, for example).”

We can of course created dedicated login class for the X11 Window System, as we use group video already we will create video: login class for the X11 Window System.

I assume that the default: login class is untouched – if You already modified it with lang and charset options, remove them.

Add this login class to the /etc/login.conf file.

video:\
        :charset=UTF-8:\
        :lang=en_US.UTF-8:\
        :tc=default:

Rebuild the login class database.

# cap_mkdb /etc/login.conf

How the account looks before setting the login class.

# grep vuk /etc/master.passwd
vuk:{REMOVED}:1000:1000::0:0:vuk:/home/vuk:/bin/sh

Lets set the login class to video for the vuk user.

# pw usermod -L video -n vuk

How the account looks after setting the login class.

# grep vuk /etc/master.passwd
vuk:{REMOVED}:1000:1000:video:0:0:vuk:/home/vuk:/bin/sh

Now logout and login again to make that work.

Hope that helps.

UPDATE 4 – Tap to Click on Synaptics Touchpad

After upgrade FreeBSD from 12.1-RELEASE to 12.2-RELEASE the tap to click on (not only mine touchpad on ThinkPad W520 machine stopped working.

There is also option called NaturalScrolling which enables the natural scrolling mode. It means that if you use two fingers to slide up on the touchpad the content of the window will move up (like scrolling down with mouse).

The ‘not’ natural scrolling mode means that sliding two fingers up on the touchpad will move the content of window down (like scrolling up with the mouse).

After some time I fell that natural scrolling is more … natural/logical for me so I switched to it.

Below configuration fixes that and tap to click works again.

# pkg install xf86-input-synaptics

# cat << BSD > /usr/local/etc/X11/xorg.conf.d/touchpad.conf
Section "InputClass"
  Identifier "touchpad"
  MatchIsTouchpad "on"
  Driver "libinput"
  Option "Tapping" "on"
  Option "NaturalScrolling" "on"
EndSection
BSD

After these steps restart the X11 server and tap to click should work properly again.

Hope that helps.

UPDATE 5 – VAAPI and Tear Free on Intel Cards

The VAAPI is also known as Video Acceleration API – its open source API that allows applications such as mpv(1) or vlc(1) media players to use hardware video acceleration capabilities – usually provided by the GPU.

About Tear Free option … some people praise Wayland as tear free experience … well guess what you can have the same on X11 too. It will provide at most 1 frame of latency to the X11 output while using little more memory for additional copying but besides that nothing changes. The input latency does not change.

Here is the detailed information about Tear Free from Intel.

Disable or enable TearFree updates. This option forces X to perform all rendering to a backbuffer prior to updating the actual display. It requires an extra memory allocation the same size as a framebuffer, the occasional extra copy, and requires Damage tracking. Thus enabling TearFree requires more memory and is slower (reduced throughput) and introduces a small amount of output latency, but it should not impact input latency. However, the update to the screen is then performed synchronously with the vertical refresh of the display so that the entire update is completed before the display starts its refresh. That is only one frame is ever visible, preventing an unsightly tear between two visible and differing frames. Note that this replicates what the compositing manager should be doing, however TearFree will redirect the compositor updates (and those of fullscreen games) directly on to the scanout thus incurring no additional overhead in the composited case. Also note that not all compositing managers prevent tearing, and if the outputs are rotated, there will still be tearing without TearFree enabled.

To achieve this we will need to add these two packages:

# pkg install libvdpau-va-gl libva-intel-driver

The vlc(1) media player does not need any configuration to use VAAPI. It will just ‘pick it up’ automatically.

% vlc VIDEO.mp4
(...)
libva info: va_openDriver() returns 0
(...)

To use VAAPI in mpv(1) you will need to add hwdec=vaapi option in the ~/.config/mpv/mpv.conf config file.

% cat << MPV >> ~/.config/mpv/mpv.conf
hwdec=vaapi

MPV

% mpv VIDEO.mp4
(...)
Using hardware decoding (vaapi).
(...)

Above terminal outputs from mpv(1) or vlc(1) media players will let you know that they are using VAAPI successfully.

Lets get back to Intel Tear Free option – when enabled – will be shown as follows in the /var/log/Xorg.0.log file.

% grep -i tear /var/log/Xorg.0.log
[  6356.991] (**) intel(0): Option "TearFree" "true"
[  6356.993] (**) intel(0): TearFree enabled

To enable it use the following X11 config for the graphics card.

% cat << X11 > /usr/local/etc/X11/xorg.conf.d/card.conf
Section "Device"
  Identifier "Card0"
  Driver "intel"
  Option "TearFree" "true"
  Option "DPMS"
EndSection

X11

After these steps restart the X11 server to make these changes work.

Also a note about the Tear Free option. I do not recall any tearing before enabling it so I generally do not see any ‘benefit’ of enabling it, but maybe its just me. I have read that some people see noticeable difference (for the good) when they enabled the Tear Free option.

Regards.

EOF

43 thoughts on “FreeBSD Desktop – Part 3 – X11 Window System

  1. Lorenzo

    If you modify /etc/login.conf, you are modifying the systemwide locale for the default login class to which all users belong (also user www for Apache, for example).
    After modifying login.conf you have to run the following to rebuild its database:
    # cap_mkdb /etc/login.conf

    Logout, then log in again to have the proper locale set

    Liked by 2 people

    Reply
  2. Pingback: FreeBSD desktop (3) | 0ddn1x: tricks with *nix

  3. Pingback: In Other BSDs for 2018/05/26 – DragonFly BSD Digest

  4. Pingback: FreeBSD Desktop – Part 6 – Key Components – Task Bar | vermaden

  5. Pingback: FreeBSD Desktop – Part 7 – Key Components – Wallpaper Handling | vermaden

  6. Pingback: FreeBSD Desktop – Part 8 – Key Components – Application Launcher | vermaden

  7. Pingback: FreeBSD Desktop – Part 9 – Key Components – Keyboard/Mouse Shortcuts | vermaden

  8. Pingback: FreeBSD Desktop – Part 4 – Key Components – Window Manager | vermaden

  9. Pingback: FreeBSD Desktop – Part 5 – Key Components – Status Bar | vermaden

  10. Pingback: FreeBSD Desktop – Part 10 – Key Components – Locking Solution | vermaden

  11. Pingback: FreeBSD Desktop – Part 11 – Key Components – Blue Light Spectrum Suppress | vermaden

  12. Pingback: FreeBSD Desktop – Part 12 – Configuration – Openbox | vermaden

  13. Pingback: FreeBSD Desktop – Part 13 – Configuration – Dzen2 | vermaden

  14. Pingback: FreeBSD Desktop – Part 14 – Configuration – Tint2 | vermaden

  15. Pingback: FreeBSD Desktop – Part 2 – Install | vermaden

  16. Pingback: FreeBSD Desktop – Part 15 – Configuration – Fonts & Frameworks | vermaden

  17. brad

    Greetings!

    On a virtualized machine in VirtualBox it is not necessary to install this driver from intel? It does not detect the video driver of the virtualbox-ose-additions in the window managers, how to proceed to solve? In the Xorg configuration, is it required manually or leave the automatic configuration by default? The same goes for the language change, how to proceed to change the language in this case to Poland without having to manually configure the Xorg? This i915 kms add-on to the system module is quite confusing, on a 1366×768 machine, is it necessary to add that i915kms to the rc.conf file and loader.conf?

    Like

    Reply
    1. vermaden Post author

      On a virtualized machine in VirtualBox it is not necessary to install this driver from intel?

      No.

      It does not detect the video driver of the virtualbox-ose-additions in the window managers, how to proceed to solve?

      Here is what You need to do:

      # pkg install virtualbox-ose-additions
      # sysrc vboxguest_enable=YES
      # sysrc vboxservice_enable=YES
      # pw groupmod wheel -m #YOURUSERNAME#
      

      Then use vboxvideo and vboxmouse for graphics card and mouse respectively.

      Allow use of VirtualBox Shared Clipboard with this entry in ~/.xinitrc (or ~/.xsession of You use it instead).

      # ENABLE VIRTUALBOX SHARED CLIPBOARD WHEN IN VM
        if [ "$( sysctl -n kern.vm_guest )" != "none" ]
        then
          VBoxClient --clipboard 1> /dev/null 2> /dev/null
        fi
      

      The same goes for the language change, how to proceed to change the language in this case to Poland without having to manually configure the Xorg?

      Like that:

      % setxkbmap us
      

      This i915 kms add-on to the system module is quite confusing, on a 1366Γ—768 machine, is it necessary to add that i915kms to the rc.conf file and loader.conf?

      Depends, loading modules in /etc/rc.conf is faster then from /boot/loader.conf so its best to keep only zfs an geli (if you use them) at /boot/loader.conf and put the rest in /etc/rc.conf file.

      Regards.

      Like

      Reply
  18. Pingback: FreeBSD Desktop – Part 1 – Simplified Boot | vermaden

  19. brad

    It has no effect and still does not detect the window manager to the guests of the virtualized virtualbox machine. I wish you would experience it on a real Linux machine with the FreeBSD guest system in virtualbox.

    Greetings!

    Like

    Reply
  20. Pingback: FreeBSD Desktop – Part 16 – Configuration – Pause Any Application | vermaden

  21. Pingback: FreeBSD Desktop – Part 17 – Automount Removable Media | πŸ†…πŸ…΄πŸ†πŸ„ΌπŸ„°πŸ„³πŸ…”πŸ…

  22. Pingback: FreeBSD Desktop – Part 2.1 – Install FreeBSD 12 | πšŸπšŽπš›πš–πšŠπšπšŽπš—

  23. Pingback: FreeBSD Desktop – Part 18 – Global Dashboard | πšŸπšŽπš›πš–πšŠπšπšŽπš—

  24. Surtr

    When I use the command startx /usr/local/bin/openbox-session, Openbox comes up, but I have no right click menu. I copied menu.xml and rc.xml to /home/user/.config/openbox. What am I doing wrong?

    Like

    Reply
  25. Pingback: FreeBSD GNOME 3 Fast Track | πšŸπšŽπš›πš–πšŠπšπšŽπš—

  26. Pingback: FreeBSD Gnome 3 Fast Track - Your Cheer

  27. Pingback: FreeBSD Desktop – Fragment 3 – X11 Window Map – πšŸπšŽπš›πš–πšŠπšπšŽπš— - JellyEnt

  28. Pingback: FreeBSD Desktop – Part 3 – X11 Window System - GistTree

  29. Pingback: FreeBSD Desktop – Part 3 – X11 Window System | ءحافة Ψ­Ψ±Ψ© FREE PRESS

  30. philv

    Thanks for your excellent guides on FreeBSD. Would you consider adding or updating X11 to address HIDPI displays and multi monitor setups? Those are two topics that had delayed my use of FreeBSD as a primary desktop.

    Like

    Reply
    1. vermaden Post author

      Thanks.

      … as for HiDPI … would you consider 1080p a HiDPI related resolution? πŸ™‚

      I may ‘try’ to show some HiDPI settings for 1080p as this is the screen I am using but I am not sure that this will be useful for people with ‘real’ HiDPI screens lik 4K for example?

      Regards.

      Liked by 1 person

      Reply
      1. philv

        Thanks. In my case, 3x (3840×2160) monitors at 161 dpi needed both GDK_DPI_SCALE=0.5 and XFCE custom DPI settings for font scaling, as well setting xbindkeys(1) to run xrandr(1) to reset the monitors when they wake after xscreensaver(1) puts them to sleep or manually turning off a monitor. Monitor locations are manually set in xorg.conf(5) on initial startup, but reset their location to all be +0+0 when waking. Neither scaling or position were an issue with 1920×1080 on a single monitor. DPI tweaking is likely to be different for every window manager, so perhaps the best note would be to for the reader to look up window manager specific settings.

        Like

  31. Piotr

    Witam, nie wiem czy może coś się zmieniło w wersji 13.2, czy też to kestia komputera (Dell z procesorem KabyLake), w każdym razie sposób na ustawienie Ctrl+Alt+Backspace nie działa, a także by uzyskać polską klawiaturę trzeba do .xinitrc dodać setxkbmap -layout pl inaczej nie działa, może dlatego że u mnie /var/log/Xorg.0.log nie zawiera żadnej wzmianki o devd (choć devd jest włączone)? Dodatkowo, u mnie na 13.2 fuse nie ma, nazwa modułu to fusefs, aesni też nie da się załadować, jest już w kernelu. Pozdr

    Liked by 1 person

    Reply
    1. vermaden Post author

      Hej,

      faktycznie aesni zagoscil w kernelu i nie trzeba juz go recznie ladowac/dodawac.

      Co do CTRL+ALT+BACKSPACE to musze sprawdzic. Przyznam bez bicia ze dopoki FreeBSD nie zmieni polityki z budowaniem pakietow ktore dostarczaja moduly jadra – to nie przesiadam sie na nowsza wersje wczesniej niz 3 miesiace po wydaniu. Obecna (zla) polityka jest taka ze dla 13.2 buduje sie moduly jadra jeszcze na starszej 13.1 – niestety oznacza to czesto po prostu nie dzialajace (albo nawet nie da sie zaladowac) moduly jadra na 13.2.

      13.1 wypada z obiegu jakos za 2-3 tygodnie – wtedy zmigruje na 13.2 i bede to (CTRL+ALT+BACKSPACE) tez sprawdzal. Tak samo klawiature. Zmiana ukladu przez setxkbmap -layout pl w ~/.xinitrc byla zawsze mozliwa – po prostu mozna to bylo miec albo w ~/.xinitrc albo w konfiguracji XORG.

      Nazwa modulu FUSE tez sie zmienila (zupelnie nie wiem po co …) wiec o tym tez wtedy wzmianke dodam.

      Dzieki za zgloszenie tego wszystkiego.

      Pozdrawiam,
      vermaden

      Like

      Reply
      1. Piotr

        Nie ma za co, niestety FreeBSD ma czasem kiepskΔ… politykΔ™ – tak jak z pmbr, przez co kiedyΕ› musiaΕ‚em hotpluggowaΔ‡ dysk PATA, bo z wersjΔ… FreeBSD komputer nawet nie chciaΕ‚ siΔ™ uruchomiΔ‡ do BIOS-u, i to byΕ‚a jedyna opcja ΕΌeby mΓ³c zmieniΔ‡ “bit from hell”. JeΕ›li chodzi o kolejne zmiany, to wyglΔ…da na to, ΕΌe 13.2 domyΕ›lnie uruchamia SpeedShift na obsΕ‚ugiwanych procesorach (wyΕ‚Δ…czenie tego w BIOS/UEFI nic nie daje, wyΕ‚Δ…cza go jedynie loaderowe ustawienie hint.hwpstate_intel.X.disabled=1, gdzie X to sΔ… numery procesorΓ³w), przez co instrukcje z artykuΕ‚u The Power To Serve teΕΌ sΔ… nieaktualne, dev.cpu.0.freq_levels raportuje jedynie domyΕ›lnΔ… czΔ™stotliwoΕ›Δ‡ bez zuΕΌycia prΔ…du, a uΕΌycie w powerd_flags ktΓ³rejkolwiek z opcji -m -M w ogΓ³le powerd “wyΕ‚Δ…cza”. Pozdrawiam

        Like

      2. vermaden Post author

        JeΕ›li chodzi o kolejne zmiany, to wyglΔ…da na to, ΕΌe 13.2 domyΕ›lnie uruchamia SpeedShift na obsΕ‚ugiwanych procesorach (wyΕ‚Δ…czenie tego w BIOS/UEFI nic nie daje, wyΕ‚Δ…cza go jedynie loaderowe ustawienie hint.hwpstate_intel.X.disabled=1, gdzie X to sΔ… numery procesorΓ³w), przez co instrukcje z artykuΕ‚u The Power To Serve teΕΌ sΔ… nieaktualne, dev.cpu.0.freq_levels raportuje jedynie domyΕ›lnΔ… czΔ™stotliwoΕ›Δ‡ bez zuΕΌycia prΔ…du, a uΕΌycie w powerd_flags ktΓ³rejkolwiek z opcji -m -M w ogΓ³le powerd β€œwyΕ‚Δ…cza”.

        To dodawalem juz jakis czase temu jako to (w The Power to Server): UPDATE 4 – Intel Speed Shift

        Like

  32. Son Phan Trung

    I wonder what are your thoughts on Wayland in general, and the fact that many distros are starting to drop X11?

    Like

    Reply
    1. vermaden Post author
      My thoughts on Wayland are pretty much summarized here: .gist table { margin-bottom: 0; } Think twice before abandoning Xorg. Wayland breaks everything! Hence, if you are interested in existing applications to “just work” without the need for adjustments, then you may be better off avoiding Wayland. Wayland solves no issues I have but breaks almost everything I need. Even the most basic, most simple things (like xkill) – in this case with no obvious replacement. And usually it stays broken, because the Wayland folks mostly seem to care about Automotive, Gnome, maybe KDE – and alienating everyone else (e.g., people using just an X11 window manager or something like GNUstep) in the process. Wayland proponents make it seem like Wayland is “the successor” of Xorg, when in fact it is not. It is merely an incompatible alternative, and not even one that has (nor wants to have) feature parity (missing features). And unlike X11 (the X Window System), Wayland protocol designers actively avoid the concept of “windows” (making up incomprehensible words like “xdg_toplevel” instead). DO NOT USE A WAYLAND SESSION! Let Wayland not destroy everything and then have other people fix the damage it caused. Or force more Red Hat/Gnome components (glib, Portals, Pipewire) on everyone! Please add more examples to the list. Wayland seems to be made by people who do not care for existing software. They assume everyone is happy to either rewrite everything or to just use Gnome on Linux (rather than, say, twm with ROX Filer on NetBSD). Edit: When I wrote the above, I didn’t really realize what Wayland even was, I just noticed that some distributions (like Fedora) started pushing it onto me and things didn’t work properly there. Today I realize that you can’t “install Wayland”, because unlike Xorg, there is not one “Wayland display server” but actually every desktop envrironment has its own. And maybe “the Wayland folks” don’t “only care about Gnome”, but then, any fix that is done in Gnome’s Wayland implementation isn’t automatically going to benefit all users of Wayland-based software, and possibly isn’t even the implementation “the Wayland folks” would necessarily recommend. Edit 12/2023: If something wants to replace X11 for desktop computers (such as professional Unix workstations), then it better support all needed features (and key concepts, like windows) for that use case. That people also have displays on their fridge doesn’t matter the least bit in that context of discussion. Let’s propose the missing Wayland protocols for full X11 feature parity. Wayland is broken by design A crash in the window manager takes down all running applications You cannot run applications as root You cannot do a lot of things that you can do in Xorg by design There is not one /usr/bin/wayland display server application that is desktop environment agnostic and is used by everyone (unlike with Xorg) It offloads a lot of work to each and every window manager. As a result, the same basic features get implemented differently in different window managers, with different behaviors and bugs – so what works on desktop environment A does not necessarily work in desktop environment B (e.g., often you hear that something “works in Wayland”, even though it only really works on Gnome and KDE, not in all Wayland implementations). This summarizes it very well: https://gitlab.freedesktop.org/wayland/wayland/-/issues/233 Apparently the Wayland project doesn’t even want to be “X.org 2.0”, and doesn’t want to provide a commonly used implementation of a compositor that could be used by everyone: https://gitlab.freedesktop.org/wayland/wayland/-/issues/233. Yet this would imho be required if they want to make it into a worthwile “successor” that would have any chance of ever fixing the many Wayland issues at the core. Wayland breaks screen recording applications MaartenBaert/ssr#431 ❌ broken since 24 Jan 2016, no resolution (“I guess they use a non-standard GNOME interface for this”) https://github.com/mhsabbagh/green-recorder ❌ (“I am no longer interested in working with things like ffmpeg/wayland/GNOME’s screencaster or solving the issues related to them or why they don’t work”) vkohaupt/vokoscreenNG#51 ❌ broken since at least 7 Mar 2020. (“I have now decided that there will be no Wayland support for the time being. Reason, there is no budget for it. Let’s see how it looks in a year or two.”) – This is the key problem. Wayland breaks everything and then expects others to fix the wreckage it caused on their own expense. obsproject/obs-studio#2471 ❌ broken since at least 7 Mar 2020. (“Wayland is unsupported at this time”, “There isn’t really something that can just be easily changed. Wayland provides no capture APIs”) There is a workaround for OBS Studio that requires a obs-xdg-portal plugin (which is known to be Red Hat/Flatpak-centric, GNOME-centric, “perhaps” works with other desktops) phw/peek#1191 ❌ broken since 14 Jan 2023. Peek, a screen recording tool, has been abandoned by its developerdue to a number of technical challenges, mostly with Gtk and Wayland (“Many of these have to do with how Wayland changed the way applications are being handled”) As of February 2024, screen recording is still broken utterly on Wayland with the vast majority of tools. Proof Workaround: Find a Wayland compositor that supports the wlr-screencopy-unstable-v1 protocol and use wf-recorder -a. The default compositor in Raspberry Pi OS (Wayfire) does, but the default compositor in Ubuntu doesn’t. (That’s the worst part of Wayland: Unlike with Xorg, it always depends on the particular Wayand compositor what works and what is broken. Is there even one that supports everything?) Wayland breaks screen sharing applications jitsi/jitsi-meet#2350 ❌ broken since 3 Jan 2018 jitsi/jitsi-meet#6389 ❌ broken since 24 Jan 2016 (“Closing since there is nothing we can do from the Jitsi Meet side.”) See? Wayland breaks stuff and leaves application developers helpless and unable to fix the breakage, even if they wanted. NOTE: As of November 2023, screen sharing in Chromium using Jitsi Meet is still utterly broken, both in Raspberry Pi OS Desktop, and in a KDE Plasma installation, albeit with different behavior. Note that Pipewire, Portals and whatnot are installed, and even with them it does not work. raspberrypi/bookworm-feedback#149 (comment) ❌ broken since at least Nov 17, 2023 (“window sharing not being available in wlroots derived compositors (such as wayfire)”) flathub/us.zoom.Zoom#22 Zoom ❌ broken since at least 4 Jan 2019. (“Can not start share, we only support wayland on GNOME with Ubuntu (17, 18), Fedora (25 to 29), Debian 9, openSUSE Leap 15, Arch Linux”). No word about non-GNOME! https://community.zoom.com/t5/Meetings/Screensharing-only-works-on-GNOME-wayland-when-it-should-work-on/m-p/64823 Zoom ❌ Still broken as of 24 Jun 2022. (“… we only support Wayland on Gnome with Ubuntu 17 and above, Fedora 25 and above, Debian 9 and above …”) probonopd/Zoom.AppImage#8 ❌ broken since 1 Oct 2022 Zoom: “You need PulseAudio 1.0 and above to support audio share” on a system that uses pipewire-pulseaudio Wayland breaks automation software
      sudo pkg install py37-autokey
      
      This is an X11 application, and as such will not function 100% on 
      distributions that default to using Wayland instead of Xorg.
      
      Wayland breaks Gnome-Global-AppMenu (global menus for Gnome) https://gitlab.com/lestcape/Gnome-Global-AppMenu/-/issues/116 ❌ broken since 24 Aug 2018 (“because the lack of the Gtk+ Wayland support for the Global Menu”) https://bugs.kde.org/show_bug.cgi?id=424485 ❌ Still broken as of late 2023 (“I am also still not seeing GTK global menus on wayland. They appear on the applications themselves, wasting a lot of space.”) Wayland broke global menus with KDE platformplugin https://blog.broulik.de/2016/10/global-menus-returning/ (“it uses global window IDs, which don’t exist in a Wayland world… no global menu on Wayland, I thought, not without significant re-engineering effort”). KDE had to do additional work to work around it. And it still did not work: https://bugs.kde.org/show_bug.cgi?id=385880 (“When using the Plasma-Wayland session, the global menu does not work.”) Good news: According to this report global menus now work with KDE platformplugin as of 4/2022 Wayland breaks global menus with non-KDE Qt platformplugins https://blog.broulik.de/2016/10/global-menus-returning/ ❌ broke non-KDE platformplugins. As a result, global menus now need _KDE_NET_WM_APPMENU_OBJECT_PATH which only the KDE platformplugin sets, leaving everyone else in the dark Wayland breaks AppImages that don’t ship a special Wayland Qt plugin https://blog.martin-graesslin.com/blog/2018/03/unsetting-qt_qpa_platform-environment-variable-by-default/ ❌ broke AppImages that don’t ship a special Wayland Qt plugin. “This affects proprietary applications, FLOSS applications bundled as appimages, FLOSS applications bundled as flatpaks and not distributed by KDE and even the Qt installer itself. In my opinion this is a showstopper for running a Wayland session.” However, there is a workaround: “AppImages which ship just the XCB plugin will automatically fallback to running in xwayland mode” (see below). Wayland breaks Redshift https://wiki.archlinux.org/index.php/redshift ❌ broken (“Redshift does not support Wayland since it offers no way to adjust the color temperature”) Update: Some Wayland compositors (such as Wayfire) now support wlr_gamma_control_unstable_v1, see https://github.com/WayfireWM/wayfire/wiki/Tutorial#configuring-wayfire and jonls/redshift#663. Does it work in all Wayland compositors though? Wayland breaks global hotkeys albertlauncher/albert#309 ❌ broken since 7 Jan 2017 (“This is a security measure, but has the side effect of preventing applications from registering their own global hotkeys”) YouTube video by RenΓ© Rebe Wayland does not work for Xfce? See below. Wayland does not work properly on NVidia hardware? Apparently Wayland relies on nouveau drivers for NVidia hardware. The nouveau driver has been giving unsatisfactory performance since its inception. Even clicking on the application starter icon in Gnome results in a stuttery animation. Only the proprietary NVidia driver results in full performance. See below. Wayland does not work properly on Intel hardware https://cfenollosa.com/blog/fed-up-with-the-mac-i-spent-six-months-with-a-linux-laptop-the-grass-is-not-greener-on-the-other-side.html ❌ broken since at least 02 Apr 2021 (“Screen tearing with the intel driver. Come on. This was solved on xorg and now with Wayland it’s back.”) Wayland prevents GUI applications from running as root https://bugzilla.redhat.com/show_bug.cgi?id=1274451 ❌ broken since 22 Oct 2015 (“No this will only fix sudo for X11 applications. Running GUI code as root is still a bad idea.” I absolutely detest it when software tries to prevent me from doing what some developer thinks is “a bad idea” but did not consider my use case, e.g., running truss for debugging on FreeBSD needs to run the application as root. https://bugzilla.mozilla.org/show_bug.cgi?id=1323302 suggests it is not possible: “These sorts of security considerations are very much the way that “the Linux desktop” is going these days”.) Suggested solution Wayland is biased toward Linux and breaks BSD https://blog.netbsd.org/tnf/entry/wayland_on_netbsd_trials_and ❌ broken since 28 Sep 2020 (“Wayland is written with the assumption of Linux to the extent that every client application tends to #include <linux/input.h> because Wayland’s designers didn’t see the need to define a OS-neutral way to get mouse button IDs. (…) In general, Wayland is moving away from the modularity, portability, and standardization of the X server. (…) I’ve decided to take a break from this, since it’s a fairly huge undertaking and uphill battle. Right now, X11 combined with a compositor like picom or xcompmgr is the more mature option.” Wayland complicates server-side window decorations https://blog.martin-graesslin.com/blog/2018/01/server-side-decorations-and-wayland/ ❌ FUD since at least 27 January 2018 (“I heard that GNOME is currently trying to lobby for all applications implementing client-side decorations. One of the arguments seems to be that CSD is a must on Wayland. ” … “I’m burnt from it and are not interested in it any more.”) Server-side window decorations are what make the title bar and buttons of all windows on a system consistent. They are a must have_ for a consistent system, so that applications written e.g., Gtk will not look entirely alien on e.g., a Qt based desktop, and to enforce that developers cannot place random controls into window titles where they do not belong. Client-side decorations, on the other hand, are destroying uniformity and consistency, put additional burden on application and toolkit developers, and allow e.g., GNOME developers to put random controls (that do not belong there) into window titles (like buttons), hence making it more difficult to achieve a uniform look and feel for all applications regardless of the toolkit being used. Wayland breaks windows rasing/activating themselves https://phabricator.kde.org/D16648#470609 (“Wayland clients can’t raise or activate themselves”), ❌ broken since May 27 2019 Wayland breaks RescueTime https://help.rescuetime.com/article/117-common-linux-issues (“One of the features of Wayland is that it prevents apps from doing precisely what RescueTime is trying to doβ€”track activity in other windows.”) ❌ broken since June 3, 2021 Wayland breaks window managers Apparently Wayland (at least as implemented in KWin) does not respect EWMH protocols, and breaks other command line tools like wmctrl, xrandr, xprop, etc. Please see the discussion below for details. Wayland requires JWM, TWM, XDM, IceWM,… to reimplement Xorg-like functionality https://gitlab.freedesktop.org/wayland/wayland/-/issues/233
      Screen recording and casting Querying of the mouse position, keyboard LED state, active window position or name, moving windows (xdotool, wmctrl) Global shortcuts System tray Input Method support/editor (IME) Graphical settings management (i.e. tools like xranrd) Fast user switching/multiple graphical sessions Session configuration including but not limited to 1) input devices 2) monitors configuration including refresh rate / resolution / scaling / rotation and power saving 3) global shortcuts HDR/deep color support VRR (variable refresh rate) Disabling input devices (xinput alternative) As it currently stands minor WMs and DEs do not even intend to support Wayland given the sheer complexity of writing all the code required to support the above features. You do not expect JWM, TWM, XDM or even IceWM developers to implement all the featured outlined in ^1.
      Wayland breaks _NET_WM_STATE_SKIP_TASKBAR protocol https://github.comelectron/electron#33226 (“skipTaskbar has no effect on Wayland. Currently Electron uses _NET_WM_STATE_SKIP_TASKBAR to tell the WM to hide an app from the taskbar, and this works fine on X11 but there’s no equivalent mechanism in Wayland.” Workarounds are only available for some desktops including GNOME and KDE Plasma.) ❌ broken since March 10, 2022 Wayland breaks NoMachine NX https://kb.nomachine.com/TR03S10126?s=wayland ❌ broken since 2021-03-09 (“The session becomes unresponsive once logged-in to the Wayland desktop”) Wayland breaks xclip xclip is a command line utility that is designed to run on any system with an X11 implementation. It provides an interface to X selections (“the clipboard”). Apparently Wayland isn’t compatible to the X11 clipboard either. AppImage/AppImageKit#1221 (comment) ❌ broken since 2022-20-15 (“Espanso built for X11 will not work on Wayland due to xclip. Wayland asks for wl-copy“) This is another example that the Wayland requires everyone to change components and take on additional work just because Wayland is incompatible to what we had working for all those years. Wayland breaks SUDO_ASKPASS https://github.com/linuxhw/hw-probe-pyqt5-gui/commit/eb2d6e5145fb8571414bda57676084b7f13b94e5#diff-23cb15995f1502beebb38433bfa83204a5f45b376eaf88e2e41a0d8a1cd44722R290 ❌ broken since 2022-04-09 (“SUDO_ASKPASS doesn’t work on Wayland currently, so piping the password”) Wayland breaks X11 atoms X11 atoms can be used to store information on windows. For example, a file manager might store the path that the window represents in an X11 atom, so that it (and other applications) can know for which paths there are open file manager windows. Wayland is not compatible to X11 atoms, resulting in all software that relies on them to be broken until specifically ported to Wayland (which, in the case of legacy software, may well be never). Possible workaround (to be verified): Use the (Qt proprietary?) Extended Surface Wayland protocol casually mentioned in https://blog.broulik.de/2016/10/global-menus-returning/ “which allows you to set (and read?) arbitrary properties on a window”. Is it the set_generic_property from https://github.com/qt/qtwayland/blob/dev/src/extensions/surface-extension.xml? Wayland breaks games Games are developed for X11. And if you run a game on Wayland, performance is subpar due to things like forced vsync. Only recently, some Wayland implementations (like KDE KWin) let you disable that. Wayland breaks xdotool (Details to be added; apparently no 1:1 drop-in replacement available?) Wayland breaks xkill xkill (which I use on a regular basis) does not work with Wayland applications. What is the equivalent for Wayland applications? Wayland breaks screensavers Is it true that Wayland also breaks screensavers? https://www.jwz.org/blog/2023/09/wayland-and-screen-savers/ Wayland breaks setting the window position Other platforms (Windows, Mac, other destop environments) can set the window position on the screen, so all cross-platform toolkits and applications expect to do the same on Wayland, but Wayland can’t (doesn’t want to) do it. PCSX2/pcsx2#10179 PCX2 (Playstation 2 Emulator) ❌ broken since 2023-10-25 (“Disables Wayland, it’s super broken/buggy in basically every scenario. KDE isn’t too buggy, GNOME is a complete disaster.”) Wayland breaks color mangement Apparently color management as of 2023 (well over a decade of Wayland development) is still in the early “thinking” stage, all the while Wayland is already being pushed on people as if it was a “X11 successor”. https://gitlab.freedesktop.org/pq/color-and-hdr/-/blob/main/doc/color-management-model.md Wayland breaks DRM leasing According to Valve, “DRM leasing is the process which allows SteamVR to take control of your VR headset’s display in order to present low-latency VR content”. “Unfortunately not all Wayland compositors support DRM leasing” https://help.steampowered.com/en/faqs/view/18A4-1E10-8A94-3DDA – “not all” highlights one of the fundamental problems with Wayland – there is fragmentation Wayland breaks In-home Streaming ValveSoftware/steam-for-linux#6148 ❌ broken since 2019-03-17 Wayland breaks NetWM Extended Window Manager Hints, a.k.a. NetWM, is an X Window System standard for the communication between window managers and applications Wayland breaks window icons Wayland breaks window icons when no .desktop files are used: Seemingly Wayland requires developers to use the xdg-shell protocol, which in turn requires developers to use reverse-DNS application IDs and set_app_id, which causes the icon to be loaded from the .desktop file. This is serious breakage, as not all desktop environments (for good reasons) use .desktop files. A display server should have no business in this, as this belongs into the domain of the desktop environment. https://community.kde.org/Guidelines_and_HOWTOs/Wayland_Porting_Notes#Application_Icon, https://gitlab.freedesktop.org/wayland/wayland-protocols/-/issues/52 ❌ broken since 2021-06-21 Qt setWindowIcon has no effect on KDE/Wayland https://bugreports.qt.io/browse/QTBUG-101427 (“Resolution: Out of scope”, meaning it cannot be fixed in Qt, “Using QT_QPA_PLATFORM=xcb works, though”, meaning that if you disable Wayland then it works) ❌ broken since 2022-03-03 LibrePCB developer: “Btw it’s just one of several problems we have with Wayland, therefore we still enforce LibrePCB to run with XWayland. It’s a shame, but I feel totally helpless against such decisions made by Wayland and using XWayland is the only reasonable option (which even works perfectly fine)…” https://gitlab.freedesktop.org/wayland/wayland-protocols/-/issues/52#note_2155885 Wayland breaks drag and drop On Raspberry Pi OS (which is running a Wayland session by default), dragging a file out of a zip file onto the desktop fails with “XDirectSave failed.” The same seems to be true in Gnome: https://discourse.gnome.org/t/xdnddirectsave-and-wayland/2954 Workarounds Users: Refuse to use Wayland sessions. Uninstall desktop environments/Linux distributions that only ship Wayland sessions. Avoid Wayland-only applications (such as PreSonus Studio One) (potential workaround: run in https://github.com/cage-kiosk/cage) Application developers: Enforce running applications on X11/XWayland (like LibrePCB does as of 11/2023) Examples of Wayland being forced on users This is exactly the kind of behavior this gist seeks to prevent. Asahi Linux enforces Wayland for ARM-based Macs: https://social.treehouse.systems/@marcan/110354541574112092 Fedora enforces Wayland for KDE Plasma: https://fedoraproject.org/wiki/Changes/KDE_Plasma_6#Why_drop_the_X11_session_with_the_Plasma_6_upgrade? Red Hat enforces Wayland for RHEL:https://www.redhat.com/de/blog/rhel-10-plans-wayland-and-xorg-server References Dudemanguy’s Musings, Wayland Isn’t Going to Save The Linux Desktop Chris Titus Tech: Wayland vs Xorg https://www.youtube.com/watch?v=U_MBJcD3SFI tildearrow: did somebody say “anti-Wayland horseshit”? pcsx2: CI/Linux: Disable Wayland and spring cleaning Testing SCREEN RECORDERS on Linux Mint Wayland view raw Wayland.md hosted with ❤ by GitHub LikeLike
      Reply

Leave a comment