Hello all,
I'm setting up a laptop with a 4K screen (it's a Thinkpad P51). This 4K screen will be used to manipulate Photos (with programs that require Windows...).
I have installed Linux as well (for everything that does not require M$ stuff) with MX-Linux and TDE.
I want to run TDE (and mostly all Linux programs) at 1920x1080. I've managed to do this with xrandr, running from a script that is in /usr/local/share.
The last "problem" (with which I can live, just nags me) is that this script visibly is run relatively late, after the login screen, which is then tiny.
I first set it up for xfce/lightdm and the scripts are triggered from *.desktop files in ~/.config/autostart.
I found an /opt/trinity/share/autostart and hoped it might run thing before login but it does not seem to (or more probably my syntax is not the right one).
So the question is: is it possible to set resolution before login, if so how. I'd prefet to continue working with xrandr than hardwiring something in the X configuration file.
Thierry
Thierry de Coulon via tde-users composed on 2023-04-30 12:30 (UTC+0200):
is it possible to set resolution before login, if so how. I'd prefet to continue working with xrandr than hardwiring something in the X configuration file.
Debian [-based] - put script in /etc/X11/Xsession.d/.
Fedora, Mageia or openSUSE - put script in /etc/X11/xinit/xinitrc.d/.
Script name might matter. I usually begin its name with a 4 or 5.
Alternatively, use /etc/X11/xorg.conf.d/50-monitor.conf to set
Option "PreferredMode" "1920x1080".
On 2023-04-30 07:46:23 Felix Miata via tde-users wrote:
Alternatively, use /etc/X11/xorg.conf.d/50-monitor.conf to set
Option "PreferredMode" "1920x1080".
I'm guessing that #Section "Monitor", "# Identifier "Default Monitor" and #EndSection should be uncommented as well?
| # Having multiple "Monitor" sections is known to be problematic. Make | # sure you don't have in use another one laying around e.g. in another | # xorg.conf.d file or even a generic xorg.conf file. More details can | # be found in https://bugs.freedesktop.org/show_bug.cgi?id=32430. | # | #Section "Monitor" | # Identifier "Default Monitor" | # | # ## If your monitor doesn't support DDC you may override the | # ## defaults here | # #HorizSync 28-85 | # #VertRefresh 50-100 | # | # ## Add your mode lines here, use e.g the cvt tool | Option "PreferredMode" "2560x1080" | # | #EndSection
Leslie
J Leslie Turriff composed on 2023-04-30 21:44 (UTC-0500):
Felix Miata wrote:
Alternatively, use /etc/X11/xorg.conf.d/50-monitor.conf to set
Option "PreferredMode" "1920x1080".
I'm guessing that #Section "Monitor", "# Identifier "Default Monitor" and #EndSection should be uncommented as well?
| # Having multiple "Monitor" sections is known to be problematic. Make | # sure you don't have in use another one laying around e.g. in another | # xorg.conf.d file or even a generic xorg.conf file. More details can | # be found in https://bugs.freedesktop.org/show_bug.cgi?id=32430. | # | #Section "Monitor" | # Identifier "Default Monitor" | # | # ## If your monitor doesn't support DDC you may override the | # ## defaults here | # #HorizSync 28-85 | # #VertRefresh 50-100 | # | # ## Add your mode lines here, use e.g the cvt tool | Option "PreferredMode" "2560x1080" | # | #EndSection
It's not a valid Xorg config file with all the mandatory strings commented away.
On 2023-04-30 23:20:10 Felix Miata via tde-users wrote:
J Leslie Turriff composed on 2023-04-30 21:44 (UTC-0500):
Felix Miata wrote:
Alternatively, use /etc/X11/xorg.conf.d/50-monitor.conf to set
Option "PreferredMode" "1920x1080".
I'm guessing that #Section "Monitor", "# Identifier "Default Monitor" and #EndSection should be uncommented as well?
| # Having multiple "Monitor" sections is known to be problematic. Make | # sure you don't have in use another one laying around e.g. in another | # xorg.conf.d file or even a generic xorg.conf file. More details can | # be found in https://bugs.freedesktop.org/show_bug.cgi?id=32430. | # | #Section "Monitor" | # Identifier "Default Monitor" | # | # ## If your monitor doesn't support DDC you may override the | # ## defaults here | # #HorizSync 28-85 | # #VertRefresh 50-100 | # | # ## Add your mode lines here, use e.g the cvt tool | Option "PreferredMode" "2560x1080" | # | #EndSection
It's not a valid Xorg config file with all the mandatory strings commented away.
What I show above is the existing file in my /etc/X11/xorg.conf.d, with just the option you provided inserted. Are you agreeing then, that the lines I mentioned should not have # prefixes?
Leslie
J Leslie Turriff composed on 2023-05-01 01:24 (UTC-0500):
What I show above is the existing file in my /etc/X11/xorg.conf.d, with just the option you provided inserted. Are you agreeing then, that the lines I mentioned should not have # prefixes?
The file you found is a template. As you found it, it is completely inert. If you want to enable it to do anything, the lines that would otherwise define the file as an Xorg config file cannot include a # ahead of required file components.
man xorg.conf
To learn what the required components may be.
J Leslie Turriff via tde-users wrote:
What I show above is the existing file in my /etc/X11/xorg.conf.d, with just the option you provided inserted. Are you agreeing then, that the lines I mentioned should not have # prefixes?
We guess that you put the file and those settings following the man page, because the file is not present by default. This is why I advised to use tderandrtray, which applies when user session started. It makes more sense, because you affect only your user settings.
On Sunday 30 April 2023 14.46:23 Felix Miata via tde-users wrote:
Alternatively, use /etc/X11/xorg.conf.d/50-monitor.conf to set
Option "PreferredMode" "1920x1080".
There is no such file. If I create one following the "template" proposed by J Leslie Turriff, uncommenting:
# Section "Monitor" Identifier "Default Monitor"
# ## If your monitor doesn't support DDC you may override the # ## defaults here # #HorizSync 28-85 # #VertRefresh 50-100 # # ## Add your mode lines here, use e.g the cvt tool Option "PreferredMode" "1920x1080" # EndSection
This leads to a non-booting system (error message about Plymouth failing). If I manage to boot to a command line, startx does not work, complaining that "Identidier" is not a correct command.
It's been a few yeras I have lost the use of editing these files - It now usually "just works" and I have lost track of *how* it's (supposed to) works.
Thierry
Thierry de Coulon composed on 2023-05-01 11:20 (UTC+0200):
Which distro? Version? All aren't configured exactly the same. Are there other files in /etc/X11/xorg.conf.d/ affecting graphics configuration? /etc/X11/xorg.conf?
Did you try putting an xrandr script in an appropriate location for your distro in /etc/X11/?
Section "Monitor" Identifier "DefaultMonitor" HorizSync 28-85 VertRefresh 50-100 Option "PreferredMode" "1920x1080" EndSection
Try above, after editing HorizSync and VertRefresh to match your display specs. If that doesn't help, try 2560x1440 or 2048x1152 instead of 1920x1080.
This leads to a non-booting system (error message about Plymouth failing). If I manage to boot to a command line, startx does not work, complaining that "Identidier" is not a correct command.
Try disabling Plymouth. Add one of more of the following to your linu line in Grub:
noplymouth plymouth=0 plymouth.enable=0
If none work and your distro allows uninstalling plymouth, uninstall it.
If still no joy, try a totally different approach, creating ~/.Xresources, or /etc/X11/Xresources, and appending to it:
Xft.dpi: 132 or Xft.dpi: 143
With this method, be sure your desktop settings fonts panel does not force a dpi.
If you try more than 143, you may get undesirable side-effects.
On Monday 01 May 2023 12.07:21 Felix Miata via tde-users wrote:
Which distro? Version? All aren't configured exactly the same.
MX-Linux 21 (with updates)
Are there other files in /etc/X11/xorg.conf.d/ affecting graphics configuration? /etc/X11/xorg.conf?
The two files present seem related to the input devices (10-evdev.conf says it's a catchall loader for udev-based systems, and 20-synaptics controls the trackpoint/touchpad).
Did you try putting an xrandr script in an appropriate location for your distro in /etc/X11/?
Not yet, as I have not identified such locations.
There might be /etc/X11/xinit with xinitrc and xerverrc. However people seem to advocate ~/.xinitrc which, I guess, can only be read *after* login.
For the time being my scripts are in /usr/local/share but started by *.desktop files in ~/.config/autostart
Section "Monitor" Identifier "DefaultMonitor" HorizSync 28-85 VertRefresh 50-100 Option "PreferredMode" "1920x1080" EndSection
Try above, after editing HorizSync and VertRefresh to match your display specs. If that doesn't help, try 2560x1440 or 2048x1152 instead of 1920x1080.
Mmh... In last resort. I don't élike playing with Sync and Refresh, only to get a bigger login. Seting auto-login wwould also be a solution on that machine.
Try disabling Plymouth. Add one of more of the following to your linu line in Grub:
noplymouth plymouth=0 plymouth.enable=0
If none work and your distro allows uninstalling plymouth, uninstall it.
Not starting plymouth did not let start X. Plymouth crashed because X was not running.
If still no joy, try a totally different approach, creating ~/.Xresources, or /etc/X11/Xresources, and appending to it:
Xft.dpi: 132 or Xft.dpi: 143
With this method, be sure your desktop settings fonts panel does not force a dpi.
If you try more than 143, you may get undesirable side-effects.
Thank you, I'll try that.
Regards,
Thierry
On 2023-05-01 04:20:43 Thierry de Coulon via tde-users wrote:
On Sunday 30 April 2023 14.46:23 Felix Miata via tde-users wrote:
Alternatively, use /etc/X11/xorg.conf.d/50-monitor.conf to set
Option "PreferredMode" "1920x1080".
There is no such file.
I suppose this depends on one's distro. In openSUSE it is provided as a template.
If I create one following the "template" proposed by J Leslie Turriff, uncommenting:
# Section "Monitor" Identifier "Default Monitor"
# ## If your monitor doesn't support DDC you may override the # ## defaults here # #HorizSync 28-85 # #VertRefresh 50-100 # # ## Add your mode lines here, use e.g the cvt tool Option "PreferredMode" "1920x1080" # EndSection
Thank you for explaining which lines must be uncommented.
This leads to a non-booting system (error message about Plymouth failing). If I manage to boot to a command line, startx does not work, complaining that "Identidier" is not a correct command.
It's been a few yeras I have lost the use of editing these files - It now usually "just works" and I have lost track of *how* it's (supposed to) works.
Thierry
Leslie --
Thierry de Coulon via tde-users wrote:
So the question is: is it possible to set resolution before login, if so how. I'd prefet to continue working with xrandr than hardwiring something in the X configuration file.
well, if you want this setting only for your user, there is tderandrtray program that starts with the user session after login to TDE. If you configure this right, it is easy replacement for xrandr. I usually save the settings in one custom profile and tell tderandrtray to load this profile
On 2023-04-30 10:35:29 deloptes via tde-users wrote:
Thierry de Coulon via tde-users wrote:
So the question is: is it possible to set resolution before login, if so how. I'd prefet to continue working with xrandr than hardwiring something in the X configuration file.
well, if you want this setting only for your user, there is tderandrtray program that starts with the user session after login to TDE. If you configure this right, it is easy replacement for xrandr. I usually save the settings in one custom profile and tell tderandrtray to load this profile
Read the Subject again. :-)
Leslie -- Platform: GNU/Linux Hardware: x86_64 Distribution: openSUSE Leap 15.4 Desktop Environment: Trinity Qt: 3.5.0 TDE: R14.0.13 tde-config: 1.0
On Sunday 30 April 2023 05:30:36 am Thierry de Coulon via tde-users wrote:
The last "problem" (with which I can live, just nags me) is that this script visibly is run relatively late, after the login screen, which is then tiny.
Hi Thierry,
Graphics aren't really my thing, but ... ;0
Is it possible to configure the login screen software itself to display the resolution of itself that you want?
IDK, just seems that you're trying to configure the wrong thing?
HTH?, Michael
On Monday 01 May 2023 04.40:04 Michael via tde-users wrote:
Is it possible to configure the login screen software itself to display the resolution of itself that you want?
IDK, just seems that you're trying to configure the wrong thing?
Well, basically what I want is to run the machinein full HD and not 4K, I'd prefer to maintain the possibility to switch to 4K if useful.
I have tried to use tderandr (if I am right that this is the name for the utility living in my kicker). It does work to change the resolution, but when I tried "configure display" and setting rules, I got terrible artifacts (strange colours, unrfeadable screen) so I gave up.
As I guess tderandr uses xrandr, I decided to write a scipt that sets full HD. This works, but for the moment I get it only to run *after* login, with the effect that the loginb screen is quite tiny - but usable.
I think only tweaking the x.org settings would do that. I'll try what Felix suggested.
Thierry
On Sun, 30 Apr 2023 12:30:36 +0200 Thierry de Coulon via tde-users users@trinitydesktop.org wrote:
The last "problem" (with which I can live, just nags me) is that this script visibly is run relatively late, after the login screen, which is then tiny.
I first set it up for xfce/lightdm and the scripts are triggered from *.desktop files in ~/.config/autostart.
Are you still running lightdm? If so, it has a number of options in its configuration for triggering wrapper scripts. (If you've switched to TDM, this obviously won't help.)
If you always log in as the same user, you could always set the thing to autologin and bypass the DM login screen completely.
E. Liddell
On Monday 01 May 2023 13.40:22 E. Liddell via tde-users wrote:
Are you still running lightdm? If so, it has a number of options in its configuration for triggering wrapper scripts. (If you've switched to TDM, this obviously won't help.)
I run TDM
If you always log in as the same user, you could always set the thing to autologin and bypass the DM login screen completely.
Yes, this may be a solution.
Thierry