Hello all, I’m using OpenSuse 13.1. I have a notebook (resolution 1366x768) and I connect it to a 17" monitor (resolution 1920x1080) using a HDMI connector. I am able to switch screens pressing Fn+F1 twice and everything works fine (notebook screen turns off and monitor becomes the only screen as 1920x1020). The problem is that everytime I reboot I have to press Fn+F1 twice in the login manager (I guess it’s GDM). I already tryed to add this line to /etc/rc.d/boot.local but it has no effect:
xrandr --output HDMI1 --mode 1920x1080
It’s strange because I am able to change my resolution using xrandr. Here is my current output for xrandr:
$ xrandr --current
Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 32767 x 32767
LVDS1 connected (normal left inverted right x axis y axis)
1366x768 60.0 + 40.0
800x600 60.3 56.2
VGA1 disconnected (normal left inverted right x axis y axis)
HDMI1 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 510mm x 290mm
1920x1080 59.9*+ 60.0 60.0 50.0 59.9
1920x1080i 60.1 50.0 60.0
1280x1024 75.0 60.0
1280x720 60.0 50.0 59.9
1024x768 75.1 60.0
800x600 75.0 60.3 56.2
720x480 60.0 59.9
640x480 75.0 60.0 59.9
DP1 disconnected (normal left inverted right x axis y axis)
VIRTUAL1 disconnected (normal left inverted right x axis y axis)
How do I set my 17" monitor to be the default display everytime I boot my notebook and it’s connected to it?
I haven’t tryed yet, but either way I think it won’t work. The path “~/” will only be determined after a successful login, right? By that time I would have already set my monitor as my display, because I need it to perform the login. After the login I don’t need the monitor to be set once again as my display, it has already been done manually.
I need this command to be executed before the login manager appears (or else I can’t login), thus I need it to be executed before any user has been authenticated and before any “~/” path has been defined.
Yes, that is correct. If you need it to occur earlier, you could try adding the xrandr command to /etc/X11/xinit/xinitrc instead, right where it says
# Add your own lines here...
Bear in mind that as KDM/GDM initialises, some settings are auto-detected again, so for example if a display resolution is set here, it won’t persist, and the xrandr command has to be set again after login (via autostart script or similar). In your case, it should set the primary display before login.
The alternative method would be to use the Xorg config files to do the same as outlined here:
Could placing the command inside a .bashrc file work? I did pass a similar command, related to a resolution issue I had, using either that method or from a .bash_profile file, can’t remember which but it worked well enough.
No, that’s not the issue. The OP was trying to identify a method that would be invoked prior to login, (but AFAIK once login has commenced the screen layout is re-initialized again by the desktop environment.
What I did is to select the HDMI “toggle primary output” (star) option from applications/configure desktop/Display Configuration.
I also have set the Energy saving settings to turn off the screen of the laptop when I close the lid (i keep it closed when I work. I hope that will help!
Where is “applications/configure desktop/Display Configuration” exactly? Which desktop manager are you using? I don’t seem to have this option (I use cinnamon).
That’s for KDE. (“Configure Desktop” is KDE’s configuration application, also known as “Systemsettings”)
I don’t know Cinnamon, but as it is a fork of GNOME, it should have something similar as well in its control center (or whatever it’s called in Cinnamon).
But please bear in mind, that this only applies to the user session anyway. It has absolutely no effect to the login screen.