Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
xrandr doesn't work as it used to (turning off one monitor)
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
Cellmate
n00b
n00b


Joined: 01 Dec 2009
Posts: 39
Location: Germany

PostPosted: Sun Feb 25, 2024 10:32 am    Post subject: xrandr doesn't work as it used to (turning off one monitor) Reply with quote

I play a small number of games with Wine, but some of them show strange behavior if the mouse pointer leaves the game screen, so I used to turn off the other monitor before starting the game. Usually like this:
Code:
xrandr --output "$OTHERMON" --off

This worked perfectly for about 5 years until it stopped working. Nowadays I get the error message:
Code:
X Error of failed request:  BadMatch (invalid parameter attributes)
  Major opcode of failed request:  139 (RANDR)
  Minor opcode of failed request:  7 (RRSetScreenSize)

I mean, turning off one monitor isn't impossible, but doing it manually with the system settings app somehow misses the point. While still being one of the recommended methods in an aging StackOverflow article which has rather questionable alternatives to offer, I'd like to ask what I am doing wrong?
Back to top
View user's profile Send private message
netfab
Veteran
Veteran


Joined: 03 Mar 2005
Posts: 1897
Location: 127.0.0.1

PostPosted: Sun Feb 25, 2024 12:50 pm    Post subject: Reply with quote

Hi,

Does not answer your question, but :
Quote:

some of them show strange behavior if the mouse pointer leaves the game screen

To avoid this before running the game I use xpointerbarrier ¹ to lock the cursor to the screen I want.
No need to turn off the other screen.

1. https://www.uninformativ.de/git/xpointerbarrier/file/README.html
2. https://github.com/netfab/overlay/blob/master/x11-apps/xpointerbarrier/xpointerbarrier-9999.ebuild
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21635

PostPosted: Sun Feb 25, 2024 4:43 pm    Post subject: Reply with quote

Wine also offers Emulate a virtual desktop and Automatically capture the mouse in full-screen windows. Do either of these help to keep the cursor confined even when the second monitor is enabled?
Back to top
View user's profile Send private message
Ralphred
Guru
Guru


Joined: 31 Dec 2013
Posts: 501

PostPosted: Sun Feb 25, 2024 9:30 pm    Post subject: Reply with quote

Hu wrote:
Emulate a virtual desktop

Don't do this with game bottles - if explorer.exe has a problem after a wine update (or for any other reason) it can stop you using things like winecfg to fix it.

Cellmate, try and validate whatever is creating the "$OTHERMON" variable, and compare it to xrandr|grep -v "^ ", it could just be that some regex or similar no longer works.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum