SafeEyes icon indicating copy to clipboard operation
SafeEyes copied to clipboard

Not all screens are disabled

Open stdedos opened this issue 6 years ago • 48 comments

I am seeing a bug related to https://github.com/slgobinath/SafeEyes/issues/121

When I am on secondary monitor according to BIOS priorities (because otherwise ~/.config/monitors.xml has no primary monitor set), Safe Eyes only appears on said monitor.

Blocking or otherwise work perfectly, it's just that one of the monitors (the 'Primary') appears active

sntentos@sntentos-OptiPlex-9010 [2017-10-23 15:22:20]:~$ neofetch
            .-/+oossssoo+/-.               sntentos@sntentos-OptiPlex-9010
        `:+ssssssssssssssssss+:`           -------------------------------
      -+ssssssssssssssssssyyssss+-         OS: Ubuntu 16.04.3 LTS x86_64
    .ossssssssssssssssssdMMMNysssso.       Host: OptiPlex 9010 01
   /ssssssssssshdmmNNmmyNMMMMhssssss/      Kernel: 4.10.0-37-generic
  +ssssssssshmydMMMMMMMNddddyssssssss+     Uptime: 7 days, 32 mins
 /sssssssshNMMMyhhyyyyhmNMMMNhssssssss/    Packages: 2263
.ssssssssdMMMNhsssssssssshNMMMdssssssss.   Shell: bash 4.3.48
+sssshhhyNMMNyssssssssssssyNMMMysssssss+   Resolution: 1680x1050, 1680x1050
ossyNMMMNyMMhsssssssssssssshmmmhssssssso   DE: Unity
ossyNMMMNyMMhsssssssssssssshmmmhssssssso   WM: Compiz
+sssshhhyNMMNyssssssssssssyNMMMysssssss+   WM Theme: Ambiance
.ssssssssdMMMNhsssssssssshNMMMdssssssss.   Theme: Ambiance [GTK2/3]
 /sssssssshNMMMyhhyyyyhdNMMMNhssssssss/    Icons: Ubuntu-mono-dark [GTK2/3]
  +sssssssssdmydMMMMMMMMddddyssssssss+     Terminal: gnome-terminal
   /ssssssssssshdmNNNNmyNMMMMhssssss/      CPU: Intel i7-3770 (8) @ 3.900GHz
    .ossssssssssssssssssdMMMNysssso.       GPU: NVIDIA GeForce GT 640 OEM
      -+sssssssssssssssssyyyssss+-         Memory: 9165MiB / 32123MiB
        `:+ssssssssssssssssss+:` 
            .-/+oossssoo+/-.                                       

stdedos avatar Oct 23 '17 12:10 stdedos

Thanks for reporting this issue. I couldn't reproduce this on my Linux Mint system. I will try further and let you know the fix.

Thanks

slgobinath avatar Oct 26 '17 15:10 slgobinath

I have the same issue.

tonymihay avatar Nov 01 '17 12:11 tonymihay

Care to ... comment if you looked through same files, what kind of OS do you have, etc, etc?

stdedos avatar Nov 01 '17 12:11 stdedos

            .-/+oossssoo+/-.               
        `:+ssssssssssssssssss+:`           ------------------
      -+ssssssssssssssssssyyssss+-         OS: Ubuntu 16.04.3 LTS x86_64
    .ossssssssssssssssssdMMMNysssso.       Host: H110M-S2H
   /ssssssssssshdmmNNmmyNMMMMhssssss/      Kernel: 4.4.0-98-generic
  +ssssssssshmydMMMMMMMNddddyssssssss+     Uptime: 4 hours, 5 mins
 /sssssssshNMMMyhhyyyyhmNMMMNhssssssss/    Packages: 2011
.ssssssssdMMMNhsssssssssshNMMMdssssssss.   Shell: zsh 5.1.1
+sssshhhyNMMNyssssssssssssyNMMMysssssss+   Resolution: 1920x1080, 1920x1080
ossyNMMMNyMMhsssssssssssssshmmmhssssssso   DE: Unity
ossyNMMMNyMMhsssssssssssssshmmmhssssssso   WM: Compiz
+sssshhhyNMMNyssssssssssssyNMMMysssssss+   WM Theme: Ambiance
.ssssssssdMMMNhsssssssssshNMMMdssssssss.   Theme: Ambiance [GTK2/3]
 /sssssssshNMMMyhhyyyyhdNMMMNhssssssss/    Icons: Ubuntu-mono-dark [GTK2/3]
  +sssssssssdmydMMMMMMMMddddyssssssss+     Terminal: gnome-terminal
   /ssssssssssshdmNNNNmyNMMMMhssssss/      CPU: Intel i5-6600 (4) @ 3.900GHz
    .ossssssssssssssssssdMMMNysssso.       GPU: Intel Integrated Graphics
      -+sssssssssssssssssyyyssss+-         Memory: 12937MiB / 15960MiB
        `:+ssssssssssssssssss+:` 
            .-/+oossssoo+/-.                                       

tonymihay avatar Nov 01 '17 12:11 tonymihay

Two monitors, same issue: only the left one is blocked during the break. Weird, because everything was fine in the previous version.

            .-/+oossssoo+/-.               tux@tux-HP-EliteBook-840-G3 
        `:+ssssssssssssssssss+:`           -------------------------------- 
      -+ssssssssssssssssssyyssss+-         OS: Ubuntu 17.04 x86_64 
    .ossssssssssssssssssdMMMNysssso.       Model: HP EliteBook 840 G3 
   /ssssssssssshdmmNNmmyNMMMMhssssss/      Kernel: 4.10.0-38-generic 
  +ssssssssshmydMMMMMMMNddddyssssssss+     Uptime: 3 days, 4 hours, 12 mins 
 /sssssssshNMMMyhhyyyyhmNMMMNhssssssss/    Packages: 2416 
.ssssssssdMMMNhsssssssssshNMMMdssssssss.   Shell: bash 4.4.7 
+sssshhhyNMMNyssssssssssssyNMMMysssssss+   Resolution: 1920x1080, 1920x1080 
ossyNMMMNyMMhsssssssssssssshmmmhssssssso   DE: Unity:Unity7 
ossyNMMMNyMMhsssssssssssssshmmmhssssssso   WM: Compiz 
+sssshhhyNMMNyssssssssssssyNMMMysssssss+   WM Theme: Ambiance 
.ssssssssdMMMNhsssssssssshNMMMdssssssss.   Theme: Ambiance [GTK2/3] 
 /sssssssshNMMMyhhyyyyhdNMMMNhssssssss/    Icons: Papirus [GTK2/3] 
  +sssssssssdmydMMMMMMMMddddyssssssss+     Terminal: gnome-terminal 
   /ssssssssssshdmNNNNmyNMMMMhssssss/      CPU: Intel i5-6300U (4) @ 3.0GHz 
    .ossssssssssssssssssdMMMNysssso.       GPU: Intel HD Graphics 520 
      -+sssssssssssssssssyyyssss+-         Memory: 4104MiB / 7862MiB 
        `:+ssssssssssssssssss+:` 
            .-/+oossssoo+/-.                                       

Asalle avatar Nov 23 '17 10:11 Asalle

Hi all, I couldn't reproduce this problem and unable to figure out the exact issue by manually analyzing the code. Could anyone try the following fix and let me know whether it resolves the issue?

  1. Clone the master branch to your computer
git clone https://github.com/slgobinath/SafeEyes.git
  1. Change the directory to SafeEyes
cd SafeEyes
  1. Change the branch to fix
git checkout fix-multi-display-issue
  1. Exit the currently running Safe Eyes instance.
  2. Run Safe Eyes from source using the following command and see whether it fixes the problem. (Please try both manual break (Take a break now option) and the automatic break after 15 minutes interval)
python3 -m safeeyes --debug

Thanks in advance.

slgobinath avatar Dec 01 '17 20:12 slgobinath

Well, for me it would have to be Monday ... so enjoy your weekend :-D

stdedos avatar Dec 02 '17 12:12 stdedos

Hi @slgobinath, The issue is gone now.

tonymihay avatar Dec 04 '17 11:12 tonymihay

@slgobinath I seem to agree too :/

I will keep this version and "try" to replicate it though in the meantime

stdedos avatar Dec 04 '17 12:12 stdedos

Hi all, Thanks for the update. I have made one more modification to this fix since it happens only in Unity desktop environment. I leave this branch unmerged until the next release for your testing purposes.

To pull the recent change, use git pull origin fix-multi-display-issue command after git checkout fix-multi-display-issue command.

slgobinath avatar Dec 04 '17 15:12 slgobinath

Small, somewhat rookie question:

Which channel would you recommend us following? apt-get / pip / ./setup.py ?

Also, the debug.log from all that execution (if it helps at all)

debug-log.log.zip

stdedos avatar Dec 20 '17 12:12 stdedos

I recommend apt-get for Ubuntu and its distributions because it can resolve all the dependencies.

pip is for those who do not have official packages (i.e except Ubuntu, Arch, and Gentoo users). The problem with pip is: it cannot install non-Python dependencies. There can be compatibility issues too because pip usually installs the latest version of libraries which may not be supported by the OS especially in non-rolling release systems like Ubuntu.

setup.py is only for those willing to use development version. I do not recommend it unless you want to test something.

Have you came across the same problem later while running the fix-multi-display-issue branch? If not, I will merge it with master branch and release the next version including this fix.

Thanks

slgobinath avatar Dec 20 '17 12:12 slgobinath

@slgobinath so far no, I consider it to be safe enough.

Of course, I'd prefer if all followers gave a +1 and not "depend" on me for that :smile:

stdedos avatar Dec 20 '17 12:12 stdedos

@slgobinath Not meaning to be pushy: When is the merge commit expected to reach apt-get repo? Or is it auto-synced once in origin/master?

stdedos avatar Jan 03 '18 13:01 stdedos

Hi, It is already merged into the master branch but I did not release it since I was on holidays in last few days and if there were any issues with releases I couldn't fix them immediately.

Today I am going to release the new version.

slgobinath avatar Jan 03 '18 14:01 slgobinath

Fix released in 2.0.2 (2.0.1 has a dependency issue) but Launchpad is waiting for a day to build :-( Once the package is built, I will release it to all Ubuntu versions.

slgobinath avatar Jan 05 '18 12:01 slgobinath

Hi @stdedos, The Ubuntu build takes days to build (Still in the waiting queue). I am disappointed and installed using pip on my computer.

slgobinath avatar Jan 09 '18 17:01 slgobinath

Why do the server has to build it, and not you provide the "packages"? :/

That's a big bottleneck right there ...

stdedos avatar Jan 09 '18 17:01 stdedos

That's how Ubuntu Launchpad works (according to my understanding). Only the changes made to the code are uploaded to Launchpad and they build from the source in their servers. Usually, it takes only 1-2 hours but this time it is more than 3 days but still waiting...

slgobinath avatar Jan 09 '18 18:01 slgobinath

Hi @stdedos, Now, 2.0.2 is available in Ubuntu PPA.

slgobinath avatar Jan 12 '18 23:01 slgobinath

Hi @slgobinath,

Weird, but still not working for me. I'm on 2.0.2. img_3973

tonymihay avatar Jan 17 '18 11:01 tonymihay

@slgobinath Weird ... neither does it work for me anymore :/

stdedos avatar Jan 22 '18 08:01 stdedos

Okay. Though I am unable to reproduce it in my system, I will try my best to analyze the code and fix the issue. @stdedos and @tonymihay are you using Unity or Gnome?

slgobinath avatar Jan 22 '18 11:01 slgobinath

I doubt how much helpful I can be, since you already got my neofetch from above (i.e. Unity)

sntentos@optiplex-9010 [2018-01-22 11:20:28]:$ neofetch 
            .-/+oossssoo+/-.               sntentos@optiplex-9010
        `:+ssssssssssssssssss+:`           ----------------------
      -+ssssssssssssssssssyyssss+-         OS: Ubuntu 16.04.3 LTS x86_64
    .ossssssssssssssssssdMMMNysssso.       Host: OptiPlex 9010 01
   /ssssssssssshdmmNNmmyNMMMMhssssss/      Kernel: 4.13.0-26-generic
  +ssssssssshmydMMMMMMMNddddyssssssss+     Uptime: 3 days, 23 hours
 /sssssssshNMMMyhhyyyyhmNMMMNhssssssss/    Packages: 2365
.ssssssssdMMMNhsssssssssshNMMMdssssssss.   Shell: bash 4.3.48
+sssshhhyNMMNyssssssssssssyNMMMysssssss+   Resolution: 1680x1050, 1920x1080, 1920x1080
ossyNMMMNyMMhsssssssssssssshmmmhssssssso   DE: Unity
ossyNMMMNyMMhsssssssssssssshmmmhssssssso   WM: Compiz
+sssshhhyNMMNyssssssssssssyNMMMysssssss+   WM Theme: Ambiance
.ssssssssdMMMNhsssssssssshNMMMdssssssss.   Theme: Ambiance [GTK2/3]
 /sssssssshNMMMyhhyyyyhdNMMMNhssssssss/    Icons: Ubuntu-mono-dark [GTK2/3]
  +sssssssssdmydMMMMMMMMddddyssssssss+     Terminal: gnome-terminal
   /ssssssssssshdmNNNNmyNMMMMhssssss/      CPU: Intel i7-3770 (8) @ 3.900GHz
    .ossssssssssssssssssdMMMNysssso.       GPU: NVIDIA GeForce GT 640 OEM
      -+sssssssssssssssssyyyssss+-         Memory: 9503MiB / 32119MiB
        `:+ssssssssssssssssss+:` 
            .-/+oossssoo+/-.                                   

stdedos avatar Jan 22 '18 11:01 stdedos

@stdedos I made my fix for Unity. That's why I asked again for confirmation. I will try my best. Thanks

slgobinath avatar Jan 22 '18 11:01 slgobinath

@slgobinath I use Unity.

tonymihay avatar Jan 22 '18 11:01 tonymihay

@slgobinath Unless I take a break from the leftmost screen (1680x1050), there is a one-off issue: image

stdedos avatar Jan 23 '18 14:01 stdedos

@slgobinath I may have a bit of information for you ....

I was in WinKey+Shift+W mode (I think, this gets all the windows from all the virtual desktops, and displays them per-monitor), and a break occured.

In that mode, for some reason, a lot of things don't work e.g. Media Player keys. And I noticed something really interesting! My middle screen had actually 2 break windows!

Is it possible that, you "somehow" had a fix for it already, and then you broke it by "fixing" it out-of-order? :stuck_out_tongue:

stdedos avatar Mar 15 '18 17:03 stdedos

Hi @stdedos, Safe Eyes creates windows equal to the number of screens you have. Problem is with moving them to the correct window. Unfortunately, I do not have an environment to test 3 monitors (I only have 2) so my fixes so far are based on my intuition only. I am looking for a system with 3 monitors to test.

Meanwhile, if anyone is interested, please have a look at the code in between BreakScreen.py:200 - BreakScreen.py:207 which is responsible for moving windows.

slgobinath avatar Mar 19 '18 11:03 slgobinath

Hi @slgobinath,

Unfortunately the latest fix is not working even for two monitors.

tonymihay avatar Mar 19 '18 13:03 tonymihay