You are not logged in.
I was just pointing out the pattern that prime-switch somehow didn't seem to complete during SDDMs exit phase (with similar symptoms)
Did removing the vesa driver have any discernable impact?
Next time you try to switch the mode, after the logout try to run prime-switch from a different VT explicitly.
Also
I dont want PRIME offloading is my option because I want to switch between integrated and dedicated GPUs and do not want to use hybrid graphics.
Is not really an answer ("I don't want it because I don't want it") - are you dreaming about much longer battery runtime or stuff?
Edit: english…
Last edited by seth (2022-12-09 16:20:28)
Offline
I made a typo in that message
I meant "I dont think PRIME offloading is my option because..."
I know that there is an option to run programs that require dedicated GPU with prime-run, but at the end I just want to enable and disable nvidia GPU with a press of a button, because most of the time I don't use programs like this. But, when I do, I want them to automaticly start with the only available GPU. For instance, I'm having trouble launching Steam games from console.
Anyways, I just think that this is more comfortable this way.
So, back to the topic, I switched to nvidia and then to integrated mode back. A black screen occured so I switched to another virtual terminal, typed sudo prime-switch and here's the output:
[5] INFO: # Xorg pre-start hook
[5] INFO: Previous state was: {'type': 'pending_pre_xorg_start', 'requested_mode': 'integrated', 'current_mode': 'nvidia'}
[5] INFO: Requested mode is: integrated
[995] INFO: Available modules: ['nouveau', 'bbswitch', 'acpi_call', 'nvidia', 'nvidia_drm', 'nvidia_modeset', 'nvidia_uvm']
[995] INFO: Unloading modules ['nvidia_drm', 'nvidia_modeset', 'nvidia_uvm', 'nvidia'] (if loaded)
[998] INFO: Cannot unload modules: None
[998] INFO: Waiting 1s and retrying.
[2005] INFO: Cannot unload modules: None
[2005] INFO: Waiting 1s and retrying.
[3013] INFO: Cannot unload modules: None
[3013] INFO: Waiting 1s and retrying.
[4020] INFO: Cannot unload modules: None
[4020] INFO: Waiting 1s and retrying.
[5029] INFO: Cannot unload modules: None
[5029] INFO: Waiting 1s and retrying.
[6037] INFO: Max tries (6) exceeded
[6037] ERROR: Xorg pre-start setup error
Traceback (most recent call last):
File "/usr/lib/python3.10/site-packages/optimus_manager/kernel.py", line 269, in _unload_modules
subprocess.check_call(
File "/usr/lib/python3.10/subprocess.py", line 369, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command 'modprobe -r nvidia_drm nvidia_modeset nvidia_uvm nvidia' returned non-zero exit status 1.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/lib/python3.10/site-packages/optimus_manager/hooks/pre_xorg_start.py", line 51, in main
setup_kernel_state(config, prev_state, requested_mode)
File "/usr/lib/python3.10/site-packages/optimus_manager/kernel.py", line 25, in setup_kernel_state
_nvidia_down(config)
File "/usr/lib/python3.10/site-packages/optimus_manager/kernel.py", line 104, in _nvidia_down
_unload_nvidia_modules(available_modules)
File "/usr/lib/python3.10/site-packages/optimus_manager/kernel.py", line 214, in _unload_nvidia_modules
_unload_modules(available_modules, ["nvidia_drm", "nvidia_modeset", "nvidia_uvm", "nvidia"])
File "/usr/lib/python3.10/site-packages/optimus_manager/kernel.py", line 277, in _unload_modules
raise KernelSetupError(f"Cannot unload modules {modules_to_unload}: {e.stderr}") from e
optimus_manager.kernel.KernelSetupError: Cannot unload modules ['nvidia_drm', 'nvidia_modeset', 'nvidia_uvm', 'nvidia']: None
[6038] INFO: Removing /etc/X11/xorg.conf.d/10-optimus-manager.conf (if present)
[6038] INFO: Writing state {'type': 'pre_xorg_start_failed', 'switch_id': '20221209T192941', 'requested_mode': 'integrated'}
Thank you for your attention and patience, I really appreciate it
Offline
Well, it apparently fails to unload modules.
1. Did the explicit call lead to an effective switch?
2. What's the output of "lsmod" before and after that explicit call?
I want them to automaticly start with the only available GPU
So instead of altering their invocation (eg. by shadowing the binary w/ a script in /usr/local/bin) you click around to switch the GPU, log out and back in to apply that change and then "automatically" start the program on the GPU…?
Offline
I'm sorry, but what do you mean by 'explict call'? Running 'prime-switch' directly ?
Offline
Yes.
Offline
Initial mode: Integrated.
Explict call did not led to switch, even avter logging out and back in
lsmod before prime-run:
Module Size Used by
snd_usb_audio 397312 4
snd_usbmidi_lib 45056 1 snd_usb_audio
snd_rawmidi 49152 1 snd_usbmidi_lib
snd_seq_device 16384 1 snd_rawmidi
mc 73728 1 snd_usb_audio
usbhid 73728 0
tun 61440 2
uhid 20480 1
ccm 20480 9
rfcomm 90112 16
nvidia 61218816 24
cmac 16384 3
algif_hash 16384 1
algif_skcipher 16384 1
af_alg 36864 6 algif_hash,algif_skcipher
snd_sof_pci_intel_tgl 16384 0
intel_tcc_cooling 16384 0
nf_tables 286720 315
snd_sof_intel_hda_common 180224 1 snd_sof_pci_intel_tgl
x86_pkg_temp_thermal 20480 0
intel_powerclamp 20480 0
soundwire_intel 53248 1 snd_sof_intel_hda_common
libcrc32c 16384 1 nf_tables
soundwire_generic_allocation 16384 1 soundwire_intel
kvm_intel 389120 0
soundwire_cadence 45056 1 soundwire_intel
snd_sof_intel_hda 20480 1 snd_sof_intel_hda_common
nfnetlink 20480 1 nf_tables
snd_sof_pci 24576 2 snd_sof_intel_hda_common,snd_sof_pci_intel_tgl
snd_sof_xtensa_dsp 20480 1 snd_sof_intel_hda_common
kvm 1138688 1 kvm_intel
bnep 32768 2
irqbypass 16384 1 kvm
snd_sof 307200 2 snd_sof_pci,snd_sof_intel_hda_common
crct10dif_pclmul 16384 1
crc32_pclmul 16384 0
snd_sof_utils 20480 1 snd_sof
polyval_clmulni 16384 0
iTCO_wdt 16384 0
coretemp 20480 0
polyval_generic 16384 1 polyval_clmulni
snd_soc_hdac_hda 28672 1 snd_sof_intel_hda_common
joydev 28672 0
gf128mul 16384 1 polyval_generic
mousedev 24576 0
snd_hda_ext_core 36864 3 snd_sof_intel_hda_common,snd_soc_hdac_hda,snd_sof_intel_hda
intel_pmc_bxt 16384 1 iTCO_wdt
ghash_clmulni_intel 16384 0
iTCO_vendor_support 16384 1 iTCO_wdt
snd_soc_acpi_intel_match 73728 2 snd_sof_intel_hda_common,snd_sof_pci_intel_tgl
mei_hdcp 24576 0
mei_pxp 20480 0
snd_soc_acpi 16384 2 snd_soc_acpi_intel_match,snd_sof_intel_hda_common
aesni_intel 393216 10
soundwire_bus 126976 3 soundwire_intel,soundwire_generic_allocation,soundwire_cadence
iwlmvm 524288 0
r8169 102400 0
vfat 24576 1
crypto_simd 16384 1 aesni_intel
pmt_telemetry 16384 0
cryptd 24576 3 crypto_simd,ghash_clmulni_intel
hid_multitouch 32768 0
intel_rapl_msr 20480 0
pmt_class 16384 1 pmt_telemetry
fat 98304 1 vfat
snd_soc_core 393216 4 soundwire_intel,snd_sof,snd_sof_intel_hda_common,snd_soc_hdac_hda
intel_cstate 20480 0
realtek 36864 1
spi_nor 118784 0
btusb 65536 0
mdio_devres 16384 1 r8169
snd_compress 28672 1 snd_soc_core
mac80211 1298432 1 iwlmvm
intel_uncore 217088 0
snd_hda_codec_realtek 172032 1
i2c_i801 45056 0
ac97_bus 16384 1 snd_soc_core
wmi_bmof 16384 0
pcspkr 16384 0
mtd 90112 3 spi_nor
btrtl 28672 1 btusb
mei_me 53248 2
libarc4 16384 1 mac80211
i2c_smbus 20480 1 i2c_i801
snd_hda_codec_generic 98304 1 snd_hda_codec_realtek
snd_pcm_dmaengine 16384 1 snd_soc_core
snd_hda_codec_hdmi 86016 2
libphy 172032 3 r8169,mdio_devres,realtek
mei 172032 5 mei_hdcp,mei_pxp,mei_me
btbcm 24576 1 btusb
iwlwifi 491520 1 iwlmvm
snd_hda_intel 61440 4
btintel 45056 1 btusb
snd_intel_dspcfg 36864 3 snd_hda_intel,snd_sof,snd_sof_intel_hda_common
intel_lpss_pci 28672 0
snd_intel_sdw_acpi 20480 2 snd_sof_intel_hda_common,snd_intel_dspcfg
btmtk 16384 1 btusb
intel_lpss 16384 1 intel_lpss_pci
idma64 20480 0
cfg80211 1118208 3 iwlmvm,iwlwifi,mac80211
snd_hda_codec 188416 5 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec_realtek,snd_soc_hdac_hda
bluetooth 942080 46 btrtl,btmtk,btintel,btbcm,bnep,btusb,rfcomm
snd_hda_core 118784 9 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_ext_core,snd_hda_codec,snd_hda_codec_realtek,snd_sof_intel_hda_common,snd_soc_hdac_hda,snd_sof_intel_hda
snd_hwdep 16384 2 snd_usb_audio,snd_hda_codec
processor_thermal_device_pci_legacy 16384 0
snd_pcm 172032 12 snd_hda_codec_hdmi,snd_hda_intel,snd_usb_audio,snd_hda_codec,soundwire_intel,snd_sof,snd_sof_intel_hda_common,snd_compress,snd_soc_core,snd_sof_utils,snd_hda_core,snd_pcm_dmaengine
processor_thermal_device 20480 1 processor_thermal_device_pci_legacy
processor_thermal_rfim 16384 1 processor_thermal_device
snd_timer 49152 1 snd_pcm
processor_thermal_mbox 16384 2 processor_thermal_rfim,processor_thermal_device
ecdh_generic 16384 2 bluetooth
ucsi_acpi 16384 0
processor_thermal_rapl 20480 1 processor_thermal_device
snd 131072 31 snd_hda_codec_generic,snd_seq_device,snd_hda_codec_hdmi,snd_hwdep,snd_hda_intel,snd_usb_audio,snd_usbmidi_lib,snd_hda_codec,snd_hda_codec_realtek,snd_sof,snd_timer,snd_compress,snd_soc_core,snd_pcm,snd_rawmidi
intel_rapl_common 32768 2 intel_rapl_msr,processor_thermal_rapl
typec_ucsi 53248 1 ucsi_acpi
thunderbolt 401408 0
intel_vsec 20480 0
soundcore 16384 1 snd
intel_soc_dts_iosf 20480 1 processor_thermal_device_pci_legacy
typec 90112 1 typec_ucsi
igen6_edac 32768 0
roles 16384 1 typec_ucsi
i2c_hid_acpi 16384 0
i2c_hid 40960 1 i2c_hid_acpi
int3403_thermal 20480 0
int340x_thermal_zone 20480 2 int3403_thermal,processor_thermal_device
int3400_thermal 20480 0
acpi_thermal_rel 16384 1 int3400_thermal
acpi_tad 20480 0
asus_wireless 20480 0
acpi_pad 24576 0
mac_hid 16384 0
pkcs8_key_parser 16384 0
crypto_user 24576 0
asus_nb_wmi 28672 0
asus_wmi 65536 1 asus_nb_wmi
ledtrig_audio 16384 2 snd_hda_codec_generic,asus_wmi
sparse_keymap 16384 1 asus_wmi
platform_profile 16384 1 asus_wmi
rfkill 32768 11 iwlmvm,asus_wmi,bluetooth,cfg80211
fuse 176128 3
acpi_call 16384 0
bpf_preload 24576 0
ip_tables 36864 0
x_tables 57344 1 ip_tables
ext4 1015808 1
crc32c_generic 16384 0
crc16 16384 2 bluetooth,ext4
mbcache 16384 1 ext4
jbd2 188416 1 ext4
i915 3149824 380
nvme 61440 3
serio_raw 20480 0
atkbd 36864 0
nvme_core 208896 5 nvme
libps2 20480 1 atkbd
drm_buddy 20480 1 i915
nvme_common 24576 1 nvme_core
vivaldi_fmap 16384 1 atkbd
intel_gtt 28672 1 i915
spi_intel_pci 16384 0
drm_display_helper 180224 1 i915
spi_intel 28672 1 spi_intel_pci
crc32c_intel 24576 3
cec 81920 2 drm_display_helper,i915
xhci_pci 20480 0
ttm 94208 1 i915
vmd 24576 0
xhci_pci_renesas 24576 1 xhci_pci
wmi 45056 2 asus_wmi,wmi_bmof
i8042 49152 1 asus_nb_wmi
serio 28672 4 serio_raw,atkbd,i8042
video 65536 2 asus_wmi,i915
lsmod after prime-switch (diff shows some changes, but, as I can see, list of modules stays the same):
Module Size Used by
snd_usb_audio 397312 2
snd_usbmidi_lib 45056 1 snd_usb_audio
snd_rawmidi 49152 1 snd_usbmidi_lib
snd_seq_device 16384 1 snd_rawmidi
mc 73728 1 snd_usb_audio
usbhid 73728 0
tun 61440 2
uhid 20480 1
ccm 20480 6
rfcomm 90112 16
nvidia 61218816 24
cmac 16384 3
algif_hash 16384 1
algif_skcipher 16384 1
af_alg 36864 6 algif_hash,algif_skcipher
snd_sof_pci_intel_tgl 16384 0
intel_tcc_cooling 16384 0
nf_tables 286720 315
snd_sof_intel_hda_common 180224 1 snd_sof_pci_intel_tgl
x86_pkg_temp_thermal 20480 0
intel_powerclamp 20480 0
soundwire_intel 53248 1 snd_sof_intel_hda_common
libcrc32c 16384 1 nf_tables
soundwire_generic_allocation 16384 1 soundwire_intel
kvm_intel 389120 0
soundwire_cadence 45056 1 soundwire_intel
snd_sof_intel_hda 20480 1 snd_sof_intel_hda_common
nfnetlink 20480 1 nf_tables
snd_sof_pci 24576 2 snd_sof_intel_hda_common,snd_sof_pci_intel_tgl
snd_sof_xtensa_dsp 20480 1 snd_sof_intel_hda_common
kvm 1138688 1 kvm_intel
bnep 32768 2
irqbypass 16384 1 kvm
snd_sof 307200 2 snd_sof_pci,snd_sof_intel_hda_common
crct10dif_pclmul 16384 1
crc32_pclmul 16384 0
snd_sof_utils 20480 1 snd_sof
polyval_clmulni 16384 0
iTCO_wdt 16384 0
coretemp 20480 0
polyval_generic 16384 1 polyval_clmulni
snd_soc_hdac_hda 28672 1 snd_sof_intel_hda_common
joydev 28672 0
gf128mul 16384 1 polyval_generic
mousedev 24576 0
snd_hda_ext_core 36864 3 snd_sof_intel_hda_common,snd_soc_hdac_hda,snd_sof_intel_hda
intel_pmc_bxt 16384 1 iTCO_wdt
ghash_clmulni_intel 16384 0
iTCO_vendor_support 16384 1 iTCO_wdt
snd_soc_acpi_intel_match 73728 2 snd_sof_intel_hda_common,snd_sof_pci_intel_tgl
mei_hdcp 24576 0
mei_pxp 20480 0
snd_soc_acpi 16384 2 snd_soc_acpi_intel_match,snd_sof_intel_hda_common
aesni_intel 393216 8
soundwire_bus 126976 3 soundwire_intel,soundwire_generic_allocation,soundwire_cadence
iwlmvm 524288 0
r8169 102400 0
vfat 24576 1
crypto_simd 16384 1 aesni_intel
pmt_telemetry 16384 0
cryptd 24576 3 crypto_simd,ghash_clmulni_intel
hid_multitouch 32768 0
intel_rapl_msr 20480 0
pmt_class 16384 1 pmt_telemetry
fat 98304 1 vfat
snd_soc_core 393216 4 soundwire_intel,snd_sof,snd_sof_intel_hda_common,snd_soc_hdac_hda
intel_cstate 20480 0
realtek 36864 1
spi_nor 118784 0
btusb 65536 0
mdio_devres 16384 1 r8169
snd_compress 28672 1 snd_soc_core
mac80211 1298432 1 iwlmvm
intel_uncore 217088 0
snd_hda_codec_realtek 172032 1
i2c_i801 45056 0
ac97_bus 16384 1 snd_soc_core
wmi_bmof 16384 0
pcspkr 16384 0
mtd 90112 3 spi_nor
btrtl 28672 1 btusb
mei_me 53248 2
libarc4 16384 1 mac80211
i2c_smbus 20480 1 i2c_i801
snd_hda_codec_generic 98304 1 snd_hda_codec_realtek
snd_pcm_dmaengine 16384 1 snd_soc_core
snd_hda_codec_hdmi 86016 2
libphy 172032 3 r8169,mdio_devres,realtek
mei 172032 5 mei_hdcp,mei_pxp,mei_me
btbcm 24576 1 btusb
iwlwifi 491520 1 iwlmvm
snd_hda_intel 61440 4
btintel 45056 1 btusb
snd_intel_dspcfg 36864 3 snd_hda_intel,snd_sof,snd_sof_intel_hda_common
intel_lpss_pci 28672 0
snd_intel_sdw_acpi 20480 2 snd_sof_intel_hda_common,snd_intel_dspcfg
btmtk 16384 1 btusb
intel_lpss 16384 1 intel_lpss_pci
idma64 20480 0
cfg80211 1118208 3 iwlmvm,iwlwifi,mac80211
snd_hda_codec 188416 5 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec_realtek,snd_soc_hdac_hda
bluetooth 942080 46 btrtl,btmtk,btintel,btbcm,bnep,btusb,rfcomm
snd_hda_core 118784 9 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_ext_core,snd_hda_codec,snd_hda_codec_realtek,snd_sof_intel_hda_common,snd_soc_hdac_hda,snd_sof_intel_hda
snd_hwdep 16384 2 snd_usb_audio,snd_hda_codec
processor_thermal_device_pci_legacy 16384 0
snd_pcm 172032 12 snd_hda_codec_hdmi,snd_hda_intel,snd_usb_audio,snd_hda_codec,soundwire_intel,snd_sof,snd_sof_intel_hda_common,snd_compress,snd_soc_core,snd_sof_utils,snd_hda_core,snd_pcm_dmaengine
processor_thermal_device 20480 1 processor_thermal_device_pci_legacy
processor_thermal_rfim 16384 1 processor_thermal_device
snd_timer 49152 1 snd_pcm
processor_thermal_mbox 16384 2 processor_thermal_rfim,processor_thermal_device
ecdh_generic 16384 2 bluetooth
ucsi_acpi 16384 0
processor_thermal_rapl 20480 1 processor_thermal_device
snd 131072 27 snd_hda_codec_generic,snd_seq_device,snd_hda_codec_hdmi,snd_hwdep,snd_hda_intel,snd_usb_audio,snd_usbmidi_lib,snd_hda_codec,snd_hda_codec_realtek,snd_sof,snd_timer,snd_compress,snd_soc_core,snd_pcm,snd_rawmidi
intel_rapl_common 32768 2 intel_rapl_msr,processor_thermal_rapl
typec_ucsi 53248 1 ucsi_acpi
thunderbolt 401408 0
intel_vsec 20480 0
soundcore 16384 1 snd
intel_soc_dts_iosf 20480 1 processor_thermal_device_pci_legacy
typec 90112 1 typec_ucsi
igen6_edac 32768 0
roles 16384 1 typec_ucsi
i2c_hid_acpi 16384 0
i2c_hid 40960 1 i2c_hid_acpi
int3403_thermal 20480 0
int340x_thermal_zone 20480 2 int3403_thermal,processor_thermal_device
int3400_thermal 20480 0
acpi_thermal_rel 16384 1 int3400_thermal
acpi_tad 20480 0
asus_wireless 20480 0
acpi_pad 24576 0
mac_hid 16384 0
pkcs8_key_parser 16384 0
crypto_user 24576 0
asus_nb_wmi 28672 0
asus_wmi 65536 1 asus_nb_wmi
ledtrig_audio 16384 2 snd_hda_codec_generic,asus_wmi
sparse_keymap 16384 1 asus_wmi
platform_profile 16384 1 asus_wmi
rfkill 32768 11 iwlmvm,asus_wmi,bluetooth,cfg80211
fuse 176128 3
acpi_call 16384 0
bpf_preload 24576 0
ip_tables 36864 0
x_tables 57344 1 ip_tables
ext4 1015808 1
crc32c_generic 16384 0
crc16 16384 2 bluetooth,ext4
mbcache 16384 1 ext4
jbd2 188416 1 ext4
i915 3149824 122
nvme 61440 3
serio_raw 20480 0
atkbd 36864 0
nvme_core 208896 5 nvme
libps2 20480 1 atkbd
drm_buddy 20480 1 i915
nvme_common 24576 1 nvme_core
vivaldi_fmap 16384 1 atkbd
intel_gtt 28672 1 i915
spi_intel_pci 16384 0
drm_display_helper 180224 1 i915
spi_intel 28672 1 spi_intel_pci
crc32c_intel 24576 3
cec 81920 2 drm_display_helper,i915
xhci_pci 20480 0
ttm 94208 1 i915
vmd 24576 0
xhci_pci_renesas 24576 1 xhci_pci
wmi 45056 2 asus_wmi,wmi_bmof
i8042 49152 1 asus_nb_wmi
serio 28672 4 serio_raw,atkbd,i8042
video 65536 2 asus_wmi,i915
Offline
lsmod before prime-run
?
At no point nvidia_drm or nvidia_modeset seem to be loaded?
https://wiki.archlinux.org/title/NVIDIA … de_setting and check whether they are during the X11 session on nvidia.
Offline
Switching to dedicated GPU with optimus-manager --switch or with direct kernel parameter optimus-manager.startup=nvidia leds to succesfull switch
lsmod (nvidai modules are loaded):
Module Size Used by
tun 61440 2
uhid 20480 1
ccm 20480 6
rfcomm 90112 16
nvidia_drm 73728 41
nvidia_modeset 1503232 77 nvidia_drm
nvidia 61218816 3534 nvidia_modeset
cmac 16384 3
algif_hash 16384 1
algif_skcipher 16384 1
af_alg 36864 6 algif_hash,algif_skcipher
snd_sof_pci_intel_tgl 16384 0
snd_sof_intel_hda_common 180224 1 snd_sof_pci_intel_tgl
soundwire_intel 53248 1 snd_sof_intel_hda_common
intel_tcc_cooling 16384 0
soundwire_generic_allocation 16384 1 soundwire_intel
x86_pkg_temp_thermal 20480 0
nf_tables 286720 315
soundwire_cadence 45056 1 soundwire_intel
intel_powerclamp 20480 0
libcrc32c 16384 1 nf_tables
snd_sof_intel_hda 20480 1 snd_sof_intel_hda_common
kvm_intel 389120 0
snd_sof_pci 24576 2 snd_sof_intel_hda_common,snd_sof_pci_intel_tgl
nfnetlink 20480 1 nf_tables
bnep 32768 2
coretemp 20480 0
snd_sof_xtensa_dsp 20480 1 snd_sof_intel_hda_common
kvm 1138688 1 kvm_intel
snd_sof 307200 2 snd_sof_pci,snd_sof_intel_hda_common
irqbypass 16384 1 kvm
snd_sof_utils 20480 1 snd_sof
crct10dif_pclmul 16384 1
snd_soc_hdac_hda 28672 1 snd_sof_intel_hda_common
mousedev 24576 0
vfat 24576 1
crc32_pclmul 16384 0
iTCO_wdt 16384 0
polyval_clmulni 16384 0
snd_hda_ext_core 36864 3 snd_sof_intel_hda_common,snd_soc_hdac_hda,snd_sof_intel_hda
fat 98304 1 vfat
intel_pmc_bxt 16384 1 iTCO_wdt
polyval_generic 16384 1 polyval_clmulni
snd_soc_acpi_intel_match 73728 2 snd_sof_intel_hda_common,snd_sof_pci_intel_tgl
pmt_telemetry 16384 0
gf128mul 16384 1 polyval_generic
mei_pxp 20480 0
mei_hdcp 24576 0
iTCO_vendor_support 16384 1 iTCO_wdt
snd_soc_acpi 16384 2 snd_soc_acpi_intel_match,snd_sof_intel_hda_common
ghash_clmulni_intel 16384 0
hid_multitouch 32768 0
pmt_class 16384 1 pmt_telemetry
aesni_intel 393216 8
soundwire_bus 126976 3 soundwire_intel,soundwire_generic_allocation,soundwire_cadence
intel_rapl_msr 20480 0
crypto_simd 16384 1 aesni_intel
cryptd 24576 3 crypto_simd,ghash_clmulni_intel
snd_soc_core 393216 4 soundwire_intel,snd_sof,snd_sof_intel_hda_common,snd_soc_hdac_hda
intel_cstate 20480 0
iwlmvm 524288 0
intel_uncore 217088 0
spi_nor 118784 0
pcspkr 16384 0
r8169 102400 0
snd_compress 28672 1 snd_soc_core
snd_hda_codec_realtek 172032 1
btusb 65536 0
i2c_i801 45056 0
ac97_bus 16384 1 snd_soc_core
realtek 36864 1
wmi_bmof 16384 0
mtd 90112 3 spi_nor
snd_pcm_dmaengine 16384 1 snd_soc_core
mac80211 1298432 1 iwlmvm
i2c_smbus 20480 1 i2c_i801
mei_me 53248 2
btrtl 28672 1 btusb
mdio_devres 16384 1 r8169
libarc4 16384 1 mac80211
snd_hda_codec_generic 98304 1 snd_hda_codec_realtek
libphy 172032 3 r8169,mdio_devres,realtek
snd_hda_codec_hdmi 86016 2
mei 172032 5 mei_hdcp,mei_pxp,mei_me
iwlwifi 491520 1 iwlmvm
btbcm 24576 1 btusb
snd_hda_intel 61440 4
snd_usb_audio 397312 2
btintel 45056 1 btusb
snd_intel_dspcfg 36864 3 snd_hda_intel,snd_sof,snd_sof_intel_hda_common
intel_lpss_pci 28672 0
intel_lpss 16384 1 intel_lpss_pci
snd_intel_sdw_acpi 20480 2 snd_sof_intel_hda_common,snd_intel_dspcfg
btmtk 16384 1 btusb
snd_usbmidi_lib 45056 1 snd_usb_audio
cfg80211 1118208 3 iwlmvm,iwlwifi,mac80211
snd_hda_codec 188416 5 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec_realtek,snd_soc_hdac_hda
snd_rawmidi 49152 1 snd_usbmidi_lib
idma64 20480 0
bluetooth 942080 46 btrtl,btmtk,btintel,btbcm,bnep,btusb,rfcomm
snd_hda_core 118784 9 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_ext_core,snd_hda_codec,snd_hda_codec_realtek,snd_sof_intel_hda_common,snd_soc_hdac_hda,snd_sof_intel_hda
snd_seq_device 16384 1 snd_rawmidi
mc 73728 1 snd_usb_audio
snd_hwdep 16384 2 snd_usb_audio,snd_hda_codec
snd_pcm 172032 12 snd_hda_codec_hdmi,snd_hda_intel,snd_usb_audio,snd_hda_codec,soundwire_intel,snd_sof,snd_sof_intel_hda_common,snd_compress,snd_soc_core,snd_sof_utils,snd_hda_core,snd_pcm_dmaengine
processor_thermal_device_pci_legacy 16384 0
thunderbolt 401408 0
ecdh_generic 16384 2 bluetooth
processor_thermal_device 20480 1 processor_thermal_device_pci_legacy
snd_timer 49152 1 snd_pcm
processor_thermal_rfim 16384 1 processor_thermal_device
processor_thermal_mbox 16384 2 processor_thermal_rfim,processor_thermal_device
snd 131072 27 snd_hda_codec_generic,snd_seq_device,snd_hda_codec_hdmi,snd_hwdep,snd_hda_intel,snd_usb_audio,snd_usbmidi_lib,snd_hda_codec,snd_hda_codec_realtek,snd_sof,snd_timer,snd_compress,snd_soc_core,snd_pcm,snd_rawmidi
processor_thermal_rapl 20480 1 processor_thermal_device
intel_vsec 20480 0
soundcore 16384 1 snd
ucsi_acpi 16384 0
intel_rapl_common 32768 2 intel_rapl_msr,processor_thermal_rapl
typec_ucsi 53248 1 ucsi_acpi
intel_soc_dts_iosf 20480 1 processor_thermal_device_pci_legacy
typec 90112 1 typec_ucsi
igen6_edac 32768 0
roles 16384 1 typec_ucsi
i2c_hid_acpi 16384 0
int3403_thermal 20480 0
i2c_hid 40960 1 i2c_hid_acpi
int340x_thermal_zone 20480 2 int3403_thermal,processor_thermal_device
joydev 28672 0
int3400_thermal 20480 0
acpi_tad 20480 0
acpi_thermal_rel 16384 1 int3400_thermal
asus_wireless 20480 0
acpi_pad 24576 0
mac_hid 16384 0
pkcs8_key_parser 16384 0
crypto_user 24576 0
asus_nb_wmi 28672 0
asus_wmi 65536 1 asus_nb_wmi
ledtrig_audio 16384 2 snd_hda_codec_generic,asus_wmi
sparse_keymap 16384 1 asus_wmi
platform_profile 16384 1 asus_wmi
rfkill 32768 11 iwlmvm,asus_wmi,bluetooth,cfg80211
fuse 176128 3
acpi_call 16384 0
bpf_preload 24576 0
ip_tables 36864 0
x_tables 57344 1 ip_tables
ext4 1015808 1
crc32c_generic 16384 0
crc16 16384 2 bluetooth,ext4
mbcache 16384 1 ext4
jbd2 188416 1 ext4
usbhid 73728 0
i915 3149824 4
nvme 61440 3
serio_raw 20480 0
atkbd 36864 0
nvme_core 208896 5 nvme
libps2 20480 1 atkbd
vivaldi_fmap 16384 1 atkbd
nvme_common 24576 1 nvme_core
drm_buddy 20480 1 i915
intel_gtt 28672 1 i915
drm_display_helper 180224 1 i915
spi_intel_pci 16384 0
crc32c_intel 24576 3
cec 81920 2 drm_display_helper,i915
spi_intel 28672 1 spi_intel_pci
xhci_pci 20480 0
vmd 24576 0
xhci_pci_renesas 24576 1 xhci_pci
ttm 94208 1 i915
i8042 49152 1 asus_nb_wmi
wmi 45056 2 asus_wmi,wmi_bmof
serio 28672 4 serio_raw,atkbd,i8042
video 65536 2 asus_wmi,i915
glxinfo | grep Open:
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: NVIDIA GeForce RTX 3050 Laptop GPU/PCIe/SSE2
OpenGL core profile version string: 4.6.0 NVIDIA 525.60.11
OpenGL core profile shading language version string: 4.60 NVIDIA
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 4.6.0 NVIDIA 525.60.11
OpenGL shading language version string: 4.60 NVIDIA
OpenGL context flags: (none)
OpenGL profile mask: (none)
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.2 NVIDIA 525.60.11
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
OpenGL ES profile extensions:
Last edited by GoracioNewport (2022-12-14 08:30:30)
Offline
That seems to have not been an issue anyway.
Theses here
nvidia_drm 73728 41
nvidia_modeset 1503232 77 nvidia_drm
are the interesting modules and the previously linked "nvidia_drm.modeset=1" would have been the relevant parameter…
Is the lsmod output before or after enabling drm?
If you just enabled the latter, the only interesting question is whether you can now switch back.
Btw. when you ran prime-switch directly, was that while there was any running X11 server (ie. from with a plasma session or while the SDDM greeter was up)?
Cause that'd have been pointless.
Offline
Just to recap: I can switch to nvidia mode with optimus-manager without a problem, but when I try to switch back I just get black screen. Restarting sddm doesn't fix the issue.
However, I made an interesting discovery.
Btw. when you ran prime-switch directly, was that while there was any running X11 server (ie. from with a plasma session or while the SDDM greeter was up)?
Yes, I did prime-switch from GUI, didn't know I had to do it in VT. But when I try to do prime-run in VT and do sudo systemctl restart sddm, I have nvidia (not nvidia_drm or others) module loaded in my lsmod
Offline
You first need to "sudo systemctl stop sddm" before you "sudo prime-switch" and then "sudo systemctl start sddm" to make this a meaningful test.
Offline
Same behaviour, I did "sudo systemctl stop sddm", then prime-switch gave me no output, then "sudo systemctl start sddm", and logged in. lsmod gives the same output (only "nvidia" module is loaded), but glxinfo says that integrated graphics are used
Offline
The important part is that the switch now works what means that the SDDM hook failing is the main cause.
The hook is provided by optimus-manager, so you should raise a bug there. I guess it expects to unload the nvidia driver while that's still (or again) in use by SDDM and aborts because of the failure instead of eg. scheduling the removal.
Offline
Switching to LightDM solved this issue. Thank you, seth and V1del, everything works fine now.
So what we did basically:
1) Installed bbswitch package
2) Manually provided BusID options to /etc/optimus-manager/xorg/nvidia-mode/nvidia-gpu.conf and /etc/optimus-manager/xorg/integrated-mode/integrated-gpu.conf according to "lspci | grep -e VGA -e 3D" output
3) Changed display manager to LightDM
Thanks again, have a good day!
Offline