[Ubuntu-x-swat] [Bug 1803179]
since this bug is fixed in nouveau and the last responses here are all related to the nvidia driver can we close this bug? If people are having issues with the nvidia driver they should contact Nvidia about it. Anyway, removing myself from CC due to the noise. -- You received this bug notification because you are a member of Ubuntu-X, which is subscribed to nvidia-graphics-drivers-390 in Ubuntu. https://bugs.launchpad.net/bugs/1803179 Title: System does not reliably come out of suspend To manage notifications about this bug go to: https://bugs.launchpad.net/linux/+bug/1803179/+subscriptions ___ Mailing list: https://launchpad.net/~ubuntu-x-swat Post to : ubuntu-x-swat@lists.launchpad.net Unsubscribe : https://launchpad.net/~ubuntu-x-swat More help : https://help.launchpad.net/ListHelp
[Ubuntu-x-swat] [Bug 1803179]
(In reply to Ranjith Hegde from comment #172) > New problems in an old thread > > After using @Matthias Fulz's method (bumblebee without bbswitch + pm with > powertop+tlp) its quite simple to run any software requiring nvidia. with > his patch. > > The problem is in preventing any other software from using nvidia when not > run with optirun/primusrun. For example, any software that calls for EGL > automatically turns on nvidia. Mpv is one of those. > > Is there any way to ensure EGL calls intel instead? There is solution in > arch wiki with env-variable > "__EGL_VENDOR_LIBRARY_FILENAMES="/usr/share/glvnd/egl_vendor.d/50_mesa.json" > " > > but it does not work. I have tried adding it in all possible places > (/etc/environment, /etc/profile, bash-profile, zsh-profile-equivalent etc..) Hey, I was also struggling with those problems. What I do is that instead of removing the nvidia-audio from the PCIe Bus, I remove the nvidia card: % cat /usr/local/bin/remove_nvidia #!/usr/bin/bash echo 1 > /sys/bus/pci/devices/:01:00.1/remove echo 1 > /sys/bus/pci/devices/:01:00.0/remove I do this at boot via systemd. There is a post earlier that describes how to do it. You should also make sure that the nvidia modules are not loaded (should be taken care if you use bumblebee). In order to re-enable the nvidia card when you need it, use: % cat /usr/local/bin/add_nvidia #!/usr/bin/env bash echo 1 > /sys/bus/pci/rescan You can modify your bumbleebee/optimus/primus scripts accordingly. -- You received this bug notification because you are a member of Ubuntu-X, which is subscribed to nvidia-graphics-drivers-390 in Ubuntu. https://bugs.launchpad.net/bugs/1803179 Title: System does not reliably come out of suspend To manage notifications about this bug go to: https://bugs.launchpad.net/linux/+bug/1803179/+subscriptions ___ Mailing list: https://launchpad.net/~ubuntu-x-swat Post to : ubuntu-x-swat@lists.launchpad.net Unsubscribe : https://launchpad.net/~ubuntu-x-swat More help : https://help.launchpad.net/ListHelp
[Ubuntu-x-swat] [Bug 1803179]
(In reply to Karol Herbst from comment #169) > (In reply to xxxaaa from comment #168) > > (In reply to Karol Herbst from comment #167) > > > btw, this bug should be fixed with the nouveau river in 5.7 (and > backports > > > should follow soon for 5.4, 5.5 and 5.6) > > > > I have similar issue https://bugzilla.kernel.org/show_bug.cgi?id=206727 but > > I use NVIDIA PRIME driver. Will your bugfix work for that too or does it > > work only for nouveau drivers? > > the fix is for Nouveau only, but I am actually in contact with Nvidia about > the same issue they have inside their driver as well. > > But the bug can be fixed from within the open source files inside the nvidia > driver as well I just hope that Nvidia will have a proper solution here as > the fix in Nouveau is also more of a workaround than a real fix. (Sorry for being impatient but this bug has been bugging me a lot.) Do you know if this has been fixed on Nvidia Drivers yet or not? And if it has not been fixed then whether it is on their roadmap or not? -- You received this bug notification because you are a member of Ubuntu-X, which is subscribed to nvidia-graphics-drivers-390 in Ubuntu. https://bugs.launchpad.net/bugs/1803179 Title: System does not reliably come out of suspend To manage notifications about this bug go to: https://bugs.launchpad.net/linux/+bug/1803179/+subscriptions ___ Mailing list: https://launchpad.net/~ubuntu-x-swat Post to : ubuntu-x-swat@lists.launchpad.net Unsubscribe : https://launchpad.net/~ubuntu-x-swat More help : https://help.launchpad.net/ListHelp
[Ubuntu-x-swat] [Bug 1803179]
(In reply to Karol Herbst from comment #174) > (In reply to xxxaaa from comment #173) > > (In reply to Karol Herbst from comment #169) > > > (In reply to xxxaaa from comment #168) > > > > (In reply to Karol Herbst from comment #167) > > > > > btw, this bug should be fixed with the nouveau river in 5.7 (and > > > backports > > > > > should follow soon for 5.4, 5.5 and 5.6) > > > > > > > > I have similar issue https://bugzilla.kernel.org/show_bug.cgi?id=206727 > > but > > > > I use NVIDIA PRIME driver. Will your bugfix work for that too or does > it > > > > work only for nouveau drivers? > > > > > > the fix is for Nouveau only, but I am actually in contact with Nvidia > about > > > the same issue they have inside their driver as well. > > > > > > But the bug can be fixed from within the open source files inside the > > nvidia > > > driver as well I just hope that Nvidia will have a proper solution here > as > > > the fix in Nouveau is also more of a workaround than a real fix. > > > > (Sorry for being impatient but this bug has been bugging me a lot.) > > Do you know if this has been fixed on Nvidia Drivers yet or not? And if it > > has not been fixed then whether it is on their roadmap or not? > > Afaik they do not and my attempts to get them to even reproduce the issue > failed... > > so I don't see it getting fixed any time soon and honestly, if I have to put > more time into it I might even stop caring as the fix we have for Nouveau is > good enough and appears to have resolved the issue for good. > > In case you are still plagued by it I suspect you might want to bring that > up to Nvidia directly and see if they get more motivated fixing it if they > get more reports. I had asked about it in the nvidia linux forums some time back but nothing came out of it either :( https://forums.developer.nvidia.com/t/bug-cant-change-power-state-from-d3cold-to-d0-config-space-inaccessible-stuck-at-boot/112912 Some time back you had said - > But the bug can be fixed from within the open source files inside the nvidia > driver So, can your nouveau patch be applied to nvidia driver as well? -- You received this bug notification because you are a member of Ubuntu-X, which is subscribed to nvidia-graphics-drivers-390 in Ubuntu. https://bugs.launchpad.net/bugs/1803179 Title: System does not reliably come out of suspend To manage notifications about this bug go to: https://bugs.launchpad.net/linux/+bug/1803179/+subscriptions ___ Mailing list: https://launchpad.net/~ubuntu-x-swat Post to : ubuntu-x-swat@lists.launchpad.net Unsubscribe : https://launchpad.net/~ubuntu-x-swat More help : https://help.launchpad.net/ListHelp
[Ubuntu-x-swat] [Bug 1803179]
(In reply to xxxaaa from comment #173) > (In reply to Karol Herbst from comment #169) > > (In reply to xxxaaa from comment #168) > > > (In reply to Karol Herbst from comment #167) > > > > btw, this bug should be fixed with the nouveau river in 5.7 (and > > backports > > > > should follow soon for 5.4, 5.5 and 5.6) > > > > > > I have similar issue https://bugzilla.kernel.org/show_bug.cgi?id=206727 > but > > > I use NVIDIA PRIME driver. Will your bugfix work for that too or does it > > > work only for nouveau drivers? > > > > the fix is for Nouveau only, but I am actually in contact with Nvidia about > > the same issue they have inside their driver as well. > > > > But the bug can be fixed from within the open source files inside the > nvidia > > driver as well I just hope that Nvidia will have a proper solution here as > > the fix in Nouveau is also more of a workaround than a real fix. > > (Sorry for being impatient but this bug has been bugging me a lot.) > Do you know if this has been fixed on Nvidia Drivers yet or not? And if it > has not been fixed then whether it is on their roadmap or not? Afaik they do not and my attempts to get them to even reproduce the issue failed... so I don't see it getting fixed any time soon and honestly, if I have to put more time into it I might even stop caring as the fix we have for Nouveau is good enough and appears to have resolved the issue for good. In case you are still plagued by it I suspect you might want to bring that up to Nvidia directly and see if they get more motivated fixing it if they get more reports. -- You received this bug notification because you are a member of Ubuntu-X, which is subscribed to nvidia-graphics-drivers-390 in Ubuntu. https://bugs.launchpad.net/bugs/1803179 Title: System does not reliably come out of suspend To manage notifications about this bug go to: https://bugs.launchpad.net/linux/+bug/1803179/+subscriptions ___ Mailing list: https://launchpad.net/~ubuntu-x-swat Post to : ubuntu-x-swat@lists.launchpad.net Unsubscribe : https://launchpad.net/~ubuntu-x-swat More help : https://help.launchpad.net/ListHelp
[Ubuntu-x-swat] [Bug 1803179]
New problems in an old thread After using @Matthias Fulz's method (bumblebee without bbswitch + pm with powertop+tlp) its quite simple to run any software requiring nvidia. with his patch. The problem is in preventing any other software from using nvidia when not run with optirun/primusrun. For example, any software that calls for EGL automatically turns on nvidia. Mpv is one of those. Is there any way to ensure EGL calls intel instead? There is solution in arch wiki with env-variable "__EGL_VENDOR_LIBRARY_FILENAMES="/usr/share/glvnd/egl_vendor.d/50_mesa.json" " but it does not work. I have tried adding it in all possible places (/etc/environment, /etc/profile, bash-profile, zsh-profile-equivalent etc..) -- You received this bug notification because you are a member of Ubuntu-X, which is subscribed to nvidia-graphics-drivers-390 in Ubuntu. https://bugs.launchpad.net/bugs/1803179 Title: System does not reliably come out of suspend To manage notifications about this bug go to: https://bugs.launchpad.net/linux/+bug/1803179/+subscriptions ___ Mailing list: https://launchpad.net/~ubuntu-x-swat Post to : ubuntu-x-swat@lists.launchpad.net Unsubscribe : https://launchpad.net/~ubuntu-x-swat More help : https://help.launchpad.net/ListHelp
[Ubuntu-x-swat] [Bug 1803179] Re: System does not reliably come out of suspend
** Bug watch added: Linux Kernel Bug Tracker #206727 https://bugzilla.kernel.org/show_bug.cgi?id=206727 -- You received this bug notification because you are a member of Ubuntu-X, which is subscribed to nvidia-graphics-drivers-390 in Ubuntu. https://bugs.launchpad.net/bugs/1803179 Title: System does not reliably come out of suspend To manage notifications about this bug go to: https://bugs.launchpad.net/linux/+bug/1803179/+subscriptions ___ Mailing list: https://launchpad.net/~ubuntu-x-swat Post to : ubuntu-x-swat@lists.launchpad.net Unsubscribe : https://launchpad.net/~ubuntu-x-swat More help : https://help.launchpad.net/ListHelp
[Ubuntu-x-swat] [Bug 1803179]
(In reply to xxxaaa from comment #168) > (In reply to Karol Herbst from comment #167) > > btw, this bug should be fixed with the nouveau river in 5.7 (and backports > > should follow soon for 5.4, 5.5 and 5.6) > > I have similar issue https://bugzilla.kernel.org/show_bug.cgi?id=206727 but > I use NVIDIA PRIME driver. Will your bugfix work for that too or does it > work only for nouveau drivers? the fix is for Nouveau only, but I am actually in contact with Nvidia about the same issue they have inside their driver as well. But the bug can be fixed from within the open source files inside the nvidia driver as well I just hope that Nvidia will have a proper solution here as the fix in Nouveau is also more of a workaround than a real fix. -- You received this bug notification because you are a member of Ubuntu-X, which is subscribed to nvidia-graphics-drivers-390 in Ubuntu. https://bugs.launchpad.net/bugs/1803179 Title: System does not reliably come out of suspend To manage notifications about this bug go to: https://bugs.launchpad.net/linux/+bug/1803179/+subscriptions ___ Mailing list: https://launchpad.net/~ubuntu-x-swat Post to : ubuntu-x-swat@lists.launchpad.net Unsubscribe : https://launchpad.net/~ubuntu-x-swat More help : https://help.launchpad.net/ListHelp
[Ubuntu-x-swat] [Bug 1803179]
(In reply to Karol Herbst from comment #167) > btw, this bug should be fixed with the nouveau river in 5.7 (and backports > should follow soon for 5.4, 5.5 and 5.6) I have similar issue https://bugzilla.kernel.org/show_bug.cgi?id=206727 but I use NVIDIA PRIME driver. Will your bugfix work for that too or does it work only for nouveau drivers? -- You received this bug notification because you are a member of Ubuntu-X, which is subscribed to nvidia-graphics-drivers-390 in Ubuntu. https://bugs.launchpad.net/bugs/1803179 Title: System does not reliably come out of suspend To manage notifications about this bug go to: https://bugs.launchpad.net/linux/+bug/1803179/+subscriptions ___ Mailing list: https://launchpad.net/~ubuntu-x-swat Post to : ubuntu-x-swat@lists.launchpad.net Unsubscribe : https://launchpad.net/~ubuntu-x-swat More help : https://help.launchpad.net/ListHelp
[Ubuntu-x-swat] [Bug 1803179]
(In reply to Kai-Heng Feng from comment #170) > Karol Herbst, > > Is it fixed by removing the OSI vendor strings? should be, yes. -- You received this bug notification because you are a member of Ubuntu-X, which is subscribed to nvidia-graphics-drivers-390 in Ubuntu. https://bugs.launchpad.net/bugs/1803179 Title: System does not reliably come out of suspend To manage notifications about this bug go to: https://bugs.launchpad.net/linux/+bug/1803179/+subscriptions ___ Mailing list: https://launchpad.net/~ubuntu-x-swat Post to : ubuntu-x-swat@lists.launchpad.net Unsubscribe : https://launchpad.net/~ubuntu-x-swat More help : https://help.launchpad.net/ListHelp
[Ubuntu-x-swat] [Bug 1803179]
Karol Herbst, Is it fixed by removing the OSI vendor strings? -- You received this bug notification because you are a member of Ubuntu-X, which is subscribed to nvidia-graphics-drivers-390 in Ubuntu. https://bugs.launchpad.net/bugs/1803179 Title: System does not reliably come out of suspend To manage notifications about this bug go to: https://bugs.launchpad.net/linux/+bug/1803179/+subscriptions ___ Mailing list: https://launchpad.net/~ubuntu-x-swat Post to : ubuntu-x-swat@lists.launchpad.net Unsubscribe : https://launchpad.net/~ubuntu-x-swat More help : https://help.launchpad.net/ListHelp
[Ubuntu-x-swat] [Bug 1803179]
btw, this bug should be fixed with the nouveau river in 5.7 (and backports should follow soon for 5.4, 5.5 and 5.6) -- You received this bug notification because you are a member of Ubuntu-X, which is subscribed to nvidia-graphics-drivers-390 in Ubuntu. https://bugs.launchpad.net/bugs/1803179 Title: System does not reliably come out of suspend To manage notifications about this bug go to: https://bugs.launchpad.net/linux/+bug/1803179/+subscriptions ___ Mailing list: https://launchpad.net/~ubuntu-x-swat Post to : ubuntu-x-swat@lists.launchpad.net Unsubscribe : https://launchpad.net/~ubuntu-x-swat More help : https://help.launchpad.net/ListHelp
[Ubuntu-x-swat] [Bug 1803179]
(In reply to Matthias Fulz from comment #165) > (In reply to Ranjith Hegde from comment #164) > > (In reply to Matthias Fulz from comment #161) > > > > Hello, > > Thank you for your patch and effort. I tried your primusrun patch. First I > > get an infinite repetitions of this > > /bin/bash: warning: shell level (1000) too high, resetting to 1 > > > Ok this is NOT a patch :) > It's just a simple script to run optirun / primusrun encapsulated to load > and unload the nvidia module. > > > and when I stop (C-c) I get an infinite loop of this > > > > rmmod: ERROR: Module nvidia is not currently loaded > > finished. > > unloading nvidia modules ... > > rmmod: ERROR: Module nvidia is not currently loaded > > finished. > > > > nothing launches.. > > Any ideas? > > > Yes: I'm quite sure you've got /usr/local/bin in your PATH and this before > the /usr/bin entry, where optirun / primusrun should be placed in. > > Two possible solutions: > > 1.) Change the lines primusrun $@ and optirun $@ to use the full path a.e. > /usr/bin/primusrun $@ instead of primusrun $@ > > 2.) Rename the scripts to something like /usr/local/bin/primusrun.sh and > /usr/local/bin/optirun.sh > > Second solution will avoid any naming clushes for sure. > > Hope that helps > > BR, > Matthias Thank you for your reply! Firstly about the naming hickup. I am from computer music background and any piece of code is referred to as a patch. I know its quite different in shell scripting or general programming world. my bad I tried your second solution of using .sh and running it after I close all programs running on Nvidia. it works. Thanks If I were to place your script (!) directly inside usr/bin/primusrun then where would you suggest I put it. here's how it looks, unedited #!/bin/bash # Readback-display synchronization method # 0: no sync, 1: D lags behind one frame, 2: fully synced # export PRIMUS_SYNC=${PRIMUS_SYNC:-0} # Verbosity level # 0: only errors, 1: warnings (default), 2: profiling # export PRIMUS_VERBOSE=${PRIMUS_VERBOSE:-1} # Upload/display method # 0: autodetect, 1: textures, 2: PBO/glDrawPixels (needs Mesa-10.1+) # export PRIMUS_UPLOAD=${PRIMUS_UPLOAD:-0} # Approximate sleep ratio in the readback thread, percent # export PRIMUS_SLEEP=${PRIMUS_SLEEP:-90} # Secondary display # export PRIMUS_DISPLAY=${PRIMUS_DISPLAY:-:8} # "Accelerating" libGL # $LIB will be interpreted by the dynamic linker # export PRIMUS_libGLa=${PRIMUS_libGLa:-'/usr/$LIB/nvidia/libGL.so.1'} # "Displaying" libGL # export PRIMUS_libGLd=${PRIMUS_libGLd:-'/usr/$LIB/libGL.so.1'} # Directory containing primus libGL PRIMUS_libGL=/usr/\$LIB/primus # On some distributions, e.g. on Ubuntu, libnvidia-tls.so is not available # in default search paths. Add its path manually after the primus library # PRIMUS_libGL=${PRIMUS_libGL}:/usr/lib/nvidia-current:/usr/lib32/nvidia-current # Mesa drivers need a few symbols to be visible # export PRIMUS_LOAD_GLOBAL=${PRIMUS_LOAD_GLOBAL:-'libglapi.so.0'} # Need functions from primus libGL to take precedence export LD_LIBRARY_PATH=${PRIMUS_libGL}${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} # And go! export __GLVND_DISALLOW_PATCHING=1 exec "$@" -- You received this bug notification because you are a member of Ubuntu-X, which is subscribed to nvidia-graphics-drivers-390 in Ubuntu. https://bugs.launchpad.net/bugs/1803179 Title: System does not reliably come out of suspend To manage notifications about this bug go to: https://bugs.launchpad.net/linux/+bug/1803179/+subscriptions ___ Mailing list: https://launchpad.net/~ubuntu-x-swat Post to : ubuntu-x-swat@lists.launchpad.net Unsubscribe : https://launchpad.net/~ubuntu-x-swat More help : https://help.launchpad.net/ListHelp
[Ubuntu-x-swat] [Bug 1803179]
(In reply to Ranjith Hegde from comment #164) > (In reply to Matthias Fulz from comment #161) > > Hello, > Thank you for your patch and effort. I tried your primusrun patch. First I > get an infinite repetitions of this > /bin/bash: warning: shell level (1000) too high, resetting to 1 > Ok this is NOT a patch :) It's just a simple script to run optirun / primusrun encapsulated to load and unload the nvidia module. > and when I stop (C-c) I get an infinite loop of this > > rmmod: ERROR: Module nvidia is not currently loaded > finished. > unloading nvidia modules ... > rmmod: ERROR: Module nvidia is not currently loaded > finished. > > nothing launches.. > Any ideas? > Yes: I'm quite sure you've got /usr/local/bin in your PATH and this before the /usr/bin entry, where optirun / primusrun should be placed in. Two possible solutions: 1.) Change the lines primusrun $@ and optirun $@ to use the full path a.e. /usr/bin/primusrun $@ instead of primusrun $@ 2.) Rename the scripts to something like /usr/local/bin/primusrun.sh and /usr/local/bin/optirun.sh Second solution will avoid any naming clushes for sure. Hope that helps BR, Matthias -- You received this bug notification because you are a member of Ubuntu-X, which is subscribed to nvidia-graphics-drivers-390 in Ubuntu. https://bugs.launchpad.net/bugs/1803179 Title: System does not reliably come out of suspend To manage notifications about this bug go to: https://bugs.launchpad.net/linux/+bug/1803179/+subscriptions ___ Mailing list: https://launchpad.net/~ubuntu-x-swat Post to : ubuntu-x-swat@lists.launchpad.net Unsubscribe : https://launchpad.net/~ubuntu-x-swat More help : https://help.launchpad.net/ListHelp
[Ubuntu-x-swat] [Bug 1803179]
(In reply to Matthias Fulz from comment #161) > I'm just using bumblebee and do not blacklist nvidia modules. > > This is my /etc/bumblebee/xorg.conf.nvidia > > Section "ServerLayout" > Identifier "Layout0" > Option "AutoAddDevices" "true" > Option "AutoAddGPU" "false" > EndSection > > Section "Device" > Identifier "DiscreteNvidia" > Driver "nvidia" > VendorName "NVIDIA Corporation" > > > Option "NoLogo" "true" > Option "UseEDID" "false" > Option "AllowEmptyInitialConfiguration" > EndSection > > Section "Screen" > Identifier "Screen0" > Device "DiscreteNvidia" > EndSection > > And I'm just using an additional systemd service for powertop > /etc/systemd/system/powertop.service: > > [Unit] > Description=PowerTOP auto tune > > [Service] > Type=idle > Environment="TERM=dumb" > ExecStart=/usr/bin/bash -c "sleep 30 && /usr/bin/powertop --auto-tune && > sleep 10 && echo 'on' > '/sys/bus/usb/devices/1-1/power/control'" > > [Install] > WantedBy=multi-user.target > > Then I've everything ready and can use: > primusrun > optirum > > for nvidia GPU stuff. For the unloading of the modules after the use I'm > using the following scripts: > > /usr/local/bin/primusrun > > #!/bin/bash > > trap unload 1 2 3 6 > > unload() { > /usr/bin/lsmod | grep nvidia > /dev/null 2>&1 > if [ $? -eq 0 ] > then > echo "unloading nvidia modules ..." > sleep 2 > /usr/bin/lsmod | grep nvidia_modeset > /dev/null 2>&1 > if [ $? -eq 0 ] > then > sudo /usr/bin/rmmod nvidia_modeset > fi > sudo /usr/bin/rmmod nvidia > echo "finished." > fi > } > > primusrun $@ > unload > > /usr/local/bin/optirun > > #!/bin/bash > > trap unload 1 2 3 6 > > unload() { > /usr/bin/lsmod | grep nvidia > /dev/null 2>&1 > if [ $? -eq 0 ] > then > echo "unloading nvidia modules ..." > sleep 2 > /usr/bin/lsmod | grep nvidia_modeset > /dev/null 2>&1 > if [ $? -eq 0 ] > then > sudo /usr/bin/rmmod nvidia_modeset > fi > sudo /usr/bin/rmmod nvidia > echo "finished." > fi > } > > optirun $@ > unload > > That's it for me. > > In addition for powersavings I'm using TLP with quite default settings. > > Offloading inside the nvidia drivers is just not really helpful afaik :) > > Hope that helps. Hello, Thank you for your patch and effort. I tried your primusrun patch. First I get an infinite repetitions of this /bin/bash: warning: shell level (1000) too high, resetting to 1 and when I stop (C-c) I get an infinite loop of this rmmod: ERROR: Module nvidia is not currently loaded finished. unloading nvidia modules ... rmmod: ERROR: Module nvidia is not currently loaded finished. nothing launches.. Any ideas? I am on Arch, optimus laptop with intel coffeelake and RTX 2070 I have bumblebeed enabled with your recommended xorg.nvidia settings, using powertop pm to turn off Nvidia card which works fine -- You received this bug notification because you are a member of Ubuntu-X, which is subscribed to nvidia-graphics-drivers-390 in Ubuntu. https://bugs.launchpad.net/bugs/1803179 Title: System does not reliably come out of suspend To manage notifications about this bug go to: https://bugs.launchpad.net/linux/+bug/1803179/+subscriptions ___ Mailing list: https://launchpad.net/~ubuntu-x-swat Post to : ubuntu-x-swat@lists.launchpad.net Unsubscribe : https://launchpad.net/~ubuntu-x-swat More help : https://help.launchpad.net/ListHelp
[Ubuntu-x-swat] [Bug 1803179]
(In reply to Matthias Fulz from comment #161) > I'm just using bumblebee and do not blacklist nvidia modules. > > This is my /etc/bumblebee/xorg.conf.nvidia > > Section "ServerLayout" > Identifier "Layout0" > Option "AutoAddDevices" "true" > Option "AutoAddGPU" "false" > EndSection > > Section "Device" > Identifier "DiscreteNvidia" > Driver "nvidia" > VendorName "NVIDIA Corporation" > > > Option "NoLogo" "true" > Option "UseEDID" "false" > Option "AllowEmptyInitialConfiguration" > EndSection > > Section "Screen" > Identifier "Screen0" > Device "DiscreteNvidia" > EndSection > > And I'm just using an additional systemd service for powertop > /etc/systemd/system/powertop.service: > > [Unit] > Description=PowerTOP auto tune > > [Service] > Type=idle > Environment="TERM=dumb" > ExecStart=/usr/bin/bash -c "sleep 30 && /usr/bin/powertop --auto-tune && > sleep 10 && echo 'on' > '/sys/bus/usb/devices/1-1/power/control'" > > [Install] > WantedBy=multi-user.target > > Then I've everything ready and can use: > primusrun > optirum > > for nvidia GPU stuff. For the unloading of the modules after the use I'm > using the following scripts: > > /usr/local/bin/primusrun > > #!/bin/bash > > trap unload 1 2 3 6 > > unload() { > /usr/bin/lsmod | grep nvidia > /dev/null 2>&1 > if [ $? -eq 0 ] > then > echo "unloading nvidia modules ..." > sleep 2 > /usr/bin/lsmod | grep nvidia_modeset > /dev/null 2>&1 > if [ $? -eq 0 ] > then > sudo /usr/bin/rmmod nvidia_modeset > fi > sudo /usr/bin/rmmod nvidia > echo "finished." > fi > } > > primusrun $@ > unload > > /usr/local/bin/optirun > > #!/bin/bash > > trap unload 1 2 3 6 > > unload() { > /usr/bin/lsmod | grep nvidia > /dev/null 2>&1 > if [ $? -eq 0 ] > then > echo "unloading nvidia modules ..." > sleep 2 > /usr/bin/lsmod | grep nvidia_modeset > /dev/null 2>&1 > if [ $? -eq 0 ] > then > sudo /usr/bin/rmmod nvidia_modeset > fi > sudo /usr/bin/rmmod nvidia > echo "finished." > fi > } > > optirun $@ > unload > > That's it for me. > > In addition for powersavings I'm using TLP with quite default settings. > > Offloading inside the nvidia drivers is just not really helpful afaik :) > > Hope that helps. Cheers! I'll see what I can do there :) Thank you so much for all the help -- You received this bug notification because you are a member of Ubuntu-X, which is subscribed to nvidia-graphics-drivers-390 in Ubuntu. https://bugs.launchpad.net/bugs/1803179 Title: System does not reliably come out of suspend To manage notifications about this bug go to: https://bugs.launchpad.net/linux/+bug/1803179/+subscriptions ___ Mailing list: https://launchpad.net/~ubuntu-x-swat Post to : ubuntu-x-swat@lists.launchpad.net Unsubscribe : https://launchpad.net/~ubuntu-x-swat More help : https://help.launchpad.net/ListHelp
[Ubuntu-x-swat] [Bug 1803179]
(In reply to Matthias Fulz from comment #159) > Yep the problem is bbswitch. Just deinstall it, make sure the power mode for > nvidia gpu and hdmi sound are set to auto and unload the nvidia & > nvidia_modeset modules. > > bbswitch will still lead to the lockups, if used. Awesome! Blacklisting the modules, then setting runtime power management to auto for everything in powertop put the power usage down to about 8W. Loading the modules back up again manually puts the power usage back up, and unloading them back down, without having to use bbswitch at all. Do you know if it's possible to, with an X session that started up without the nvidia modules loaded, then turn those modules on and use that GPU with "__NV_PRIME_RENDER_OFFLOAD=1 __VK_LAYER_NV_optimus=NVIDIA_only __GLX_VENDOR_LIBRARY_NAME=nvidia "$@"" (the PRIME render offload in the recent drivers). I've so far not had any success :( -- You received this bug notification because you are a member of Ubuntu-X, which is subscribed to nvidia-graphics-drivers-390 in Ubuntu. https://bugs.launchpad.net/bugs/1803179 Title: System does not reliably come out of suspend To manage notifications about this bug go to: https://bugs.launchpad.net/linux/+bug/1803179/+subscriptions ___ Mailing list: https://launchpad.net/~ubuntu-x-swat Post to : ubuntu-x-swat@lists.launchpad.net Unsubscribe : https://launchpad.net/~ubuntu-x-swat More help : https://help.launchpad.net/ListHelp
[Ubuntu-x-swat] [Bug 1803179]
Additional information: The on is for my logitech receiver as it is annoying like hell when powersavings are enabled for it. Will need to move the mouse for 2s before it*s working again. And the sleep is needed to be able to have all the hardware available before powertop will change the modes. -- You received this bug notification because you are a member of Ubuntu-X, which is subscribed to nvidia-graphics-drivers-390 in Ubuntu. https://bugs.launchpad.net/bugs/1803179 Title: System does not reliably come out of suspend To manage notifications about this bug go to: https://bugs.launchpad.net/linux/+bug/1803179/+subscriptions ___ Mailing list: https://launchpad.net/~ubuntu-x-swat Post to : ubuntu-x-swat@lists.launchpad.net Unsubscribe : https://launchpad.net/~ubuntu-x-swat More help : https://help.launchpad.net/ListHelp
[Ubuntu-x-swat] [Bug 1803179]
I'm just using bumblebee and do not blacklist nvidia modules. This is my /etc/bumblebee/xorg.conf.nvidia Section "ServerLayout" Identifier "Layout0" Option "AutoAddDevices" "true" Option "AutoAddGPU" "false" EndSection Section "Device" Identifier "DiscreteNvidia" Driver "nvidia" VendorName "NVIDIA Corporation" Option "NoLogo" "true" Option "UseEDID" "false" Option "AllowEmptyInitialConfiguration" EndSection Section "Screen" Identifier "Screen0" Device "DiscreteNvidia" EndSection And I'm just using an additional systemd service for powertop /etc/systemd/system/powertop.service: [Unit] Description=PowerTOP auto tune [Service] Type=idle Environment="TERM=dumb" ExecStart=/usr/bin/bash -c "sleep 30 && /usr/bin/powertop --auto-tune && sleep 10 && echo 'on' > '/sys/bus/usb/devices/1-1/power/control'" [Install] WantedBy=multi-user.target Then I've everything ready and can use: primusrun optirum for nvidia GPU stuff. For the unloading of the modules after the use I'm using the following scripts: /usr/local/bin/primusrun #!/bin/bash trap unload 1 2 3 6 unload() { /usr/bin/lsmod | grep nvidia > /dev/null 2>&1 if [ $? -eq 0 ] then echo "unloading nvidia modules ..." sleep 2 /usr/bin/lsmod | grep nvidia_modeset > /dev/null 2>&1 if [ $? -eq 0 ] then sudo /usr/bin/rmmod nvidia_modeset fi sudo /usr/bin/rmmod nvidia echo "finished." fi } primusrun $@ unload /usr/local/bin/optirun #!/bin/bash trap unload 1 2 3 6 unload() { /usr/bin/lsmod | grep nvidia > /dev/null 2>&1 if [ $? -eq 0 ] then echo "unloading nvidia modules ..." sleep 2 /usr/bin/lsmod | grep nvidia_modeset > /dev/null 2>&1 if [ $? -eq 0 ] then sudo /usr/bin/rmmod nvidia_modeset fi sudo /usr/bin/rmmod nvidia echo "finished." fi } optirun $@ unload That's it for me. In addition for powersavings I'm using TLP with quite default settings. Offloading inside the nvidia drivers is just not really helpful afaik :) Hope that helps. -- You received this bug notification because you are a member of Ubuntu-X, which is subscribed to nvidia-graphics-drivers-390 in Ubuntu. https://bugs.launchpad.net/bugs/1803179 Title: System does not reliably come out of suspend To manage notifications about this bug go to: https://bugs.launchpad.net/linux/+bug/1803179/+subscriptions ___ Mailing list: https://launchpad.net/~ubuntu-x-swat Post to : ubuntu-x-swat@lists.launchpad.net Unsubscribe : https://launchpad.net/~ubuntu-x-swat More help : https://help.launchpad.net/ListHelp
[Ubuntu-x-swat] [Bug 1803179]
Yep the problem is bbswitch. Just deinstall it, make sure the power mode for nvidia gpu and hdmi sound are set to auto and unload the nvidia & nvidia_modeset modules. bbswitch will still lead to the lockups, if used. -- You received this bug notification because you are a member of Ubuntu-X, which is subscribed to nvidia-graphics-drivers-390 in Ubuntu. https://bugs.launchpad.net/bugs/1803179 Title: System does not reliably come out of suspend To manage notifications about this bug go to: https://bugs.launchpad.net/linux/+bug/1803179/+subscriptions ___ Mailing list: https://launchpad.net/~ubuntu-x-swat Post to : ubuntu-x-swat@lists.launchpad.net Unsubscribe : https://launchpad.net/~ubuntu-x-swat More help : https://help.launchpad.net/ListHelp
[Ubuntu-x-swat] [Bug 1803179]
(In reply to Matthias Fulz from comment #157) > Yep the actual arch kernel is working fine here, including these patches: > Linux omega 5.5.2-arch1-1 #1 SMP PREEMPT Tue, 04 Feb 2020 18:56:18 + > x86_64 GNU/Linux > > Best Powerconsumption so far 6-7W normal working (wlan, 25% display, > browsing, etc.) > > No lockups anymore, using bumblebee (primusrun, optirun) just need to > manually unload the nvidia modules afterwards, which I've included in simple > scripts. > > Thanks at all for this :) I'm currently using the vanilla kernel and still run into the lockups I mentioned above. Do I need to apply patches myself? Or is it just the stuff I'm using (eg I only use bbswitch, on top of optimus-manager)? Sorry if this is a little asking the obvious, just had this problem for a while now and not sure how to deal with it. -- You received this bug notification because you are a member of Ubuntu-X, which is subscribed to nvidia-graphics-drivers-390 in Ubuntu. https://bugs.launchpad.net/bugs/1803179 Title: System does not reliably come out of suspend To manage notifications about this bug go to: https://bugs.launchpad.net/linux/+bug/1803179/+subscriptions ___ Mailing list: https://launchpad.net/~ubuntu-x-swat Post to : ubuntu-x-swat@lists.launchpad.net Unsubscribe : https://launchpad.net/~ubuntu-x-swat More help : https://help.launchpad.net/ListHelp
[Ubuntu-x-swat] [Bug 1803179]
Yep the actual arch kernel is working fine here, including these patches: Linux omega 5.5.2-arch1-1 #1 SMP PREEMPT Tue, 04 Feb 2020 18:56:18 + x86_64 GNU/Linux Best Powerconsumption so far 6-7W normal working (wlan, 25% display, browsing, etc.) No lockups anymore, using bumblebee (primusrun, optirun) just need to manually unload the nvidia modules afterwards, which I've included in simple scripts. Thanks at all for this :) -- You received this bug notification because you are a member of Ubuntu-X, which is subscribed to nvidia-graphics-drivers-390 in Ubuntu. https://bugs.launchpad.net/bugs/1803179 Title: System does not reliably come out of suspend To manage notifications about this bug go to: https://bugs.launchpad.net/linux/+bug/1803179/+subscriptions ___ Mailing list: https://launchpad.net/~ubuntu-x-swat Post to : ubuntu-x-swat@lists.launchpad.net Unsubscribe : https://launchpad.net/~ubuntu-x-swat More help : https://help.launchpad.net/ListHelp
[Ubuntu-x-swat] [Bug 1803179]
Are these patches included in kernel 5.5.2? I blacklist nvidia modules on boot, and "echo 'OFF' | sudo tee /proc/acpi/bbswitch" (which succeeds) followed by lspci also produces a freeze on my machine. Without the call to bbswitch, the freeze does not happen, but my idle power usage is at 25-30W, instead of the ~11 that occurs if I do invoke bbswitch. I'm running Arch, with the 5.5.2 kernel. Hardware is an Intel i7-8750H and NVidia GTX 1070M, and my kernel parameters are "root=/dev/nvme0n1p5 rw add_efi_memmap initrd=intel-ucode.img initrd=initramfs-%v.img nopti intel_iommu=on iommu=on sysrq_always_enabled=1". -- You received this bug notification because you are a member of Ubuntu-X, which is subscribed to nvidia-graphics-drivers-390 in Ubuntu. https://bugs.launchpad.net/bugs/1803179 Title: System does not reliably come out of suspend To manage notifications about this bug go to: https://bugs.launchpad.net/linux/+bug/1803179/+subscriptions ___ Mailing list: https://launchpad.net/~ubuntu-x-swat Post to : ubuntu-x-swat@lists.launchpad.net Unsubscribe : https://launchpad.net/~ubuntu-x-swat More help : https://help.launchpad.net/ListHelp
[Ubuntu-x-swat] [Bug 1803179]
ok I've found out that this difference seems to be gone when using tlp instead of laptop-mode-tools. Kernel 5.5-rc3 (including these patches) + Bumblebee and tlp provides me the full optimus usage + 8/9W power consumption on intel GPU. For me everything is working absolutely perfect now !!! :) -- You received this bug notification because you are a member of Ubuntu-X, which is subscribed to nvidia-graphics-drivers-390 in Ubuntu. https://bugs.launchpad.net/bugs/1803179 Title: System does not reliably come out of suspend To manage notifications about this bug go to: https://bugs.launchpad.net/linux/+bug/1803179/+subscriptions ___ Mailing list: https://launchpad.net/~ubuntu-x-swat Post to : ubuntu-x-swat@lists.launchpad.net Unsubscribe : https://launchpad.net/~ubuntu-x-swat More help : https://help.launchpad.net/ListHelp
[Ubuntu-x-swat] [Bug 1803179]
Ok after I removed the patches and the normal Kernel-Update to 5.3.11 happend, I'm experiencing the same higher power consumption that happend during the test before. It could be related to something else not the patches. But I'm unable to find out atm. where it comes from :( The pc is not going below 10W with 5.3.11 on 5.3.8 it drops to 7-8W. -- You received this bug notification because you are a member of Ubuntu-X, which is subscribed to nvidia-graphics-drivers-390 in Ubuntu. https://bugs.launchpad.net/bugs/1803179 Title: System does not reliably come out of suspend To manage notifications about this bug go to: https://bugs.launchpad.net/linux/+bug/1803179/+subscriptions ___ Mailing list: https://launchpad.net/~ubuntu-x-swat Post to : ubuntu-x-swat@lists.launchpad.net Unsubscribe : https://launchpad.net/~ubuntu-x-swat More help : https://help.launchpad.net/ListHelp
[Ubuntu-x-swat] [Bug 1803179]
More infos: powertop shows this when using intel gpu only (my workarounds from post https://bugzilla.kernel.org/show_bug.cgi?id=156341#c139) 0.0%PCI Device: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor PCIe Controller (x16) 0.0%PCI Device: Intel Corporation Cannon Lake PCH HECI Controller 0.0%PCI Device: NVIDIA Corporation GP107M [GeForce GTX 1050 Mobile] 0.0%PCI Device: Intel Corporation Cannon Lake PCH SPI Controller 0.0%PCI Device: Intel Corporation Cannon Lake PCH cAVS 0.0%PCI Device: NVIDIA Corporation GP107GL High Definition Audio Controller 0.0%PCI Device: Intel Corporation Cannon Lake PCH Shared SRAM 0.0%PCI Device: Intel Corporation Cannon Lake PCH SMBus Controller 0.0%PCI Device: Intel Corporation Cannon Lake PCH PCI Express Root Port #14 when using the patches with nvidia modules unloaded and power set to auto its still saying 100% -- You received this bug notification because you are a member of Ubuntu-X, which is subscribed to nvidia-graphics-drivers-390 in Ubuntu. https://bugs.launchpad.net/bugs/1803179 Title: System does not reliably come out of suspend To manage notifications about this bug go to: https://bugs.launchpad.net/linux/+bug/1803179/+subscriptions ___ Mailing list: https://launchpad.net/~ubuntu-x-swat Post to : ubuntu-x-swat@lists.launchpad.net Unsubscribe : https://launchpad.net/~ubuntu-x-swat More help : https://help.launchpad.net/ListHelp
[Ubuntu-x-swat] [Bug 1803179]
Of course I've set the power to auto for everything -- You received this bug notification because you are a member of Ubuntu-X, which is subscribed to nvidia-graphics-drivers-390 in Ubuntu. https://bugs.launchpad.net/bugs/1803179 Title: System does not reliably come out of suspend To manage notifications about this bug go to: https://bugs.launchpad.net/linux/+bug/1803179/+subscriptions ___ Mailing list: https://launchpad.net/~ubuntu-x-swat Post to : ubuntu-x-swat@lists.launchpad.net Unsubscribe : https://launchpad.net/~ubuntu-x-swat More help : https://help.launchpad.net/ListHelp
[Ubuntu-x-swat] [Bug 1803179]
I've tryed the patches and can confirm that the issues with lockups are gone with just using bumblebee (unloading nvidia module). But still the problems are the same: 1.) Just unloading the nvidia modules keeps the power consumption up to 13/14W which is 5-6W more (almoest double) in compare to intel only ~8W 2.) Using acpi call to poweroff the nvidia card completely which drops the power consumption to 8W the lockups are back. So for me the patches are not working :( -- You received this bug notification because you are a member of Ubuntu-X, which is subscribed to nvidia-graphics-drivers-390 in Ubuntu. https://bugs.launchpad.net/bugs/1803179 Title: System does not reliably come out of suspend To manage notifications about this bug go to: https://bugs.launchpad.net/linux/+bug/1803179/+subscriptions ___ Mailing list: https://launchpad.net/~ubuntu-x-swat Post to : ubuntu-x-swat@lists.launchpad.net Unsubscribe : https://launchpad.net/~ubuntu-x-swat More help : https://help.launchpad.net/ListHelp
[Ubuntu-x-swat] [Bug 1803179] Re: System does not reliably come out of suspend
on Which kernel (of the mainline) the patches are applied. Is it coming soon or I have to apply the patches myself. -- You received this bug notification because you are a member of Ubuntu-X, which is subscribed to nvidia-graphics-drivers-390 in Ubuntu. https://bugs.launchpad.net/bugs/1803179 Title: System does not reliably come out of suspend To manage notifications about this bug go to: https://bugs.launchpad.net/linux/+bug/1803179/+subscriptions ___ Mailing list: https://launchpad.net/~ubuntu-x-swat Post to : ubuntu-x-swat@lists.launchpad.net Unsubscribe : https://launchpad.net/~ubuntu-x-swat More help : https://help.launchpad.net/ListHelp
[Ubuntu-x-swat] [Bug 1803179]
(In reply to Kai-Heng Feng from comment #145) > Laptops with Skylake SoC and later shouldn't need bbswitch. PCIe port PM > will disable the power of the card. > After nvidia.ko gets unloaded, make sure "power/control" is "auto" for its > video (e.g. 01:00.0) and audio (e.g. 01:00.1) functions and its upstream > bridge (use lspci -t to check). > > In addition to that, these two commits are also required for mainline kernel > users: > https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/ > ?id=52525b7a3cf82adec5c6cf0ecbd23ff228badc94 > https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/ > ?id=bacd861452d2be86a4df341b12e32db7dac8021e I have an i7 8750H with a GTX 1050 Mobile. I applied these two patches on top of Linus' tree. After I switched all "power/control" to "auto", everything works now. Card powers down, suspend/resume works. Thank you for figuring this out. Before this I was getting lockups with bbswitch/acpi_call during boot. I had to do crazy workarounds to get away with this during early boot and suspend/resume. Those days are gone now! -- You received this bug notification because you are a member of Ubuntu-X, which is subscribed to nvidia-graphics-drivers-390 in Ubuntu. https://bugs.launchpad.net/bugs/1803179 Title: System does not reliably come out of suspend To manage notifications about this bug go to: https://bugs.launchpad.net/linux/+bug/1803179/+subscriptions ___ Mailing list: https://launchpad.net/~ubuntu-x-swat Post to : ubuntu-x-swat@lists.launchpad.net Unsubscribe : https://launchpad.net/~ubuntu-x-swat More help : https://help.launchpad.net/ListHelp
[Ubuntu-x-swat] [Bug 1803179] Re: System does not reliably come out of suspend
I have hp-spectre x360 i7-9750h, nvidia gtx 1650 I have the same issue. This is the first laptop that I have, which is not suitable for linux because of this issue. Any ideas when this issue will be fix for any kernel. -- You received this bug notification because you are a member of Ubuntu-X, which is subscribed to nvidia-graphics-drivers-390 in Ubuntu. https://bugs.launchpad.net/bugs/1803179 Title: System does not reliably come out of suspend To manage notifications about this bug go to: https://bugs.launchpad.net/linux/+bug/1803179/+subscriptions ___ Mailing list: https://launchpad.net/~ubuntu-x-swat Post to : ubuntu-x-swat@lists.launchpad.net Unsubscribe : https://launchpad.net/~ubuntu-x-swat More help : https://help.launchpad.net/ListHelp
[Ubuntu-x-swat] [Bug 1803179]
(In reply to Kai-Heng Feng from comment #145) > Laptops with Skylake SoC and later shouldn't need bbswitch. PCIe port PM > will disable the power of the card. > After nvidia.ko gets unloaded, make sure "power/control" is "auto" for its > video (e.g. 01:00.0) and audio (e.g. 01:00.1) functions and its upstream > bridge (use lspci -t to check). > > In addition to that, these two commits are also required for mainline kernel > users: > https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/ > ?id=52525b7a3cf82adec5c6cf0ecbd23ff228badc94 > https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/ > ?id=bacd861452d2be86a4df341b12e32db7dac8021e Ok I've a coffee lake and will go to try these two commits and report back. -- You received this bug notification because you are a member of Ubuntu-X, which is subscribed to nvidia-graphics-drivers-390 in Ubuntu. https://bugs.launchpad.net/bugs/1803179 Title: System does not reliably come out of suspend To manage notifications about this bug go to: https://bugs.launchpad.net/linux/+bug/1803179/+subscriptions ___ Mailing list: https://launchpad.net/~ubuntu-x-swat Post to : ubuntu-x-swat@lists.launchpad.net Unsubscribe : https://launchpad.net/~ubuntu-x-swat More help : https://help.launchpad.net/ListHelp
[Ubuntu-x-swat] [Bug 1803179]
(In reply to Matthias Fulz from comment #144) > Ok here are more tests: > > Disabling the audio part with your suggestion ist working. > No NVIDIA audio in powertop nor in lspci. > > Your solution is basically loading / unloading the nvidia modul now, which > indeed is working, but not the optimus part I think? Optimus IS working here, no problem at all. [snip] > For some users it might be fully ok to just use load / unload nvidia as it > make a difference for the power consumption. > > But for me it's around 1/3 missing runtime, which relly hurts me :) > > But perhaps you could try my workaround with two boot entries and check the > power consumption on your side, when running intel only? I will try this maybe tonight when I will have more time to spare. I too would be interested in gaining 20-30% battery life! But, then again, I wouldn't want to have to reboot to be able to use the dGPU (I use it for blender3d). > for me it's around 7-8W intel only and around 11W when using your workaround. > But again your solution is just not really disabling the nvidia card, > instead it's more like just not using it and let it stay in idle mode with > limited PM. Yes, and no... as far as I can see from my tests, it is not staying in idle mode, it is being fully powered down by the kernel when not in use, and fully powered up again when I use optirun. -- You received this bug notification because you are a member of Ubuntu-X, which is subscribed to nvidia-graphics-drivers-390 in Ubuntu. https://bugs.launchpad.net/bugs/1803179 Title: System does not reliably come out of suspend To manage notifications about this bug go to: https://bugs.launchpad.net/linux/+bug/1803179/+subscriptions ___ Mailing list: https://launchpad.net/~ubuntu-x-swat Post to : ubuntu-x-swat@lists.launchpad.net Unsubscribe : https://launchpad.net/~ubuntu-x-swat More help : https://help.launchpad.net/ListHelp
[Ubuntu-x-swat] [Bug 1803179]
Laptops with Skylake SoC and later shouldn't need bbswitch. PCIe port PM will disable the power of the card. After nvidia.ko gets unloaded, make sure "power/control" is "auto" for its video (e.g. 01:00.0) and audio (e.g. 01:00.1) functions and its upstream bridge (use lspci -t to check). In addition to that, these two commits are also required for mainline kernel users: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=52525b7a3cf82adec5c6cf0ecbd23ff228badc94 https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=bacd861452d2be86a4df341b12e32db7dac8021e -- You received this bug notification because you are a member of Ubuntu-X, which is subscribed to nvidia-graphics-drivers-390 in Ubuntu. https://bugs.launchpad.net/bugs/1803179 Title: System does not reliably come out of suspend To manage notifications about this bug go to: https://bugs.launchpad.net/linux/+bug/1803179/+subscriptions ___ Mailing list: https://launchpad.net/~ubuntu-x-swat Post to : ubuntu-x-swat@lists.launchpad.net Unsubscribe : https://launchpad.net/~ubuntu-x-swat More help : https://help.launchpad.net/ListHelp
[Ubuntu-x-swat] [Bug 1803179]
(In reply to Matthias Fulz from comment #143) > (In reply to arpie from comment #142) > > (In reply to Matthias Fulz from comment #141) > > > (In reply to arpie from comment #140) > > [snip] > > Ah I see. > Then I think this is basically somehow similar to my workaround using the > snd_hda_intel modul parameter. > The nvidia card will just be completely "powered off" by not using it in any > way (no module loaded) Yes, now I've read your workaround more closely, I think you're right it is basically achieving the same thing. > > I am sure that there must be a 'proper' solution where the correct ACPI > > commands are used to power off/on both the nvidia video and audio at the > > same time but finding such a solution is far beyond me... > > I think some ACPI / PM guys should definitly check the audio part of the GPU > as there could be some issues related to this bug. Judging by comment 145, they are already way ahead of us! -- You received this bug notification because you are a member of Ubuntu-X, which is subscribed to nvidia-graphics-drivers-390 in Ubuntu. https://bugs.launchpad.net/bugs/1803179 Title: System does not reliably come out of suspend To manage notifications about this bug go to: https://bugs.launchpad.net/linux/+bug/1803179/+subscriptions ___ Mailing list: https://launchpad.net/~ubuntu-x-swat Post to : ubuntu-x-swat@lists.launchpad.net Unsubscribe : https://launchpad.net/~ubuntu-x-swat More help : https://help.launchpad.net/ListHelp
[Ubuntu-x-swat] [Bug 1803179]
(In reply to Kai-Heng Feng from comment #145) Thank you very much for this optimistic-sounding info, Kai-Heng Feng. > Laptops with Skylake SoC and later shouldn't need bbswitch. PCIe port PM > will disable the power of the card. How do I check if I have Skylake SoC? I am actually currently using a modified bbswitch where I have disabled the acpi calls. The point of this is to force bumblebee to automatically load and unload the nvidia modules before and after using optirun. I suspect there is an easier way but for now this works for me. > After nvidia.ko gets unloaded, make sure "power/control" is "auto" for its > video (e.g. 01:00.0) and audio (e.g. 01:00.1) functions and its upstream > bridge (use lspci -t to check). I initially tried what you describe here but the audio part was preventing power management from happening because it was permanently flagged in use by the snd_hda_audio module. Hence my work-around. > In addition to that, these two commits are also required for mainline kernel > users: > https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/ > ?id=52525b7a3cf82adec5c6cf0ecbd23ff228badc94 > https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/ > ?id=bacd861452d2be86a4df341b12e32db7dac8021e I am not interested in attempting to compile the kernel so will wait for these two commits to make it into the stable release. Reading their descriptions, especially the second one, sounds like it is the perfect fix for what I am experiencing. -- You received this bug notification because you are a member of Ubuntu-X, which is subscribed to nvidia-graphics-drivers-390 in Ubuntu. https://bugs.launchpad.net/bugs/1803179 Title: System does not reliably come out of suspend To manage notifications about this bug go to: https://bugs.launchpad.net/linux/+bug/1803179/+subscriptions ___ Mailing list: https://launchpad.net/~ubuntu-x-swat Post to : ubuntu-x-swat@lists.launchpad.net Unsubscribe : https://launchpad.net/~ubuntu-x-swat More help : https://help.launchpad.net/ListHelp
[Ubuntu-x-swat] [Bug 1803179]
Ok here are more tests: Disabling the audio part with your suggestion ist working. No NVIDIA audio in powertop nor in lspci. Your solution is basically loading / unloading the nvidia modul now, which indeed is working, but not the optimus part I think? As soon as I try acpi the freeze is happening again after one or two times running lspci. And here the real problem starts: Just loading and afterwards unloading the nvidia module wakes up the card from the real disabled state. Even powertop telling 0% usage of the nvidia card my power consumption is not going below 11W again. So the issue here is: You're way is not triggering the real shutdown for the nvidia card as you're just unloading the module. The difference in using bbswitch (which leads to freezes for you as well) is that this will do the acpi calls and really powering down the card, which leads to the freezes... For some users it might be fully ok to just use load / unload nvidia as it make a difference for the power consumption. But for me it's around 1/3 missing runtime, which relly hurts me :) But perhaps you could try my workaround with two boot entries and check the power consumption on your side, when running intel only? for me it's around 7-8W intel only and around 11W when using your workaround. But again your solution is just not really disabling the nvidia card, instead it's more like just not using it and let it stay in idle mode with limited PM. -- You received this bug notification because you are a member of Ubuntu-X, which is subscribed to nvidia-graphics-drivers-390 in Ubuntu. https://bugs.launchpad.net/bugs/1803179 Title: System does not reliably come out of suspend To manage notifications about this bug go to: https://bugs.launchpad.net/linux/+bug/1803179/+subscriptions ___ Mailing list: https://launchpad.net/~ubuntu-x-swat Post to : ubuntu-x-swat@lists.launchpad.net Unsubscribe : https://launchpad.net/~ubuntu-x-swat More help : https://help.launchpad.net/ListHelp
[Ubuntu-x-swat] [Bug 1803179]
(In reply to arpie from comment #142) > (In reply to Matthias Fulz from comment #141) > > (In reply to arpie from comment #140) > [snip] > > > If I completely disable the audio card using : > > > echo 1 | sudo tee /sys/bus/pci/devices/:01:00.1/remove > > > > > > Then the system hangs are completely cured > > > > Not working for me. Still freezing with this. > > Any chance of more details? When and how is it freezing? Is it any > different from before? What are your machine/card details (looks like you > haven't posted these anywhere above)? > I've got a HP OMEN 15 with a nvidia GTX 1050 running archlinux > Also, are you absolutely sure you've disabled the audio card during boot > *before the kernel notices it is there*? The only reliable way I've found > to check if this is the case, is to run powertop, and look in the 'Device > Status' tab for listings of 'Audio codec hwX: nvidia'. If that is > showing up, then the nvidia sound card is still active and will cause hangs. > My solution only works if the audio card is removed/disabled before the > audio system initialises during boot (hence the WantedBy=sysinit.target in > my service file). > I've used your service file together with bumblebee and bbswitch. > I think I should have also mentioned that in order for the kernel to do the > PM, you need to do something like : > > echo auto | sudo tee /sys/bus/pci/devices/:01:00.0/power/control > > I have TLP installed, which does this for me. > Ok this step was missing. > Now a few days have passed, I admit I have had a few freezes when using > bbswitch. But if I disable bbswitch and just use bumblebee with no power > management, all is well (so far). If I want to power down the nvidia GFX > card I just manually modprobe -r nvidia and the kernel does the rest. > Using this solution, I see a drop from about 20W to 10W when the card powers > off, with no ACPI calls at all (or, rather, none that I am aware of - I have > no idea what the kernel is actually doing behind the scenes). > Ah I see. Then I think this is basically somehow similar to my workaround using the snd_hda_intel modul parameter. The nvidia card will just be completely "powered off" by not using it in any way (no module loaded) > I am sure that there must be a 'proper' solution where the correct ACPI > commands are used to power off/on both the nvidia video and audio at the > same time but finding such a solution is far beyond me... I think some ACPI / PM guys should definitly check the audio part of the GPU as there could be some issues related to this bug. I will try it perhaps once again and give feedback here. But honestly these tests are really harmful for me because it happens very often that some files are truncated to zero during this crash randomly and I've to restore backups then... -- You received this bug notification because you are a member of Ubuntu-X, which is subscribed to nvidia-graphics-drivers-390 in Ubuntu. https://bugs.launchpad.net/bugs/1803179 Title: System does not reliably come out of suspend To manage notifications about this bug go to: https://bugs.launchpad.net/linux/+bug/1803179/+subscriptions ___ Mailing list: https://launchpad.net/~ubuntu-x-swat Post to : ubuntu-x-swat@lists.launchpad.net Unsubscribe : https://launchpad.net/~ubuntu-x-swat More help : https://help.launchpad.net/ListHelp
[Ubuntu-x-swat] [Bug 1803179]
(In reply to Matthias Fulz from comment #141) > (In reply to arpie from comment #140) [snip] > > If I completely disable the audio card using : > > echo 1 | sudo tee /sys/bus/pci/devices/:01:00.1/remove > > > > Then the system hangs are completely cured > > Not working for me. Still freezing with this. Any chance of more details? When and how is it freezing? Is it any different from before? What are your machine/card details (looks like you haven't posted these anywhere above)? Also, are you absolutely sure you've disabled the audio card during boot *before the kernel notices it is there*? The only reliable way I've found to check if this is the case, is to run powertop, and look in the 'Device Status' tab for listings of 'Audio codec hwX: nvidia'. If that is showing up, then the nvidia sound card is still active and will cause hangs. My solution only works if the audio card is removed/disabled before the audio system initialises during boot (hence the WantedBy=sysinit.target in my service file). I think I should have also mentioned that in order for the kernel to do the PM, you need to do something like : echo auto | sudo tee /sys/bus/pci/devices/:01:00.0/power/control I have TLP installed, which does this for me. Now a few days have passed, I admit I have had a few freezes when using bbswitch. But if I disable bbswitch and just use bumblebee with no power management, all is well (so far). If I want to power down the nvidia GFX card I just manually modprobe -r nvidia and the kernel does the rest. Using this solution, I see a drop from about 20W to 10W when the card powers off, with no ACPI calls at all (or, rather, none that I am aware of - I have no idea what the kernel is actually doing behind the scenes). I am sure that there must be a 'proper' solution where the correct ACPI commands are used to power off/on both the nvidia video and audio at the same time but finding such a solution is far beyond me... -- You received this bug notification because you are a member of Ubuntu-X, which is subscribed to nvidia-graphics-drivers-390 in Ubuntu. https://bugs.launchpad.net/bugs/1803179 Title: System does not reliably come out of suspend To manage notifications about this bug go to: https://bugs.launchpad.net/linux/+bug/1803179/+subscriptions ___ Mailing list: https://launchpad.net/~ubuntu-x-swat Post to : ubuntu-x-swat@lists.launchpad.net Unsubscribe : https://launchpad.net/~ubuntu-x-swat More help : https://help.launchpad.net/ListHelp
[Ubuntu-x-swat] [Bug 1803179]
(In reply to arpie from comment #140) > After hours of experimenting on this laptop : > > Computer : PC Specialist OptimusIX 15 (aka Clevo N8xxEP6) > BIOS : American Megatrends 1.07.13 > OS : Arch Linux > GPU : NVIDIA GTX 1060 Mobile > > Until recently, any attempt to use bumblebee or acpi commands to power down > the GPU have resulted in a system freeze with lspci, suspend, power cable > plug in, etc. No kernel line parameters seem to have any effect. > > I have discovered that the system freeze is closely linked to the > interaction between the nvidia graphics card on pci address :01:00.0 and > its associated sound card at pci address :01:00.1 (I don't actually > know what that sound card is doing - I presume it's for the HDMI port?) > > If I completely disable the audio card using : > echo 1 | sudo tee /sys/bus/pci/devices/:01:00.1/remove > > Then the system hangs are completely cured - I can acpi _OFF or _ON or _PS3 > or _PS0 to my hearts content and the gfx card will power up and down > perfectly, lspci behaves perfectly normally (without any lag), and > suspend/resume and power cable plug/unplug all works. Even better, kernel > power management on the PCI bus seems to work perfectly too, but only kicks > in when I rmmod nvidia. So far, bumblebee and bbswitch also seem to be > totally happy. > > Can anybody else confirm similar findings? > > Bear in mind that the audio card needs to be removed BEFORE the kernel loads > any audio modules. I do it like this : > > [Unit] > Description=Nvidia Audio Card OnBoot Disabler > Before=bumblebeed.service > > [Service] > Type=oneshot > RemainAfterExit=yes > ExecStart=/usr/bin/sh -c "echo 1 > /sys/bus/pci/devices/:01:00.1/remove" > ExecStop=/usr/bin/sh -c "echo 1 > /sys/bus/pci/rescan" > > [Install] > WantedBy=sysinit.target Not working for me. Still freezing with this. -- You received this bug notification because you are a member of Ubuntu-X, which is subscribed to nvidia-graphics-drivers-390 in Ubuntu. https://bugs.launchpad.net/bugs/1803179 Title: System does not reliably come out of suspend To manage notifications about this bug go to: https://bugs.launchpad.net/linux/+bug/1803179/+subscriptions ___ Mailing list: https://launchpad.net/~ubuntu-x-swat Post to : ubuntu-x-swat@lists.launchpad.net Unsubscribe : https://launchpad.net/~ubuntu-x-swat More help : https://help.launchpad.net/ListHelp
[Ubuntu-x-swat] [Bug 1803179]
After hours of experimenting on this laptop : Computer : PC Specialist OptimusIX 15 (aka Clevo N8xxEP6) BIOS : American Megatrends 1.07.13 OS : Arch Linux GPU : NVIDIA GTX 1060 Mobile Until recently, any attempt to use bumblebee or acpi commands to power down the GPU have resulted in a system freeze with lspci, suspend, power cable plug in, etc. No kernel line parameters seem to have any effect. I have discovered that the system freeze is closely linked to the interaction between the nvidia graphics card on pci address :01:00.0 and its associated sound card at pci address :01:00.1 (I don't actually know what that sound card is doing - I presume it's for the HDMI port?) If I completely disable the audio card using : echo 1 | sudo tee /sys/bus/pci/devices/:01:00.1/remove Then the system hangs are completely cured - I can acpi _OFF or _ON or _PS3 or _PS0 to my hearts content and the gfx card will power up and down perfectly, lspci behaves perfectly normally (without any lag), and suspend/resume and power cable plug/unplug all works. Even better, kernel power management on the PCI bus seems to work perfectly too, but only kicks in when I rmmod nvidia. So far, bumblebee and bbswitch also seem to be totally happy. Can anybody else confirm similar findings? Bear in mind that the audio card needs to be removed BEFORE the kernel loads any audio modules. I do it like this : [Unit] Description=Nvidia Audio Card OnBoot Disabler Before=bumblebeed.service [Service] Type=oneshot RemainAfterExit=yes ExecStart=/usr/bin/sh -c "echo 1 > /sys/bus/pci/devices/:01:00.1/remove" ExecStop=/usr/bin/sh -c "echo 1 > /sys/bus/pci/rescan" [Install] WantedBy=sysinit.target -- You received this bug notification because you are a member of Ubuntu-X, which is subscribed to nvidia-graphics-drivers-390 in Ubuntu. https://bugs.launchpad.net/bugs/1803179 Title: System does not reliably come out of suspend To manage notifications about this bug go to: https://bugs.launchpad.net/linux/+bug/1803179/+subscriptions ___ Mailing list: https://launchpad.net/~ubuntu-x-swat Post to : ubuntu-x-swat@lists.launchpad.net Unsubscribe : https://launchpad.net/~ubuntu-x-swat More help : https://help.launchpad.net/ListHelp
[Ubuntu-x-swat] [Bug 1803179]
If someone is interested in a workaround for using either nvidia or the intel card, I've worked out the following setup: One grub entry for intel only: modprobe.blacklist=nvidia_drm modprobe.blacklist=nvidia_modeset modprobe.blacklist=nvidia snd_hda_intel.enable=1,0,0 Adding the above parameters to grub and using just the intel GPU I'm able to run my omen laptop with 8-9W (25% Display brightness) which gives me around 7-8h :) Every other setup just goes with around 15W Second grub for using the nvidia together with the binary blob: I'm using the following grub parameter to tell that I want to use the discrete card: discretevga=y Therefore I've a shell script that checks for this cmdline param and activate the needed xorg conf: #!/bin/bash if [ -f /etc/X11/xorg.conf.d/20-nvidia.conf ] then rm /etc/X11/xorg.conf.d/20-nvidia.conf fi cat /proc/cmdline | grep 'discretevga' > /dev/null 2>&1 if [ $? -eq 0 ] then ln -s /usr/local/etc/x11-nvidia.conf /etc/X11/xorg.conf.d/20-nvidia.conf else rmmod nvidia_drm rmmod nvidia_modeset rmmod nvidia fi exit 0 here is the x11-nvidia.conf that I'm using: Section "Module" Load "modesetting" EndSection Section "Device" Identifier "Nvidia Card" Driver "nvidia" BusID "1:0:0" Option "AllowEmptyInitialConfiguration" EndSection Drawback is obviously the needed reboot, that is needed to switch between the cards, but at least I'm able to use really both on their own without any issue. And for me 90% of the time I'm just using the intel card, so most important is low power consumption. Hopefully this helps some of you guys ;) -- You received this bug notification because you are a member of Ubuntu-X, which is subscribed to nvidia-graphics-drivers-390 in Ubuntu. https://bugs.launchpad.net/bugs/1803179 Title: System does not reliably come out of suspend To manage notifications about this bug go to: https://bugs.launchpad.net/linux/+bug/1803179/+subscriptions ___ Mailing list: https://launchpad.net/~ubuntu-x-swat Post to : ubuntu-x-swat@lists.launchpad.net Unsubscribe : https://launchpad.net/~ubuntu-x-swat More help : https://help.launchpad.net/ListHelp
[Ubuntu-x-swat] [Bug 1803179] Re: System does not reliably come out of suspend
I can describe that on latest Ubutnu 18.04.3 LTS (Linux local 5.0.0-29-generic #31~18.04.1-Ubuntu SMP Thu Sep 12 18:29:21 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux) that there is following behavior for suspend (on HP Spectre x360 15"). - For Nvidia GPU Prime profile, the reliability of wake-up from suspend seems to be improved with recent updates, however there is issue with power draining and heating of the laptop. - When using the integrated Intel graphic by selecting it in PRIME profiles, the computer come out from suspend reliable, however there is the same issue, that the battery is draining and laptop temperature is becoming high while the laptop is suspended. The issue is present also with no peripherals connected, and during suspend the laptop fans are off, so the temperature of laptop is becoming quite high. -- You received this bug notification because you are a member of Ubuntu-X, which is subscribed to nvidia-graphics-drivers-390 in Ubuntu. https://bugs.launchpad.net/bugs/1803179 Title: System does not reliably come out of suspend To manage notifications about this bug go to: https://bugs.launchpad.net/linux/+bug/1803179/+subscriptions ___ Mailing list: https://launchpad.net/~ubuntu-x-swat Post to : ubuntu-x-swat@lists.launchpad.net Unsubscribe : https://launchpad.net/~ubuntu-x-swat More help : https://help.launchpad.net/ListHelp
[Ubuntu-x-swat] [Bug 1803179]
What's the current status on this bug, any reply/update on those patches? -- You received this bug notification because you are a member of Ubuntu-X, which is subscribed to nvidia-graphics-drivers-390 in Ubuntu. https://bugs.launchpad.net/bugs/1803179 Title: System does not reliably come out of suspend To manage notifications about this bug go to: https://bugs.launchpad.net/linux/+bug/1803179/+subscriptions ___ Mailing list: https://launchpad.net/~ubuntu-x-swat Post to : ubuntu-x-swat@lists.launchpad.net Unsubscribe : https://launchpad.net/~ubuntu-x-swat More help : https://help.launchpad.net/ListHelp