jakeday / linux-surface

Linux Kernel for Surface Devices
2.59k stars 242 forks source link

Question: How is it to undock Surface Book 2? #534

Open han-so1omon opened 5 years ago

han-so1omon commented 5 years ago

Does this work fluidly with discrete graphics enabled? Can it be re-docked easily? What are common problems? How frequently do they occur?

qzed commented 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:

han-so1omon commented 5 years ago

So the switch is seamless with the above additions, then? Or is it necessary to choose dGPU after startup?

qzed commented 5 years ago

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).

han-so1omon commented 5 years ago

dgpu is in the base, right?

qzed commented 5 years ago

Yes

han-so1omon commented 5 years ago

so it will need to be disabled before undocking manually, yes?

qzed commented 5 years ago

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.

han-so1omon commented 5 years ago

ok cool. this all seems quite simple. i think i will try to use the surface book 2 with arch linux

qzed commented 5 years ago

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).

han-so1omon commented 5 years ago

ok wifi issue might be pretty huge, especially if it is a firmware bug. do you use this computer as a daily driver?

versipellis commented 5 years ago

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.

versipellis commented 5 years ago

@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.

han-so1omon commented 5 years ago

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"?

qzed commented 5 years ago

@versipellis PR is on my TODO list, I hope I can get to that soon.

han-so1omon commented 5 years ago

What are recommended desktop environments? i like lightweight environments generally