Questions tagged [xrandr]

`xrandr` is a configuration utility to the RandR X Window System extension. This utility is useful for screen configuration.

xrandr is a configuration utility to the RandR X Window System extension. This utility is useful for screen configuration.

For more information, please visit this website

https://wiki.archlinux.org/index.php/xrandr

113 questions
3
votes
2 answers

How to find the dpi of a monitor on which a specific window is placed in linux?

I want to change the font size when my application window moves from one monitor to another depending on the underlying dpi of destination monitor. I played with xrandr, xdpyinfo and xlib. I looked at the source code but I couldn't find a way to…
user3054986
  • 417
  • 7
  • 18
3
votes
1 answer

How to change the monitor brightness by X11 RandR extension library?

I can simply change my monitor brightness via xrandr --output VGA1 --brightness 0.25 Though it is software-only modification, it does the trick anyway. According to the man page, xrandr is the primitive command line interface to RandR extension, so…
Kevin Dong
  • 5,001
  • 9
  • 29
  • 62
2
votes
0 answers

How to constantly monitor xrandr and automatically respond to a physical change in a multi monitor setup?

I'm using a laptop with a mint linux and I use a multimonitor setup. I'll show my current xrandr output for reference at the end of the question. I change my physical monitor setup several times a day. I unplug one or both external monitors and plug…
6q9nqBjo
  • 161
  • 7
2
votes
1 answer

Is there an xrandr function/interface for controlling brightness?

The code for xrandr is quite messy and I can't quite understand, it also severely lacks documentation. What's the best/cleanest interface to be able to control brightness through libxrandr? edit: to clarify I want to use the api not the cli command
zee
  • 2,933
  • 2
  • 16
  • 28
2
votes
1 answer

xrandr: How to check if mirroring screens

What's a clean way to check if my monitors are being mirrored or not with xrandr? Background I'm using polybar and as of now I have a script that launches an extra polybar if my second monitor is connected. Problem is that when I'm mirroring I…
2
votes
1 answer

How to get a string from an xcb_atom_t?

I want to find out the name of an xcb_randr_monitor_info_t. It has a name field, but that's of type xcb_atom_t, not a char [255] or something easy like that. How can I turn it into a (preferably UTF-8) string?
quadrupleslap
  • 460
  • 1
  • 6
  • 18
2
votes
1 answer

How to create virtual display under Raspbian using xrandr?

Could anybody help me out to understand how to create virtual display for Raspberry Pi 3 B running Raspbian using xrandr? I saw that it is possible to do this, for example, for Ubuntu and Linux Mint by executing these commands: #!/bin/bash xrandr…
IDe1mos
  • 31
  • 1
  • 3
2
votes
3 answers

Use awk to match a word, then find the first occurrence of another word

I am trying to find a way to re-search for another matching word after I already had a match. I am specifically trying to get the brightness value of one of my monitors. For example a part of the output of my xrandr --verbose is the following: DP-1…
2
votes
1 answer

Discrepancy between command line XRandR and own code

I need to programatically get the refresh rate of a monitor. When I type xrandr (1.4.1, opensuse 13) on the command line I get: Screen 0: minimum 8 x 8, current 1920 x 1200, maximum 16384 x 16384 VGA-0 disconnected primary (normal left inverted…
GuillaumeR
  • 49
  • 6
1
vote
2 answers

What is the CARD variable type in XRANDR?

Edit2: Just to make it clear, integers are what I originally entered into the program. My original code, before I started testing anything, was this: import struct from Xlib import X, display, Xutil from Xlib.ext import randr d =…
Lazuli
  • 31
  • 5
1
vote
0 answers

X Error of failed request: BadValue (integer parameter out of range for operation) when trying to output new mode

Issue: Want to add a new resolution (2560X1440) to the external monitor (Lenovo ThinkVision E27q-20 27). The highest resolution available is 1920X1080. Getting an error when trying to output new mode that was added. Steps taken: Verified that the…
1
vote
1 answer

Where's `CurrentTime` defined? How do I get it?

I'm trying to write a rudementary program to rotate the screen (using libXrandr). I couldn't find a lot of info about libXrandr, outside of xrandr's source code and man pages. So, I decided to analyze xrandr's source code to learn about…
1
vote
3 answers

How to move workspace to monitor

I regularly change physical setup (work from home and office) and need a flexible and quick way of changing workspace form monitor to monitor. OS: Arch Window Manager: i3
Dotty
  • 48
  • 6
1
vote
1 answer

Automatically use desired monitor and the corresponding audio ouput

I'm using manjaro-linux-i3 with polybar and I'm currently working on my multiple monitor setup. I have a TV which I normally use with the amplifier it is connected to. In addition I have my desk with a triple monitor setup which I normally use with…
babbes
  • 13
  • 5
1
vote
1 answer

Forcing Awesome to restart when connecting a new screen

I have some complicated screen and docking station setup and would like to automatically restart Awesome when docking and undocking. How can I tell Awesome to do that? I know the preferred way of doing things is to avoid restarting and using the…
scaramouche
  • 461
  • 2
  • 12