Closed samsapti closed 4 years ago
i'm surprised i didnt come across this already myself but it definitely makes sense. i'll test it out in the next day or two and add it in, thanks for contributing. :+1:
thanks again, i merged your modified no-optimus.sh
I had an issue with LightDM failing in Intel mode, whenever I would lock the screen or logout (basically everytime I needed to access LightDM for the second time after reboot), so I began to troubleshoot, and here's what I found:
After LightDM failing after logout, I was able to switch to another TTY. From there I tried to run
sudo lightdm
and from there I got the error in this photo. I took a look at /usr/local/bin/optimus.sh. It turned out, that on line 12 and 27, the directory /sys/bus/pci/devices/0000:01:00.0 doesn't exist, since the dGPU is allready powered down, so LightDM stalls and the system requires a reboot. I applied a simple fix, and everything works perfectly now.Here's my fix: Before:
/etc/switch/intel/no-optimus.sh
After:
/etc/switch/intel/no-optimus.sh
Edit: I also created a pull request.