DEV Community

Brisbane Web Developer
Brisbane Web Developer

Posted on

Not relying on KDE Plasma to correct monitor layout

Summary

  • KDE Plasma seems to forget the setting for monitor layout at certain event. I lost the setting while I was investigating about how I can avoid my X1E2 to get crashed with an extra monitor when turning on vsync to play a game.
  • This corrects the monitor layout issue.
  • My X1E2 has 1920x1080 and the external monitors have 2560x1440.

Scripts

/usr/local/bin/layout-monitors
====================
#!/bin/bash

xrandr \
  --output DP-0 --auto --size 2560x1440 --panning 2560x1440 \
  --output DP-1 --auto --pos 2560x0 \
  --output eDP-1-1 --auto --primary --pos 640x1440
Enter fullscreen mode Exit fullscreen mode
/usr/share/sddm/scripts/Xsetup
====================
#!/bin/sh
# Xsetup - run as root before the login dialog appears

if [ -e /sbin/prime-offload ]; then
    echo running NVIDIA Prime setup /sbin/prime-offload
    /sbin/prime-offload
fi

# Important: Put at last because it does not work otherwise
# ===== FROM HERE =====
if [ -e /usr/local/bin/layout-monitors ]; then
    echo running layout script /usr/local/bin/layout-monitors
    /usr/local/bin/layout-monitors
fi
# ===== TO HERE =====
Enter fullscreen mode Exit fullscreen mode

Original Post

Here

AWS Security LIVE!

Tune in for AWS Security LIVE!

Join AWS Security LIVE! for expert insights and actionable tips to protect your organization and keep security teams prepared.

Learn More

Top comments (0)

nextjs tutorial video

Youtube Tutorial Series 📺

So you built a Next.js app, but you need a clear view of the entire operation flow to be able to identify performance bottlenecks before you launch. But how do you get started? Get the essentials on tracing for Next.js from @nikolovlazar in this video series 👀

Watch the Youtube series

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay