Askannz / optimus-manager

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

HDMI still disconnected after switching ot Nvidia #523

Closed Pinkolik closed 5 days ago

Pinkolik commented 1 year ago

Describe the bug Hello! I have a device with Intel Graphics and Nvidia, it has multiple video outputs (HDMI, mini-display) which are connected to GPU, which means they're not accessible when running in integrated graphics mode. But even when I switch to Nvidia xrandr still says that HDMI is disconnected.

System info Please include :

Logs xrandr output


Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 16384 x 16384
eDP-1 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 381mm x 214mm
   1920x1080    144.00*+  60.01    59.97    59.96    60.08    59.93  
   1680x1050     59.95    59.88  
   1400x1050     74.76    59.98  
   1600x900      59.99    59.94    59.95    59.82  
   1280x1024     85.02    75.02    60.02  
   1400x900      59.96    59.88  
   1280x960      85.00    60.00  
   1440x810      60.00    59.97  
   1368x768      59.88    59.85  
   1280x800      59.99    59.97    59.81    59.91  
   1152x864      75.00  
   1280x720      60.00    59.99    59.86    59.74  
   1024x768      85.00    75.05    60.04    85.00    75.03    70.07    60.00  
   1024x768i     86.96  
   960x720       85.00    75.00    60.00  
   928x696       75.00    60.05  
   896x672       75.05    60.01  
   1024x576      59.95    59.96    59.90    59.82  
   960x600       59.93    60.00  
   832x624       74.55  
   960x540       59.96    59.99    59.63    59.82  
   800x600       85.00    75.00    70.00    65.00    60.00    85.14    72.19    75.00    60.32    56.25  
   840x525       60.01    59.88  
   864x486       59.92    59.57  
   700x525       74.76    59.98  
   800x450       59.95    59.82  
   640x512       85.02    75.02    60.02  
   700x450       59.96    59.88  
   640x480       85.09    60.00    85.01    72.81    75.00    59.94  
   720x405       59.51    58.99  
   720x400       85.04  
   684x384       59.88    59.85  
   640x400       59.88    59.98    85.08  
   576x432       75.00  
   640x360       59.86    59.83    59.84    59.32  
   640x350       85.08  
   512x384       85.00    75.03    70.07    60.00  
   512x384i      87.06  
   512x288       60.00    59.92  
   416x312       74.66  
   480x270       59.63    59.82  
   400x300       85.27    72.19    75.12    60.32    56.34  
   432x243       59.92    59.57  
   320x240       85.18    72.81    75.00    60.05  
   360x202       59.51    59.13  
   360x200       85.04  
   320x200       85.27  
   320x180       59.84    59.32  
   320x175       85.27  
DP-1 disconnected (normal left inverted right x axis y axis)
HDMI-1 disconnected (normal left inverted right x axis y axis)
DP-2 disconnected (normal left inverted right x axis y axis)
DP-3 disconnected (normal left inverted right x axis y axis)
DP-4 disconnected (normal left inverted right x axis y axis)

Any advice?

rafay99-epic commented 1 year ago

Same is happening to me, I switch to NVIDIA drivers and My external display is connected via a dock and It is not detecting at all. My display is using HDMI and the xrandr is not detecting anything.

nwildner commented 1 week ago

@rafay99-epic @Pinkolik , is this still happening on a more recent version of optimus-manager-git ? My Asus TUF has the same problem where HDMI and mini DP ports are hardwired to the nvidia GPU, but I'm not facing those problems anymore

Since this issue isn't active for the last year and a lot has changed in many aspects of multiple software, we'll keep this case opened for some days and close it if no further comments are provided.

Have a nice week ahead.

rafay99-epic commented 1 week ago

@nwildner Thanks, brother. I switched to optimus-manager-git on Awesome Window Manager. I'm not sure what I did, but it's currently working.

However, there's still one more issue. When I switch from integrated to hybrid mode using Optimus Manager, everything works fine. But when I shut down the machine and reboot, the laptop display does not show anything. I can access the tty session, but Awesome Window Manager does not show up. All my other extensions are working, but my window manager does not display graphics. I have no idea what's going on. Is it my window manager, the graphics card drivers, or Optimus Manager?

Any ideas?

nwildner commented 1 week ago

Sup @rafay99-epic .

So, in your case, you get no video on AwesomeWM when setting to hybrid mode? What login manager are you using?

For me, it is the contrary: If I set to integrated mode, I'll not be able to have output on those ports. It needs to be at least hybrid and nvidia will consume a minimum amount of energy because it is hardwired to those ports...

rafay99-epic commented 1 week ago

@nwildner

Currently, I am using the SDDM login manager, and thanks for the feedback, I solved the problem. It had nothing to do with the drivers or Awesome Window Manager. It was the config file.

I was importing polkit, and that command was not running properly when Awesome Window Manager was loading after the login.

Pinkolik commented 6 days ago

Hello, @nwildner. Last time I tried connecting HDMI to laptop was this January. It was working, however, after some time the video would freeze and I had to restart. I don't know if it's still an issue now, I'll try to check in the following days

nwildner commented 6 days ago

Sup @Pinkolik . Ok, lets wait for your input on this one.

Nvidia also released a lot of updates on their side as well, and driver 550 was pretty fu***d up. I've got random stalls with the classic caps lock blinking behavior of a Kernel crash. I've reported that in this article

https://www.gamingonlinux.com/2024/06/you-may-want-to-avoid-nvidia-driver-550-if-youre-on-a-laptop/

nvidia-dkms version 555 seems to be fine so far.

rafay99-epic commented 6 days ago

Yeah, switching to just Nvidia cards is not stable. Last night, I switched to using only Nvidia drivers, and the animation and UI were quite laggy. But the moment I switched to hybrid mode, everything worked fine and perfectly.

There are still a lot of bugs, and improvements are required.

nwildner commented 6 days ago

Sup @rafay99-epic . Thanks for your report here.

Lets wait for @Pinkolik confirmation on the HDMI disconnection stuff.

Meanwhile, are you able to report all your findings related to "choppy" performance on nvidia mode on the following case?

That will be the case where we will concentrate all reports related to nvidia mode being sluggish :)

rafay99-epic commented 6 days ago

@nwildner Your welcome, brother.

I will be taking a look at this issue.

Pinkolik commented 6 days ago

@nwildner Looks like everything works flawlessly now. No interruptions or freezings. Thank you for your time 💪

nwildner commented 5 days ago

As for the HDMI issue here, I'll then close the case. For the black screen and nvidia tearing/sluggish issues, please refer to the respective cases opened.

Thanks for the feedback and for taking time to report this back after this optimus-manager hiatus.

Have a nice day.