LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Games
User Name
Password
Linux - Games This forum is for all discussion relating to gaming in Linux.

Notices


Reply
  Search this Thread
Old 01-11-2014, 11:01 AM   #1
greatbear
Member
 
Registered: Feb 2012
Distribution: ubuntu
Posts: 44

Rep: Reputation: Disabled
Full screen games change screen settings on duel monitor systems


I'm using KDE. Anyone have some experience with Dbus or QDbus to suggest how I can begin to put together a qbus commandline to set my duel monitor settings to right after I've played a full-screen game? The full screen game removes all my nice duel monitor settings, leaving me with cloned monitors, so I'm hoping to write a qbus line that winks everything back to normal duality.

I don't know how to go about researching what causes this, so that I can fix it, but I'm reading about QBUS. Lets see: Qbus --> interface + service + object.... Ok, how about I use Python either 2.7 or 3.3 with a Qdbus binding...

Quote:
qdbusviewer ships with Qt4 itself and is easy for anyone who is familiar with the basic D-Bus concepts....
Maybe I should stop playing full screen games. That would fix the problem. No, I'm sick of this issue, and full screen games are important.



(Full Screen games in KDE completely erase my duel monitor settings, leaving my system with two cloned monitors. Its the most useless configuration you can have for duel monitors, so after the game I need to go manually fix the settings. Its not important, but it is annoying.)

Last edited by greatbear; 01-11-2014 at 11:05 AM.
 
Old 09-12-2015, 08:46 AM   #2
greatbear
Member
 
Registered: Feb 2012
Distribution: ubuntu
Posts: 44

Original Poster
Rep: Reputation: Disabled
This is the eventual solution I have come to. There is no need to use anything so complex as dbus, and xrandr is the needed command. Time has passed and though I don't use KDE currently (using XFCE4 at the moment), I use the following script to set my second monitor up whenever I connect it:
Quote:
#Used for laptop. Puts HDMI screen to the right of the laptop screen.
#Pass the xrandr name of the display device.
function checkOTHERMONITOR {
if [ -n $1 ]; then
local OTHERMONITOR="${1}"
echo "the variable OTHERMONITOR is $OTHERMONITOR"
if [ $OTHERMONITOR = "$( xrandr | grep '\<connected' | cut -d' ' -f1 | grep ${OTHERMONITOR} )" ]; then
return 0
else
return 1
fi
fi
}

checkOTHERMONITOR HDMI1 && xrandr --output LVDS1 --auto --output HDMI1 --auto --right-of LVDS1
The above should work for KDE, xfce4, any, as well as for most window managers. Suppose that you run a video game that changes all your monitor settings...then you may run a script like the above to put them back to their automatic settings. Copying the above script will not work for everyone, and you will need to find out what the command xrandr (included with all xwindows variants) names your monitors and modify your script accordingly. The window managers should all respect the underlying xwindow settings.

This script places my external monitor HDMI1 to the right of the laptop monitor LDVS1. There is no need for me to check for LDVS, because its the built-in. For that reason it doesn't appear in the short script. Once the script works right you can add it to your session start-up, and so when you log in your duel monitors will be set up for you. It can also be tacked on to scripts that run video games or scripts that monitor game processes, so that after they exit the monitors will be set up properly again. (This seems to be less of a problem lately, but certain games still fail to set monitors back up after they run.)

Last edited by greatbear; 09-12-2015 at 08:48 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Black screen after exiting full screen games AGazzaz Linux - Games 1 11-25-2011 01:27 AM
Mouse click on monitor 1 kills full-screen in flash on monitor 2. Can this be fixed? damgar Linux - Software 12 02-23-2010 11:39 PM
how to get games (like doom 3) to go full screen? zero79 Linux - Games 4 10-07-2004 11:16 AM
Can't get games to run full screen help! snatale1 Mandriva 0 02-29-2004 08:23 PM
Problems with some full screen games, no video :( jerome187 Linux - Software 2 11-20-2003 09:56 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Games

All times are GMT -5. The time now is 04:32 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration