Problem with external monitor plugged to notebook

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












My case: At work, I use my own laptop (Xiaomi Mi Pro). When I connect it to an external monitor, I want to be able to just close the lid and leave without the laptop and have the laptop suspend. When I return, I want to continue working.



But it's not that simple when an external monitor is attached. The default behaviour of Linux with multiple desktop environments is to change the primary monitor to the external.



For example: Ubuntu 18.04.1. Its dconf option lid-close-suspend-with-external-monitor doesn't work. Nothing changes when I set that option to true. Sometimes Ubuntu couldn't recognize that external monitor at all. This problem suddenly appeared and disappeared, so I abandoned Ubuntu.



Now I'm using Mint 19 with Cinnamon. It has the necessary option in the power settings (actually the same dconf option lid-close-suspend-with-external-monitor, but in the cinnamon section). And it works, but when I open the lid, the windows from the laptop screen move to the external monitor. Having to move them back to workplaces is time consuming and undesirable.



I think that before laptop suspends, xrandr has time to change the primary monitor to external. How can I prevent this behavior. Can I lock the primary laptop monitor? Or maybe it is possible to restore the position of the windows after opening the lid?










share|improve this question























  • When you are at your office, what do you use that external monitor for? Just as a test, does the bad behaviour occur when you set the external to mirror the internal display?
    – K7AAY
    Aug 21 at 16:41










  • Basically, I output additional windows to the external monitor. But on presentations I use the mirror mode. In mirror mode, the screens are duplicated, so there is no problem with the position of the windows.
    – ÐšÐ¾Ð½ÑÑ‚антин Башаркевич
    Aug 21 at 16:51














up vote
0
down vote

favorite












My case: At work, I use my own laptop (Xiaomi Mi Pro). When I connect it to an external monitor, I want to be able to just close the lid and leave without the laptop and have the laptop suspend. When I return, I want to continue working.



But it's not that simple when an external monitor is attached. The default behaviour of Linux with multiple desktop environments is to change the primary monitor to the external.



For example: Ubuntu 18.04.1. Its dconf option lid-close-suspend-with-external-monitor doesn't work. Nothing changes when I set that option to true. Sometimes Ubuntu couldn't recognize that external monitor at all. This problem suddenly appeared and disappeared, so I abandoned Ubuntu.



Now I'm using Mint 19 with Cinnamon. It has the necessary option in the power settings (actually the same dconf option lid-close-suspend-with-external-monitor, but in the cinnamon section). And it works, but when I open the lid, the windows from the laptop screen move to the external monitor. Having to move them back to workplaces is time consuming and undesirable.



I think that before laptop suspends, xrandr has time to change the primary monitor to external. How can I prevent this behavior. Can I lock the primary laptop monitor? Or maybe it is possible to restore the position of the windows after opening the lid?










share|improve this question























  • When you are at your office, what do you use that external monitor for? Just as a test, does the bad behaviour occur when you set the external to mirror the internal display?
    – K7AAY
    Aug 21 at 16:41










  • Basically, I output additional windows to the external monitor. But on presentations I use the mirror mode. In mirror mode, the screens are duplicated, so there is no problem with the position of the windows.
    – ÐšÐ¾Ð½ÑÑ‚антин Башаркевич
    Aug 21 at 16:51












up vote
0
down vote

favorite









up vote
0
down vote

favorite











My case: At work, I use my own laptop (Xiaomi Mi Pro). When I connect it to an external monitor, I want to be able to just close the lid and leave without the laptop and have the laptop suspend. When I return, I want to continue working.



But it's not that simple when an external monitor is attached. The default behaviour of Linux with multiple desktop environments is to change the primary monitor to the external.



For example: Ubuntu 18.04.1. Its dconf option lid-close-suspend-with-external-monitor doesn't work. Nothing changes when I set that option to true. Sometimes Ubuntu couldn't recognize that external monitor at all. This problem suddenly appeared and disappeared, so I abandoned Ubuntu.



Now I'm using Mint 19 with Cinnamon. It has the necessary option in the power settings (actually the same dconf option lid-close-suspend-with-external-monitor, but in the cinnamon section). And it works, but when I open the lid, the windows from the laptop screen move to the external monitor. Having to move them back to workplaces is time consuming and undesirable.



I think that before laptop suspends, xrandr has time to change the primary monitor to external. How can I prevent this behavior. Can I lock the primary laptop monitor? Or maybe it is possible to restore the position of the windows after opening the lid?










share|improve this question















My case: At work, I use my own laptop (Xiaomi Mi Pro). When I connect it to an external monitor, I want to be able to just close the lid and leave without the laptop and have the laptop suspend. When I return, I want to continue working.



But it's not that simple when an external monitor is attached. The default behaviour of Linux with multiple desktop environments is to change the primary monitor to the external.



For example: Ubuntu 18.04.1. Its dconf option lid-close-suspend-with-external-monitor doesn't work. Nothing changes when I set that option to true. Sometimes Ubuntu couldn't recognize that external monitor at all. This problem suddenly appeared and disappeared, so I abandoned Ubuntu.



Now I'm using Mint 19 with Cinnamon. It has the necessary option in the power settings (actually the same dconf option lid-close-suspend-with-external-monitor, but in the cinnamon section). And it works, but when I open the lid, the windows from the laptop screen move to the external monitor. Having to move them back to workplaces is time consuming and undesirable.



I think that before laptop suspends, xrandr has time to change the primary monitor to external. How can I prevent this behavior. Can I lock the primary laptop monitor? Or maybe it is possible to restore the position of the windows after opening the lid?







power-management suspend laptop display-settings






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Sep 9 at 21:02









Rui F Ribeiro

36.7k1271116




36.7k1271116










asked Aug 21 at 16:25









Константин Башаркевич

1013




1013











  • When you are at your office, what do you use that external monitor for? Just as a test, does the bad behaviour occur when you set the external to mirror the internal display?
    – K7AAY
    Aug 21 at 16:41










  • Basically, I output additional windows to the external monitor. But on presentations I use the mirror mode. In mirror mode, the screens are duplicated, so there is no problem with the position of the windows.
    – ÐšÐ¾Ð½ÑÑ‚антин Башаркевич
    Aug 21 at 16:51
















  • When you are at your office, what do you use that external monitor for? Just as a test, does the bad behaviour occur when you set the external to mirror the internal display?
    – K7AAY
    Aug 21 at 16:41










  • Basically, I output additional windows to the external monitor. But on presentations I use the mirror mode. In mirror mode, the screens are duplicated, so there is no problem with the position of the windows.
    – ÐšÐ¾Ð½ÑÑ‚антин Башаркевич
    Aug 21 at 16:51















When you are at your office, what do you use that external monitor for? Just as a test, does the bad behaviour occur when you set the external to mirror the internal display?
– K7AAY
Aug 21 at 16:41




When you are at your office, what do you use that external monitor for? Just as a test, does the bad behaviour occur when you set the external to mirror the internal display?
– K7AAY
Aug 21 at 16:41












Basically, I output additional windows to the external monitor. But on presentations I use the mirror mode. In mirror mode, the screens are duplicated, so there is no problem with the position of the windows.
– ÐšÐ¾Ð½ÑÑ‚антин Башаркевич
Aug 21 at 16:51




Basically, I output additional windows to the external monitor. But on presentations I use the mirror mode. In mirror mode, the screens are duplicated, so there is no problem with the position of the windows.
– ÐšÐ¾Ð½ÑÑ‚антин Башаркевич
Aug 21 at 16:51















active

oldest

votes











Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f463910%2fproblem-with-external-monitor-plugged-to-notebook%23new-answer', 'question_page');

);

Post as a guest



































active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes















 

draft saved


draft discarded















































 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f463910%2fproblem-with-external-monitor-plugged-to-notebook%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

How to check contact read email or not when send email to Individual?

Displaying single band from multi-band raster using QGIS

How many registers does an x86_64 CPU actually have?