[Bug 1803179]

2020-02-09 Thread daniel.gomme
(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
Bugs, which is subscribed to 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

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1803179]

2020-02-09 Thread daniel.gomme
(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
Bugs, which is subscribed to 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

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1803179]

2020-02-09 Thread daniel.gomme
(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
Bugs, which is subscribed to 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

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1803179]

2020-02-09 Thread daniel.gomme
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
Bugs, which is subscribed to 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

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs