Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Unable to launch graphics if discrete GPU mode is selected at BIOS. #519

Closed
ma-chengyuan opened this issue Sep 23, 2022 · 3 comments
Closed

Comments

@ma-chengyuan
Copy link

Describe the bug
My laptop allows me to select in BIOS whether to boot with switchable graphics or discrete graphics only. In the latter mode the OS will not see the integrated GPU at all. Optimus-manager worked like a charm under switchable graphics mode but under discrete graphics mode it seems to block the system from launching SDDM. The log stopped right at "reached graphics target" and I had to switch to another tty to see what was going on. Of course, optimus manager isn't supposed to be launched when only the discrete GPU is present, but I wonder if it can somehow "fail silently." I tried disabling the systemd service and/or adding a SDDM conf file that override 20-optimus-manager.conf to revert it's changes back to default, but neither seemed to work. Is there's any simple way to temporarily disable optimus-manager entirely for a boot? If so I might write some scripts that runs ahead of optimus-manager and disables the latter when appropriate. Though optimus manager's nvidia mode under switchable graphics does things pretty similar to what discrete graphics mode could offer, I would still like my system to launch under both modes without problem :) Thanks!

System info

  • Distribution: Arch
  • Desktop manager: KDE
  • Display manager: SDDM
  • Laptop model: Lenovo Legion 7 (R9000K2021H). Nvidia RTX 3080 + AMD R9 5900HX
  • The version of optimus-manager: latest stable release (optimus-manager)
  • Custom optimus-manager configuration file at /etc/optimus-manager/optimus-manager.conf:
[amd]
DRI=3
driver=modesetting
tearfree=

[intel]
DRI=3
accel=
driver=modesetting
modeset=yes
tearfree=

[nvidia]
DPI=96
PAT=yes
allow_external_gpus=no
dynamic_power_management=fine
ignore_abi=no
modeset=yes
options=overclocking

[optimus]
auto_logout=yes
pci_power_control=no
pci_remove=no
pci_reset=no
startup_auto_battery_mode=integrated
startup_auto_extpower_mode=nvidia
startup_mode=hybrid
switching=none

Logs

[6] INFO: # Xorg pre-start hook
[6] INFO: Previous state was: {'type': 'pending_pre_xorg_start', 'requested_mode': 'hybrid', 'current_mode': None}
[7] INFO: Requested mode is: hybrid
[663] INFO: Available modules: ['nouveau', 'nvidia', 'nvidia_drm', 'nvidia_modeset', 'nvidia_uvm']
[663] INFO: Unloading modules ['nouveau'] (if loaded)
[665] INFO: switching=none, nothing to do
[677] ERROR: Xorg pre-start setup error
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 22, in setup_kernel_state
    _nvidia_up(config, hybrid=(requested_mode == "hybrid"))
  File "/usr/lib/python3.10/site-packages/optimus_manager/kernel.py", line 81, in _nvidia_up
    if not pci.is_nvidia_visible():
  File "/usr/lib/python3.10/site-packages/optimus_manager/pci.py", line 67, in is_nvidia_visible
    bus_ids = get_gpus_bus_ids(notation_fix=False)
  File "/usr/lib/python3.10/site-packages/optimus_manager/pci.py", line 100, in get_gpus_bus_ids
    raise PCIError("Cannot find the integrated GPU. Is this an Optimus system ?")
optimus_manager.pci.PCIError: Cannot find the integrated GPU. Is this an Optimus system ?
[678] INFO: Removing /etc/X11/xorg.conf.d/10-optimus-manager.conf (if present)
[678] INFO: Writing state {'type': 'pre_xorg_start_failed', 'switch_id': '20220922T201655', 'requested_mode': 'hybrid'}
[14] INFO: # Daemon pre-start hook
[14] INFO: Removing /etc/X11/xorg.conf.d/10-optimus-manager.conf (if present)
[15] INFO: Copying /etc/optimus-manager/optimus-manager.conf to /var/lib/optimus-manager/tmp/config_copy.conf
[16] INFO: Startup mode is: hybrid
[16] INFO: Writing state {'type': 'pending_pre_xorg_start', 'requested_mode': 'hybrid', 'current_mode': None}
[16] INFO: Daemon pre-start hook completed successfully.
[16] INFO: Calling Xorg pre-start hook.
[1] INFO: # Commands daemon
[1] INFO: Opening UNIX socket
[1] INFO: Awaiting commands
[125196] INFO: Process stop requested
[125196] INFO: Closing and removing the socket...
[125196] INFO: Goodbye !
@ma-chengyuan ma-chengyuan changed the title Unable to launch graphics if discrete GPU is selected at BIOS. Unable to launch graphics if discrete GPU mode is selected at BIOS. Sep 23, 2022
@Klusio19
Copy link

Have you figured it out? I have Identical problem. Also the Legion laptop, but a little bit older (Y540, with intel i7-9750H and GTX1660 Ti), also the Arch Linux, but with the Gnome DE and GDM, also using "dynamic_power_management=fine". The same behaviour: during boot, I am stuck at "reached graphics target". But I have one more, annoying behaviour: I can't even enter tty, because the screen flickers every ~0.5 seconds, and after I enter the tty, it lasts only for that ~0.5 seconds. I can only click the power button to shut down the machine. I have identical logs. I also tried disabling the systemd service in the grub entry, that did not work. Only after uninstalling optimus-manager completely, I can boot with discrete graphics.

@StrikeNP
Copy link

StrikeNP commented Jul 1, 2023

I am also having this issue on my Razer Blade 15 (2021 base) with RTX 3070, linux kernel 6.3.9-arch1-1

Update:
Through some more reading, it appears that this may be due to an incompatibility with the linux kernel 6+. After uninstalling optimus-manager I was able to use the gpu again (but obviously lost the iGPU only mode), disabling the systemctl service did not seem to be enough to resolve the issue for me.
Considering the developer is not actively supporting this project and looking to hand it off, I decided to look for another optimus solution.

@nwildner
Copy link
Collaborator

nwildner commented Jul 1, 2024

Sup folks. Let's track this on #533

Currently, optimus-manager does not handle a missing iGPU and will raise an "it is a Desktop" exception.

Closing as a duplicate. Feel free to contribute with the other case.

@nwildner nwildner closed this as completed Jul 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants