锁屏后黑屏

锁屏后黑屏

前段时间,我尝试在我的 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 键”)。因此,如果我的笔记本电脑的屏幕在挂起后无法唤醒,我只需点击快捷方式即可刷新屏幕,从而有效地将其唤醒。

相关内容