Skip to content
This repository has been archived by the owner on Oct 27, 2019. It is now read-only.

reboot required to switch on Ubuntu 17.10 #34

Open
Motherboard opened this issue May 14, 2018 · 19 comments
Open

reboot required to switch on Ubuntu 17.10 #34

Motherboard opened this issue May 14, 2018 · 19 comments

Comments

@Motherboard
Copy link

Using Ubuntu 17.10 with nvidia-390, Switching (either from intel to nvidia, or from nvidia to intel) no longer happens on logout, but requires fool restart.

The indicator asks to confirm logout, but does nothing. And manual logout results in a login loop.

After a restart the gpu is switched.. I wonder if that's an Ubuntu thing? Will switching to Mint 18.3 solve this problem?

@andrebrait
Copy link
Owner

As far as I can tell, that's a side effect of newer kernels alongside newer Nvidia drivers. Mint is the equivalent of goint back to Ubuntu 16.04 and using the default 4.4 kernel, so that might work for you.

@Motherboard
Copy link
Author

Motherboard commented May 14, 2018

Oh, I have to use the 4.13 kernel... So I guess I'm doomed :(

By the way, I read on nvidia dev talks that using systemctl restart display-manager after logout from the vterm resolves the restart issue.. Maybe you could add that to prime-indicator, if it detects the kernel\drivers are too new to just logout\login.

Edit: Maybe a better way would be to ditch prime-select altogether and use nvidia-xrun instead.

@andrebrait
Copy link
Owner

Wow, pretty cool. Thanks a lot. I haven't been having a lot of time to mess with this indicator.

I'll see if I can pinpoint to yoh the location to insert the systemctl restart command in the scripts to see if it works for you.

@Motherboard
Copy link
Author

I've got an update - the restart of the display manager is only needed for GDM (maybe also Gnome) - moved to Cinnamon and LightDM, and now it works fine!

@andrebrait
Copy link
Owner

andrebrait commented May 18, 2018 via email

@mmhobi7
Copy link

mmhobi7 commented May 19, 2018

nvidia-xrun hasn't seen an update in awhile, and it seems to be the successor to bumblebee not nvidia-prime. I see a future for it where nvidia works like it does on windows with optimus.

We could replace logout with sudo reboot or sudo systemctl restart display-manager

@mmhobi7
Copy link

mmhobi7 commented May 19, 2018

ok so sudo systemctl restart display-manager is slower then a reboot and didn't switch the graphics.

@Motherboard
Copy link
Author

Motherboard commented May 20, 2018

@aaahh restart display-manager was much faster than reboot on my machine, and it did switch the graphics.... And when I switched to lightDM, even this restart is not needed anymore.

My nvidia-prime version is 0.8.5, perhaps 0.8.8 in bionic beaver is the problem?

@andrebrait
Copy link
Owner

I have to take a proper look into this, but until September I can't promise anything...

What I would do to try and pinpoint the problem is to switch graphics using the NVIDIA's control panel and seeing what it takes to do so properly. Is it a reboot? Log out and then in? Restarting the display-manager? A combination of some of these?

My Indicator is basically a fancy icon in the tray + a script to run the switching without needing to sudo manually.

@mmhobi7
Copy link

mmhobi7 commented May 20, 2018

I am on 0.8.8,
canonical/nvidia-prime@d68b6cd
so can someone do cat /proc/acpi/bbswitch for me

also you were right on lighdm dependency,
canonical/nvidia-prime@675b307
https://launchpadlibrarian.net/366530048/nvidia-prime_0.8.7_0.8.8.diff.gz

the power of Nvidia is found at
/etc/prime-discrete

everywhere I'm reading a reboot is required for 390. I remember reading somewhere that the alternative is basically to restart everything which is effectively a soft-reboot

@Motherboard
Copy link
Author

Motherboard commented May 20, 2018

so can someone do cat /proc/acpi/bbswitch for me

I get
cat: /proc/acpi/bbswitch: No such file or directory

everywhere I'm reading a reboot is required for 390

I got nvidia 390.59-0ubuntu0~gpu17.10.1 with kernel 4.13.0-41-generic, and it work just fine with just login\logout with lightDM...

Using the nvidia-settings control panel to switch, as @andrebrait suggested also works for me with a simple login/logout.

@mmhobi7
Copy link

mmhobi7 commented May 20, 2018

Nvidia-settings tells me to "Please restart your computer to apply the changes"

It's the kernel, 4.15.0-21-generic
The change was in the kernel I think, I think 4.14 also works with just a logout and login
could you do a sudo cat /sys/kernel/debug/vgaswitcheroo/switch

@Motherboard
Copy link
Author

cat: /sys/kernel/debug/vgaswitcheroo/switch: No such file or directory

@mmhobi7
Copy link

mmhobi7 commented May 21, 2018

Make sure you have intel switched on

@Motherboard
Copy link
Author

Yes, I'm on the iGPU right now.

@mmhobi7
Copy link

mmhobi7 commented May 21, 2018

Well nvidia prime uses either vgaswicheroo or bbswitch, so I have no idea what is being used on your system, either way 0.8.8 and 4.15 brings switcheroo and requires reboot

@Motherboard
Copy link
Author

bbswitch has a problem loading on my system:

dmesg | grep bbswitch


[    4.205189] bbswitch: No suitable _DSM call found.
[30881.017388] bbswitch: version 0.8
[30881.017398] bbswitch: Found integrated VGA device 0000:00:02.0: \_SB_.PCI0.GFX0
[30881.017408] bbswitch: Found discrete VGA device 0000:01:00.0: \_SB_.PCI0.PEG0.PEGP
[30881.017436] bbswitch: failed to evaluate \_SB_.PCI0.PEG0.PEGP._DSM {0xF8,0xD8,0x86,0xA4,0xDA,0x0B,0x1B,0x47,0xA7,0x2B,0x60,0x42,0xA6,0xB5,0xBE,0xE0} 0x100 0x0 {0x00,0x00,0x00,0x00}: AE_NOT_FOUND
[30881.017454] bbswitch: failed to evaluate \_SB_.PCI0.PEG0.PEGP._DSM {0xA0,0xA0,0x95,0x9D,0x60,0x00,0x48,0x4D,0xB3,0x4D,0x7E,0x5F,0xEA,0x12,0x9F,0xD4} 0x102 0x0 {0x00,0x00,0x00,0x00}: AE_NOT_FOUND
[30881.017536] bbswitch: No suitable _DSM call found.
[30881.090336] bbswitch: version 0.8
[30881.090353] bbswitch: Found integrated VGA device 0000:00:02.0: \_SB_.PCI0.GFX0
[30881.090370] bbswitch: Found discrete VGA device 0000:01:00.0: \_SB_.PCI0.PEG0.PEGP
[30881.090407] bbswitch: failed to evaluate \_SB_.PCI0.PEG0.PEGP._DSM {0xA0,0xA0,0x95,0x9D,0x60,0x00,0x48,0x4D,0xB3,0x4D,0x7E,0x5F,0xEA,0x12,0x9F,0xD4} 0x102 0x0 {0x00,0x00,0x00,0x00}: AE_NOT_FOUND
[30881.090512] bbswitch: No suitable _DSM call found.

But I still switch with no problem...

@mmhobi7
Copy link

mmhobi7 commented May 21, 2018

Can you tell if your nvidia is on? Like extra heat? I’m guessing your graphics card is never turned off
cat /etc/prime-discrete

@Motherboard
Copy link
Author

sudo cat /etc/prime-discrete
off

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants