Askannz / optimus-manager

A Linux program to handle GPU switching on Optimus laptops.
MIT License
2.3k stars 170 forks source link

Failed switching to Nvidia After Latest Update #578

Closed Hikmat-E-Ustad closed 1 month ago

Hikmat-E-Ustad commented 1 month ago

optimus-manager-git-1:r744.301a279.python3.12-1 update from AUR broke switching to Nvidia

optimus-manager --switch nvidia --no-confirm 
hikmateustad@hikmateustad-dell ~ % yay -S optimus-manager-git                              
Sync Explicit (1): optimus-manager-git-1:r744.301a279.python3.12-1
[sudo] password for hikmateustad: 
warning: optimus-manager-git-1:r744.301a279.python3.12-1 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...

Packages (1) optimus-manager-git-1:r744.301a279.python3.12-1

Total Installed Size:  0.35 MiB
Net Upgrade Size:      0.00 MiB

:: Proceed with installation? [Y/n] ^C
Interrupt signal received

 -> error installing repo packages
1 hikmateustad@hikmateustad-dell ~ %                                                                                                                 :(
hikmateustad@hikmateustad-dell ~ % archey
                                 User: hikmateustad
               +                 Hostname: hikmateustad-dell
               #                 Model: Dell Inc. Inspiron One 2320 00
              ###                Distro: Arch Linux x86_64
             #####               Kernel: Linux 6.10.10-zen1-1-zen
             ######              Uptime: 31 minutes
            ; #####;             Load Average: 1.07 1.27 1.68
           +##.#####             Processes: 234
          +##########            Window Manager: KWin (X11)
         #############;          Desktop Environment: KDE
        ###############+         Shell: /bin/zsh
       #######   #######         Terminal: Konsole ██ ██ ██ ██ ██ ██ ██
     .######;     ;###;`".       Packages: 2234
    .#######;     ;#####.        Temperature: 56.0 C (Max. 57.0 C)
    #########.   .########`      CPU: 4 x Intel(R) Core(TM) i5-2400S CPU @ 2.50GHz
   ######'           '######     GPU: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller
  ;####                 ####;    GPU: NVIDIA Corporation GF108M [GeForce GT 525M]
  ##'                     '##    
 #'                         `#   

hikmateustad@hikmateustad-dell ~ % 
  GNU nano 8.2                                           /etc/optimus-manager/optimus-manager.conf                                                      
[amd]
DRI=3
driver=modesetting
tearfree=

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

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

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

Logs

 hikmateustad@hikmateustad-dell ~ % optimus-manager --status
ERROR: the optimus-manager service failed boot-time startup.
Log at /var/log/optimus-manager/daemon/daemon-20240922T092751.log
Error loading config file : Cannot find header for section [optimus]
1 hikmateustad@hikmateustad-dell ~ %    

Log file

 GNU nano 8.2                                   /var/log/optimus-manager/daemon/daemon-20240922T092751.log                                             
[325] INFO: # Daemon pre-start hook
[326] INFO: Removing /etc/X11/xorg.conf.d/10-optimus-manager.conf (if present)
[385] INFO: Copying /etc/optimus-manager/optimus-manager.conf to /var/lib/optimus-manager/tmp/config_copy.conf
[401] ERROR: Daemon startup error
Traceback (most recent call last):
  File "/usr/lib/python3.12/site-packages/optimus_manager/hooks/pre_daemon_start.py", line 27, in main
    config = load_config()
             ^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/optimus_manager/config.py", line 16, in load_config
    config = _load_config()
             ^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/optimus_manager/config.py", line 28, in _load_config
    _validate_config(base_config)
  File "/usr/lib/python3.12/site-packages/optimus_manager/config.py", line 114, in _validate_config
    raise ConfigError("Cannot find header for section [%s]" % section)
optimus_manager.config.ConfigError: Cannot find header for section [optimus]
[429] INFO: Writing state {'type': 'startup_failed', 'startup_mode': None, 'daemon_run_id': '20240922T092751'}
[1] INFO: # Commands daemon
[1] INFO: Opening UNIX socket
[2] INFO: Awaiting commands
loisgomez commented 1 month ago

Affected by this issue as well

es20490446e commented 1 month ago

I forgot to update the AUR package. Check now 👍

loisgomez commented 1 month ago

Thanks @es20490446e I am still seeing the issue after installing the latest update from the aur package.

image

Hikmat-E-Ustad commented 1 month ago

I confirm the issue still persists even after your update

hikmateustad@hikmateustad-dell ~ % optimus-manager --status
ERROR: the optimus-manager service failed boot-time startup.
Log at /var/log/optimus-manager/daemon/daemon-20240922T160744.log
Error loading config file : Cannot find header for section [optimus]
1 hikmateustad@hikmateustad-dell ~ % nano /var/log/optimus-manager/daemon/daemon-20240922T160744.log
hikmateustad@hikmateustad-dell ~ % 
  GNU nano 8.2                                   /var/log/optimus-manager/daemon/daemon-20240922T160744.log                                             
[525] INFO: # Daemon pre-start hook
[525] INFO: Removing /etc/X11/xorg.conf.d/10-optimus-manager.conf (if present)
[544] INFO: Copying /etc/optimus-manager/optimus-manager.conf to /var/lib/optimus-manager/tmp/config_copy.conf
[570] ERROR: Daemon startup error
Traceback (most recent call last):
  File "/usr/lib/python3.12/site-packages/optimus_manager/hooks/pre_daemon_start.py", line 27, in main
    config = load_config()
             ^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/optimus_manager/config.py", line 16, in load_config
    config = _load_config()
             ^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/optimus_manager/config.py", line 28, in _load_config
    _validate_config(base_config)
  File "/usr/lib/python3.12/site-packages/optimus_manager/config.py", line 114, in _validate_config
    raise ConfigError("Cannot find header for section [%s]" % section)
optimus_manager.config.ConfigError: Cannot find header for section [optimus]
[576] INFO: Writing state {'type': 'startup_failed', 'startup_mode': None, 'daemon_run_id': '20240922T160744'}
[2] INFO: # Commands daemon
[2] INFO: Opening UNIX socket
[2] INFO: Awaiting commands
es20490446e commented 1 month ago

Okay, let me test this more thoroughly...

Feelsonic commented 1 month ago

Same thing for me after update. ERROR: the optimus-manager service failed boot-time startup. Log at /var/log/optimus-manager/daemon/daemon-20240922T184248.log Error loading config file : Cannot find header for section [optimus]

es20490446e commented 1 month ago

It seems fixed now using the AUR package.

Please confirm that it is also working for you.

If not, reopen this issue and comment.

If it is not possible for you to reopen, let me know here.

command: systemctl status optimus-manager
● optimus-manager.service - Optimus Manager Commands Daemon
     Loaded: loaded (/usr/lib/systemd/system/optimus-manager.service; enabled; preset: disabled)
     Active: active (running) since Sun 2024-09-22 19:35:13 CEST; 2min 57s ago
 Invocation: 59cceb54b6ae4b319475c8bce3ae99a2
    Process: 567 ExecStartPre=/usr/bin/python3 -u -m optimus_manager.hooks.pre_daemon_start (code=exi>
    Process: 631 ExecStartPre=/usr/bin/python3 -u -m optimus_manager.hooks.pre_xorg_start (code=exite>
   Main PID: 680 (python3)
      Tasks: 1 (limit: 19001)
     Memory: 15.3M (peak: 17.7M)
        CPU: 305ms
     CGroup: /system.slice/optimus-manager.service
             └─680 /usr/bin/python3 -u -m optimus_manager.daemon

Sep 22 19:35:12 Ultra python3[631]: [30] INFO: switching=none, nothing to do
Sep 22 19:35:12 Ultra python3[631]: [47] INFO: Loading module nvidia
Sep 22 19:35:12 Ultra python3[631]: [49] INFO: Loading module nvidia_drm
Sep 22 19:35:13 Ultra python3[631]: [1281] INFO: Writing to /etc/X11/xorg.conf.d/10-optimus-manager.c>
Sep 22 19:35:13 Ultra python3[631]: [1281] INFO: Writing state {'type': 'pending_post_xorg_start', 's>
Sep 22 19:35:13 Ultra python3[631]: [1281] INFO: Xorg pre-start hook completed successfully.
Sep 22 19:35:13 Ultra systemd[1]: Started Optimus Manager Commands Daemon.
Sep 22 19:35:13 Ultra python3[680]: [1] INFO: # Commands daemon
Sep 22 19:35:13 Ultra python3[680]: [1] INFO: Opening UNIX socket
Sep 22 19:35:13 Ultra python3[680]: [1] INFO: Awaiting commands
es20490446e commented 1 month ago

To better prevent issues like this in the future, inside package, I have also coded some scripts that makes it easy to test changes right away.

es20490446e commented 1 month ago

Wait, I see that there's another issue...

es20490446e commented 1 month ago

So I cannot further reproduce this issue. So I guess it's fixed.

Hikmat-E-Ustad commented 1 month ago

@es20490446e

I cannot even test because for 404's

1 hikmateustad@hikmateustad-dell ~ % yay -S optimus-manager-git optimus-manager-qt
Sync Explicit (2): optimus-manager-qt-1.6.9-3, optimus-manager-git-1:r748.bc57a16.python3.12-1
resolving dependencies...
looking for conflicting packages...
:: optimus-manager-git-1:r748.bc57a16.python3.12-1 and switcheroo-control-2.6-4 are in conflict. Remove switcheroo-control? [y/N] y

Packages (3) switcheroo-control-2.6-4 [removal]  optimus-manager-git-1:r748.bc57a16.python3.12-1  optimus-manager-qt-1.6.9-3

Total Download Size:   0.08 MiB
Total Installed Size:  1.17 MiB
Net Upgrade Size:      1.04 MiB

:: Proceed with installation? [Y/n] 
:: Retrieving packages...
 optimus-manager-git-1:r748.bc57a16.python3.12-1-any.pkg.tar.zst failed to download
error: failed retrieving file 'optimus-manager-git-1:r748.bc57a16.python3.12-1-any.pkg.tar.zst' from cdn-mirror.chaotic.cx : The requested URL returned error: 404
error: failed retrieving file 'optimus-manager-git-1:r748.bc57a16.python3.12-1-any.pkg.tar.zst' from geo-mirror.chaotic.cx : The requested URL returned error: 404
error: failed retrieving file 'optimus-manager-git-1:r748.bc57a16.python3.12-1-any.pkg.tar.zst' from br-mirror.chaotic.cx : The requested URL returned error: 404
error: failed retrieving file 'optimus-manager-git-1:r748.bc57a16.python3.12-1-any.pkg.tar.zst' from bg-mirror.chaotic.cx : The requested URL returned error: 404
error: failed retrieving file 'optimus-manager-git-1:r748.bc57a16.python3.12-1-any.pkg.tar.zst' from ca-mirror.chaotic.cx : The requested URL returned error: 404
error: failed retrieving file 'optimus-manager-git-1:r748.bc57a16.python3.12-1-any.pkg.tar.zst' from cl-mirror.chaotic.cx : The requested URL returned error: 404
error: failed retrieving file 'optimus-manager-git-1:r748.bc57a16.python3.12-1-any.pkg.tar.zst' from de-2-mirror.chaotic.cx : The requested URL returned error: 404
error: failed retrieving file 'optimus-manager-git-1:r748.bc57a16.python3.12-1-any.pkg.tar.zst' from de-3-mirror.chaotic.cx : The requested URL returned error: 404
error: failed retrieving file 'optimus-manager-git-1:r748.bc57a16.python3.12-1-any.pkg.tar.zst' from de-4-mirror.chaotic.cx : The requested URL returned error: 404
error: failed retrieving file 'optimus-manager-git-1:r748.bc57a16.python3.12-1-any.pkg.tar.zst' from fr-mirror.chaotic.cx : The requested URL returned error: 404
error: failed retrieving file 'optimus-manager-git-1:r748.bc57a16.python3.12-1-any.pkg.tar.zst' from gr-mirror.chaotic.cx : The requested URL returned error: 404
error: failed retrieving file 'optimus-manager-git-1:r748.bc57a16.python3.12-1-any.pkg.tar.zst' from in-mirror.chaotic.cx : The requested URL returned error: 404
error: failed retrieving file 'optimus-manager-git-1:r748.bc57a16.python3.12-1-any.pkg.tar.zst' from in-2-mirror.chaotic.cx : The requested URL returned error: 404
error: failed retrieving file 'optimus-manager-git-1:r748.bc57a16.python3.12-1-any.pkg.tar.zst' from in-3-mirror.chaotic.cx : The requested URL returned error: 404
error: failed retrieving file 'optimus-manager-git-1:r748.bc57a16.python3.12-1-any.pkg.tar.zst' from in-4-mirror.chaotic.cx : The requested URL returned error: 404
error: failed retrieving file 'optimus-manager-git-1:r748.bc57a16.python3.12-1-any.pkg.tar.zst' from kr-mirror.chaotic.cx : The requested URL returned error: 404
error: failed retrieving file 'optimus-manager-git-1:r748.bc57a16.python3.12-1-any.pkg.tar.zst' from es-mirror.chaotic.cx : The requested URL returned error: 404
error: failed retrieving file 'optimus-manager-git-1:r748.bc57a16.python3.12-1-any.pkg.tar.zst' from es-2-mirror.chaotic.cx : The requested URL returned error: 404
error: failed retrieving file 'optimus-manager-git-1:r748.bc57a16.python3.12-1-any.pkg.tar.zst' from us-mi-mirror.chaotic.cx : The requested URL returned error: 404
error: failed retrieving file 'optimus-manager-git-1:r748.bc57a16.python3.12-1-any.pkg.tar.zst' from us-tx-mirror.chaotic.cx : The requested URL returned error: 404
error: failed retrieving file 'optimus-manager-git-1:r748.bc57a16.python3.12-1-any.pkg.tar.zst' from us-ut-mirror.chaotic.cx : The requested URL returned error: 404
warning: failed to retrieve some files
error: failed to commit transaction (failed to retrieve some files)
Errors occurred, no packages were upgraded.
 -> error installing repo packages
1 hikmateustad@hikmateustad-dell ~ %     
es20490446e commented 1 month ago

That's an issue with Chaotic AUR.

The package there may take a while to update.

Hikmat-E-Ustad commented 1 month ago

@es20490446e Works