Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question] How to setup dual monitor, with one of them being vertical #145

Closed
awohsen opened this issue Sep 26, 2022 · 6 comments
Closed
Labels
question Further information is requested

Comments

@awohsen
Copy link

awohsen commented Sep 26, 2022

Currently the setup is like this:
image

how can i change it to this:
image

There are some answered topics about this issue; but since the yoru has so much configuration over rc.lua, its hard for me to find the actual place to config layout.

@awohsen awohsen added the question Further information is requested label Sep 26, 2022
@VicoHBB
Copy link

VicoHBB commented Sep 26, 2022

Your could use ArandR but you have to configure the screen every time that you turn on your computer, to fix this, check the xorg configuration files, xorg.conf.d, in this dir you can create a file like 01-monitors.conf with your configuration

@awohsen
Copy link
Author

awohsen commented Sep 26, 2022

I tried ArandR and visually created xrandr configuration, this is the correct setup (xrandr export):

Screen 0: minimum 8 x 8, current 2490 x 1680, maximum 16384 x 16384
DVI-I-0 disconnected (normal left inverted right x axis y axis)
DVI-I-1 connected primary 1440x900+0+461 (normal left inverted right x axis y axis) 408mm x 255mm
   1440x900      59.89*+  74.98
   1280x1024     75.02    60.02
   1280x960      60.00
   1280x800      59.81
   1152x864      75.00
   1024x768      75.03    70.07    60.00
   800x600       75.00    72.19    60.32    56.25
   640x480       75.00    72.81    59.94
HDMI-0 disconnected (normal left inverted right x axis y axis)
DP-0 disconnected (normal left inverted right x axis y axis)
DVI-D-0 connected 1050x1680+1440+0 left (normal left inverted right x axis y axis) 473mm x 296mm
   1680x1050     59.95*+
   1600x1200     60.00
   1440x900      59.89
   1280x1024     60.02
   1280x960      60.00
   1024x768      60.00
   800x600       60.32
   640x480       59.94
DP-1 disconnected (normal left inverted right x axis y axis)

But as you said it's not persistent, I guess there is a way to call the sh file exported from ArandR before awesome startup, but I think the xorg.conf is the right way to do it.

However, when I tried to write xorg.conf with the help of this and this, the result was this and it's not working as well:

# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig:  version 470.141.03

# output DVI-D-0
# crtc 1
# mode 1680x1050
# pos 1440x0
# rate 59.95
# rotate left
# x-prop-non_desktop 0
# output DVI-I-1
# crtc 0
# mode 1440x900
# pos 0x461
# primary
# rate 59.89
# x-prop-non_desktop 0

Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0" 1440 0
    Screen      1  "Screen1" LeftOf "Screen0"
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
EndSection

Section "Files"
EndSection

Section "InputDevice"
    # generated from default
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol" "auto"
    Option         "Device" "/dev/psaux"
    Option         "Emulate3Buttons" "no"
    Option         "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"
    # generated from default
    Identifier     "Keyboard0"
    Driver         "kbd"
EndSection

Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "Unknown"
    Option         "RandRRotation" "on"
    Option         "Rotate" "CCW"
    Option         "DPMS"
EndSection

Section "Monitor"
    Identifier     "Monitor1"
    VendorName     "Unknown"
    ModelName      "Unknown"
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    Screen 0
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    Screen 1
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

Section "Screen"
    Identifier     "Screen1"
    Device         "Device1"
    Monitor        "Monitor1"
    DefaultDepth    24
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

Is there any other way to do this? or what I'm doing wrong? 🙁

@VicoHBB
Copy link

VicoHBB commented Sep 26, 2022

My configuration is simpler, inside the 'xorg.conf.d' dir I have the keyboard configuration ('00-keyboard.conf') and the monitors configuration (01-monitors.conf).

I see that you don't have some parameters inside the monitors sections, this is my configuration(01-monitors.conf), check the option "rotate":

Section "Monitor"
  Identifier "eDP-1"
  Modeline "1366x768" 148.50 1920 2008 2052 2200 1080
  1084 1089 1125 +hsync +vsync
  Option "PreferredMode" "1366x768"
  Option "LeftOf" "HDMI-1"
  Option "DPMS" "true"
  Option "Primary" "false"
EndSection

Section "Monitor"
  Identifier "HDMI-1"
  Modeline "3440x1440" 148.50 1920 2008 2052 2200 1080
  1084 1089 1125 +hsync +vsync
  Option "PreferredMode" "3440x1440"
  Option "RightOf" "eDP-1"
  Option "DPMS" "true"
  Option "Rotate" "left" 
  Option "Primary" "true"
EndSection

To create it I read this https://www.x.org/releases/current/doc/man/man5/xorg.conf.5.xhtml, and here is the output xrandr the last guide me set the Modeline

Screen 0: minimum 320 x 200, current 3286 x 1080, maximum 16384 x 16384
HDMI-1 connected primary 1920x1080+1366+0 (normal left inverted right x axis y axis) 521mm x 293mm
   3440x1440     60.00*+
   1920x1080     60.00 +  59.96    50.00    59.94    59.93  
   1680x1050     59.95    59.88  
   1400x1050     59.98  
   1600x900      59.95    60.00    59.82  
   1280x1024     60.02  
   1440x900      59.90  
   1400x900      59.96    59.88  
   1280x960      60.00  
   1440x810      59.97  
   1368x768      59.88    59.85  
   1280x800      59.99    59.97    59.81    59.91  
   1280x720      60.00    59.99    59.86    60.00    50.00    59.94    59.74  
   1024x768      60.04    70.07    60.00  
   960x720       60.00  
   928x696       60.05  
   896x672       60.01  
   1024x576      59.95    59.96    59.90    59.82  
   960x600       59.93    60.00  
   960x540       59.96    59.99    59.63    59.82  
   800x600       70.00    65.00    60.00    72.19    60.32    56.25  
   840x525       60.01    59.88  
   864x486       59.92    59.57  
   720x576       50.00  
   700x525       59.98  
   800x450       59.95    59.82  
   720x480       60.00    59.94  
   640x512       60.02  
   700x450       59.96    59.88  
   640x480       60.00    72.81    66.67    60.00    59.94  
   720x405       59.51    58.99  
   720x400       70.08  
   684x384       59.88    59.85  
   640x400       59.88    59.98  
   640x360       59.86    59.83    59.84    59.32  
   512x384       70.07    60.00  
   512x288       60.00    59.92  
   480x270       59.63    59.82  
   400x300       72.19    60.32    56.34  
   432x243       59.92    59.57  
   320x240       72.81    60.05  
   360x202       59.51    59.13  
   320x180       59.84    59.32  
eDP-1 connected 1366x768+0+0 (normal left inverted right x axis y axis) 344mm x 193mm
   1366x768      60.02*+  60.00    40.01  
   1280x720      60.00    59.99    59.97    59.86    59.74  
   1152x768      59.95  
   1024x768      60.04    60.00    59.95  
   960x720       60.00  
   928x696       60.05  
   896x672       60.01  
   1024x576      59.95    59.96    59.90    59.82  
   960x600       59.93    60.00  
   960x540       59.96    59.99    59.63    59.82  
   800x600       60.00    60.32    59.96    56.25  
   840x525       60.01    59.88  
   864x486       59.92    59.57  
   848x480       59.94  
   700x525       59.98  
   800x450       59.95    59.82  
   720x480       59.94  
   640x512       60.02  
   700x450       59.96    59.88  
   640x480       60.00    59.94    59.94  
   720x405       59.51    58.99  
   684x384       59.88    59.85  
   640x400       59.88    59.98  
   640x360       59.86    59.83    59.84    59.32  
   512x384       60.00  
   512x288       60.00    59.92  
   480x270       59.63    59.82  
   400x300       60.32    56.34  
   432x243       59.92    59.57  
   320x240       60.05  
   360x202       59.51    59.13  
   320x180       59.84    59.32 

Finally, if you are using NVIDIA drivers, check the compatibility of the graphics and the xorg config

@awohsen
Copy link
Author

awohsen commented Sep 27, 2022

Wow, it actually did the job! Thanks a lot.

I've deleted the recent .conf file and created '/etc/X11/xorg.conf.d/01-monitors.conf', there I just put this setting:

Section "Monitor"
  VendorName "ViewSonic"
  Identifier "DVI-I-1"
#  Modeline "1366x768" 148.50 1920 2008 2052 2200 1080
#  1084 1089 1125 +hsync +vsync
  Option "PreferredMode" "1440x900"
  Option "LeftOf" "DVI-D-0"
  Option "DPMS" "true"
  Option "Primary" "true"
EndSection

Section "Monitor"
  VendorName "HP"
  Identifier "DVI-D-0"
#  Modeline "3440x1440" 148.50 1920 2008 2052 2200 1080
#  1084 1089 1125 +hsync +vsync
  Option "PreferredMode" "1680x1050"
  Option "RightOf" "DVI-I-1"
  Option "DPMS" "true"
  Option "Rotate" "left"
  Option "Primary" "false"
EndSection

(I don't still know how to configure the Modeline part so I commented it out)

However now in yoru my mouse pointer is 3x large and I don't know how to fix it 😁

@VicoHBB
Copy link

VicoHBB commented Sep 27, 2022

Perfect!!! If I remember correctly in modline I put the maximum resolution that the monitor supports, following your xrand output, it would be like this:

Section "Monitor"
  VendorName "ViewSonic"
  Identifier "DVI-I-1"
  Modeline "1440x900" 148.50 1920 2008 2052 2200 1080
  1084 1089 1125 +hsync +vsync
  Option "PreferredMode" "1440x900"
  Option "LeftOf" "DVI-D-0"
  Option "DPMS" "true"
  Option "Primary" "true"
EndSection

Section "Monitor"
  VendorName "HP"
  Identifier "DVI-D-0"
  Modeline "1680x1050" 148.50 1920 2008 2052 2200 1080
  1084 1089 1125 +hsync +vsync
  Option "PreferredMode" "1680x1050"
  Option "RightOf" "DVI-I-1"
  Option "DPMS" "true"
  Option "Rotate" "left"
  Option "Primary" "false"
EndSection

For the cursor could is that you have the vertical monitor as principal(I apologize for not mentioning it earlier), try to change it to the other monitor and see what happens, if doesn't change try configure the file index.theme for the size (check this video https://www.youtube.com/watch?v=Dj7co2R7RKw , this doesn't have the solution but say where is the file)

@awohsen
Copy link
Author

awohsen commented Oct 3, 2022

thanks for the help,

try to change it to the other monitor and see what happens

how should I change that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants