Jump to content

GPU problems ๐Ÿ˜‘

So I did install Debian on bare metal and I don't like my graphics performance. I thought the performance I was getting was very smooth considering hardware acceleration was not being used, until I found out that the GPU is being used by default, which disappointed me. There seems to be a v-sync issue. I see very noticeable tearing when using the system. Hardware accelerated GPU decoding is probably working but I am not sure. I thought my CPU usage was high but I was running a 4k 60 fps video and even on Windows I think it is similar, but if it wasn't working, my CPU usage should go to 100% and video should stutter so I think it works.

ย 

Edit- Also I hate my audio. Maybe I just need to fiddle around with equalizer but oh god I hate drivers!

Microsoft owns my soul.

ย 

Also, Dell is evil, but HP kinda nice.

Link to comment
Share on other sites

Link to post
Share on other sites

What model graohics card do you have? Did you set up the non-FOSS drivers?

I sold my soul for ProSupport.

Link to comment
Share on other sites

Link to post
Share on other sites

5 minutes ago, Needfuldoer said:

What model graohics card do you have? Did you set up the non-FOSS drivers?

"Intel CometLake-U GT2 [UHD Graphics]". Basically the integrated graphics of 10th gen, that's all I have. I have no idea what FOSS drivers are. I installed nothing related to graphics except xorg and my window manager.

Microsoft owns my soul.

ย 

Also, Dell is evil, but HP kinda nice.

Link to comment
Share on other sites

Link to post
Share on other sites

3 minutes ago, Gat Pelsinger said:

I have no idea what FOSS drivers are.

Free & Open-Source Software. Essentially the drivers included in the kernel, which should be the case for both AMD and Intel. You should only need non-FOSS (i.e. proprietary) drivers for Nvidia.

ย 

You may still need to install something like mesa-intel or similar. Not sure on Debian, since I only ever use it on servers.

Remember to either quote or @mention others, so they are notified of your reply

Link to comment
Share on other sites

Link to post
Share on other sites

2 minutes ago, Eigenvektor said:

Free & Open-Source Software. Essentially the drivers included in the kernel, which should be the case for both AMD and Intel. You should only need non-FOSS (i.e. proprietary) drivers for Nvidia.

so whats wrong with my graphics?

Microsoft owns my soul.

ย 

Also, Dell is evil, but HP kinda nice.

Link to comment
Share on other sites

Link to post
Share on other sites

3 minutes ago, Gat Pelsinger said:

so whats wrong with my graphics?

I was editing my previous answer as you posted. It's possible you need to install some additional packages. Have never used Debian on a desktop, since it's really geared towards server use, so not too sure what you'd need. Which desktop environment are you using anyway?

Remember to either quote or @mention others, so they are notified of your reply

Link to comment
Share on other sites

Link to post
Share on other sites

@Eigenvektor

ย 

Looks like I fixed it but I am not sure if this is a good fix.

ย 

At -

/etc/X11/xorg.conf.d/20-intel.conf

ย 

I need to add -

ย 

Section "Device"
    Identifier "Intel Graphics"
    Driver "intel"
    Option "TearFree" "true"
EndSection

ย 

and reboot. Now I can't see tearing. So, that's it? I still cannot say if everything is smooth but is doable. I am using i3wm. Probably yes, I am missing some packages because this is a very bare bones install. I did not install any standard system utilities as well and I had to go as far as installing stuff like sudo and xorg manaully. But, I do remember a few years ago I had tried Manjaro or Linux Mint on my older device, and even on that I had the screen tearing problem. That time I had installed everything out of the box.

Microsoft owns my soul.

ย 

Also, Dell is evil, but HP kinda nice.

Link to comment
Share on other sites

Link to post
Share on other sites

20 minutes ago, Gat Pelsinger said:

Now I can't see tearing. So, that's it?

Sounds good. Similar to what I have in /etc/X11/xorg.conf.d/20-amdgpu.conf for my AMD card:

Spoiler
Section "Device"
        Identifier "AMD"
        Driver "amdgpu"
        Option "VariableRefresh" "true"
        Option "AsyncFlipSecondaries" "true"
EndSection

Though as of now Gnome doesn't actually support VRR yet (should be coming in the next release).

ย 

20 minutes ago, Gat Pelsinger said:

But, I do remember a few years ago I had tried Manjaro or Linux Mint on my older device, and even on that I had the screen tearing problem.

Stuff tends to change a lot when you're talking years. The thing is Debian is geared towards servers and values stability over everything else, so it usually comes with packages that are a lot older than what you'd get on Manjaro, which tends to be cutting edge.

ย 

For example Debian 12 comes with Linux kernel 6.1, which was first released in December 2022, so a fair bit older than Manjaro's default kernel of 6.6 (and you can easily switch to 6.7 or even the 6.8 release candidate). GPU drivers included in the kernel tend to receive a fair amount of updates. At the very least I'd give a recent live-USB a try, no need to install anything.

Remember to either quote or @mention others, so they are notified of your reply

Link to comment
Share on other sites

Link to post
Share on other sites

Freesync has some weird flickering issue last time I used it on my monitor. I typically just disable it in linux.ย 

Sudo make me a sandwichย 

Link to comment
Share on other sites

Link to post
Share on other sites

10 hours ago, Gat Pelsinger said:

@Eigenvektor

ย 

Looks like I fixed it but I am not sure if this is a good fix.

ย 

At -

/etc/X11/xorg.conf.d/20-intel.conf

ย 

I need to add -

ย 

Section "Device"
    Identifier "Intel Graphics"
    Driver "intel"
    Option "TearFree" "true"
EndSection

ย 

and reboot. Now I can't see tearing. So, that's it? I still cannot say if everything is smooth but is doable. I am using i3wm. Probably yes, I am missing some packages because this is a very bare bones install. I did not install any standard system utilities as well and I had to go as far as installing stuff like sudo and xorg manaully. But, I do remember a few years ago I had tried Manjaro or Linux Mint on my older device, and even on that I had the screen tearing problem. That time I had installed everything out of the box.

I have been starting to use wayland and I can say that it is smooth, you should try using that instead of xorg as a whole.ย 

Link to comment
Share on other sites

Link to post
Share on other sites

54 minutes ago, goatedpenguin said:

I have been starting to use wayland and I can say that it is smooth, you should try using that instead of xorg as a whole.ย 

The things that's keeping me off of Wayland for now is a bug where mouse buttons on my graphics tablet are swapped e.g. desktop compared to browser and more importantly there's no replacement for xsetwacom that allows me to define a keyboard shortcut to switch it between screens.

Remember to either quote or @mention others, so they are notified of your reply

Link to comment
Share on other sites

Link to post
Share on other sites

If you dont want OS defaulting to your GPU use onboard connection and change bios settings to internal gpu instead external.

I'm jank tinkerer if it works then it works.

Regardless of compatibility ๐Ÿง๐Ÿ––

Link to comment
Share on other sites

Link to post
Share on other sites

44 minutes ago, BoomerDutch said:

If you dont want OS defaulting to your GPU use onboard connection and change bios settings to internal gpu instead external.

what? I only have integrated gpu.

Microsoft owns my soul.

ย 

Also, Dell is evil, but HP kinda nice.

Link to comment
Share on other sites

Link to post
Share on other sites

14 hours ago, Gat Pelsinger said:

until I found out that the GPU is being used by default

What else did you think it was gonna use?

23 minutes ago, Gat Pelsinger said:

what? I only have integrated gpu.

Yes

I'm jank tinkerer if it works then it works.

Regardless of compatibility ๐Ÿง๐Ÿ––

Link to comment
Share on other sites

Link to post
Share on other sites

Make sure "xserver-xorg-video-intel" is not installed

Install "intel-media-va-driver-non-free"
Set the following in "/etc/environment"

LIBVA_DRIVER_NAME=iHD
VDPAU_DRIVER=va_gl

ย 

Be aware that the only browsers that support Hardware Accelerated Video Decoding are Firefox and Epiphany.

If you decide to use Firefox with Wayland then also add the following to "/etc/environment"

MOZ_ENABLE_WAYLAND=1

ย 

Link to comment
Share on other sites

Link to post
Share on other sites

14 hours ago, Gat Pelsinger said:

Looks like I fixed it but I am not sure if this is a good fix.

ย 

Section "Device"

    Identifier "Intel Graphics"
    Driver "intel"
    Option "TearFree" "true"
EndSection

This setting is specific to the xorg intel driver which has been deprecated for quite awhile. In a properly configured system this should no longer work.
You should be using the modesetting driver which does not currently support TearFree, this feature is left up to your compositor.

Link to comment
Share on other sites

Link to post
Share on other sites

@Nayr438

ย 

I am using the xorg driver. So I am not supposed to use it? And it looks like I need to compile the driver myself? This is where I found it - https://github.com/intel/media-driver?tab=readme-ov-file. Does the Ubuntu one work for debian?

Microsoft owns my soul.

ย 

Also, Dell is evil, but HP kinda nice.

Link to comment
Share on other sites

Link to post
Share on other sites

37 minutes ago, Gat Pelsinger said:

I am using the xorg driver. So I am not supposed to use it?

No. It's in maintenance mode, dropped as a default from most distributions, is considered unsupported, and technically isn't considered compatible with your CPU. The only reason it's kept around is for legacy systems.


The Arch Wiki has some references to this deprecation you can look over, https://wiki.archlinux.org/title/intel_graphics
ย 

Quote
Note:

ย 

ย 

37 minutes ago, Gat Pelsinger said:

And it looks like I need to compile the driver myself? This is where I found it - https://github.com/intel/media-driver?tab=readme-ov-file. Does the Ubuntu one work for debian?

"intel-media-va-driver-non-free" is in the debian non-free repo. A quick search says this will enable the repo, "apt-add-repository non-free"

ย 

ย 

Link to comment
Share on other sites

Link to post
Share on other sites

@Nayr438

ย 

So I installed it but how do I know if it is being utilized or not? Right now, I don't see any difference with my graphics.

Microsoft owns my soul.

ย 

Also, Dell is evil, but HP kinda nice.

Link to comment
Share on other sites

Link to post
Share on other sites

@Nayr438 @Eigenvektor

ย 

My mind is completely overwhelmed with all I am troubleshooting but I think I am getting somewhere. I installed the non-free driver as @Nayr438 and wrote the config file, but I saw no effects. I uninstalled the xorg driver and lost my gui, so I had to install it back. Nonetheless, by running vainfo, I see that my hardware acceleration is setup up correctly, and video playback in firefox runs correctly, even though I uninstalled the non-free driver (read on). Before running the vainfo command, I had a problem where if I go fulls screen in firefox, video playback would jitter and drop frames a lot. I tried the same video in chrome to see it run smoothly, but that was because hardware accelerated GPU decoding wasn't being used at all. I then came across the "modesetting" driver for Intel, and apparently I wasn't using that one. At -

/etc/X11/xorg.conf.d/20-intel.conf

had to change the Driver part from "Intel" to "modesetting" and reboot. Now, video playback in firefox runs correctly, but now there is tearing on the screen, even though

Option "TearFree" "true"

is added. Also adding this line - Option "SwapbuffersWait" "false" does nothing (just to give you more information but don't get overwhelmed).

ย 

One thing I should also add is that graphics feel smoother with tearing on. That is to be expected as V-sync adds latency, but I am not talking about latency. In Windows, v-sync is always on, but graphics is still "smooth" and not necessarily low latency. I don't know what the heck I want but just want to improve my experience.

ย 

Update -

ย 

So the problem of the video playback was the accelmethod that was being used. If I switch to sna or uxa accelmethods, I get that problem. If I do not specify it, I think the driver uses the glamor X accel method which does not give me the problem. But anyways, I heard that the intel media driver is way better than the xorg driver, so I installed the the media driver and also uninstalled the xorg driver, but, in my x11 config, I need to choose the modesetting driver and not the intel driver or else xserver would not start. This all still doesn't fix the tearing problem. Note that I am not use a compositor, but I think enable tear free at driver level would be much better, except I am not able to.

Microsoft owns my soul.

ย 

Also, Dell is evil, but HP kinda nice.

Link to comment
Share on other sites

Link to post
Share on other sites

16 hours ago, Eigenvektor said:

The things that's keeping me off of Wayland for now is a bug where mouse buttons on my graphics tablet are swapped e.g. desktop compared to browser and more importantly there's no replacement for xsetwacom that allows me to define a keyboard shortcut to switch it between screens.

Agreed thats why I am stillย mostlyย using xorg. My purposes for using Linux are mostly dev oriented so xorg works fine since I am not gaming on Linux.ย 

Link to comment
Share on other sites

Link to post
Share on other sites

On 3/15/2024 at 12:18 PM, Gat Pelsinger said:

lso I hate my audio. Maybe I just need to fiddle around with equalizer but oh god I hate drivers!

Try pipewire, debian uses pulseaudio and pipewire is more robust in my experience.ย 

ย 

On 3/15/2024 at 12:18 PM, Gat Pelsinger said:

I thought the performance I was getting was very smooth considering hardware acceleration was not being used

Enable hardware acceleration

ย 

Can you post all your system specs, audio devices and peripherals that you are using for Linux so we can get this driver thing sorted out?ย 

ย 

From what I know currently given the info try doing this:

ย 

Enable the non-free repo in your sources and install the packages:ย firmware-misc-nonfree and intel-microcode.

Link to comment
Share on other sites

Link to post
Share on other sites

1 hour ago, Gat Pelsinger said:

had to change the Driver part from "Intel" to "modesetting" and reboot. Now, video playback in firefox runs correctly, but now there is tearing on the screen, even though

Option "TearFree" "true"

Because that option is currently unsupported, it's left up to your compositor such as kwin (kde) or mutter (gnome). This is something I believe more widely supported under Wayland.

ย 

If you want my opinion, just use something that supports Wayland. xorg-server is moving into deprecated status anyways with distros already talking about dropping it.
I seen mention of i3, maybe consider Sway or Hyprland.

ย 

Funnily TearFree was recently merged into the modesetting driver, but it's not in a stable release and Debian wouldn't see it for probably a couple years if they even still ship xorg at that point.

ย 

21 minutes ago, goatedpenguin said:

Try pipewire, debian uses pulseaudio and pipewire is more robust in my experience.

If this is true, id also use pipewire which has largely replaced pulseaudio in other distros. If you do decide to go Wayland this is also the only way to get screen recording.

Also do make sure your microcode is installed as mentioned by @goatedpenguin

Link to comment
Share on other sites

Link to post
Share on other sites

@Nayr438

ย 

So I thought to revert back to the orignal config where I had the xorg driver and tear free working, but I forgot about the lag problem in video playback on firefox. As I said earlier, the problem also occurred when I used the accelmethod option and set it to either sna or uxa, even using with modesetting.

ย 

Also, apparently modesetting is in the kernel instead of being a separate driver? Because I had tested uninstall both the xorg driver and the intel media driver but having the config set to modesetting but the system still functioned.

ย 

Right now, I tried installing the intel media driver and trying different accelmethod options, but the lag problem doesn't go away. It only goes away with the modesetting driver. You had said earlier to uninstall the xorg driver and only keep the media driver. However, if I uninstall the xorg driver, xserver won't start, probably because my config says Driver "intel". Is it supposed to say something else to use the media driver?

Microsoft owns my soul.

ย 

Also, Dell is evil, but HP kinda nice.

Link to comment
Share on other sites

Link to post
Share on other sites

intel-media-driver is just for hardware accelerated codec support. You enabled it when you set the /etc/environment variables

15 hours ago, Nayr438 said:

Set the following in "/etc/environment"

LIBVA_DRIVER_NAME=iHD
VDPAU_DRIVER=va_gl

You don't need a intel xorg config file, the only accelmethods modesetting even supports is glamor or none.
https://man.archlinux.org/man/modesetting.4

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

ร—