鎖定螢幕後黑屏

鎖定螢幕後黑屏

前段時間,我嘗試在我的 Linux Mint 18.2 Sonya 上安裝 tensorflow-gpu,但可能在安裝過程中損壞了某些東西。我在啟動時遇到了黑屏。為了解決這個問題,我編輯了/etc/default/grubGRUB_CMDLINE_LINUX="i915.modeset=0"

我使用 i915 參數,因為我有一個英特爾主機板(我相信)。

現在我喚醒電腦後出現黑畫面。我在網路上找到的許多解決方案都需要更改GRUB_CMDLINE_LINUX參數,但由於我已經必須編輯此內容,所以我認為這與更改 i915 參數無關。

你知道如何解決這個問題嗎?謝謝 !

編輯:如果我刪除i915.modeset=0,我會啟動到黑屏。這就是為什麼我首先添加了這個參數,但它只能解決啟動時黑屏的問題。在確保 Ctrl+Alt+Backspace 確實已啟動並登出後,我嘗試在「黑屏」時使用它,但它也無法解決問題。感謝@terdon 提出的這些修復建議!

答案1

我有一個類似的問題,我在各種機器和系統上都遇到過這個問題。我一直無法找到其根本原因,但作為解決方法,我為xrandr設定螢幕的命令分配了鍵盤快捷鍵。這裡可能值得一試。

  1. 透過查看以下輸出找出目前的螢幕設定xrandr

    $ xrandr
    Screen 0: minimum 320 x 200, current 6400 x 1440, maximum 8192 x 8192
    eDP-1 connected 2560x1440+3840+0 (normal left inverted right x axis y axis) 310mm x 174mm
       2560x1440     60.00*+  59.99    59.99    59.96    59.95  
       1920x1440     60.00  
       1856x1392     60.01  
       1792x1344     60.01  
       2048x1152     59.99    59.98    59.90    59.91  
       1920x1200     59.88    59.95  
       1920x1080     60.01    59.97    59.96    59.93  
       1600x1200     60.00  
       1680x1050     59.95    59.88  
       1400x1050     59.98  
       1600x900      59.99    59.94    59.95    59.82  
       1280x1024     60.02  
       1400x900      59.96    59.88  
       1280x960      60.00  
       1440x810      60.00    59.97  
       1368x768      59.88    59.85  
       1280x800      59.99    59.97    59.81    59.91  
       1280x720      60.00    59.99    59.86    59.74  
       1024x768      60.04    60.00  
       960x720       60.00  
       928x696       60.05  
       896x672       60.01  
       1024x576      59.95    59.96    59.90    59.82  
       960x600       59.93    60.00  
       960x540       59.96    59.99    59.63    59.82  
       800x600       60.00    60.32    56.25  
       840x525       60.01    59.88  
       864x486       59.92    59.57  
       700x525       59.98  
       800x450       59.95    59.82  
       640x512       60.02  
       700x450       59.96    59.88  
       640x480       60.00    59.94  
       720x405       59.51    58.99  
       684x384       59.88    59.85  
       640x400       59.88    59.98  
       640x360       59.86    59.83    59.84    59.32  
       512x384       60.00  
       512x288       60.00    59.92  
       480x270       59.63    59.82  
       400x300       60.32    56.34  
       432x243       59.92    59.57  
       320x240       60.05  
       360x202       59.51    59.13  
       320x180       59.84    59.32  
    DP-1 disconnected (normal left inverted right x axis y axis)
    HDMI-1 disconnected (normal left inverted right x axis y axis)
    DP-2 disconnected (normal left inverted right x axis y axis)
    HDMI-2 disconnected (normal left inverted right x axis y axis)
    DP-3 disconnected (normal left inverted right x axis y axis)
    HDMI-3 disconnected (normal left inverted right x axis y axis)
    DP-3-1 disconnected (normal left inverted right x axis y axis)
    DP-3-2 connected primary 1920x1080+1920+0 (normal left inverted right x axis y axis) 531mm x 299mm
       1920x1080     60.00*+  60.00    50.00    59.94  
       1680x1050     59.88  
       1600x900      60.00  
       1280x1024     75.02    60.02  
       1440x900      59.90  
       1280x800      59.91  
       1152x864      75.00  
       1280x720      60.00    60.00    50.00    50.00    59.94  
       1024x768      75.03    70.07    60.00  
       832x624       74.55  
       800x600       72.19    75.00    60.32    56.25  
       720x576       50.00    50.00  
       720x480       60.00    60.00    59.94    59.94  
       640x480       75.00    72.81    66.67    60.00    59.94  
       720x400       70.08  
    DP-3-3 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 477mm x 268mm
       1920x1080     60.00*+
       1680x1050     59.95  
       1280x1024     75.02    60.02  
       1152x864      75.00  
       1024x768      75.03    60.00  
       800x600       75.00    60.32  
       640x480       75.00    59.94  
       720x400       70.08  
    

    我實際上有 3 個活動螢幕,所以我的輸出有點複雜。這是單一螢幕設定的樣子:

    $ xrandr
    Screen 0: minimum 320 x 200, current 2560 x 1440, maximum 8192 x 8192
    eDP-1 connected primary 2560x1440+0+0 (normal left inverted right x axis y axis) 310mm x 174mm
       2560x1440     60.00*+  59.99    59.99    59.96    59.95  
       1920x1440     60.00  
       1856x1392     60.01  
       1792x1344     60.01  
       2048x1152     59.99    59.98    59.90    59.91  
       1920x1200     59.88    59.95  
       1920x1080     60.01    59.97    59.96    59.93  
       1600x1200     60.00  
       1680x1050     59.95    59.88  
       1400x1050     59.98  
       1600x900      59.99    59.94    59.95    59.82  
       1280x1024     60.02  
       1400x900      59.96    59.88  
       1280x960      60.00  
       1440x810      60.00    59.97  
       1368x768      59.88    59.85  
       1280x800      59.99    59.97    59.81    59.91  
       1280x720      60.00    59.99    59.86    59.74  
       1024x768      60.04    60.00  
       960x720       60.00  
       928x696       60.05  
       896x672       60.01  
       1024x576      59.95    59.96    59.90    59.82  
       960x600       59.93    60.00  
       960x540       59.96    59.99    59.63    59.82  
       800x600       60.00    60.32    56.25  
       840x525       60.01    59.88  
       864x486       59.92    59.57  
       700x525       59.98  
       800x450       59.95    59.82  
       640x512       60.02  
       700x450       59.96    59.88  
       640x480       60.00    59.94  
       720x405       59.51    58.99  
       684x384       59.88    59.85  
       640x400       59.88    59.98  
       640x360       59.86    59.83    59.84    59.32  
       512x384       60.00  
       512x288       60.00    59.92  
       480x270       59.63    59.82  
       400x300       60.32    56.34  
       432x243       59.92    59.57  
       320x240       60.05  
       360x202       59.51    59.13  
       320x180       59.84    59.32  
    DP-1 disconnected (normal left inverted right x axis y axis)
    HDMI-1 disconnected (normal left inverted right x axis y axis)
    DP-2 disconnected (normal left inverted right x axis y axis)
    HDMI-2 disconnected (normal left inverted right x axis y axis)
    DP-3 disconnected (normal left inverted right x axis y axis)
    HDMI-3 disconnected (normal left inverted right x axis y axis)
    DP-3-1 disconnected (normal left inverted right x axis y axis)
    DP-3-2 disconnected (normal left inverted right x axis y axis)
    DP-3-3 disconnected (normal left inverted right x axis y axis)
    

    根據從 獲得的輸出xrandr,您可以建立一個命令來複製目前的設定。因此,為了獲得我的三個螢幕,我將使用:

    xrandr --output eDP-1 --mode 2560x1440 --output DP-3-2 --auto --left-of eDP-1 --primary --output DP-3-3 --left-of DP-3-2 --auto 
    

    對於單一螢幕,它將是:

    xrandr --output eDP-1 --mode 2560x1440  --primary
    

    或甚至只是:

    xrandr --output eDP-1 --auto
    

    這會將我的筆記型電腦的螢幕 ( ) 設定eDP-1在最右側,將另外兩個螢幕設置在其左側。嘗試xrandr並獲取適合您的命令。請注意,您的系統上的螢幕名稱會有所不同,您需要弄清楚哪個是哪個。

  2. 獲得正確的xrandr命令後,為其設定桌面捷徑。例如,在 Cinnamon 上,我可以透過前往「首選項」=>「鍵盤」=>「捷徑」=>「自訂捷徑」來執行此操作:

    鍵盤設定截圖

正如您在圖片中看到的,我已經指定了快捷鍵Super+ 3(“Super”是“Windows 鍵”)。因此,如果我的筆記型電腦的螢幕在掛起後無法喚醒,我只需點擊快捷方式即可刷新螢幕,從而有效地將其喚醒。

相關內容