rliou92 / umonitor

Manage monitor configuration automatically
MIT License
68 stars 1 forks source link

Umonitor suddenly stopped working #3

Closed Notaduck closed 6 years ago

Notaduck commented 6 years ago

Hi again ;) Umonitor suddenly stopped working from one day to another ?

$ ~ umonitor -l portable                                                                                                                              
[1]    3319 segmentation fault (core dumped)  umonitor -l portable
$ ~ umonitor --version                                                                                                                                
umonitor 20170805
Written by Ricky Liou
rliou92 commented 6 years ago

Hello :) Could you give me the output of

umonitor -l portable --verbose?

Thanks!

Notaduck commented 6 years ago

Yes of course

umonitor -l portable --verbose                                                                                                   
Connected to server
Loading profile: portable
Number of profiles: 2
Trying to find which profile matches current setup
Current connected outputs: eDP1 (SHP unknown) 
DP2-1 (DEL DELL U2715H) HDMI1 (DEL DELL U2515H) 
Looping over profile 
Configuration outputs: eDP1 (SHP unknown) DP2-1 (DEL DELL U2715H) HDMI1 (DEL DELL U2515H) 
Profile home matches current setup
Done loading values from configuration file
Loading profile home
Num outputs per profile home: 3
Trying to find matching setting for eDP1 (SHP unknown)
Found output in configuration file that matches eDP1 (SHP unknown)
Trying match up the configuration resolution with the mode id
No need to find mode id, just let this output be disabled later
Trying to find matching setting for DP2-1 (DEL DELL U2715H)
Found output in configuration file that matches DP2-1 (DEL DELL U2715H)
Trying match up the configuration resolution with the mode id
Found matching mode id: 78
Found potential crtc 63. Is it already assigned?
Queing up crtc to load: 63
Crtc settings: x:0, y:504, rotation: 1, is_primary: 1, mode_id: 78, output: DP2-1
Trying to find matching setting for HDMI1 (DEL DELL U2515H)
Found output in configuration file that matches HDMI1 (DEL DELL U2515H)
Trying match up the configuration resolution with the mode id
Found matching mode id: 78
Found potential crtc 63. Is it already assigned?
Crtc 63 already assigned!
Found potential crtc 64. Is it already assigned?
Queing up crtc to load: 64
Crtc settings: x:2560, y:0, rotation: 8, is_primary: 0, mode_id: 78, output: HDMI1
Does any of queued crtc match currently loaded crtc 63?
Crtc: x:0, y:0, rotation: 1, mode_id: 0, output: eDP1
Does any of queued crtc match currently loaded crtc 64?
Crtc: x:2560, y:0, rotation: 8, mode_id: 78, output: HDMI1
Queued crtc 64 matches! Remove duplicate crtc 64 from ll
Does any of queued crtc match currently loaded crtc 65?
Crtc: x:0, y:576, rotation: 1, mode_id: 78, output: DP2-1
Queing disable crtc 65
Does any of queued crtc match currently loaded crtc 66?
Crtc: x:0, y:0, rotation: 1, mode_id: 0, output: VIRTUAL1
Looping over profile 
Configuration outputs: eDP1 (SHP unknown) 
[1]    2835 segmentation fault (core dumped)  umonitor -l portable --verbose
rliou92 commented 6 years ago

Hmmm I need more information about the segmentation fault. Could you use valgrind and run the following?

valgrind --leak-check=yes umonitor -l portable --verbose

Notaduck commented 6 years ago

I'm first home again tomorrow, but I Will do IT as soon as I get home

Notaduck commented 6 years ago
Connected to server
Loading profile: portable
Number of profiles: 2
Trying to find which profile matches current setup
Current connected outputs: eDP1 (SHP unknown) DP2-1 (DEL DELL U2715H) HDMI1 (DEL DELL U2515H) 
Looping over profile 
Configuration outputs: eDP1 (SHP unknown) DP2-1 (DEL DELL U2715H) HDMI1 (DEL DELL U2515H) 
Profile home matches current setup
Done loading values from configuration file
Loading profile home
Num outputs per profile home: 3
Trying to find matching setting for eDP1 (SHP unknown)
Found output in configuration file that matches eDP1 (SHP unknown)
Trying match up the configuration resolution with the mode id
No need to find mode id, just let this output be disabled later
Trying to find matching setting for DP2-1 (DEL DELL U2715H)
Found output in configuration file that matches DP2-1 (DEL DELL U2715H)
Trying match up the configuration resolution with the mode id
Found matching mode id: 440
Found potential crtc 63. Is it already assigned?
Queing up crtc to load: 63
Crtc settings: x:0, y:504, rotation: 1, is_primary: 1, mode_id: 440, output: DP2-1
Trying to find matching setting for HDMI1 (DEL DELL U2515H)
Found output in configuration file that matches HDMI1 (DEL DELL U2515H)
Trying match up the configuration resolution with the mode id
Found matching mode id: 440
Found potential crtc 63. Is it already assigned?
Crtc 63 already assigned!
Found potential crtc 64. Is it already assigned?
Queing up crtc to load: 64
Crtc settings: x:2560, y:0, rotation: 8, is_primary: 0, mode_id: 440, output: HDMI1
Does any of queued crtc match currently loaded crtc 63?
Crtc: x:0, y:0, rotation: 1, mode_id: 74, output: eDP1
Queing disable crtc 63
Does any of queued crtc match currently loaded crtc 64?
Crtc: x:0, y:0, rotation: 1, mode_id: 0, output: eDP1
Does any of queued crtc match currently loaded crtc 65?
Crtc: x:0, y:0, rotation: 1, mode_id: 0, output: eDP1
Does any of queued crtc match currently loaded crtc 66?
Crtc: x:0, y:0, rotation: 1, mode_id: 0, output: VIRTUAL1
Looping over profile 
Configuration outputs: eDP1 (SHP unknown) 
rliou92 commented 6 years ago

Is that the complete output of valgrind? Where's the segfault?

Notaduck commented 6 years ago

I missed some of the lines.... sry

 ~ valgrind --leak-check=yes umonitor -l portable --verbose                                                                        
==6578== Memcheck, a memory error detector
==6578== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==6578== Using Valgrind-3.13.0 and LibVEX; rerun with -h for copyright info
==6578== Command: umonitor -l portable --verbose
==6578== 
Connected to server
Loading profile: portable
Number of profiles: 2
Trying to find which profile matches current setup
Current connected outputs: eDP1 (SHP unknown) DP2-1 (DEL DELL U2715H) HDMI1 (DEL DELL U2515H) 
Looping over profile 
Configuration outputs: eDP1 (SHP unknown) DP2-1 (DEL DELL U2715H) HDMI1 (DEL DELL U2515H) 
Profile home matches current setup
Done loading values from configuration file
Loading profile home
Num outputs per profile home: 3
Trying to find matching setting for eDP1 (SHP unknown)
Found output in configuration file that matches eDP1 (SHP unknown)
Trying match up the configuration resolution with the mode id
No need to find mode id, just let this output be disabled later
Trying to find matching setting for DP2-1 (DEL DELL U2715H)
Found output in configuration file that matches DP2-1 (DEL DELL U2715H)
Trying match up the configuration resolution with the mode id
Found matching mode id: 430
Found potential crtc 63. Is it already assigned?
Queing up crtc to load: 63
Crtc settings: x:0, y:504, rotation: 1, is_primary: 1, mode_id: 430, output: DP2-1
Trying to find matching setting for HDMI1 (DEL DELL U2515H)
Found output in configuration file that matches HDMI1 (DEL DELL U2515H)
Trying match up the configuration resolution with the mode id
Found matching mode id: 430
Found potential crtc 63. Is it already assigned?
Crtc 63 already assigned!
Found potential crtc 64. Is it already assigned?
Queing up crtc to load: 64
Crtc settings: x:2560, y:0, rotation: 8, is_primary: 0, mode_id: 430, output: HDMI1
Does any of queued crtc match currently loaded crtc 63?
Crtc: x:0, y:0, rotation: 1, mode_id: 0, output: eDP1
Does any of queued crtc match currently loaded crtc 64?
Crtc: x:0, y:576, rotation: 1, mode_id: 430, output: DP2-1
Queing disable crtc 64
Does any of queued crtc match currently loaded crtc 65?
Crtc: x:2560, y:0, rotation: 8, mode_id: 430, output: HDMI1
Queued crtc 64 matches! Remove duplicate crtc 64 from ll
Does any of queued crtc match currently loaded crtc 66?
Crtc: x:0, y:0, rotation: 1, mode_id: 0, output: VIRTUAL1
Looping over profile 
Configuration outputs: eDP1 (SHP unknown) 
==6578== Invalid read of size 1
==6578==    at 0x58F3DE0: __strcmp_ssse3 (in /usr/lib/libc-2.27.so)
==6578==    by 0x10E1A3: ??? (in /usr/bin/umonitor)
==6578==    by 0x10E590: ??? (in /usr/bin/umonitor)
==6578==    by 0x10DB73: ??? (in /usr/bin/umonitor)
==6578==    by 0x57E106A: (below main) (in /usr/lib/libc-2.27.so)
==6578==  Address 0x0 is not stack'd, malloc'd or (recently) free'd
==6578== 
==6578== 
==6578== Process terminating with default action of signal 11 (SIGSEGV): dumping core
==6578==  Access not within mapped region at address 0x0
==6578==    at 0x58F3DE0: __strcmp_ssse3 (in /usr/lib/libc-2.27.so)
==6578==    by 0x10E1A3: ??? (in /usr/bin/umonitor)
==6578==    by 0x10E590: ??? (in /usr/bin/umonitor)
==6578==    by 0x10DB73: ??? (in /usr/bin/umonitor)
==6578==    by 0x57E106A: (below main) (in /usr/lib/libc-2.27.so)
==6578==  If you believe this happened as a result of a stack
==6578==  overflow in your program's main thread (unlikely but
==6578==  possible), you can try to increase the size of the
==6578==  main thread stack using the --main-stacksize= flag.
==6578==  The main thread stack size used in this run was 8388608.
==6578== 
==6578== HEAP SUMMARY:
==6578==     in use at exit: 33,422 bytes in 156 blocks
==6578==   total heap usage: 451 allocs, 295 frees, 73,525 bytes allocated
==6578== 
==6578== LEAK SUMMARY:
==6578==    definitely lost: 0 bytes in 0 blocks
==6578==    indirectly lost: 0 bytes in 0 blocks
==6578==      possibly lost: 0 bytes in 0 blocks
==6578==    still reachable: 33,422 bytes in 156 blocks
==6578==         suppressed: 0 bytes in 0 blocks
==6578== Reachable blocks (those to which a pointer was found) are not shown.
==6578== To see them, rerun with: --leak-check=full --show-leak-kinds=all
==6578== 
==6578== For counts of detected and suppressed errors, rerun with: -v
==6578== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)
[1]    6578 segmentation fault (core dumped)  valgrind --leak-check=yes umonitor -l portable --verbose
rliou92 commented 6 years ago

Thanks! Could you post your configuration file? I suspect the problem might be there.

Notaduck commented 6 years ago

Here it is, I haven't changed a single line in the configuration since Dec, 21 - 2017

home : 
{
  Screen : 
  {
    width = 4000;
    height = 2560;
    widthMM = 1055;
    heightMM = 675;
  };
  Monitors : 
  {
    eDP1 : 
    {
      EDID = "SHP unknown";
      resolution : 
      {
        x = 0;
        y = 0;
      };
      pos : 
      {
        x = 0;
        y = 0;
      };
      rotation = 0;
    };
    DP2-1 : 
    {
      EDID = "DEL DELL U2715H";
      resolution : 
      {
        x = 2560;
        y = 1440;
      };
      pos : 
      {
        x = 0;
        y = 504;
      };
      rotation = 1;
      primary = 1;
    };
    HDMI1 : 
    {
      EDID = "DEL DELL U2515H";
      resolution : 
      {
        x = 2560;
        y = 1440;
      };
      pos : 
      {
        x = 2560;
        y = 0;
      };
      rotation = 8;
    };
  };
};
portable : 
{
  Screen : 
  {
    width = 1920;
    height = 1080;
    widthMM = 506;
    heightMM = 284;
  };
  Monitors : 
  {
    eDP1 : 
    {
      EDID = "SHP unknown";
      resolution : 
      {
        x = 1920;
        y = 1080;
      };
      pos : 
      {
        x = 0;
        y = 0;
      };
      rotation = 1;
    };
  };
};
stanna80 commented 6 years ago

this issue sounds similar to mine ;)

rliou92 commented 6 years ago

I identified the commit that introduces the segfault, so I reverted it. Try it now!

Notaduck commented 6 years ago

@rliou92 I can confirm that everything is working now, However it is on a new install I tried it