Xrandr settings - similar option available for wayland?

I’m using a dual monitor setup and the login screen is always active on the secondary screen at startup … It only affects SDDM so the wrong screen is offered for login.
With X11, this issue could be fixed using xrandr …

Is there any similar solution when using wayland?

$ xrandr | grep ' connected'
HDMI-A-2 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 531mm x 299mm
HDMI-A-3 connected 1920x1080+1920+0 (normal left inverted right x axis y axis) 531mm x 299mm

for X11 once …
/usr/share/sddm/scripts/Xsetup

xrandr --output HDMI-A-2 --auto --primary
xrandr --output HDMI-A-3 --off

KDE Plasma Version: 6.5.3
KDE Frameworks Version: 6.20.0
Qt Version: 6.10.1
Kernel Version: 6.18.0-1-MANJARO (64-bit)
Graphics Platform: Wayland
Processors: 8 × Intel® Core™ i7-6700 CPU @ 3.40GHz
Memory: 32 GiB of RAM (31.1 GiB usable)
Graphics Processor: Intel® HD Graphics 530
Manufacturer: Dell Inc.
Product Name: OptiPlex 7040

wlr-randr should be able to do this. It’s in the repository. :backhand_index_pointing_down:

sudo pacman -S wlr-randr
1 Like

wlr-randr doesn’t work on Plasma, as Plasma is not built with wlroots. I mentioned this a couple of months ago in another topic:

2 Likes

Same goes for GNOME as Mutter does not use wlroots, either. :wink:

1 Like

It might make better sense to re-build everything that can be built against wlroots to encourage a more even playing field; granted, there are logistical considerations.

I suppose, despite the general hype, that might be detrimental to the walled garden KDE seem focused on creating.

1 Like

On Plasma you can use kscreen-doctor

 $ kscreen-doctor -h
Usage: kscreen-doctor [options] [output.<name>.<setting> output.<name>.setting [...]]
kscreen-doctor allows to change the screen setup from the command-line.

Setting the output configuration is done in an atomic fashion, all settings
are applied in a single command.
kscreen-doctor can be used to enable and disable outputs, to position screens,
change resolution (mode setting), etc.. You should put all your options into 
a single invocation of kscreen-doctor, so they can all be applied at once.

Usage examples:

   Show output information:
   $ kscreen-doctor -o
   Output: 1 eDP-1 enabled connected Panel Modes: Modes: 1:800x600@60 [...] Geometry: 0,0 1280x800
   Output: 70 HDMI-2 enabled connected  HDMI Modes: 1:800x600@60 [...] Geometry: 1280,0 1920x1080

   Disable the hdmi output, enable the laptop panel and set it to a specific mode
   $ kscreen-doctor output.HDMI-2.disable output.eDP-1.mode.1 output.eDP-1.enable

   Position the hdmi monitor on the right of the laptop panel
   $ kscreen-doctor output.HDMI-2.position.1280,0 output.eDP-1.position.0,0

   Set resolution mode
   $ kscreen-doctor output.HDMI-2.mode.1920x1080@60 

   Set scale (note: fractional scaling is only supported on wayland)
   $ kscreen-doctor output.HDMI-2.scale.2 

   Set rotation (possible values: none, left, right, inverted)
   $ kscreen-doctor output.HDMI-2.rotation.left 

   Set HDR mode (possible values: enable, disable)
   $ kscreen-doctor output.HDMI-2.hdr.enable

   Set SDR brightness (possible values: 100-1000)
   $ kscreen-doctor output.HDMI-2.sdr-brightness.300

   Set wide color gamut mode (possible values: enable, disable)
   $ kscreen-doctor output.HDMI-2.wcg.enable

   Set ICC profile path
   $ kscreen-doctor output.HDMI-2.iccprofile."/path/to/profile.icc"

   Show dpms information:
   $ kscreen-doctor --dpms show

   Set dpms mode: (possible values: on, off)
   $ kscreen-doctor --dpms on

Options:
  -h, --help                   Displays help on commandline options.
  --help-all                   Displays help, including generic Qt options.
  -i, --info                   Show runtime information: backends, logging,
                               etc.
  -j, --json                   Show configuration in JSON format
  -o, --outputs                Show outputs
  -d, --dpms <off>             Display power management (wayland only)
  -l, --log <comment>          Write a comment to the log file
  --dpms-excluded <connector>  Do not apply the dpms change to the output with
                               said model names

Arguments:
  config                       Specific output settings are separated by
                               spaces, each setting is in the form of
                               output.<name>.<setting>[.<value>]
                               For example:
                               $ kscreen-doctor output.HDMI-2.enable \ 
                                              output.eDP-1.mode.4 \ 
                                              output.eDP-1.position.1280,0
                               Multiple settings are passed in order to have
                               kscreen-doctor apply these settings in one go.
3 Likes

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.