All about Tips&Tricks

Fedora 40/GTK 4: Applications have no text (NVIDIA driver)

Tips&Tricks

The Fedora 40 release has a problem with the NVIDIA 470 driver in that text of many applications is invisible or flickers while hovering the mouse. This bug seems specific to the version 470 of the NVIDIA drivers and doesn't affect the other versions.

Edit /etc/environment and add this line, then reboot the system:

GSK_RENDERER=gl

The bug seems to be caused by the new renderers for GTK and potentially older hardware. The above environment variable switches the renderer back to the older OpenGL one, thus resolving the issue.

More details in this forum post.


Fedora/Gnome: Disable automatic suspend for remote logins

Tips&Tricks

Fedora with the Gnome desktop suspends after 15 minutes if no user is logged into the machine. This does affect remote logins via SSH or the Remote Login RDP functionality. The Gnome settings do not allow changing the "Automatic Suspend" options of the system, but only for each user.

You can inspect the configuration for GDM using these shell commands. The 900 are the timeout in seconds, i.e., 15 minutes.

$ sudo -u gdm dbus-run-session gsettings list-recursively org.gnome.settings-daemon.plugins.power | grep sleep
org.gnome.settings-daemon.plugins.power sleep-inactive-ac-timeout 900
org.gnome.settings-daemon.plugins.power sleep-inactive-ac-type 'suspend'
org.gnome.settings-daemon.plugins.power sleep-inactive-battery-timeout 900
org.gnome.settings-daemon.plugins.power sleep-inactive-battery-type 'suspend'

Setting the timeout to 0 disables the timeout. Disable suspend while on AC power:

sudo -u gdm dbus-run-session gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-ac-timeout 0

Disable suspend while on battery power:

sudo -u gdm dbus-run-session gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-battery-timeout 0

More details in this forum post.


Firefox: Sync Toolbar Layout

https://support.mozilla.org/en-US/questions/1292568

Tips&Tricks

Firefox can be made to synchronize the toolbar among multiple instances. The configuration is stored in browser.uiCustomization.state which must be added to the sync keys.

  1. Open about:config page in Firefox and bypass the warning (if you see one).
  2. Then type services.sync.prefs.sync.browser.uiCustomization.state into the search bar on that page.
  3. Create a new preference. Select Boolean, press the + button, and ensure the value is set to true.

Gnome Remote Login on SELinux enabled systems

Tips&Tricks

Gnome Remote Login (RDP) is not working on systems with SELinux set to enforce. This does affect Fedora 40 that ships Gnome 46. Executing this code installs new SELinux rules that permit the necessary access. These rules might not be optimal and provide too much access.

tee /tmp/grd.te << EOF > /dev/null
module grd 1.0;
require {
    type system_dbusd_t;
    type unconfined_service_t;
    type xdm_t;
    class tcp_socket { getattr getopt read setopt shutdown write };
}
allow system_dbusd_t unconfined_service_t:tcp_socket { read write };
allow xdm_t unconfined_service_t:tcp_socket { getattr getopt read setopt shutdown write };
EOF
checkmodule -M -m -o /tmp/grd.mod /tmp/grd.te
semodule_package -o /tmp/grd.pp -m /tmp/grd.mod
sudo semodule -i /tmp/grd.pp

More details in this forum post.