https://bugs.kde.org/show_bug.cgi?id=357868
Bug ID: 357868 Summary: Closing laptop lid doesn't result in suspend Product: KScreen Version: 5.4.3 Platform: Kubuntu Packages OS: Linux Status: UNCONFIRMED Severity: normal Priority: NOR Component: common Assignee: dvra...@kde.org Reporter: c...@neo-zeon.de Closing the lid of the laptop doesn't result in suspend. The issue is caused by kscreen thinking that the monitor type is unknown. "unknown" type monitors are counted as external (see line 233 at https://github.com/KDE/powerdevil/blob/master/daemon/actions/bundled/handlebuttonevents.cpp) and thus the system won't suspend with the lid closed when an "external" monitor is attached. Configuring power management to ignore externally attached monitors will allow the system to suspend on a laptop lid closed, but then the laptop will of course sleep when the lid is closed even when an external monitor is attached. The best work around is to select "suspend" from the "Power / Session" menu under the application menu. ~/.xsession-errors shows the following when the lid is closed and : "powerdevil: Lid action was suppressed because an external monitor is present" xrandr seems to report the display type correctly looking at the output of 'kscreen-console bug'. The output for 'QT_LOGGING_RULES="*" kscreen-console bug': START: Requesting Config kscreen: launcherDataAvailable: "org.kde.KScreen.Backend.XRandR" kscreen: Launcher finished with exit code 1 , status 0 kscreen: Service for requested backend already running kscreen: Primary output changed from KScreen::Output(Id: 446 , Name: "HDMI-0" ) ( "HDMI-0" ) to KScreen::Output(Id: 446 , Name: "HDMI-0" ) ( "HDMI-0" ) kscreen: Primary output changed from KScreen::Output(Id: 446 , Name: "HDMI-0" ) ( "HDMI-0" ) to KScreen::Output(Id: 446 , Name: "HDMI-0" ) ( "HDMI-0" ) Received config. Took 76 milliseconds ========================xrandr --verbose========================== Screen 0: minimum 8 x 8, current 1920 x 1200, maximum 16384 x 16384 HDMI-0 connected primary 1920x1200+0+0 (0x1bf) normal (normal left inverted right x axis y axis) 518mm x 324mm Identifier: 0x1be Timestamp: 1304363 Subpixel: unknown Gamma: 1.0:1.0:1.0 Brightness: 1.0 Clones: CRTC: 0 CRTCs: 1 0 2 3 Transform: 1.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 1.000000 filter: EDID: 00ffffffffffff0010ac7aa053544737 1718010380342078eaee95a3544c9926 0f5054a1080081408180a940b300d1c0 010101010101283c80a070b023403020 360006442100001a000000ff00594d59 4831343633374754530a000000fc0044 454c4c2055323431324d0a20000000fd 00323d1e5311000a20202020202000ed BorderDimensions: 4 supported: 4 Border: 0 0 0 0 range: (0, 65535) SignalFormat: TMDS supported: TMDS ConnectorType: HDMI ConnectorNumber: 4 _ConnectorLocation: 4 1920x1200 (0x1bf) 154.000MHz +HSync -VSync *current +preferred h: width 1920 start 1968 end 2000 total 2080 skew 0 clock 74.04KHz v: height 1200 start 1203 end 1209 total 1235 clock 59.95Hz 1920x1080 (0x1c0) 148.500MHz +HSync +VSync h: width 1920 start 2008 end 2052 total 2200 skew 0 clock 67.50KHz v: height 1080 start 1084 end 1089 total 1125 clock 60.00Hz 1680x1050 (0x1c1) 146.250MHz -HSync +VSync h: width 1680 start 1784 end 1960 total 2240 skew 0 clock 65.29KHz v: height 1050 start 1053 end 1059 total 1089 clock 59.95Hz 1600x1200 (0x1c2) 162.000MHz +HSync +VSync h: width 1600 start 1664 end 1856 total 2160 skew 0 clock 75.00KHz v: height 1200 start 1201 end 1204 total 1250 clock 60.00Hz 1280x1024 (0x1c3) 108.000MHz +HSync +VSync h: width 1280 start 1328 end 1440 total 1688 skew 0 clock 63.98KHz v: height 1024 start 1025 end 1028 total 1066 clock 60.02Hz 1280x960 (0x1c4) 108.000MHz +HSync +VSync h: width 1280 start 1376 end 1488 total 1800 skew 0 clock 60.00KHz v: height 960 start 961 end 964 total 1000 clock 60.00Hz 1024x768 (0x1c5) 65.000MHz -HSync -VSync h: width 1024 start 1048 end 1184 total 1344 skew 0 clock 48.36KHz v: height 768 start 771 end 777 total 806 clock 60.00Hz 800x600 (0x1c6) 40.000MHz +HSync +VSync h: width 800 start 840 end 968 total 1056 skew 0 clock 37.88KHz v: height 600 start 601 end 605 total 628 clock 60.32Hz 640x480 (0x1c7) 25.175MHz -HSync -VSync h: width 640 start 656 end 752 total 800 skew 0 clock 31.47KHz v: height 480 start 490 end 492 total 525 clock 59.94Hz DP-0 connected (normal left inverted right x axis y axis) Identifier: 0x1c8 Timestamp: 1304363 Subpixel: unknown Clones: CRTCs: 1 0 2 3 Transform: 1.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 1.000000 filter: Backlight: 60 range: (0, 100) EDID: 00ffffffffffff0030e46f0400000000 0018010495221378eadc95a35855a026 0d505400000001010101010101010101 0101010101012e3680a070381f403020 350058c21000001a522b80a070381f40 3020350058c21000001a000000fe0033 38373459803135365746360a00000000 000041319e001000000a010a20200092 BorderDimensions: 4 supported: 4 Border: 0 0 0 0 range: (0, 65535) SignalFormat: DisplayPort supported: DisplayPort ConnectorType: Panel ConnectorNumber: 5 _ConnectorLocation: 5 1920x1080 (0x1c9) 138.700MHz +HSync -VSync +preferred h: width 1920 start 1968 end 2000 total 2080 skew 0 clock 66.68KHz v: height 1080 start 1083 end 1088 total 1111 clock 60.02Hz 1920x1080 (0x1ca) 110.900MHz +HSync -VSync h: width 1920 start 1968 end 2000 total 2080 skew 0 clock 53.32KHz v: height 1080 start 1083 end 1088 total 1111 clock 47.99Hz DP-1 disconnected (normal left inverted right x axis y axis) Identifier: 0x1cb Timestamp: 1304363 Subpixel: unknown Clones: CRTCs: 1 0 2 3 Transform: 1.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 1.000000 filter: BorderDimensions: 4 supported: 4 Border: 0 0 0 0 range: (0, 65535) SignalFormat: DisplayPort supported: DisplayPort ConnectorType: DisplayPort ConnectorNumber: 7 _ConnectorLocation: 7 DP-2 disconnected (normal left inverted right x axis y axis) Identifier: 0x1cc Timestamp: 1304363 Subpixel: unknown Clones: CRTCs: 1 0 2 3 Transform: 1.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 1.000000 filter: BorderDimensions: 4 supported: 4 Border: 0 0 0 0 range: (0, 65535) SignalFormat: TMDS supported: TMDS ConnectorType: DisplayPort ConnectorNumber: 7 _ConnectorLocation: 7 DP-3 disconnected (normal left inverted right x axis y axis) Identifier: 0x1cd Timestamp: 1304363 Subpixel: unknown Clones: CRTCs: 1 0 2 3 Transform: 1.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 1.000000 filter: BorderDimensions: 4 supported: 4 Border: 0 0 0 0 range: (0, 65535) SignalFormat: DisplayPort supported: DisplayPort ConnectorType: DisplayPort ConnectorNumber: 8 _ConnectorLocation: 8 DP-4 disconnected (normal left inverted right x axis y axis) Identifier: 0x1ce Timestamp: 1304363 Subpixel: unknown Clones: CRTCs: 1 0 2 3 Transform: 1.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 1.000000 filter: BorderDimensions: 4 supported: 4 Border: 0 0 0 0 range: (0, 65535) SignalFormat: TMDS supported: TMDS ConnectorType: DisplayPort ConnectorNumber: 8 _ConnectorLocation: 8 ========================Outputs=================================== Screen: maxSize: QSize(16384, 16384) minSize: QSize(8, 8) currentSize: QSize(1920, 1200) ----------------------------------------------------- Id: 446 Name: "HDMI-0" Type: "Unknown" Connected: true Enabled: true Primary: true Rotation: 1 Pos: QPoint(0,0) MMSize: QSize(518, 324) Size: QSize(1920, 1200) Clones: None Mode: "447" Preferred Mode: "447" Preferred modes: ("447") Modes: "447" "" QSize(1920, 1200) 59.9502 "448" "" QSize(1920, 1080) 60 "449" "" QSize(1680, 1050) 59.9543 "450" "" QSize(1600, 1200) 60 "451" "" QSize(1280, 1024) 60.0197 "452" "" QSize(1280, 960) 60 "453" "" QSize(1024, 768) 60.0038 "454" "" QSize(800, 600) 60.3165 "455" "" QSize(640, 480) 59.9405 EDID Info: Device ID: "xrandr-Dell Inc.-DELL U2412M-YMYH14637GTS" Name: "DELL U2412M" Vendor: "Dell Inc." Serial: "YMYH14637GTS" EISA ID: "" Hash: "10c8ec85e70a375c30998498de0694ef" Width: 52 Height: 32 Gamma: 2 Red: QQuaternion(scalar:1, vector:(0.639648, 0.328125, 0)) Green: QQuaternion(scalar:1, vector:(0.299805, 0.599609, 0)) Blue: QQuaternion(scalar:1, vector:(0.150391, 0.0595703, 0)) White: QQuaternion(scalar:1, vector:(0.313477, 0.329102, 0)) ----------------------------------------------------- Id: 456 Name: "DP-0" Type: "Unknown" Connected: true Enabled: false Primary: false Rotation: 1 Pos: QPoint(0,0) MMSize: QSize(344, 194) Clones: None Mode: "" Preferred Mode: "457" Preferred modes: ("457") Modes: "457" "" QSize(1920, 1080) 60.0204 "458" "" QSize(1920, 1080) 47.9904 EDID Info: Device ID: "xrandr-unknown" Name: "" Vendor: "" Serial: "" EISA ID: "3874Y�156WF6" Hash: "d190c7f760f9f4048be22a81e23a066e" Width: 34 Height: 19 Gamma: 2 Red: QQuaternion(scalar:1, vector:(0.639648, 0.34375, 0)) Green: QQuaternion(scalar:1, vector:(0.334961, 0.625, 0)) Blue: QQuaternion(scalar:1, vector:(0.150391, 0.0517578, 0)) White: QQuaternion(scalar:1, vector:(0.313477, 0.329102, 0)) ----------------------------------------------------- Id: 459 Name: "DP-1" Type: "Unknown" Connected: false ----------------------------------------------------- Id: 460 Name: "DP-2" Type: "Unknown" Connected: false ----------------------------------------------------- Id: 461 Name: "DP-3" Type: "Unknown" Connected: false ----------------------------------------------------- Id: 462 Name: "DP-4" Type: "Unknown" Connected: false ========================Configurations============================ Configs in: "/home/hiryu/.local/share/kscreen/" Number of files: 2 "03495a4d81145434dcad5eff2a3987e1" "" "f67ff9cf3e387cc1f9c932b630f112f0" "" No external monitors are connected. Not only should kscreen detect the monitor type correctly here, but probably powerdevil should suspend if there's only a single unknown monitor attached as well. Reproducible: Always Steps to Reproduce: 1. Have a laptop screen that kscreen detects as type "unknown" 2. Make sure "Even when an external monitor is connected" is unchecked under the Power Management settings. 3. Close the laptop lid. Actual Results: Laptop doesn't suspend. Expected Results: Laptop should be suspended. -- You are receiving this mail because: You are watching all bug changes.