Open han-so1omon opened 5 years ago
Requires a bit of setup, but I've got it working pretty well overall. You will need to install a few things though:
For the dGPU: https://github.com/qzed/linux-surfacebook2-mshw0153 for disabling the dGPU by default/startup (otherwise it will get warm, even if you don't use it). I recommend also installing https://github.com/qzed/linux-surface-control for a convenient way to enable/disable it. You'll also need optimus for graphical applications (CUDA etc. where you can directly choose the GPU work without it). I'm using the proprietary nvidia driver, can't say anything about nouveau. You'll probably run into issues with the power management at some point: You will need to change the power profile (you can also do that via the surface-control tool) to get the full performance, however, it seems that on battery the dGPU is still limited quite a bit.
For detaching: Works fine out of the box (except if windows has not released the software-lock in which case the LED will stay red, a two-button reset will fix that), with the difference that it'll "time out" before unlocking. If you install https://github.com/qzed/linux-surface-dtx-daemon, the software-lock won't be an issue and it also will unlock immediately. Furthermore, you can use this to run a script before undocking the base (and also after docking). The script included by default will unmount all USB storage devices that you have connected (including sd-card). If you're using the dGPU a lot I'd also recommend adding a line to unload the dGPU driver.
So the switch is seamless with the above additions, then? Or is it necessary to choose dGPU after startup?
You can disable/enable the dGPU at runtime with the module installed, so you don't have to choose at start-up (except if you want to render the full desktop with it, in that case you either need to reboot or restart your desktop environment). You can do this by running sudo surface dgpu set on
and sudo surface dgpu set off
, additionall you need to load/unload the drivers (e.g. via sudo nvidia-modprobe
for the proprietary ones).
dgpu is in the base, right?
Yes
so it will need to be disabled before undocking manually, yes?
Not explicitly. From testing it seems to work fine without disabling it, as long as there are no applications using it. Although, as I've written above, I'd recommend (either manually or via the undock-script) to unload the driver before undocking. This will make sure that no application is using it (and fails if any is using it). From testing it also doesn't seem to make a difference if you disable the dGPU itself (e.g. via the surface
tool) although it would be a good idea to do this, just to be safe (again, you can modify the undock handler script to include both unloading modules and disabling the dGPU). Unloading the driver should be enough as if that succeeds, it guarantees that the dGPU cannot be in use any more.
ok cool. this all seems quite simple. i think i will try to use the surface book 2 with arch linux
Good luck! I think the detachment system and dGPU are working fairly well at the moment. There are some other issues you might encounter though: There seems to be an issue with suspend (see https://github.com/jakeday/linux-surface/issues/479, altough I can't reproduce that), and the WiFi issue (https://github.com/jakeday/linux-surface/issues/455, which I can reproduce on certain networks, but have no idea how to fix yet). Also cameras don't work yet (see https://github.com/jakeday/linux-surface/issues/145).
ok wifi issue might be pretty huge, especially if it is a firmware bug. do you use this computer as a daily driver?
I personally haven't run into the wifi issue, and the one time the network manager seems to stall after suspend, I have a bash script that just restarts it. I use my SB2 as a daily driver for work and research.
@qzed Have you considered submitting a PR for your surface control for the dGPU? Seems like a pretty integral part of the user experience with surface-linux.
I personally haven't run into the wifi issue, and the one time the network manager seems to stall after suspend, I have a bash script that just restarts it. I use my SB2 as a daily driver for work and research.
Please share any useful bash scripts. I hope to make this my daily driver as well. @versipellis What are your normal wifi speeds? Are you using the 13.5" or 15"?
@versipellis PR is on my TODO list, I hope I can get to that soon.
What are recommended desktop environments? i like lightweight environments generally
Does this work fluidly with discrete graphics enabled? Can it be re-docked easily? What are common problems? How frequently do they occur?