Score:2

How can I let Xubuntu / Xfce ignore me turning my screen on/off?

fr flag

I'm using Xubuntu Jammy 22.04.3 LTS with Xfce 4.

I have a multi-monitor setup and I don't like the default behaviour when I turn one of my screens off. When I turn a screen off (using the button on the screen itself), the system starts moving windows and panels around and limits my mouse to the screens that are still on. I just want the windows/panels to stay where they are and be able to interact with them using the mouse, as if the screen is still on.

Worst part is, when I turn the screen back on, it doesn't go back to the way it was. It often mirrors screens and the Xfce panels go to the wrong places or are not visible at all. I have to do a reboot and then go into the display settings again to fix it.

How can I let Xubuntu treat monitors as if they are turned on even when they're not? Should I make an xorg.conf file or something?

Display setup: (The monitor on the right is my TV, I usually don't want to use it)

Display setup

Video driver info:

$ lspci -k | grep -EA3 VGA
2b:00.0 VGA compatible controller: NVIDIA Corporation GP104 [GeForce GTX 1070 Ti] (rev a1)
    Subsystem: Micro-Star International Co., Ltd. [MSI] GP104 [GeForce GTX 1070 Ti]
    Kernel driver in use: nvidia
    Kernel modules: nvidiafb, nouveau, nvidia_drm, nvidia

$ nvidia-smi
Wed Aug 30 11:06:54 2023       
+---------------------------------------------+
| NVIDIA-SMI 535.86.05              Driver Version: 535.86.05    CUDA Version: 12.2     |
|-----------------------------------------+----------------------+----------------------+
| GPU  Name                 Persistence-M | Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp   Perf          Pwr:Usage/Cap |         Memory-Usage | GPU-Util  Compute M. |
|                                         |                      |               MIG M. |
|=========================================+======================+======================|
|   0  NVIDIA GeForce GTX 1070 Ti     Off | 00000000:2B:00.0  On |                  N/A |
|  0%   60C    P2              37W / 180W |    290MiB /  8192MiB |      0%      Default |
|                                         |                      |                  N/A |
+-----------------------------------------+----------------------+----------------------+
                                                                                         
+---------------------------------------------+
| Processes:                                                                            |
|  GPU   GI   CI        PID   Type   Process name                            GPU Memory |
|        ID   ID                                                             Usage      |
|=======================================================================================|
|    0   N/A  N/A      1221      G   /usr/lib/xorg/Xorg                          280MiB |
|    0   N/A  N/A      1522      G   xfwm4                                         6MiB |
+---------------------------------------------+

$ dkms status
nvidia/535.86.05, 5.15.0-82-generic, x86_64: installed

Related: Superuser question, Reddit post, Linux Mint Github issue

guiverc avatar
cn flag
I'm using Xubuntu 22.04 (*thus 22.04.3 as my system is fully upgraded; you mention 22.04.1 which implies you're not*) and have 5 screens connected to 2 video cards on this box; I can turn screens off without any impact to the desktop behavior (*besides obvious I can't see what's on the screens!*). You'll have to provide more details (*what kernel modules are you using, I'm using `radeon` & `i915`) & I suggest upgraded your system asap! This [22.04.2](https://fridge.ubuntu.com/2023/02/24/ubuntu-22-04-2-lts-released/) shows ISO release date but installed systems upgraded before that too
Terrance avatar
id flag
I am with @guiverc as I am using Xubuntu 22.04 as well. I can physically power off my monitors at anytime and none of my windows shift and neither does my default monitor. I am using a NVIDIA 1060 card. If you can, could you please add the output of also `nvidia-smi` as well as the output of `dkms status`? Thank you!
Paul avatar
fr flag
@Terrance I updated the driver and put the new information in the question, the behaviour is still the same.
Terrance avatar
id flag
I am running out of ideas here as I am having a heck of a time duplicating your issue. What is the `When new displays are connected:` set to in the Display settings Advanced tab? Maybe try setting that to `Show dialog` or `Do nothing`. It just sounds like your system is resetting the connection to the monitor itself. If I pull the power out of my monitor the system still detects it fine. But if I pull the display cable I can duplicate a change there. Maybe a bug in `xfwm` or possibly a power issue to your 1070 video card. I am grasping at straws trying to figure this all out.
Paul avatar
fr flag
@Terrance Interesting, so maybe my monitor "pulls the plug" when I turn it off. I just tried some things and so far when I use DisplayPort the moving of the windows occur while when I use HDMI or DVI I get the desired behaviour. Trying the other settings in the Display settings did not help.
Terrance avatar
id flag
I guess I can try that DisplayPort too and see if that happens to me. I will have to go home and find a DisplayPort cable and hope that one of my monitors supports it. I will let you know. It could be a DisplayPort issue.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.