1

Some time ago, I tried to install tensorflow-gpu on my Linux Mint 18.2 Sonya and probably broke something while doing so. I ended up with a black screen when booting. To fix this, I edited /etc/default/grub: GRUB_CMDLINE_LINUX="i915.modeset=0".

I'm using the i915 parameter because I have an intel motherboard (I believe).

Now I have a blackscreen after waking up my computer. Many of the solutions I found online required to change the GRUB_CMDLINE_LINUX parameter, but since I already had to edit this I don't think it's about changing the i915 parameter.

Do you know how to fix this problem ? Thank you !

EDIT: If I remove i915.modeset=0, I boot to a black screen. That's why I added this parameter in the first place, but it only fixes the black screen on boot issue. After making sure that Ctrl+Alt+Backspace is actually activated and logs me out, I tried to use it when "blackscreen-ed", and it won't fix the problem either. Thanks to @terdon for suggesting theses fixes though!

  • Does it fix itself if you log out (Ctrl+Alt+Backspace)? – terdon Jun 3 at 10:40
  • Unfortunately, I doesn't fix itself with Ctrl+Alt+Backspace. – Loïc Jun 3 at 12:17
0

I have a similar problem and I've had it with a variety of machines and systems. I have never been able to track down the root cause of it, but as a workaround, I have assigned a keyboard shortcut to an xrandr command that sets up my screens. That might be worth a try here.

  1. Figure out your current screen setup by looking at the output of 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  
    

    I actually have 3 screens active, so my output is a bit complex. This is what it would look like for a single screen setup:

    $ 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)
    

    Based on the output you get from xrandr, you can build a command that would duplicate your current setup. So, to get my three screens, I would use:

    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 
    

    For a single screen, it would be:

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

    Or even just:

    xrandr --output eDP-1 --auto
    

    That will set up my laptop's screen (eDP-1) at the far right, and my other two screens to the left of it. Play around with xrandr and get the command that works for you. Note that the screen names will be different on your system and you will need to work out which is which.

  2. Once you have the right xrandr command, set a desktop shortcut for it. For example, on Cinnamon, I can do this by going to Preferences => Keyboard => Shortcuts => Custom shortcuts:

    keyboard settings screenshot

As you can see in the image, I have assigned the shortcut Super+3 ("Super" is the "Windows key"). So if my laptop's screen fails to wake up after suspending, I just hit the shortcut and that refreshes the screen, effectively waking it up.

  • Thank you for your very detailed answer. I tried to follow your procedure : xrandr: Failed to get size of gamma for output default Screen 0: minimum 1366 x 768, current 1366 x 768, maximum 1366 x 768 default connected 1366x768+0+0 0mm x 0mm 1366x768 76.00* So my shortcut command would be xrandr --output default --mode 1366x768 --primary. I bind it to Alt+", and tried to use it but it still doesn't fix the black screen issue :( – Loïc Jun 3 at 12:18
  • @Loïc yeah, if the Ctrl+Alt+Backspace doesn't fix it (can you confirm that it does actually log you out though? The shortcut is sometimes deactivated), then the xrandr solution won't work either. I would try removing the i915.modeset=0 option and rebooting. Then see if that makes the problem go away. If it does, then we at least know where to start looking. Please try this and edit your question with the results. – terdon Jun 3 at 12:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.