bayasdev / envycontrol

Easy GPU switching for Nvidia Optimus laptops under Linux
MIT License
1.22k stars 62 forks source link

Fixes PCI bus not being found by regex in some laptops #39

Closed gsegalini closed 2 years ago

gsegalini commented 2 years ago

On my laptop the PCI bus printed by lspci for the Nvidia GPU is 2d:00.0 3D controller: NVIDIA and so the regex was not picking it up as it was searching only for base-10 numbers for the first 2 digits. Adding letters from a to f and changing the conversion from string to int to use base-16 made it work.