Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I use the following scripts to initialize multiscreen setup:

# Initializes Nvidia Optimus for multi-screen functionality.

sudo modprobe bbswitch
optirun true

But when my machine suspends, it goes back to a single screen. I try to restart by terminating and initializating again. I terminate with the following:

sudo kill -15 $xorg_process
sudo rmmod nvidia
sudo tee /proc/acpi/bbswitch <<<OFF

Then I run the initialize script again, but I get the following message:

[16929.676769] [ERROR]Cannot access secondary GPU - error: [XORG] (EE) Server terminated successfully (0). Closing log file.

[16929.676811] [ERROR]Aborting because fallback start is disabled.

Manual testing indicates that this error comes from the optirun true command in the initialize script. Is there a way I can reload my second screen after my machine hibernates? (or, more specifically, how to reload the Nvidia driver?)

I am referencing the solution to the Optimus multiscreen monitor issue (for machines with outputs hard-wired to the discrete GPU) found here.

share|improve this question
up vote 2 down vote accepted

The following works for me on a Thinkpad T520 under arch:

Before suspending:

killall Xorg
sudo rmmod nvidia
sudo modprobe bbswitch
sudo tee /proc/acpi/bbswitch <<< OFF
sudo systemctl stop bumblebeed

After resume:

sudo rmmod nvidia
sudo modprobe nvidia
sudo modprobe bbswitch
sudo systemctl start bumblebeed
sudo tee /proc/acpi/bbswitch <<< ON
optirun true

Especially reloading the nvidia kernel module seems to do the trick for me here.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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