Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loginctl to change seat #25

Closed
justrobd opened this issue Nov 30, 2018 · 3 comments
Closed

Loginctl to change seat #25

justrobd opened this issue Nov 30, 2018 · 3 comments

Comments

@justrobd
Copy link

justrobd commented Nov 30, 2018

Hi, I was looking into different ways that don't necessarily consist of restarting the display-manager or restarting X. Specifically I was interested if it would be possible to use the loginctl command.

 loginctl attach [Seat Name] [Device...]   

According, to the loginctl's man page it is possible to attach the device like a graphics card to a specific seat. Then it is possible to use loginctl to flush the that device using

loginctl fluh-devices

I'm not sure how to exactly implement this myself. I thought maybe I can give you the idea and if you had time you can run with it. I'm will to try to do some testing if you need help or whatever. Let me know if I'm misinterpreting the use of loginctl.

@Askannz
Copy link
Owner

Askannz commented Dec 6, 2018

Sorry for the late reply.

So after reading your suggestion I experimented a bit with loginctl, and almost bricked my computer 😅

Turns out Linux is really not happy when you attach one of your GPUs to a different seat while using it. And apparently the change is persistent, so even after rebooting the computer, I couldn't use my GPU until I reattached it to the default seat. Be careful if you try it yourself.

Anyway, thank you for your suggestion. It's definitely an interesting feature that I didn't know about. But I don't think it could really help with Optimus. If I understand correctly, your idea is to have two seats and one GPU attached to each seat ?
That's not going to work because the built-in screen of your laptop is hardwired to the Intel GPU. So the Nvidia seat would need access to both GPUs, or else it wouldn't be able to render anything to the built-in screen.

It could work if you plug in an external monitor, though. Assuming both seats can use the same mouse and keyboard (or if you are willing to plug in additional ones). It'd essentially be like having two computers into one, which does not really offer an advantage over nvidia-xrun (aside from driver stability maybe).

@justrobd
Copy link
Author

Sorry to here that it almost bricked you computer. That really sucks. You got it right I was thinking starting two seats with one attached to the GPU. I keep forgetting that the display is hardwired to the Intel GPU. Well it was an idea that failed. I'm going to keep using optimus-manager anyways it seems to working really well for me. Thanks for the work on this project.

@Askannz
Copy link
Owner

Askannz commented Dec 11, 2018

Haha don't worry, it's not your fault. No damage done.

Well, closing this issue for now, thanks for your input.

@Askannz Askannz closed this as completed Dec 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants