Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 571358

Summary: x11-misc/sddm: Protect '/usr/share/sddm/scripts/Xsetup' through etc-update mechanism
Product: Gentoo Linux Reporter: Matthias Nagel <matthias.h.nagel>
Component: Current packagesAssignee: LxQt maintainers <lxqt>
Status: UNCONFIRMED ---    
Severity: normal CC: groepaz, josef64, lxqt
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Package list:
Runtime testing required: ---

Description Matthias Nagel 2016-01-09 11:48:10 UTC
I have a very high-dpi display and I use the "force font dpi" from KDE in order to get a reasonable font scaling.

In order to have a unified experience between the KDE lock-screen and SDDM the same settings must be set for SDDM. Unfortunately, SDDM uses its own "Xsetup" script that resides in '/usr/share/sddm/scripts/'. (SDDM does not use the global Xsetup file inside '/etc/X11').

My '/usr/share/sddm/scripts/Xsetup' file looks like that:

echo 'Xft.dpi: 120' | xrdb -override
echo 'Xft.antialias: true' | xrdb -override
echo 'Xft.rgba: rgb' | xrdb -override
echo 'Xft.hinting: true' | xrdb -override
echo 'Xft.hintstyle: hintslight' | xrdb -override

However, the annoying part is that this file gets silently overwritten every time SDDM is upgraded, re-emerge and so on.

Proposed solution:

(a) (Maybe difficult) Patch SDDM such that it honors the global settings found in '/etc/X11/'. Of course, this might be difficult to achieve, because the final global settings are a merge of different files found in various sub-directories of '/etc/X11'. However, this would provide the most user-friendly experience, because this way the settings used by SDDM are always in sync with the rest of the system.

(b) (Easy) If (a) is too difficult, then at least protect '/usr/share/sddm/scripts/Xsetup' via the etc-update mechanism such that the carefully hand-crafted and manually compiled settings are not overwritten without interaction.

Reproducible: Always
Comment 1 Jauhien Piatlicki (RETIRED) gentoo-dev 2016-01-11 22:27:35 UTC
Thanks for reporting. I'll look at it. Could you, please, also file an upstream bug on sddm issue tracker asking them to read settings from /etc/X11?
Comment 2 groepaz 2016-04-12 07:55:57 UTC
for the same reason, this script is also required to get a different keyboard layout than the default US one - see for example:
Comment 3 mikey 2016-05-15 11:23:56 UTC
I cofirm this bug. Looks like pretty serious problem for me. It prevents using nvidia-drivers with optimus enabled every time when new version of sddm is installed. Also it is hard hard to debug, as one usually thinks that everything is configured properly and blames new version of nvidia-drivers for disfunctional X.
Comment 4 Tobias Leupold 2016-07-04 15:10:25 UTC
Probably also related to the issue I described in Bug #582016
Comment 5 Soren Harward 2017-02-01 14:19:31 UTC
/etc/sddm.conf has configuration directives for where Xsetup, Xstop and Xsession files are looked for.  If simply protecting /usr/share/sddm/scripts under the etc-update mechanism isn't satisfactory, then another option might be to patch/rewrite the default config file so that it looks for these things under a subdir of /etc, rather than somewhere in /usr/share/sddm .