Open MicroDroid opened 6 years ago
I had your exact same issue with the same error from optirun and the same dmesg and I fixed it using this https://wiki.archlinux.org/index.php/bumblebee#Failed_to_initialize_the_NVIDIA_GPU_at_PCI:1:0:0_.28Bumblebee_daemon_reported:_error:_.5BXORG.5D_.28EE.29_NVIDIA.28GPU-0.29.29 that worked for me and you can make a script easily if you want.
@msh0001 YES! That did work. I wonder why I haven't seen that command before even though I read the wiki page like 3 times before.
I ended up with this service in /etc/systemd/system/gpu-fix.service
:
[Unit]
Description=Fix GPU after waking up from suspension
After=suspend.target
[Service]
User=root
Type=oneshot
# Sleep is because we want to ensure fastest wake up
ExecStart=/usr/bin/bash -c "sleep 2 && echo 1 > /sys/bus/pci/rescan"
TimeoutSec=0
[Install]
WantedBy=suspend.target
I am keeping this open because this doesn't make it not a bumblebee bug.
Can't believe this. I had this issue for 2 years and it's finally fixed.
@Vortelf I can't believe you had this problem for two years and you haven't even bothered to open an issue :P
@MicroDroid Indeed :D I gave up and continued onward with restarting my laptop whenever I needed the discrete GPU.
work on debian stretch too but thats a fucking issue and doing this or script this is boring, i dont understand why thats make that because i never did it, in the past bumblebee works well after sleep
for those who want the script thats on my github
On ubuntu 18.10 I had what appeared to be a similar issue but after waking from sleep i was unable to login and @MicroDroid's service resolved the issue (Thank you!). Later while looking at some documentation for TLP I noticed https://wiki.archlinux.org/index.php/TLP#Bumblebee_with_NVIDIA_driver. After blacklisting my NVIDIA device in TLP's config and removing the previously mentioned fix the problem was also gone.
After wake up from sleep (suspend to RAM):
Relevant
dmesg
:Useful stuff:
GPU: Nvidia GeForce 930MX